Problem-Solving Strategies

Study Sheet

Problem-Solving Strategies

How to find a proof when you do not know where to start

Pólya's Four Steps

Concept
Understand, plan, execute, look back

Understand: restate the problem in your own words; identify the unknown, the data, the condition; draw a figure; try small cases. Plan: connect to a known problem; specialize, generalize, or work backwards; introduce notation. Execute: carry it out, checking each step. Look back: check the result, find another route, ask what the method can also solve.

The first step is where beginners spend too little time and experts spend the most. Computing the first five cases of a problem about all nn is not a waste — it is how the pattern, and usually the proof, is discovered. Working backwards from the goal ("what would I need to be true one line before the end?") is the second most useful habit; it turns a blank page into a specific sub-goal.

Example
Draw it first

Fence posts are placed every 22 m along a straight 1010 m fence, including both ends. How many posts? The reflex answer 10÷2=510 \div 2 = 5 counts the gaps. A drawing shows posts at 0,2,4,6,8,100, 2, 4, 6, 8, 10: six posts for five gaps. Understanding the problem — here, literally drawing it — is the step that catches the error.

Example
Small cases reveal the pattern
1234567
Three lines, three crossings, seven regions: the third line crossed two lines and added three regions.

How many regions do nn lines in general position (no two parallel, no three through a point) cut the plane into? n=0,1,2,3n = 0, 1, 2, 3: 1,2,4,71, 2, 4, 7. Differences 1,2,31, 2, 3: the nnth line crosses the n−1n - 1 earlier ones at n−1n - 1 points, which cut it into nn pieces, and each piece splits one region in two. So R(n)=R(n−1)+nR(n) = R(n - 1) + n, and R(n)=1+(1+2+⋯+n)=1+n(n+1)2R(n) = 1 + (1 + 2 + \cdots + n) = 1 + \dfrac{n(n + 1)}{2}, proved by induction with exactly that step.

Tip
Wishful thinking

Ask: "what would make this easy?" If the numbers were smaller, if the shape were symmetric, if one variable were zero — then solve THAT and see whether the solution survives being un-wished.

Side note
Where it goes wrong

Jumping from the small cases to a formula without the reason. The data 1,2,41, 2, 4 for n=0,1,2n = 0, 1, 2 lines also fit 2n2^n, which is wrong from n=3n = 3 on. The pattern becomes trustworthy only when you can say why each new line adds what it adds.

Try it
Try it: work backwards

You must reach exactly 100100 starting from 11 using only "add 11" and "double". What is the fewest moves? (Hint: go backwards from 100100.)

Show the answer

Backwards, halve when even, subtract 11 when odd: 100→50→25→24→12→6→3→2→1100 \to 50 \to 25 \to 24 \to 12 \to 6 \to 3 \to 2 \to 1: 8\mathbf{8} moves. Halving whenever possible is optimal because, run forwards, doubling is the only move that gains more than 11, and delaying a doubling never helps.

Invariants and Parity

Concept
Find what does not change

When a process or game is described by moves, look for an invariant: a quantity (often a parity, a sum mod kk, or a coloring count) that every move preserves. If the start and the goal have different values of the invariant, the goal is unreachable — a proof of impossibility with no case analysis at all.

The power of an invariant is that it replaces "try every sequence of moves" — usually infinitely many — by one check per kind of move. You never follow the process; you only verify that a single move cannot change the quantity. Finding the invariant is the creative part: compute a few candidate quantities (sum, parity, sum of squares, a count mod 33) before and after one move, and keep the one that does not change.

Example
A cup game

Seven cups, all face up; a move flips exactly two. Can all end face down? Each move changes the number of face-up cups by −2-2, 00, or +2+2: the parity of face-up cups never changes. It starts odd (77) and the goal is 00, even. Impossible. ■\blacksquare

Example
The chessboard
30 dark32 lighta dominocovers oneof each
Every domino covers one dark and one light square; the board left has 30 dark and 32 light.

Remove two opposite corners of an 8×88\times8 board. Can the rest be tiled by dominoes? Each domino covers one dark and one light square. Opposite corners have the same color, so 3030 of that color and 3232 of the other remain, and 3131 dominoes would need 3131 of each. No. ■\blacksquare

