Method stop · When and why do we use it?

Odd and Even Numbers

In the Chinese book: 奇数与偶数

Find a parity no move can change. If start and goal disagree, it can't be done.

📖 §2.4 of 《整除、同余与不定方程》M12 Parity lineM17 Coloring and Assigning Values line

Before this stop, visit:Fermat's Little Theorem and Its Uses (Concept)

One idea, one pictureChoose + or − for each number and try to make the result 0. Really can't? Change n to 7 and try again.

Loading figure…

In one sentence

Parity is just the remainder mod : the coarsest sieve there is, sorting the integers into only two classes. It is used in almost the same way every time:

Find a quantity whose parity never changes, whatever you do (or changes at every step). If the start and the goal have different parities, the goal can never be reached.

All you need to know is three facts:

  • odd ± odd = even, even ± even = even, odd ± even = odd; so adding a number and subtracting the same number have the same effect on parity.
  • When you add up a bunch of numbers, the parity of the sum depends only on how many of them are odd.
  • A product is odd every factor is odd.

Why ±1 ±2 ±3 ±4 ±5 ±6 can never make 0

Step 1 / 5
Loading figure…
  1. All plus signs

    , which is odd.

Stop 1 · Operations: flipping cups

Predict first

cups stand facing up. Each move you must flip exactly of them. Can you, after some number of moves, get all cups facing down?

Choose an answer first; then you can see the result.

Stop 2 · Boards: black-and-white coloring

Color the cells of the board black and white according to the parity of “row number + column number”. Two neighboring cells are always one black and one white. The coloring is parity drawn onto the picture.

Loading figure…
An board with two opposite corners removed leaves cells. Can dominoes of size cover it? Then try removing other cells.

The two opposite corners you removed have the same color. That leaves cells of one color and of the other, but every domino covers one black and one white cell, so dominoes need black and white. The board cannot be covered, and you don't even need to try.

Stop 3 · Equations: two ways

One problem, several solutions

Prove that has no integer solutions.

Parity argument

. Since is even, and have the same parity.

  • Both odd: the product is odd, so it is not .
  • Both even: the product is a multiple of . But is not a multiple of .

Neither case works, so there are no integer solutions.

CostNo tools needed, but you have to think of factoring it as (x−y)(x+y).

Mod 4

A square divided by can only leave or (the topic of the next stop). So divided by can only leave , while leaves .

Loading figure…

CostOne step, but you need to know first that squares leave only 0 or 1 mod 4.

The two solutions say the same thing: mod simply splits “odd and even” one level finer. When a parity argument is not enough, the next step is to switch to a better modulus.

Practice

Exercise 1Basic

Is odd or even? (Don't work out the sum.)

Exercise 2Basic

Put a or a in front of each of however you like, then work out the result. What is the smallest non-negative result you can get?

Exercise 3Advanced

is any arrangement of . Prove that the product is always even.

Exercise 4Challenge

A grid has one beetle in each cell. When a whistle blows, every beetle crawls to a neighboring cell that shares a side with its own. Prove that after the whistle some cell must be empty.

Mistake Museum · Exhibits from this stop

Before you leave, look at the traps other people fell into here.See every exhibit in the museum →

Exhibit

Parity matches, so it must be possible

The wrong step: After removing two cells there are as many black cells as white ones, so the board can certainly be covered with dominoes.
What went wrong? Think first, then open

Diagnosis Parity (or coloring) is only a security check: whatever fails it is impossible, but whatever passes it is not necessarily possible. For example, the removed cells might cut off a single cell in a corner. Black and white can still be equal, but the board obviously cannot be tiled.

The right step: To show that something “can be done”, you have to actually produce a way of doing it. A parity argument is only for showing that something “cannot be done”.

“Parity can rule things out, never in”

Exhibit

Thinking a sum and a difference can have different parities

The wrong step: is even, while is odd.
What went wrong? Think first, then open

Diagnosis is even, so and always have the same parity.

The right step: The sum and the difference of two integers have the same parity. So is either odd or a multiple of ; it can never be a number with exactly one factor of .

“Sum and difference are both odd or both even”