Internet Math Challenge

Solution to the puzzle for 7 March 2003

The probability that card 5 will end up in position 1 is 512/3125 (or 16.384%.

The easiest way to get this answer is to realize that there are 55 = 3125 possible outcomes for the 5 successive random number draws, and then to count how many of those outcomes put card 5 on top at the end. There are two ways that card 5 can end up on top:

  1. It can get placed on top on the first random number draw (by switching places with card 1) and then stay there for the other four draws. For this to happen the first random number must be a 5 and then the other four draws can be any of the other four numbers (but cannot be 5). This happens in 1*4*4*4*4 = 256 outcomes.
  2. Card 5 could be left alone for the first four draws, and then get switched with card 1 on the last draw. There are also 4*4*4*4*1 = 256 outcomes that do this.
No other combination of draws will place card 5 on top at the end, so our total is 256 + 256 = 512 -- thus 512 out of the 3125 outcomes put card 5 on top.

There is another (longer, but perhaps more instructive) way of solving this puzzle. We can simply compute the various probabilities for the location of card 5 after each draw. on the first draw, each of the numbers 1 through 5 are equally likely. But if the number comes up 1-4, card 5 will just remain where it is. If 5 is drawn then card 5 will move to position 1. So, after the first draw:

Now after the second draw: Note that the three probabilities after the second draw add up to 1, as they should: 4/25 + 1/5 + 16/25 = 1.

Continuing this slightly tedious process for three more draws yields the following:

It's interesting to note that the most likely location for card 5 to end in is position 4 -- strange!


Thanks to these sponsors for their generous support of the IMC!