UKMT Permutation Proof: Returning to the Original Order Takes an Even Number of Adjacent Swaps

Take a list of distinct numbers in increasing order. A move swaps two neighbouring entries. Prove that any sequence of moves returning to the original order has even length. This original UKMT proof extension uses inversion count as a parity invariant; it does not assume that a repeated-looking arrangement is identical when the entries are not distinct.

Need help choosing a next step? Scan the contact QR code below or contact Hanlin on WeChat. Send UKMT-S6-1130 and tell us your school year and question.

Define an inversion using positions and values

An inversion is a pair of positions with the earlier value larger than the later value. The initially increasing list has zero inversions. Counting inversions records more information than just whether a list is sorted, and taking that count modulo two gives a simple feature that can be tracked through every move.

Analyse one adjacent swap exactly

Suppose neighbouring distinct entries are a and b. Swapping them reverses the order of that pair, adding one inversion if a was smaller or removing one if a was larger. Their relationships with any other entry contribute the same combined number before and after because that other entry lies on one side of both adjacent positions.

Conclude that every move flips parity

The total inversion count therefore changes by exactly plus one or minus one, so its parity flips on every move. After an even number of moves it has the initial even parity; after an odd number it is odd. Returning to the increasing list requires inversion count zero, which is even, so the move count must be even.

Distinguish a necessary condition from a sufficient one

An even number of moves does not guarantee return. For example, starting with one, two, three, swapping the first pair then the second gives two, three, one after two moves. The conclusion only excludes return after an odd count. A parity test can reject impossible histories without completely reconstructing the permutation.

Check how a nonadjacent swap differs

Swapping entries separated by d positions can be realised by two d minus one adjacent swaps, an odd number. This helps explain why a general transposition also flips permutation parity, although it need not change the full inversion count by just one. The exact adjacent argument should not be transferred to a distant swap without distinguishing count from parity.

State why entry identities matter

If repeated values are treated as indistinguishable, a swap of equal entries can leave the visible list unchanged after one move. That would violate the conclusion unless distinct labels are retained. The proof is complete when it names the distinct-entry assumption, defines inversions, checks one move and connects the final zero count to even parity, rather than relying on a few trial shuffles.

Continue reading: UKMT Coordinate Proof: Two Distinct Circles Cannot Meet in Three Points.

Contact Hanlin

Planning a first attempt or reviewing a topic you find difficult? Scan the QR code and send UKMT-S6-1130. Include your school year, country or competition region, experience and the question you want to discuss.

Scan to contact Hanlin on WeChat. Send UKMT-S6-1130.

Contact Hanlin on WeChat

On your phone, use the button or save the QR image and scan it within WeChat.

Official information and further reading: Source 1

Online Customer Service
Contact Customer Service