Example
A rotation that keeps a sum

Three numbers 3,4,53, 4, 5 are on a board. A move replaces two of them, aa and bb, by 0.6a−0.8b0.6a - 0.8b and 0.8a+0.6b0.8a + 0.6b. Can the board ever read 4,6,124, 6, 12? The sum of squares is invariant: (0.6a−0.8b)2+(0.8a+0.6b)2=(0.36+0.64)a2+(0.64+0.36)b2=a2+b2(0.6a - 0.8b)^2 + (0.8a + 0.6b)^2 = (0.36 + 0.64)a^2 + (0.64 + 0.36)b^2 = a^2 + b^2, since the abab terms cancel. It starts at 9+16+25=509 + 16 + 25 = 50, while 16+36+144=19616 + 36 + 144 = 196. Impossible. ■\blacksquare

Side note
Where it goes wrong

Finding a quantity that changes "usually" but not always, or proving a state is unreachable when the problem asked whether it is reachable (an invariant proves impossibility only; possibility needs a construction).

Try it
Try it: invariant

The numbers 1,2,…,101, 2, \ldots, 10 are on a board. A move erases two numbers a,ba, b and writes a+ba + b. What single number remains at the end?

Show the answer

The SUM is invariant: erasing aa and bb and writing a+ba + b leaves it unchanged. It starts at 1+2+⋯+10=551 + 2 + \cdots + 10 = \mathbf{55}, so the last number is 5555.

Coloring Arguments

Concept
Color the board to count

To show a region cannot be tiled by certain pieces, color it so that every piece, wherever it is placed, covers a fixed pattern of colors. Then compare what the pieces must cover with what the region has.

A coloring is an invariant in disguise: the "move" is placing one more piece, and the quantity preserved is a relation between the numbers of cells of each color covered. The checkerboard handles pieces that cover equally many dark and light cells; pieces that do not balance, or longer pieces, need a finer coloring, such as coloring cell (i,j)(i, j) by i+j mod 4i + j \bmod 4 for 1×41 \times 4 bars.

Example
A corner versus a neighbor of a corner

Color a 5×55 \times 5 board like a checkerboard with dark corners: 1313 dark and 1212 light cells. Remove a light cell next to a corner: 1313 dark and 1111 light remain, and 1212 dominoes would need 1212 of each, so no tiling exists. Remove a corner instead: 1212 and 1212 remain, and the coloring proves nothing — in fact that board can be tiled. A balanced count is not a proof of possibility.

Example
T-tetrominoes on a 6 by 6 board
3 dark, 1 light1 dark, 3 light
However it is placed, a T covers an odd number of dark squares.

Can a 6×66 \times 6 board be tiled by 99 T-shaped pieces of four cells? Checkerboard it: 1818 dark and 1818 light. Wherever a T is placed, its row of three alternates (two cells of one color around a middle of the other), and the fourth cell, touching the middle, has the color opposite to the middle. So each T covers 33 cells of one color and 11 of the other: an odd number of dark cells. Nine odd numbers add to an odd number, but the board has 1818 dark cells. No tiling. ■\blacksquare

Example
Straight tetrominoes on a 6 by 6 board
0123011230122301233012300123011230120: 9 cells1: 10 cells2: 9 cells3: 8 cells
Every 1 by 4 bar covers one cell of each class 0,1,2,30, 1, 2, 3, but the classes have 9,10,9,89, 10, 9, 8 cells.

Can a 6×66 \times 6 board be tiled by 1×41 \times 4 bars? The area, 3636, is a multiple of 44, and the checkerboard balances (1818 and 1818) — neither rules it out. Color cell (i,j)(i, j) by (i+j) mod 4(i + j) \bmod 4. Any bar, horizontal or vertical, covers four consecutive values of i+ji + j, one of each class. So 99 bars cover 99 cells of each class. But the classes 0,1,2,30, 1, 2, 3 have 9,10,9,89, 10, 9, 8 cells. No tiling. ■\blacksquare

Side note
Where it goes wrong

Stopping at the first coloring. The checkerboard balances on the 6×66 \times 6 board, and it is tempting to conclude the 1×41 \times 4 tiling "should work". A coloring that balances only means that coloring is too weak; try one matched to the shape of the piece.

