Problem:
A random permutation of is given. It is then sorted to obtain the sequence as follows: at each step, two of the numbers which are not in their correct positions are selected at random, and the two numbers are swapped. If is the expected number of steps (i.e. swaps) required to obtain the sequence , then estimate . An estimate of earns points.
Solution
Solution:
Let be the expected number of steps if there are elements out of order. Let's consider one of these permutations and suppose that and are random elements that are out of order. The probability that swapping and sends to the proper place is , and the probability that it sends to the proper place is . Thus we can approximate
(The chance that both get sent to the right place decreases the overall probability that the number of fixed points increases, but also decreases the expected number of moves after the swap. These effects largely cancel out.)
As a result, we conclude that
and since we have . At the beginning, the expected number of elements that are in the right place is 1, so the answer is approximately . This is good enough for 19 points.