Determining a hidden digit
Think of a positive integer, call it X. Shuffle the decimal digits of X, call the resulting number Y. Subtract the smaller of X,Y from the larger, call the difference D. D has the following property: Any non-zero decimal digit of D can be determined from the remaining digits. That is, if you ask someone to hide any one of the non-zero digits in the decimal representation of D, then you can try to impress the other person by figuring out the hidden digit from the remaining digits. How is this done? Why does it work?
The short short version is that this is an artifact of the idea of casting out nines: the sum of a number’s digits gives the same remainder on division by 9 that the original number does. For instance, 431=9×47+8, and 4+3+1=8. Since X and Y have the same digits, they have the same digit-sum, so they have the same remainder on dividing by 9. But this means that their difference D is a multiple of 9; and that means that D’s digit-sum is a multiple of 9 (since it must give the same remainder on dividing by 9 that D does). When a non-zero digit is hidden, it’ll reduce the digit-sum of D by that much, so all you have to compute is the digit from 1—9 (and note that there will always be a unique digit – this is why the ‘nonzero’ restriction is there, because otherwise there’d be no way to tell a zero from a nine) to add to the digit-sum of D to bring it up to a multiple of 9.
If you’re interested in the concept, type in the phrase “casting out nines” in your search engine of choice.
In the example you gave, the basic idea is that you know that X and Y have the same remainder when divided by 9 since they share the same digits1. Hence, the difference must be a multiple of 9. Since we know the sum of the digits of any multiple of 9 is itself a multiple of 9, you can deduce the last digit.
(In the case that the sum is itself a multiple of 9, you can use the fact that they hid a non-zero digit to deduce that the remaining digit is in fact a 9.)
Your Answer
More puzzles to try-
The Botanist
At a farm, you are asked to identify these common plants from their blooms:Read More »Not born but drawn
Not born, but from a Mother’s body drawn, It hang until half of it is gone. It sleep in a ...Read More »What am I?
I can be flipped and broken but I never move. I can be closed, and opened, and sometimes removed. I ...Read More »Legs counting riddles
You walk into the bedroom and on the bed there are 4 monkeys,3 goats,5 dogs,2 cats, and 3 birds, How ...Read More »Of no use
It is of no use to one, yet absolute bliss to two : The small boy gets it for nothing, ...Read More »How do you send the valuable item so that it doesn’t go unlocked?
Imagine you want to send a valuable item to your friend. You have big enough box on which you can ...Read More »FIND THE CORRECT LABELL
There are three boxes. One is labeled “APPLES” another is labeled “ORANGES”. The last one is labeled “APPLES AND ORANGES”. ...Read More »How many trees riddle
In the local wood there are a number of trees. On these trees there are a number of birds. The ...Read More »Strong Horse
A man is going to a town with his horse. The man went to the town on Monday. He stayed ...Read More »Birth day Riddle
When asked about his birthday, a man said: “The day before yesterday I was only 25 and next year I ...Read More »Move the cards three times to make three piles of 8 cards riddle
Place three piles of cards on a table, one with 11 cards, the second with 7, and the third with ...Read More »Programmers puzzle
What will be the output of the program- print(5);Read More »Money packet Riddle
I have a large money box, 10 inches square and 12 inches tall. Roughly how many pennies can I place ...Read More »The Square Riddle
Find the number of squares in the given picture.Read More »How do you get out alive?
Imagine you are swimming in the ocean and a bunch of hungry sharks surround you. How do you get out ...Read More »White Shells Trading
A boy collects white seashells from the sea and brings them home every night. When he has enough of them, ...Read More »Who is Intelligent
You walk into a room where there are three primates held in their respective cages: 1) A lion who is ...Read More »All Liquid Riddle
Is it possible to make an LED tv, a laptop, a cat and a washing machine liquid?Read More »Free but priceless
It is free yet priceless, you can not own it but you can use it, you can not keep it ...Read More »10 Coins Puzzle
You are blindfolded and 10 coins are place in front of you on table. You are allowed to touch the ...Read More »