Problem of the Week 1103

Missing Digit

Solution

The difference is always divisible by 9, and so the missing digit is easily determined. I got fooled in the original version of the posting -- in which Bob lists the other four digits as 1, 1, 0, 3 -- by using digits that cannot actually occur!

So a natural question is: Is there an efficient algorithm to tell if a given set of n - 1 digits can occur among the n digits obtained by subtracting the reverse of an n-digit number from itself?

Bill Owens points out that the result of the problem is the same if one replaces "reversal" by any permutation. If one does that, then 1103 does occur. So then we have the question: Does every string of n - 1 digits occur among the n digits obtained by subtracting a permutation of an n-digit number from itself? I would guess that the answer is yes.

[Back to Problem 1103]

© Copyright 2008 Stan Wagon. Reproduced with permission.



22 September 2008