Maths Olympiad Prep

Library / /24 of 24

, 2019

Combinatorics Difficulty 9.2 IMO level Prove it Balkan Mathematical Olympiad

100 couples are invited to a traditional Moldovan dance. The 200 people stand in a line, and then in a step, two of them (not necessarily adjacent) may swap positions. Find the least CC such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most CC steps.

Solution

With 100 replaced by NN, the answer is C=C(N)=N1C = C(N) = N - 1. Throughout, we will say that the members of a couple have the same.

N=2N=2: We use this as a base case for induction for both bounds. Up to labelling, there is one trivial initial order, and two non-trivial ones, namely
1,1,2,2;1,2,2,1;1,2,1,2. 1, 1, 2, 2; \quad 1, 2, 2, 1; \quad 1, 2, 1, 2.
The brackets indicate how to arrive at a suitable final ordering with one step. Obviously one step is necessary in the second and third cases.

Upper bound: First we show C(N)N1C(N) \le N - 1, by induction. The base case N=2N = 2 has already been seen. Now suppose the claim is true for N1N - 1, and consider an initial arrangement of NN couples. Suppose the types of the left-most couples in line are aa and bb. If aba \neq b, then in the first step, swap the bb in place two with the other person with type aa. If a=ba = b, skip this. In both cases, we now have N1N - 1 couples distributed among the final 2N22N - 2 places, and we know that N2N - 2 steps suffices to order them appropriately, by induction. So N1N - 1 steps suffices for NN couples.

Lower bound: We need to exhibit an example of an initial order for which N1N - 1 steps are necessary. Consider
AN:=1,2,2,3,3,,N1,N1,N,N,1.(1) A_N := 1, 2, 2, 3, 3, \dots, N-1, N-1, N, N, 1. \qquad (1)
Proceed by induction, with the base case N=2N = 2 trivial. Suppose there is a sequence of at most N2N - 2 steps which works. In any suitable final arrangement, a given type must be in positions (odd, even), whereas they start in positions (even, odd). So each type must be involved in at least one step. However, each step involves at most two types, so by the pigeonhole principle, at least four types are involved in at most one step. Pick one such type a1a \neq 1. The one step involving aa must be one of
,?,a,a,?,,?,a,a,?, \dots, ?, a, a, ?, \dots \quad \dots, ?, a, a, ?, \dots
Neither of these steps affects the relative order of the 2N22N - 2 other people. So by ignoring this step involving the aa, we have a sequence of at most N3N - 3 steps acting on the other 2N22N - 2 people which appropriately sorts them. By induction, this is a contradiction. \square

Alternative lower bound I: Consider the graph with vertices given by pairs of positions {(1,2),(3,4),,(2N1,2N)}\{(1,2), (3,4), \dots, (2N-1, 2N)\}. We add an edge between pairs of (different) vertices if we ever swap two people in places corresponding to those vertices. In particular, at the end, the two people with type kk end up in places corresponding to a single vertex.
Suppose we start from the ordering (1) and have some number of steps leading to an ordering where everyone is next to their partner. Then, in the induced graph, there is a path between the vertices corresponding to the places (2k3,2k2)(2k-3, 2k-2) and (2k1,2k)(2k-1, 2k) for each 2kN2 \le k \le N, and also between (1,2)(1, 2) and (2N1,2N)(2N-1, 2N). In other words, the graph is connected, and so must have at least N1N-1 edges. \square

Alternative lower bound II: Consider a bipartite multigraph with vertex classes (v1,,vn)(v_1, \dots, v_n) and (w1,,wn)(w_1, \dots, w_n). Connect viv_i to wjw_j if a person of type jj is in positions (2i1,2i)(2i-1, 2i) (if both positions are taken by the type jj couple, then add two edges).
Each step in the dance consists of replacing edges E={vawc,vbwd}E = \{v_a \leftrightarrow w_c, v_b \leftrightarrow w_d\} with E={vawd,vbwc}E' = \{v_a \leftrightarrow w_d, v_b \leftrightarrow w_c\}. However, both before and after the step, the number of components in the graph which include {va,vb,wc,wd}\{v_a, v_b, w_c, w_d\} is either one or two. The structure of other components which do not include these vertices is unaffected by the move.
Therefore, the number of connected components increases by at most 1 in each step.
Starting from configuration (1), the graph initially consists of a single (cyclic) component, so one requires at least n1n-1 steps to get to the final configuration for which there are nn connected components. \square

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 and solution reproduced as published; topic and difficulty added by this site.