Cycles of a Random Permutation
Fifty guests at a party each write their name on a slip of paper and drop it into a hat; then, one by one, each guest draws a random slip (without replacement). Two guests are placed in the same group if there is a chain of draws linking them: for instance if A draws B’s name, B draws C’s name, and C draws A’s name, then A, B and C form one group, and such a cycle can never be joined by anyone else. Equivalently, the groups are exactly the cycles of the random permutation sending each guest to the guest whose name they drew. Find the expected number of groups, rounded to the nearest tenth.
Work it out, then compare with the answer.
SolutionShow the worked solution
Key idea. Reveal the permutation one cycle at a time. At each step exactly one of the remaining names closes the current cycle.
Let be the uniformly random permutation of the guests, where is the guest whose name drew. Reveal as follows.
- Start at guest and reveal , then , and so on.
- When the chain returns to its starting guest, the current cycle is complete.
- Then restart from the lowest-numbered guest not yet visited.
There are reveals in total. Suppose names have not yet been revealed as images when a reveal is made. By symmetry, the next image is uniform over those names. Exactly one of them is the name of the guest who started the current cycle, since that name cannot yet have been used. So this reveal closes a cycle with probability , whatever happened before.
As the reveals proceed, runs through . The number of groups is the number of reveals that close a cycle. By linearity of expectation,
Alternative. Count -cycles directly. A given set of guests can be arranged in a cycle in ways. Each such cycle occurs in with probability . Hence
Summing over again gives .
For , , which rounds to .
Variations
The same idea with a twist. Each solution gives only the changed step.
Fifty guests at a party each write their name on a slip of paper and drop it into a hat; then, one by one, each guest draws a random slip (without replacement). Two guests are placed in the same group if there is a chain of draws linking them (so the groups are exactly the cycles of the resulting random permutation). Find the average size of a group, rounded to the nearest tenth.
Work it out, then compare with the answer.
Solution
We interpret “average size of a group” as the mean size of a group chosen uniformly from all groups occurring across all equally likely draws.
From the alternative above, the expected number of -cycles is . So the permutations together contain cycles of length , and cycles in total. A uniformly chosen cycle therefore has length with probability
Its expected length is
This equals the total number of guests divided by the expected number of groups. Other readings of “average” give different answers:
- ;
- the group containing a fixed guest has size uniform on , so its mean is .
For , .