Browse · MathNet
PrintBMO 2019 Shortlist
2019 counting and probability
Problem
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 such that whatever the initial order, they can arrive at an ordering where everyone is dancing next to their partner in at most steps.
Solution
With 100 replaced by , the answer is . Throughout, we will say that the members of a couple have the same.
: 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 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 , by induction. The base case has already been seen. Now suppose the claim is true for , and consider an initial arrangement of couples. Suppose the types of the left-most couples in line are and . If , then in the first step, swap the in place two with the other person with type . If , skip this. In both cases, we now have couples distributed among the final places, and we know that steps suffices to order them appropriately, by induction. So steps suffices for couples.
Lower bound: We need to exhibit an example of an initial order for which steps are necessary. Consider Proceed by induction, with the base case trivial. Suppose there is a sequence of at most 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 . The one step involving must be one of Neither of these steps affects the relative order of the other people. So by ignoring this step involving the , we have a sequence of at most steps acting on the other people which appropriately sorts them. By induction, this is a contradiction.
Alternative lower bound I: Consider the graph with vertices given by pairs of positions . 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 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 and for each , and also between and . In other words, the graph is connected, and so must have at least edges.
Alternative lower bound II: Consider a bipartite multigraph with vertex classes and . Connect to if a person of type is in positions (if both positions are taken by the type couple, then add two edges). Each step in the dance consists of replacing edges with . However, both before and after the step, the number of components in the graph which include 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 steps to get to the final configuration for which there are connected components.
: 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 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 , by induction. The base case has already been seen. Now suppose the claim is true for , and consider an initial arrangement of couples. Suppose the types of the left-most couples in line are and . If , then in the first step, swap the in place two with the other person with type . If , skip this. In both cases, we now have couples distributed among the final places, and we know that steps suffices to order them appropriately, by induction. So steps suffices for couples.
Lower bound: We need to exhibit an example of an initial order for which steps are necessary. Consider Proceed by induction, with the base case trivial. Suppose there is a sequence of at most 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 . The one step involving must be one of Neither of these steps affects the relative order of the other people. So by ignoring this step involving the , we have a sequence of at most steps acting on the other people which appropriately sorts them. By induction, this is a contradiction.
Alternative lower bound I: Consider the graph with vertices given by pairs of positions . 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 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 and for each , and also between and . In other words, the graph is connected, and so must have at least edges.
Alternative lower bound II: Consider a bipartite multigraph with vertex classes and . Connect to if a person of type is in positions (if both positions are taken by the type couple, then add two edges). Each step in the dance consists of replacing edges with . However, both before and after the step, the number of components in the graph which include 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 steps to get to the final configuration for which there are connected components.
Final answer
99
Techniques
Invariants / monovariantsPigeonhole principleInduction / smoothing