There is already a solution for the extraordinary mathematical challenge of Christmas presented by EL PAÍS and the Royal Spanish Mathematical Society on the occasion of the lottery draw. Adolfo Quirós Gracián, professor of the Autonomous University of Madrid and director of La Gaceta de la Royal Spanish Mathematical Society presented the challenge, and now gives us the solution.
Remember that the challenge was twofold: why is it called Gúgol Lotería and what is the probability that each number has to obtain a Gugol-refund, which may or may not be the same for everyone.
The reason why it is called Gúgol Lotería is simple: 10 ^ 100 participate (1 followed by 100 zeros, we will use ^ to indicate a power) numbers, and 10 ^ 100 is called a Gúgol. By the way, it seems that Google is a wrong way to spell Googol, which is how Gúgol is written in English.
Clarified the linguistic question, which has been solved correctly by almost all the participants, the real mathematical challenge is to give the probability that each number has to obtain the Gúgol-refund.
The 0 (100 zeros) can never get the Gúgol-refund, because it is the only number with Gúgol-digit 0. Let's see what happens with the 10 ^ 100-1 remaining numbers.
Many readers will remember a rule to know if a number is exactly divisible by 9: it is when what we have called its Gúgol-digit is precisely 9. Perhaps not so many know that something more general can be said: for any number, its Gúgol- digit is the rest that we obtain when dividing it by 9 (with the small exception that, instead of remains between 0 and 8 we will have them between 1 and 9). For example, if we look at 123, its Gúgol-digit is 6, and it turns out that 123 between 9 fits to 13 and there are, of course, 6. This always happens, and that is the reason why "the test of 9" works, how well we know those who learned to do accounts before there were calculators.
As this observation about the relationship between the Gúgol-digit and the division between 9 is fundamental to solve the challenge, we will prove it (after all, we are in a mathematical challenge), but writing it only for 4-digit numbers, say abcd .
If we remember that d are the units, c the tens, etc., and divide by 9, we will have a quotient Q and a remainder R:
abcd = a x 1000 + b x 100 + c x 10 + d = 9 x Q + R
We also divide the sum of the digits by 9, again obtaining a quotient q and a remainder r:
a + b + c + d = 9 x q + r
If we subtract these two equalities,
a x 999 + b x 99 + c x 9 = 9 x (Q-q) + R-r,
Or what is the same,
R-r = 9 x (a x 111 + b x 11 + c + q-Q),
so that the difference of the remains, R-r, is a multiple of 9. But since R and r are between 0 and 8, it must be R-r = 0. That is, R = r: the remains corresponding to the number and the sum of their figures coincide. If we repeat until reaching a single digit, the Gúgol-digit, this has to be the rest when dividing by 9 the original number, except that the Gúgol-digit will be 9, and not 0, if the number is divisible by 9.
As a consequence, Gúgol-reintegrate the numbers that give the same rest as the Fat one when dividing it by 9. This classifies the numbers that interest us in 9 classes, each one with
(10 ^ 100-1) / 9 = 1111 … 1111 (100 ones in total) elements.
Since Gordo does not receive Gugol-reimbursement, the favorable cases are 1 less, and therefore the probability (favorable cases among possible cases) that a number other than 0 receives a Gugol-reimbursement is (we apologize for the profusion of parentheses)
(((10 ^ 100-1) / 9) -1) / 10 ^ 100 = (1111 … 1111-1) / 10 ^ 100 = 1111 … 1110/10 ^ 100 = 0.1111 … 1111 (99 in total) ).
In particular we see that all the numbers, except for 0000 … 0000, have the same probability of obtaining the Gúgol-refund. Xabier L. C suggests that, in order to compensate this flagrant injustice, in case of leaving the 0, not only the Gordo wins, but also all the money originally assigned to Gúgol-refunds. That way the expected gain of all the numbers will be the same again.
Note also that in the denominator (possible cases) we include the 0 because, although the Gúgol-refund can not win, it can be the number that comes out as Gordo.
Despite the limited time that readers have prepared this year to send their solutions (we apologize for this), more than 380 have been received, not only from Spain, but also from several European countries (Germany, France, Czech Republic, United Kingdom, Switzerland) and Americans (Chile, United States, Mexico). Javier C., who must be the one who turns to Yoda, has sent us his solution in impeccable language of Tatooine, which luckily we have been able to translate.
Approximately 6% of the answers are incomplete, in general because they have pointed out that not all numbers have the same probability of winning the Gúgol-refund, but they have not said what the odds are. Approximately 24% have been confused and have given wrong answers. And there is a 15% that have given with the exact probabilities.
Readers will wonder what happens with the remaining 55%. Well, they have given almost correct answers. So "almost" that we believe that no terrestrial instrument of measurement could detect the difference. But mathematics can and, taking into account the ludic but rigorous spirit of the challenges, they have a silver medal, but not gold.
The two major absences among the "almost" have been:
– Forget that Gordo does not win the Gúgol-refund and say that the 0 has probability 1/10 ^ 100 and the other 0.1111 … 1111 with 100 ones, not with 99.
– Forget that the 0, although you can not win the Gúgol-refund, it can be the Gordo, and you do not have to remove it from the denominator.
A very frequent response, that numbers other than 0 have probability 1/9, combines both errors: consider a favorable case more and a possible case less, with what is obtained
(((10 ^ 100) -1) / 9) / (10 ^ 100-1) = 1/9.
Why do not we just say it's wrong? Well, because all those readers have realized that the Gúgol-digit corresponded in some way with the rest by dividing by 9, which was the mathematical message they wanted to transmit to us from the distant galaxy.
They have done this in different ways, both between the silvers and between the golds. A few, using the technical idea of congruence. Others, like Carlos de C., seem to discover this idea without knowing it in advance, which has special merit and we congratulate them for it. Most of them have experimented with numbers with fewer figures (a very good idea!) And realizing what the pattern was emerging.
In particular, Alberto L., who defines himself as "Renegade" for disobeying advice, has experimented with a computer (he is not the only one). But only for 8-digit numbers because, as you point out, your program, which calculates 400 Gugol-digits per second, would take 932640940698958426597427403229175993076073656250932640940698958426597427403229175993076073 years in calculating one by one the Gúgol-digits of the 10 ^ 100 numbers that enter the draw. A practical demonstration that machines, very useful as they are, can not completely replace the reasoning capacity of the human brain.
The RSME has decided to send a copy of the Gardner book for beginners, which is part of the Mathematical Stimulus Library that the society publishes jointly with Editorial SM, to three readers selected by the society among those that we have called golds. They are Jordi F., Mª José E. M. and Zenaida H.
Whether you have given the correct answer or not, I hope the challenge has been interesting for you. On behalf of EL PAÍS, of the RSME and on my own, I wish you happy holidays and luck with the lottery!