Teaching objectives
A primary-school lab (ages 8-12) on parity invariants. Everything is hands-on: turning cups over, rubbing numbers off a board, making a playing card somersault, swapping tiles and, at the end, a magic trick. Every block has challenges that work and one that does not; students find out by pressing “It is impossible”, and an animated explanation shows them why.
The idea running through the lab: when every move changes something two at a time (or always switches it between even and odd), knowing whether a number is even or odd is enough to predict what will happen, without trying every way.
What students learn
- Inventing and carrying out sequences of moves to reach a goal, and looking for the shortest one.
- Keeping track of something during the game (upside-down cups, the sum on the board, flips, pairs in the wrong order) and noticing whether it is even or odd.
- Recognising an invariant: something that does not change, however much you move.
- Using the invariant to prove that a goal is impossible and to predict the result without playing.
- Seeing that the invariant depends on the rule: turning two cups at a time keeps the parity; turning three does not.
- Using colourings (chessboard, striped rows, alternate places) as a tool for discovering invariants.
Key mathematical ideas, by block
A · The cups. Turning two cups over changes the number of upside-down cups by +2, −2 or 0: its parity is invariant. With 3 upside down you never reach 0. It does not matter whether the two cups are neighbours; with three at a time the parity does change and the challenge becomes possible again.
B · The board. Replacing a and b by their difference makes the sum go down by twice the smaller one, an even number. From 1 to 6 the sum is 21: you can only finish with 1, 3 or 5. From 1 to 8 it is 36: only 0, 2, 4, 6 or 8.
C · The card. Every flip turns the card over and moves it to a square of the other colour on the chessboard: the face depends only on the colour of the square. Flips up or down change the row and turn the cup round: the cup’s direction depends only on the row. That is why the card never gets back home face up, and always reaches each square in the same state.
D · Swapping neighbours. Each swap of neighbours changes the order of exactly one pair. The minimum number of swaps is the number of pairs in the wrong order (6 for AMOR → ROMA, 15 to reverse six numbers), and the parity of the number of swaps is fixed: AMOR → ROMA in 8 swaps yes, in 7 no.
E · Reversed trios. Reversing three neighbours swaps the two ends, which are two places apart: each number stays on places of the same parity. 1..5 can be reversed; 1..6 cannot.
F · The magician. Each coin flip changes the parity of the number of heads. Whoever knows the starting parity and counts the flips can guess the covered coin.
Based on the “Parity” worksheet of the Escuela de Pensamiento Matemático, with different numbers and goals. Numbers
checked by exhaustive search in scripts/verify_paridad.mjs.
Room-by-room contents
Room 1 · Two neighbouring cups
Cups in a row, some right way up and some upside down; each move turns over two neighbours. Animated example: an upside-down cup “travels” and two upside-down neighbours are fixed at once.
Student tasks
- 6 cups with cups 2 and 5 upside down: all right way up (3 moves).
- 8 cups with 4 upside down (1, 3, 6, 8): all right way up in just 4 moves.
- With 4 upside down, after one move there can be 2, 4 or 6.
Room 2 · Can it always be done?
Upside-down counter with “even/odd”. An “It is impossible” button next to Check in every challenge (on possible ones it takes 5 points off the room).
Student tasks
- 8 cups with 3 upside down: impossible; animated explanation (the counter changes by +2, −2 or 0 and stays odd; 0 is even).
- Any two cups, 10 cups with 6 upside down: possible (3).
- Any two with 5 upside down: impossible (what matters is that there are two, not that they are neighbours).
- With any three, can it be done? (yes) and do it (3 moves).
Room 3 · Numbers on the board
At each step two numbers are rubbed out and their difference is written, until one is left. Example with 1, 2, 3, 4.
Student tasks
- From 1 to 6, finish with 1.
- Finish with 5.
- Finish with 3 (the possible endings are 1, 3 and 5).
Room 4 · What about zero?
The sum on the board goes down at each step by twice the smaller number: its parity does not change.
Student tasks
- From 1 to 6, finish with 0: impossible (sum 21, odd); animated explanation with the sum.
- From 1 to 8 (sum 36), finish with 8.
- From 1 to 8, finish with 7: impossible.
- Which endings are possible from 1 to 8 (0, 2, 4, 6 and 8).
Room 5 · The somersaulting card
The ace of cups (Spanish deck) on a 4 × 4 board, face down in a corner. Each flip onto a neighbouring square turns it over; flips up or down also turn it upside down.
Student tasks
- Reach a star face up.
- Reach another one face up and upside down.
- Reach another one face up and upright, by any way.
- Predict, with the card starting face up, how it reaches a square at the bottom (face up and upside down; it does not depend on the way). After the answer the way is shown.
Room 6 · Back home
The chessboard explains the face (grey squares: face down; yellow: face up) and striped rows explain the cup’s turn.
Student tasks
- Back home face up: impossible; explanation with the chessboard.
- Reach a square in a “pink” row face up and upright: impossible; explanation with the rows.
- Predict, with the card starting face up: it cannot reach a square in a blue row “upside down” (after the answer the rows are painted and the way is shown).
- Predict: it cannot reach the opposite corner face down (after the answer the chessboard is painted and the way is shown).
Room 7 · Swap with your neighbour
Tiles in a row; ⇄ between two neighbours swaps them. The goal and a swap counter are shown.
Student tasks
- 1-2-3-4-5-6 → 2-4-6-1-3-5 in the minimum (6).
- AMOR → ROMA in the minimum (6).
- Minimum to reverse 1..6 (15 = 5 + 4 + 3 + 2 + 1).
Room 8 · Exactly
Pairs in the wrong order with respect to the goal, with an even/odd counter: each swap adds or takes away 1.
Student tasks
- AMOR → ROMA in exactly 8 swaps.
- In exactly 7: impossible; animated explanation.
- 1..5 reversed: with how many swaps exactly (12, among 9, 11, 12 and 13).
Room 9 · Reversed trios
Tapping the middle of a trio of neighbours reverses the three (the ends swap).
Student tasks
- 1..5 → 5-4-3-2-1.
- 1..6 → 5-6-3-4-1-2.
- Minimum number of reversals for 5-4-3-2-1 (4).
Room 10 · Coloured places
Places painted in two alternating colours: each number stays on places of its colour.
Student tasks
- 1..6 → 6..1: impossible; animated explanation with the colours.
- Which of four rows can be reached (3-2-1-6-5-4).
- Reach it (2 reversals).
Room 11 · The heads-or-tails magician
7 coins. The magician (the computer) looks, closes their eyes, hears the “flip!”s and guesses the covered coin. Then the student is the magician.
Student tasks
- Do the trick twice with the magician.
- Explain how it works (parity of the heads and number of flips).
- Guess three covered coins (up to 6 rounds).
Rooms to project
The most striking ones to show and discuss in class.