In a group of $n$ people, each one had a different ball. They performed a sequence of swaps, in each swap, two people swapped the ball they had at that moment. Each pair of people performed at least one swap. In the end each person had the ball he/she had at the start. Find the least possible number of swaps, if: a) $n = 5$, b) $n = 6$.
Problem
Source: JBMO 2011 Shortlist C4
Tags: JBMO, combinatorics, Construct
13.09.2019 20:41
We will denote the people by A, B, C, ... and their initial balls by the corresponding small letters.Thus the initial state is Aa, Bb, Cc, Dd, Ee(, F f). A swap is denoted by the (capital) letters of the people involved. a) Five people form 10 pairs, so at least 10 swaps are necessary. In fact, 10 swaps are sufficient: Swap AB, then BC, then CA; the state is now Aa, Bc, Cb, Dd, Ee. Swap AD, then DE, then EA; the state is now Aa, Bc, Cb, De, Ed. Swap BE, then CD; the state is now Aa, Bd, Ce, Db, Ec. Swap BD, then CE; the state is now Aa, Bb, Cc, Dd, Ee. All requirements are fulfilled now, so the answer is 10. b) Six people form 15 pairs, so at least 15 swaps are necessary. We will prove that the final number of swaps must be even. Call a pair formed by a ball and a person inverted if letter of the ball lies after letter of the person in the alphabet. Let T be the number of inverted pairs; at the start we have T = 0. Each swap changes T by 1, so it changes the parity of T. Since in the end T = 0, the total number of swaps must be even. Hence, at least 16 swaps are necessary. In fact 16 swaps are sufficient: Swap AB, then BC, then CA; the state is now Aa, Bc, Cb, Dd, Ee, F f. Swap AD, then DE, then EA; the state is now Aa, Bc, Cb, De, Ed, F f. Swap F B, then BE, then EF; the state is now Aa, Bd, Cb, De, Ec, F f. Swap F C, then CD, then DF; the state is now Aa, Bd, Ce, Db, Ec, F f. Swap BD, then CE, then twice AF, the state is now Aa, Bb, Cc, Dd, Ee, F f. All requirements are fulfilled now, so the answer is 16.
25.01.2020 22:54
Can you please explain this? VicKmath7 wrote: Call a pair formed by a ball and a person inverted if letter of the ball lies after letter of the person in the alphabet. VicKmath7 wrote: Each swap changes T by 1, so it changes the parity of T.. For "Aa, Bc, Cb, De, Ed" T=2 and after swap B-E, for "Aa, Bd, Cb, De, Ec" T=2 again
18.06.2021 14:43
We know that the initial number of inversions in the ball array is equal to $0$, the final number of inversions is also $0$, and each swap corresponds to multiplying the ball array with a transposition, and because inversion parity = transpositions parity, we have the parity of inversion is changing by $1$ on each swap, thus we have an even number of swaps for each $n$
19.05.2024 09:02
Let C(n) denote the least number of swaps for n people, we can easily tell C(3) = 4, to get the least amount of swaps for 4 people, we do the following. we undo the last swap performed when there was 3 people. meaning A has the ball "b" B has the ball "c" and C has the ball "a". now when D joins, he performs 3 swaps, first with C, then with A and then with B, this results in the following configuration: A has "a", B has "b", C has "d" and D has "c" so whats left is 1 more swap between C and D, this will result in everyone having their ball back, so the total amount of swaps we added was 3, the same will go for every n, we first take back 1 swap then add n+1 swaps, so thats n swaps in total meaning C(n+1) = C(n) + n. since we know what C(3) is, we can figure out the answer for all n, in this case C(5) = 11 and C(6) = 16.