Magic gopher
From Wikipedia, the free encyclopedia
The Magic Gopher[1] is an interactive flash game published online by British Council.
Contents |
[edit] Overview
The game involves the 'magic gopher' asking the player to pick a random two-digit number. The player is then asked to sum the digits of the number and subtract them from the original number. The gopher then presents a list of symbols, of which the player finds the one corresponding to this new number. The gopher then proceeds to correctly guess the player's symbol, supposedly after reading his or her mind.
[edit] The Trick
The trick to the game is that the gopher uses the same symbol for every multiple of 9, from 0 through 81 (it is impossible to get a higher number using only two digits). The gopher assigns the same symbol to the multiples of 9 as to other non-multiples of 9 in order to cover up the trick; the symbol picked for each game is randomised. No matter which two-digit integer the player chooses, when the subtraction is done, the resulting number will always be a multiple of 9. In fact, no matter which (nonnegative) integer the player chooses, the result will always be a multiple of 9. The former can be proven using elementary algebra. Be aware that the proofs for n digits rely on that the digits of the number are indexed with the rightmost digit being assigned position 0, with the adjacent digits (to the left) having an index increasing by one each time. For example, for the number '261', the digit '1' is in position 0, '6' is in position 1, and '2' is in position 2.
[edit] Proof for 2 digits
Let be a 2-digit integer. Additionally, let
be the first digit of
and
be the second digit of
. Finally, let
equal the sum of the digits of n, so
.
An equivalent form for , by virtue of using a decimal numeral system, is
.
The resulting number, , is given by
. Hence,
is always a multiple of 9.Q.E.D.
[edit] Proof for n digits
Proving that no matter how large is (and how many digits
has), it is always a multiple of 9 is slightly trickier. The following proof makes use of modular arithmetic:
Let be an integer with
digits and let
represent the
digit of
.
Thus, .
Let be the sum of the digits of
. So,
.
Since .
Hence so the resulting number
is a multiple of 9.
Q.E.D.
[edit] Alternative proof for n digits
This alternative proof is less mathematically rigorous, relying on some common sense and intuition, but it is still sufficient to demonstrate the same as the above.
Again, let be an integer with
digits and let
represent the
digit of
.
Thus, .
Let be the sum of the digits of
. So,
.
Now, let .
This can be written as .
By factorising, we obtain .
Now, will give a number with
nines, hence, each individual digit of
is being multiplied by a multiple of 9 as the numbers given by
are implicitly multiples of 9. Since the sum of any number of multiples of 9 is always divisible by 9, we conclude that whichever number is picked for
, it will always be a multiple of 9.
If we use the resulting formula for assuming that
will only be 2 digits in length, we obtain the same formula as with the proof for a 2 digit
:
where
.