Math problem of the day
My father thinks this problem explains life, the universe, and everything:
Suppose you have an ipod with 100 songs. It plays songs at random without regard for what songs were played before. On average, how many songs will you hear before it repeats a previous song?
Real ipods don’t work like this, in random mode they randomise the playlist and play through it in order, so there’s no possibility of repeats. But the answer to the problem is interesting.
UPDATE: I think the answer is 13.21. Click here to see how I worked it out, although it’s not pretty. I’m sure there must be a cute way to apply some clever trick to get the answer more easily. The interesting thing is how low the number is. 100 songs and on average you only get about 13 chosen at random before you hear a repeat.
4 Comments
OK, I know it’s wrong, but let me just try it… 100?
Gabriel: Nice guess, but no it’s not 100. In fact it’s almost impossible to listen to all 100 songs without encountering a repeat. Assuming we got to the last song with no repeats, there’s only a 1/100 chance that it doesn’t repeat any of the 99 previous songs. And the 99th song only has a 2/100 chance of not being a repeat, etc. So the probability of getting to 100 with no repeats is 99! / (100^99) = 0.00000000000000000000000000000000000000000093, according to my computer.
song odds of odds of
first a repeat
listen
1 1 1.00
2 0.99 0.99
3 0.98 0.97
4 0.97 0.94
5 0.96 0.90
6 0.95 0.86
7 0.94 0.81
8 0.93 0.75
9 0.92 0.69
10 0.91 0.63
11 0.9 0.57
12 0.89 0.50
13 0.88 0.44
so we have a 50-50 change of getting a repeat on the 12th song
(1/100)exp(99)= 1.0 x 10exp(-200) would be the equation and solution to find the probability of a repete within one hundred plays. Any more than 100 plays and there would automatically be a repete.