How Mathematicians Approach a Problem They Have Never Seen
Follow the working habits that get a stuck solver moving, from small cases and pictures to proof, using one locker puzzle from start to end.
Key takeaways
- Start by restating the problem and naming exactly what is given and what is wanted.
- Small cases produce evidence and suggest a conjecture, which still needs a proof.
- Changing the representation, such as switching from a story to a table or picture, often exposes the key idea.
- Being stuck is a normal stage, and recording what failed is part of the progress.
- After solving, test the answer and ask what other problems the same idea handles.
Faced with an unfamiliar problem, a mathematician rarely sees the answer. The usual move is to make the problem concrete: restate it, try small examples, draw something, look for a pattern and then ask why the pattern holds.
None of this requires special talent. These are habits that turn "I have no idea" into a sequence of smaller questions you can actually work on, and anyone can practice them.
The sample problem
We will use a classic puzzle throughout. A hallway has 100 closed lockers, numbered 1 to 100, and 100 students walk past in turn. Student 1 changes the state of every locker. Student 2 changes lockers 2, 4, 6 and so on. Student 3 changes every third locker. This continues until student 100, who changes only locker 100. "Change" means open it if closed and close it if open.
Which lockers are open at the end?
If no method comes to mind, good. That is the situation this article is about. Simulating all 100 students by hand is possible, but long and error-prone, and it would give a list without a reason.
Understand it before attacking it
Begin by saying the problem back in your own words, then check the details. Do the lockers start closed? Does student k touch only multiples of k? Is the question about the final state only?
Next, identify the unknown. We want a set of locker numbers. Then ask what determines it. A single locker ends open if it was changed an odd number of times and closed if changed an even number of times.
That one sentence is already progress. The question about a hundred students and a hundred doors has become a question about one door: how many times is locker n changed?
Many failed attempts fail right here, by solving a slightly different problem. Underlining each condition and asking where it gets used is a cheap protection. George Pólya made this stage the first of his four steps of problem solving.
Try small cases
Shrink the hallway. With 10 lockers and 10 students, you can track everything. Locker 6 is changed by students 1, 2, 3 and 6, four times, so it ends closed. Locker 4 is changed by students 1, 2 and 4, three times, so it ends open.
| Locker | Changed by students | Times | Final state |
|---|---|---|---|
| 1 | 1 | 1 | open |
| 2 | 1, 2 | 2 | closed |
| 3 | 1, 3 | 2 | closed |
| 4 | 1, 2, 4 | 3 | open |
| 5 | 1, 5 | 2 | closed |
| 6 | 1, 2, 3, 6 | 4 | closed |
| 7 | 1, 7 | 2 | closed |
| 8 | 1, 2, 4, 8 | 4 | closed |
| 9 | 1, 3, 9 | 3 | open |
| 10 | 1, 2, 5, 10 | 4 | closed |
The open lockers are 1, 4 and 9. Those are the perfect squares. You now have something definite to say. More on this move is in using small cases to find a pattern.
Guess, then doubt
The conjecture is that locker n ends open exactly when n is a perfect square. It fits ten cases. Ten cases are not a proof, and some patterns that hold for a long stretch break later, as shown in sequences that break their own rule.
So test it somewhere new. Try 16: the students who touch it are 1, 2, 4, 8 and 16, which is five, so it is open. Try 12: students 1, 2, 3, 4, 6 and 12, which is six, so it is closed. Try a prime such as 13: only students 1 and 13, so closed.
Each test could have destroyed the guess. That is what makes it informative. Choose cases that are different in kind from those that suggested the pattern, including the awkward ones.
Find the reason
Now ask why squares are special. Locker n is touched by student d exactly when d divides n. So the number of changes equals the number of positive divisors of n.
Divisors come in pairs: if d divides n, so does n ÷ d. For 12 the pairs are (1, 12), (2, 6) and (3, 4). Paired off like this, the count is even.
The only way to get an odd count is for some divisor to be paired with itself:
d = n ÷ d
d² = n That happens exactly when n is a perfect square, and then only for one positive d, namely √n. For 36 the pairs are (1, 36), (2, 18), (3, 12), (4, 9) and the lone 6, giving nine divisors.
So the open lockers are 1, 4, 9, 16, 25, 36, 49, 64, 81 and 100. The argument covers a hallway of any length.
Expect to go around more than once.
When the first idea fails
Real work usually includes dead ends. Experienced solvers have a stock of ways to change the angle of attack.
- Draw it. A diagram, graph or table can show relationships that sentences hide.
- Rename it. Translate people into points, friendships into lines, moves into numbers.
- Simplify it. Remove a condition, reduce the dimension or take a symmetric case.
- Look at extremes. Consider the largest, smallest or first object with a property.
- Find what stays fixed. An unchanging quantity can show that a goal is impossible.
- Reverse it. Start at the goal, as in working backward.
- Recall a relative. Ask which solved problem has the same unknown or the same structure.
The invariant idea settles a famous example. Remove two opposite corners from a chessboard. Can 31 dominoes cover the remaining 62 squares? Each domino covers one dark and one light square, but opposite corners share a color, leaving 32 of one and 30 of the other. So no tiling exists, and no amount of trial would have shown why as clearly.
A change of viewpoint in action
Here is a second problem where the representation decides everything. A knockout tournament has 100 players. Each match eliminates one player, and some players sit out a round when numbers are uneven. How many matches are needed to produce a champion?
The direct approach works through the rounds: 50 matches leave 50 players, 25 more leave 25, then 12 matches with one player sitting out leave 13, and so on. Adding 50 + 25 + 12 + 6 + 3 + 2 + 1 gives 99.
Now count something else. Every match produces exactly one loser, and every player except the champion loses exactly once. So the number of matches equals the number of eliminated players, 99.
The second argument is a line long. It also answers questions the first cannot easily handle, such as 1,000,000 players or an unusual schedule of byes: the answer is always one less than the number of players. The trick was to match the things being counted with other things that are easier to count.
When a calculation comes out unexpectedly neat, as 99 did here, treat that as a hint that a shorter explanation is waiting.
Choosing good notation
A surprising amount of progress comes from naming things well. Give a letter to the quantity you want, and let related quantities have related names. If a problem has two similar objects, a₁ and a₂ are easier to follow than a and q.
Pick coordinates or labels that make the situation symmetrical. For three consecutive integers, calling them n − 1, n and n + 1 makes their sum 3n at once, so the sum of three consecutive integers is always divisible by 3. Starting with n, n + 1 and n + 2 also works, giving 3n + 3, but the first choice shows the middle number's role immediately.
If the notation starts producing long, ugly expressions, consider that a signal to back up and choose again.
Living with being stuck
Keep a written record. Note each approach, how far it went and exactly where it broke. A failed attempt often reveals which condition you have not used, and that condition is likely to matter.
It also helps to step away. The French mathematician Henri Poincaré described how an idea about his research came to him as he was boarding a bus, after a period of concentrated work that had seemed to stall. His account is one person's experience, but many solvers report something like it. The preparation seems to matter: a rest follows real effort and does not replace it.
Talking helps too. Explaining the problem to someone, even someone who says nothing, forces you to state vague assumptions precisely. For more tactics, see what to do when you are stuck.
Look back and push further
A correct answer is a good place to ask more. Is the result reasonable? Ten of the first 100 numbers are squares, and the open lockers thin out as numbers grow, which fits.
Then vary the problem. How many lockers are open with 1,000 lockers? The squares up to 1,000 run from 1² to 31², since 31² = 961 and 32² = 1,024, so 31 are open. Which lockers were touched exactly twice? Those with exactly two divisors, the primes. Which were touched exactly three times? Squares of primes, such as 4, 9, 25 and 49.
Each variation uses the same idea, counting divisors, from a new side. This is how a single puzzle turns into a piece of knowledge.
A habit for learners and teachers
The next time a problem looks foreign, give yourself a fixed opening routine before judging whether you can do it: restate, make a small case, record what you see, state a guess. Ten minutes of that usually produces a better question than the one you started with.
Teachers can support the habit by asking "what have you tried?" and "how could you test that?" before offering a method. Praise a clearly described failed attempt. Students who learn that unfamiliar problems have ways in become more willing to start, which is the step everything else depends on.