Professor X smokes a pipe. He carries two identical matchboxes, originally containing 20 matches each. When he lights his pipe, he chooses a matchbox at random and lights his pipe with one match and discards the used match.
There will eventually arise an occasion when he first selects a matchbox with only one match in it. At this point, what is the expected number of matches in the other box?
(In reply to
re: New print out of previous solution by Charlie)
Going back and looking at ed bottemiller's comment, I looked up the Banach matchbox problem, and reposed it in those terms. That problem posited that the professor would reach into a box and find no matches for the first time, whereas this puzzle asks for him to reach in and find 1 match for the first time. This effectively reduces the Banach problem to just 19 matches, but one match must be added to the final result as the actual number of matches in the other box.
So, for 19 starting matches, using formula for the Banach problem, we get:
list
5 N=19
10 for K=0 to N
20 P=combi(2*NK,N)*(0.5^(2*NK))
30 print P
40 T=T+P:Ex=Ex+P*K
50 next
60 print T,Ex
OK
run
0.128585320635465905
0.128585320635465905
0.1251100416993722319
0.1181594838271848857
0.1080315280705690383
0.0953219365328550338
0.0808792188763618469
0.0657143653370440006
0.0508756376802921295
0.0373088009655475616
0.0257302075624465942
0.0165408477187156677
0.0098019838333129882
0.0052779912948608398
0.0025334358215332031
0.0010555982589721679
0.0003671646118164062
0.0001001358032226562
0.000019073486328125
0.0000019073486328125
1.0 4.0148275047831702977
where the probabilities of zero to 19 in the "other" box are tabulated, and the last line verifies the total probability is 1, as expected, and the expected number of matches in addition to the "extra" match is 4.0148..., making the total expected number of matches 5.0148....

Posted by Charlie
on 20100629 12:27:07 