In one sentence
A process changes at every step, but if some quantity never changes at any step, then
The end point is locked by it: states with a different value of can never be reached. If a quantity never increases (a decreasing monovariant) and is a non-negative integer, the process cannot go on forever; if it never decreases and actually grows, you can never get back to the start. Looking for such a quantity is the first reflex for problems about “operations”.
Predict first
The numbers are written on a board. Each time, erase two numbers and write . In the end one number is left. Can it be ?
No. The sum is odd; each move lowers the sum by , which is even, so the parity of the sum never changes. The last number is odd.
Example: 1, 2, 3, 4, 5. Each time, replace a, b by a + b + ab. What is left at the end?
Step 1 / 4- Find the change
looks messy, but add and it factors: .
Stop 1 · Periodic sequences (Vol. 5)
If an integer sequence has a bounded invariant, it can only take finitely many states, so it must be periodic.
Example: a₁ = 1, a₂ = 3, aₙ₊₂ = aₙ₊₁ − aₙ. Why is it periodic?
Step 1 / 3- Find an invariant quadratic
Write two neighboring terms as ; the next pair is . Try :
Stop 2 · Iteration: two means (Vol. 2)
Iterate two numbers at once: one quantity is invariant and two are monotonic, so the limit gets squeezed out.
Example: x₀ = 1, y₀ = 4, xₙ₊₁ = (xₙ + yₙ)/2, yₙ₊₁ = 2xₙyₙ/(xₙ + yₙ)
Step 1 / 3- The invariant
The arithmetic mean times the harmonic mean:
Stop 3 · Rotating the axes: invariants of a conic (Vol. 7)
When the coordinate axes are rotated, the coefficients of all change, but and do not.
Example: what curve is 5x² + 4xy + 2y² = 6?
Step 1 / 3- Two invariants
After rotating to remove the term we get . The invariants give:
Stop 4 · An increasing monovariant: no way back (Vol. 5)
Infinite descent says that a positive integer cannot decrease forever. In the other direction, a quantity that strictly increases means you can never return to the start.
One problem, several solutions
The board shows . Each time, replace two numbers by and . Can appear again after some moves (at least one)?
Sum of squares: an increasing monovariant
, so a move increases by : it never decreases. In the first move both numbers are positive, so becomes strictly larger than ; after that it never decreases, so it can never return to . Answer: no.
CostOnce you find Σx², you are done.
The sum: another increasing monovariant
The new sum is , which is more than before, so the sum never decreases either. The starting numbers are pairwise different, so after the first move the sum is strictly larger than ; it never decreases after that, so again there is no way back.
CostWorks just as well, but watch out: it does not grow when the two numbers are equal.
Practice
The numbers are written on a board. Each time, erase two numbers and write , until one number is left. What is its remainder on division by ?
The numbers are written on a board. Each time, erase two numbers and write . What number is left at the end?
The numbers are written on a board. Each time, erase two numbers and write . What number is left at the end?
Rotating the coordinate axes turns the curve into . Find and decide what type of curve it is.