Maths Olympiad Prep

Library / /345 of 377

Combinatorics Difficulty 5.7 AIME, harder Prove it United States

Problem:
A calculator has a display, which shows a nonnegative integer NN, and a button, which replaces NN by a random integer chosen uniformly from the set {0,1,,N1}\{0,1, \ldots, N-1\}, provided that N>0N>0. Initially, the display holds the number N=2003N=2003. If the button is pressed repeatedly until N=0N=0, what is the probability that the numbers 1,10,1001,10,100, and 10001000 will each show up on the display at some point?

Solution

Solution:
First, we claim that if the display starts at some NN, the probability that any given number M<NM<N will appear at some point is 1/(M+1)1/(M+1). We can show this by induction on NN.

If N=M+1N = M+1 (the base case), MM can only be reached if it appears after the first step, and this occurs with probability 1/N=1/(M+1)1/N = 1/(M+1).

If N>M+1N > M+1 and the claim holds for N1N-1, then there are two possibilities starting from NN. If the first step leads to N1N-1 (this occurs with probability 1/N1/N), the probability of seeing MM subsequently is 1/(M+1)1/(M+1) by the induction hypothesis. If the first step leads to something less than N1N-1 (probability (N1)/N(N-1)/N), then it leads to any of the integers {0,1,,N2}\{0,1, \ldots, N-2\} with equal probability. But this is exactly what the first step would have been if we had started from N1N-1; hence, the probability of seeing MM is again 1/(M+1)1/(M+1) by induction. Thus, the overall probability of seeing MM is
1N1M+1+N1N1M+1=1M+1, \frac{1}{N} \cdot \frac{1}{M+1} + \frac{N-1}{N} \cdot \frac{1}{M+1} = \frac{1}{M+1},
proving the induction step and the claim.

Now let P(N,M)P(N, M) (M<NM<N) be the probability of eventually seeing the number MM if we start at NN; note that this is the same as the conditional probability of seeing MM given that we see NN. Hence, the desired probability is
P(2003,1000)P(1000,100)P(100,10)P(10,1)=11001110111112=12224222. P(2003,1000) \cdot P(1000,100) \cdot P(100,10) \cdot P(10,1) = \frac{1}{1001} \cdot \frac{1}{101} \cdot \frac{1}{11} \cdot \frac{1}{2} = \frac{1}{2224222}.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.