Some quantity stays fixed no matter what move you make. Find it, and the puzzle either has a clean parity argument or no solution at all.
Method · Invariants
Intro
When a problem describes a process β “repeatedly do this until one thing is left” or “can this state reach that state?” β find a quantity that every legal move preserves. If the start and goal disagree on that quantity, the goal is unreachable; if they agree, the invariant often forces the answer. Olympiad-flavored, but the same move powers state-machine and system-design interview questions: “what property of this system does no transition ever change?”
β Intro Β· expand
Try first (productive failure)
Before the worked example: spend 60 seconds taking your best shot at this.
A guess is fine β being briefly wrong about a problem makes the explanation
land harder when you read it. This appears once per tutorial; skip
if you already know the trick.
60s
β Try first Β· expand
Worked example
Start with the numbers 1, 2, 3, 4, 5, 6, 7 on a blackboard. In one move, you may erase any two numbers $a$ and $b$ and replace them with $|a - b|$. After 6 such moves, only one number remains. Is it possible for that final number to equal 1? Answer 1 for yes, 0 for no.
β Worked example Β· expand
Practice 1 of 3Type a fraction, decimal, or expression β mathjs parses it.
β Practice Β· expand
Reflection
When you spot a “keep doing this move” problem, what’s your menu of candidate invariants to try first? In your own words, why does an invariant <em>prove</em> unreachability rather than just suggest it?