Try it
Try it: fifteen Ts and a square

Show that an 8×88 \times 8 board cannot be tiled by 1515 T-tetrominoes and one 2×22 \times 2 square.

Show the answer

Checkerboard: 3232 dark cells. The 2×22 \times 2 square covers exactly 22 dark cells. Each T covers 11 or 33 dark cells — an odd number — and 1515 odd numbers add to an odd number. So the pieces cover (odd) +2+ 2 = an odd number of dark cells, never 3232. ■\blacksquare

Monovariants and Games

Concept
A quantity that only moves one way

A monovariant is a quantity that changes in only one direction with every move. If it is a non-negative integer and strictly decreases at every move, the process must stop. In games, the analogue is a property of positions that the winning player can always restore.

Termination proofs are well-ordering in action: a strictly decreasing sequence of non-negative integers cannot go on forever. The skill is finding the quantity. Count something the moves are designed to fix — pairs out of order, friendships inside a room, distance from the goal — and check that every allowed move reduces it by at least 11.

Example
Sorting by swaps

A row of numbers is sorted by repeatedly swapping two neighbors that are out of order. Does it always finish? Count the inversions: pairs (not just neighbors) in the wrong order. Swapping an out-of-order neighboring pair fixes that pair and changes no other pair's order, so the count drops by exactly 11. It cannot drop below 00, so the process stops — and it takes exactly as many swaps as there were inversions. For 3,1,4,23, 1, 4, 2 the inversions are (3,1),(3,2),(4,2)(3, 1), (3, 2), (4, 2): exactly 33 swaps.

Example
Splitting a club

Prove that the members of any club can be split into two rooms so that everyone has at most half of their friends in their own room. Start with any split. If someone has more than half of their friends in their room, move them. Their friendships inside a room change from (friends in old room) to (friends in new room), a strict decrease; nobody else's friendships inside rooms change. So the total number of friendships inside rooms strictly decreases, and since it is a non-negative integer, the moves stop. When they stop, nobody has more than half of their friends in their own room. ■\blacksquare

Example
The take-away game

There are 2121 counters. Two players alternately take 11, 22 or 33; whoever takes the last counter wins. The first player wins: take 11, leaving 2020. Whenever the opponent takes kk, take 4−k4 - k. After each of your turns the number left is a multiple of 44 — the property you restore — so the opponent never faces 00 on their turn, and you take the last counter.

Side note
Where it goes wrong

A decreasing quantity that is not a non-negative integer. "The distance to the target halves every move, so we arrive" is false: a positive real can halve forever without reaching 00. Termination needs integer values and a floor.

Try it
Try it: thirty counters

There are 3030 counters; players alternately take 11 to 44, and whoever takes the last one wins. Which player can force a win, and how?

Show the answer

The second player. Multiples of 55 are losing for the player about to move: whatever kk they take (11 to 44), the other replies with 5−k5 - k and leaves a multiple of 55 again. 3030 is a multiple of 55, so the second player answers every kk with 5−k5 - k and takes the last counter.

Why It Works

Let II be a quantity with I(after)=I(before)I(\text{after}) = I(\text{before}) for every allowed move. By induction on the number of moves, every position reachable from the start ss has I=I(s)I = I(s): true after 00 moves, and each move preserves it. So a position gg with I(g)≠I(s)I(g) \ne I(s) is not reachable. The converse is not part of the argument: positions with I(g)=I(s)I(g) = I(s) may still be unreachable, which is why a matching invariant never proves that a goal can be reached.

Example
A false invariant and a true one

The numbers 1,…,101, \ldots, 10 are on a board; a move erases a,ba, b and writes ∣a−b∣|a - b|. What can the last number be? Flawed: "the sum is invariant, so the last number is 5555". It is not invariant — erasing 77 and 33 and writing 44 lowers the sum by 66. What is invariant is the PARITY of the sum: a+ba + b and ∣a−b∣|a - b| differ by 2min⁡(a,b)2\min(a, b), an even number. The sum starts at 5555, odd, so the last number is odd. The invariant does not say which odd number; that would need a further argument.