Problem 11 · Permutation parity via inversions · 3 points
Made by AI and not reviewed by a real person.
Five cards start in the row 1, 2, 3, 4, 5. On each of exactly two turns, you choose any three positions and rotate their cards in either direction; which final row is impossible?

- 2, 1, 4, 3, 5
- 2, 3, 4, 1, 5
- 2, 3, 4, 5, 1
- 3, 1, 2, 4, 5
- 1, 2, 3, 4, 5
Show a hint
- Instead of following one card, look at pairs of cards: which pairs have reversed their original left-to-right order?
- A rotation of three cards can be made with two swaps. Think about what each swap does to the parity of the number of reversed pairs.
Show the answer and solution
Answer: B — 2, 3, 4, 1, 5
Each rotation is two swaps, so it preserves the parity of the number of reversed pairs. In 2, 3, 4, 1, 5, the card 1 has passed three cards, giving an odd number; that row is impossible. The other rows can all be made in two turns: 2, 3, 4, 5, 1 by rotating positions 1, 2, 3 left, then 3, 4, 5 left; 2, 1, 4, 3, 5 by rotating 1, 2, 3 right, then 1, 3, 4 left; and 3, 1, 2, 4, 5 by rotating 1, 2, 3 left twice. Even the original row 1, 2, 3, 4, 5 is possible: rotate the same three positions left, then right.