Pete and Zandra are performing a mathematical magic trick. Given a string of digits (0-9) of an audience member's choice that only Pete can see , Pete will cover up a digit of his choosing, and then Zandra will look at the remaining digits (and which one is covered) and -- without any communication with Pete -- say the digit that Pete covered.
For example, if the audience member might write 2, 5, 1, 1, 5, 6, 2, 3, 3, 7, 8, 9, 2. Then, Pete decides to cover up the 7. Then, Zandra opens her eyes, looks at the whole list (but can't see the covered number), and then 'guesses' the missing number, 7, correctly. Since that number might have been any digit, this seems like a pretty amazing feat.
What is the smallest for which this trick is always possible? And how could they pull it off?
Bonus: What if Pete had to cover two adjacent digits?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
There are 1 0 N possible digit strings chosen. There are N ⋅ 1 0 N − 1 possible strings with one digit covered ( N ways to choose the covered digit, and 1 0 N − 1 ways to put the digits of the rest). We need to map each digit string to each string with one digit covered, and the mapping must be injective (otherwise we have ambiguities). Thus N ⋅ 1 0 N − 1 ≥ 1 0 N , so N ≥ 1 0 .
To show that N = 1 0 is possible, one way to do it is to compute the sum of the digits s , then hide the ( s m o d 1 0 ) + 1 -th digit. For example, 2 6 9 4 1 5 3 1 8 6 has sum of digits 45, so we hide the ( 4 5 m o d 1 0 ) + 1 = 6 -th digit, giving 2 6 9 4 1 ? 3 1 8 6 . Figuring out the missing digit is simple; since we can see the position of the hidden digit, we know the sum of the digits modulo 10, and by summing everything else and subtracting from our sum, we get the missing digit.
Thus the answer is 1 0 .