Maths Olympiad Prep

Library / /1237 of 1394

, 2023

Combinatorics Difficulty 5.8 AIME, harder Prove it United States

Problem:

Five pairs of twins are randomly arranged around a circle. Then they perform zero or more swaps, where each swap switches the positions of two adjacent people. They want to reach a state where no one is adjacent to their twin. Compute the expected value of the smallest number of swaps needed to reach such a state.

Solution

Solution:

First, let's characterize the minimum number of swaps needed given a configuration. Each swap destroys 00, 11, or 22 adjacent pairs. If at least one pair is destroyed, no other adjacent pairs can be formed. Therefore, we only care about the count of adjacent pairs and should never create any new ones. In a maximal block of kk adjacent pairs, defined as kk consecutive (circular) adjacent pairs, we need at least k2\left\lceil\frac{k}{2}\right\rceil swaps. Maximal blocks are independent as we never create new ones. Thus, we need iki2\sum_{i}\left\lceil\frac{k_{i}}{2}\right\rceil over maximal blocks.

Now we focus on counting the desired quantity over all configurations. As the expression above is linear and because expectation is linear, our answer is the sum of the number of 11-maximal blocks, 22-maximal blocks, ..., 55-maximal blocks. Note that there can't be a 44-maximal block. This can be computed as
E[AA]E[AABB]+E[AABBCC]E[AABBCCDDEE] \mathbb{E}[AA] - \mathbb{E}[AABB] + \mathbb{E}[AABBCC] - \mathbb{E}[AABBCCDDEE]
where AAAA \ldots denotes a (not necessarily maximal) block of adjacent pairs and E[AA]\mathbb{E}[AA\ldots] is the expected count of such. (This counts a block of AAAA as 11, a block of AABBAABB as 11, a block of AABBCCAABBCC as 22, and a block of AABBCCDDEEAABBCCDDEE as 33 overall, as desired).

Lastly, we compute this quantity. Say there's nn pairs. Let's treat each of the 2n2n people as distinguishable. The expected number of kk consecutive adjacent pairs (not necessarily as a maximal block) equals
12nn(nk)k!(2n2k)!2k \frac{1}{2^{n}} n \binom{n}{k} k! (2n-2k)! 2^{k}
The first nn comes from choosing the start of this chain, (nk)\binom{n}{k} from choosing which pairs are in this chain, k!k! from permuting these pairs, 2k2^{k} from ordering the people in each pair in the chain, and (2n2k)!(2n-2k)! from permuting the other people.

We plug in n=5n=5 to obtain 926945\frac{926}{945}.

Want a route through all this instead of an archive? The track puts 2,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty) added by this project.