Maths Olympiad Prep

Library / /23 of 28

Combinatorics Difficulty 6.7 National Olympiad Prove it JBMO

Problem:

In a group of nn 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=5n=5;

b) n=6n=6.

Solution

Solution:

We will denote the people by A,B,C,A, B, C, \ldots and their initial balls by the corresponding small letters. Thus the initial state is Aa,Bb,Cc,Dd,Ee(,Ff)A a, B b, C c, D d, E e(, 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 ABA B, then BCB C, then CAC A; the state is now Aa,Bc,Cb,Dd,EeA a, B c, C b, D d, E e.

Swap ADA D, then DED E, then EAE A; the state is now Aa,Bc,Cb,De,EdA a, B c, C b, D e, E d.

Swap BEB E, then CDC D; the state is now Aa,Bd,Ce,Db,EcA a, B d, C e, D b, E c.

Swap BDB D, then CEC E; the state is now Aa,Bb,Cc,Dd,EeA a, B b, C c, D d, E e.

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 TT be the number of inverted pairs; at the start we have T=0T=0. Each swap changes TT by 1, so it changes the parity of TT. Since in the end T=0T=0, the total number of swaps must be even. Hence, at least 16 swaps are necessary. In fact 16 swaps are sufficient:

Swap ABA B, then BCB C, then CAC A; the state is now Aa,Bc,Cb,Dd,Ee,FfA a, B c, C b, D d, E e, F f.

Swap ADA D, then DED E, then EAE A; the state is now Aa,Bc,Cb,De,Ed,FfA a, B c, C b, D e, E d, F f.

Swap FBF B, then BEB E, then EFE F; the state is now Aa,Bd,Cb,De,Ec,FfA a, B d, C b, D e, E c, F f.

Swap FCF C, then CDC D, then DFD F; the state is now Aa,Bd,Ce,Db,Ec,FfA a, B d, C e, D b, E c, F f.

Swap BDB D, then CEC E, then twice AFA F, the state is now Aa,Bb,Cc,Dd,Ee,FfA a, B b, C c, D d, E e, F f.

All requirements are fulfilled now, so the answer is 16.

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.