It's indistinguishable from 9.
Here's the analysis from Dr. Math"
_____________________
Date: 05/12/2004
From: Doctor Roy
Subject: Re: Solving the Fido Puzzle
Hi Karen,
Thanks for writing to Dr. Math.
The trick has to do with divisibility by 9. Try the first part of the experiment again. Take any number (it doesn't really have to be 3 or 4 digits long, I imagine that's just so the computer has it a bit easy). Mix up the digits and perform the subtraction.
Now, divide the result by 9. You should come out with a whole number. In other words, the resulting difference should be divisible by 9. This works no matter what original number you pick. If you are familiar with number theory, the proof is simple enough. If not, just take my word for it that the difference will always be divisible by 9.
So, we have a number divisible by 9. One property of numbers divisible by 9 is that the sum of the digits of such numbers is also divisible by 9.
For example: 4059 is divisible by 9. 4+0+5+9 = 18. 18 is divisible by 9, so 4059 is divisible by 9.
4057 is NOT divisible by 9. 4+0+5+7 =16. 16 is NOT divisible by 9, so 4057 is NOT divisible by 9.
Let's use 4059 for now. If you pick 5, you enter 409 into the program. The program adds the digits up: 4+0+9 = 13. It finds the smallest number that can be added to 13 to get a multiple of 9. In this case 5:
18 - 13 = 5
So, 5 is the missing number.
That's why you are not allowed to pick 0. If the criterion is simply divisibility by 9, then the program is unable to tell the difference between 0 and 9.
For example:
4059 --> 459 ---> 4+5+9 = 18
The smallest number that can be added to 18 to get a multiple of 9 is 0. The other number that can be added to get a multiple of 9 is 9 itself. So, both 0 and 9 are possible choices. But since you are not allowed to choose 0, the program will give you 9.
Try it out. Enter 459 into the machine. It will not give you 0, which is the number we chose above. It will give you 9 instead.
Does this help? Please feel free to write back with any questions you may have.
- Doctor Roy, The Math Forum
_____________________
Wikipedia has a more general
http://en.wikipedia.org/wiki/Casting_out_nines">article on the general principle and its applications.