Home > Riddles > The impossible row of cards

The impossible row of cards

Numerical territoryLevel 3 · Intermediate · ●●●○○

You have the row:

$$ 4,\ 2,\ 6,\ 1,\ 5,\ 3. $$

The only operation allowed is to exchange two adjacent cards whose sum is odd.
Can you reach:

$$ 1,\ 2,\ 3,\ 4,\ 5,\ 6? $$

Hints

Show hints
  1. Both relative orders change, which contradicts the invariant.
  2. You can only exchange adjacent cards with an odd sum, that is, an even card with an odd card.
  3. This implies that: the relative order of the even cards to each other never changes.

Solution

Show full solution

Back to problem
Answer: No, it is impossible.
You can only exchange adjacent cards with an odd sum, that is, an even card with an odd card.
That implies that:

  • the relative order of the even cards to each other never changes,
  • and the relative order of the odd ones to each other also never changes.

In the initial row:

  • pairs: $4,2,6$,
  • odd: $1,5,3$.

In the target row:

  • pairs: $2,4,6$,
  • odd: $1,3,5$.

Both relative orders change, which contradicts the invariant.


Related riddles

Keep practicing

If you enjoyed this one, try more pure-logic riddles, explore this theme, browse the full archive, or read the riddle-solving guide.

← Previous: The number that describes itself · Next: The shredded password →