Invariance and Symmetry

Study Sheet

Invariance and Symmetry

Quantities that survive every move, and symmetries that solve for you

Finding the Invariant

Concept
Parity, sums mod kk, and colorings

For a process (a game, an operation repeated on a board or a set), compute a quantity after each move: the parity of a count, a sum modulo kk, a weighted sum, a determinant, a product of signs. If it never changes, states with different values are mutually unreachable.

The Putnam disguises invariants inside algebra: "the operation replaces (a,b)(a, b) by (a+b,ab)(a + b, ab)… show some value is never reached" is an invariant problem, and the invariant is often a symmetric function of the pair (here a+b−aba + b - ab is not preserved, but (a−1)(b−1)(a - 1)(b - 1) maps to (a+b−1)(ab−1)(a + b - 1)(ab - 1) — try several candidates). The systematic search: write the move algebraically and test the elementary symmetric functions, discriminants and determinants.

Concept
Monovariants

A quantity that always DEcreases (or increases) and is bounded proves that a process terminates, and — if it is an integer — how many steps at most. Potential functions, total energy, number of inversions.

When the question is "show the process stops" rather than "show the state is unreachable", look for a monovariant. The classic: nn people around a table pass coins; the sum of squares of holdings strictly decreases with each legal move, so the process ends. Strict decrease of a non-negative integer is a proof of termination in one sentence.

Concept
Symmetry that solves the problem

If the problem is invariant under a transformation (swapping variables, x→1−xx \to 1 - x, rotation of a configuration), the answer or the extremal configuration is often invariant too — or the transformation pairs up terms that cancel.

Symmetry arguments give integrals for free (King's rule), pair off terms in sums (roots of unity, k↔n−kk \leftrightarrow n - k), and settle games (the second player mirrors). The failure mode is assuming the extremum is at the symmetric point without proof: symmetry says the symmetric point is a critical point, not that it is the maximum. Check.

Side note
Where it goes wrong

An "invariant" that is preserved by most moves but not all — verify it on EVERY kind of move. And an invariant shows unreachability only; to show a state IS reachable you must construct the path.

Try it
Try it: an invariant

On a board are the numbers 1,2,…,2n1, 2, \ldots, 2n. A move erases two numbers a,ba, b and writes ∣a−b∣|a - b|. Show the last number has the same parity as nn.

Show the answer

The parity of the sum of the numbers on the board is invariant: a+b≡∣a−b∣(mod2)a + b \equiv |a - b| \pmod 2. The initial sum is 1+2+⋯+2n=n(2n+1)≡n(mod2)1 + 2 + \cdots + 2n = n(2n + 1) \equiv n \pmod 2, so the last number is congruent to nn mod 22. (Check n=1n = 1: the numbers 1,21, 2 leave 11, odd.)

Invariants, Worked

Tip
The invariant method

Find a quantity II with I(after)=I(before)I(\text{after}) = I(\text{before}) for EVERY allowed move. If I(start)≠I(target)I(\text{start}) \ne I(\text{target}), the target is unreachable. For tilings, colour the board so that every tile covers the same colours whatever its position; then the colour counts are the invariant.

The proof is an induction on the number of moves: if each move preserves II, so does every sequence of moves, so every reachable state has I=I(start)I = I(\text{start}). Finding II is the whole problem. Write the move algebraically and test the natural candidates on it: the sum, the sum of squares, a product, a residue, a discriminant. For a tiling, the "move" is placing one tile, and the invariant is a weighting of the cells that every tile placement covers with the same total weight.

Example
Worked: a rotation move (folklore)

The numbers 1,2,…,101, 2, \ldots, 10 are on a board. A move erases two numbers a,ba, b and writes a+b2\tfrac{a + b}{\sqrt2} and a−b2\tfrac{a - b}{\sqrt2} in their place. Can the board ever show ten numbers each of absolute value less than 66?

Step 1 — test the sum of squares on one move: (a+b2)2+(a−b2)2=2a2+2b22=a2+b2\left(\tfrac{a+b}{\sqrt2}\right)^2 + \left(\tfrac{a-b}{\sqrt2}\right)^2 = \tfrac{2a^2 + 2b^2}{2} = a^2 + b^2. The other eight numbers are untouched, so the sum of squares of all ten numbers is invariant.

Step 2 — at the start it is 12+22+⋯+102=3851^2 + 2^2 + \cdots + 10^2 = 385.

Step 3 — ten numbers of absolute value less than 66 have sum of squares less than 10⋅36=360<38510\cdot36 = 360 < 385. So the answer is no.

How to find it. The move is a rotation of the pair (a,b)(a, b) by 45∘45^\circ (its matrix is orthogonal), and rotations preserve length: the sum of squares is the first thing to try.

Example
Worked: a discriminant that does not move (Russian olympiad)

A move replaces a quadratic f(x)f(x) by x2f ⁣(1x+1)x^2f\!\left(\tfrac1x + 1\right) or by (x−1)2f ⁣(1x−1)(x - 1)^2f\!\left(\tfrac{1}{x-1}\right). Can x2+4x+3x^2 + 4x + 3 be turned into x2+10x+9x^2 + 10x + 9?

Step 1 — compute the moves on f=ax2+bx+cf = ax^2 + bx + c. First: x2f ⁣(1x+1)=a(1+x)2+bx(1+x)+cx2=(a+b+c)x2+(2a+b)x+ax^2f\!\left(\tfrac1x + 1\right) = a(1 + x)^2 + bx(1 + x) + cx^2 = (a + b + c)x^2 + (2a + b)x + a. Second: (x−1)2f ⁣(1x−1)=a+b(x−1)+c(x−1)2=cx2+(b−2c)x+(a−b+c)(x - 1)^2f\!\left(\tfrac{1}{x-1}\right) = a + b(x - 1) + c(x - 1)^2 = cx^2 + (b - 2c)x + (a - b + c).

Step 2 — discriminants: (2a+b)2−4a(a+b+c)=b2−4ac(2a + b)^2 - 4a(a + b + c) = b^2 - 4ac, and (b−2c)2−4c(a−b+c)=b2−4ac(b - 2c)^2 - 4c(a - b + c) = b^2 - 4ac. Both moves preserve the discriminant.

Step 3 — x2+4x+3x^2 + 4x + 3 has discriminant 16−12=416 - 12 = 4 and x2+10x+9x^2 + 10x + 9 has 100−36=64100 - 36 = 64. Unreachable.

How to find it. Track the roots: if f(r)=0f(r) = 0, the first new polynomial vanishes at 1r−1\tfrac{1}{r - 1} and the second at 1+1r1 + \tfrac1r. The discriminant is a2(r1−r2)2a^2(r_1 - r_2)^2, and under r↦1r−1r \mapsto \tfrac{1}{r-1} the root difference is divided by (r1−1)(r2−1)(r_1 - 1)(r_2 - 1) exactly as the new leading coefficient a+b+c=f(1)=a(1−r1)(1−r2)a + b + c = f(1) = a(1 - r_1)(1 - r_2) multiplies it. Quantities built from root differences are the natural invariants of substitutions.

Example
Worked: 1×41\times4 tiles on a 10×1010\times10 board (folklore)
colour 0: 25colour 1: 26colour 2: 25colour 3: 24
Cell (i, j) gets colour (i + j) mod 4. Each tile (thick outlines) covers one cell of each colour, but the board has 25, 26, 25, 24.

Show that a 10×1010\times10 board cannot be tiled by 1×41\times4 rectangles (placed horizontally or vertically).

Step 1 — number rows and columns 00 to 99 and give cell (i,j)(i, j) the colour (i+j) mod 4(i + j) \bmod 4.

Step 2 — a horizontal tile covers (i,j),…,(i,j+3)(i, j), \ldots, (i, j+3), whose values of i+ji + j are four consecutive integers, one in each residue class mod 44; the same holds for a vertical tile. So every tile covers exactly one cell of each colour.

Step 3 — a tiling uses 1004=25\tfrac{100}{4} = 25 tiles and would cover exactly 2525 cells of each colour.

Step 4 — count: the number of cells with i+j=si + j = s is s+1s + 1 for s≤9s \le 9 and 19−s19 - s for s≥9s \ge 9. Colour 11 gets s=1,5,9,13,17s = 1, 5, 9, 13, 17: 2+6+10+6+2=26≠252 + 6 + 10 + 6 + 2 = 26 \ne 25. No tiling exists. (The other colours get 2525, 2525, 2424.)

How to find it. Area alone (100=25⋅4100 = 25\cdot4) is no obstruction, so the invariant must see position. A colouring adapted to the tile — period 44 along both rows and columns — is the finest one every tile treats identically. The general theorem (de Bruijn): an m×nm\times n board tiles by 1×k1\times k bars iff k∣mk \mid m or k∣nk \mid n.

Side note
Where it goes wrong

For the 10×1010\times10 board, the ordinary checkerboard colouring is the tempting first try: each 1×41\times4 tile covers two black and two white cells, the board has 5050 of each — and the conclusion "the colouring shows no obstruction, so a tiling probably exists" is wrong. A balanced count is consistent with a tiling; it proves nothing. Only a colouring in which every tile covers the SAME multiset of colours, and the board does not, proves impossibility — here that requires colours mod 44, not mod 22. And even a perfectly balanced adapted colouring never proves a tiling exists: that needs a construction.

Try it
Try it: the 6×66\times6 board

Can a 6×66\times6 board be tiled by 1×41\times4 rectangles? (The area, 3636, is divisible by 44.)

Show the answer

No. Colour cell (i,j)(i, j), 0≤i,j≤50 \le i, j \le 5, by (i+j) mod 4(i + j) \bmod 4; every tile covers one cell of each colour, so a tiling by 99 tiles needs 99 of each. The number of cells with i+j=si + j = s is s+1s + 1 for s≤5s \le 5 and 11−s11 - s for s≥5s \ge 5. Colour 11 gets s=1,5,9s = 1, 5, 9: 2+6+2=10≠92 + 6 + 2 = 10 \ne 9. (The four counts are 9,10,9,89, 10, 9, 8.) Consistent with de Bruijn: 44 divides neither side.

Monovariants, Worked

Tip
Termination by a monovariant

If every move strictly increases (or decreases) a quantity MM, and MM can take only finitely many values — or values in a set with no infinite decreasing chain, such as the nonnegative integers — then the process stops. The number of values of MM bounds the number of moves.

A strictly monotone quantity never returns to an earlier value, so no state repeats. If there are finitely many possible values, the sequence of values, and hence of moves, is finite; with nonnegative integer values decreasing by at least 11, the starting value itself bounds the number of moves. The creative step is the choice of MM: a total, an energy, a count of "bad" pairs. Test it on the move and compute the change exactly; its sign should be forced by the very condition that makes the move legal.

Example
Worked: flipping signs in a table (folklore)

In an m×nm\times n table of real numbers you may change the sign of every entry of a row or column whose sum is negative. Show that any sequence of such moves is finite; deduce that the table can always be brought to a state where every row and column sum is nonnegative.

Step 1 — the monovariant is the total sum TT of the table. Flipping a line whose sum is s<0s < 0 changes that line's contribution from ss to −s-s and leaves everything else alone, so TT increases by −2s>0-2s > 0.

Step 2 — each entry is always ±\pm its original value, so there are at most 2mn2^{mn} possible tables, and TT takes at most 2mn2^{mn} values.

Step 3 — a strictly increasing sequence in a finite set is finite, so the process stops.

Step 4 — it stops exactly when no line has a negative sum, which proves the second claim (just keep flipping). ■\blacksquare

How to find it. The legal move is triggered by a negative sum, and flipping it turns a negative contribution into a positive one: the sum itself is the quantity the move improves. Finiteness of the state space replaces any need for integer values.

Example
Worked: splitting a graph (folklore)
A colouring reached by switching bad vertices: thick edges join equal colours, and every vertex has at most half its neighbours in its own colour.

Show that the vertices of every finite graph can be coloured with two colours so that every vertex has at most half of its neighbours in its own colour.

Step 1 — start from any colouring, and let MM be the number of monochromatic edges (both ends the same colour).

Step 2 — call a vertex vv bad if more than half of its dd neighbours share its colour: say pp of them do and q=d−pq = d - p do not, with p>qp > q. Switch the colour of vv. Its pp monochromatic edges become bichromatic and its qq bichromatic edges become monochromatic; no other edge changes. So MM drops by p−q≥1p - q \ge 1.

Step 3 — MM is a nonnegative integer, so after at most ∣E∣|E| switches no bad vertex remains, and that colouring has the property. ■\blacksquare (Equivalently: a colouring with the FEWEST monochromatic edges has no bad vertex — the extremal version of the same proof.)

How to find it. "Too many neighbours of my colour" is a local count of monochromatic edges, and fixing one vertex changes only the edges at that vertex. When a local fix improves a global count, that count is the monovariant.

Example
Worked: the pentagon game (IMO 1986/3)
12−3411−1311f = 46f = 16
One move at the −3 (sum S = 5): the quantity f = Σ(xᵢ − xᵢ₊₂)² drops by 2·3·5 = 30.

An integer is written at each vertex of a regular pentagon, and the five integers have positive sum SS. If three consecutive vertices carry x,y,zx, y, z with y<0y < 0, a move replaces them by x+yx + y, −y-y, z+yz + y. Show that the moves must stop after finitely many steps.

Step 1 — a move keeps the sum: (x+y)+(−y)+(z+y)=x+y+z(x + y) + (-y) + (z + y) = x + y + z. So S>0S > 0 throughout.

Step 2 — the obvious candidates fail: the sum is invariant, and the sum of absolute values can go up. Try f=∑i=15(xi−xi+2)2f = \sum_{i=1}^5(x_i - x_{i+2})^2 (indices mod 55), which compares each vertex with the two vertices not adjacent to it.

Step 3 — label the pentagon v,x,y,z,wv, x, y, z, w and apply the move at yy. Only the five terms involving xx, yy or zz change, and a direct expansion gives fnew−fold=2y(v+x+y+z+w)=2ySf_{\text{new}} - f_{\text{old}} = 2y(v + x + y + z + w) = 2yS.

Step 4 — since y<0<Sy < 0 < S, every move lowers ff by at least 22; ff is a nonnegative integer, so at most f02\tfrac{f_0}{2} moves can be made. ■\blacksquare

How to find it. Look for a quadratic quantity: the move is linear, so a quadratic changes by a linear expression in yy, and the only linear expression available with a known sign is SS. Among the symmetric quadratics, try ∑xi2\sum x_i^2, ∑(xi−xi+1)2\sum(x_i - x_{i+1})^2, ∑(xi−xi+2)2\sum(x_i - x_{i+2})^2 in turn; the last one's change factors as 2yS2yS.

Side note
Where it goes wrong

"Every move lowers the quantity, so the process stops" is false without a floor. Repeatedly replacing x>0x > 0 by x2\tfrac x2 lowers xx forever and never stops; the monovariant xx takes infinitely many values in (0,∞)(0, \infty), where there are infinite decreasing chains. In the sign-flipping proof above, what makes it work is the observation that the table has only 2mn2^{mn} possible states. Without that finiteness (or integer values bounded below), strict monotonicity proves nothing.

Try it
Try it: gcd and lcm

Several positive integers are written on a board. A move picks two of them, aa and bb, neither dividing the other, and replaces them by gcd⁡(a,b)\gcd(a, b) and lcm⁡(a,b)\operatorname{lcm}(a, b). Show that the process terminates.

Show the answer

Every number on the board always divides LL, the lcm of the starting numbers (gcd and lcm of divisors of LL divide LL), so there are finitely many possible boards. The product is invariant, since gcd⁡(a,b) lcm(a,b)=ab\gcd(a,b)\,\mathrm{lcm}(a,b) = ab. The sum strictly increases: with g=gcd⁡(a,b)g = \gcd(a, b) and ℓ=lcm⁡(a,b)\ell = \operatorname{lcm}(a, b), the identity gℓ=abg\ell = ab gives g(g+ℓ−a−b)=g2+ab−ag−bg=(a−g)(b−g)g(g + \ell - a - b) = g^2 + ab - ag - bg = (a - g)(b - g), and both factors are positive because g<ag < a and g<bg < b (if g=ag = a then a∣ba \mid b). So g+ℓ>a+bg + \ell > a + b. A strictly increasing sum on a finite set of boards: the process stops.

Symmetry Arguments, Worked

Tip
Pair, cancel, mirror

A symmetry of the problem — swapping players, swapping heads and tails, reflecting through a point, x↦a+b−xx \mapsto a + b - x — maps outcomes to outcomes. Use it to PAIR outcomes of equal probability, to CANCEL terms that map to their negatives, or to MIRROR an opponent's moves.

A symmetry is a bijection that preserves whatever the problem measures (probability, value of an integrand, legality of a move). If it maps the event AA onto the event BB, then P(A)=P(B)P(A) = P(B); if AA and BB also partition everything, both are 12\tfrac12. In games, if the second position is always the mirror image of the first, every reply is legal whenever the move it copies was legal, so the mirroring player is never the one stuck. The work in a symmetry proof is checking that the map really is a bijection preserving the right thing, including the fixed points.

Example
Worked: one more coin (folklore)

AA flips n+1n + 1 fair coins and BB flips nn. What is the probability that AA gets more heads than BB?

Step 1 — let hA,tAh_A, t_A and hB,tBh_B, t_B be the numbers of heads and tails. Since hA+tA=hB+tB+1h_A + t_A = h_B + t_B + 1, it is impossible that both hA≤hBh_A \le h_B and tA≤tBt_A \le t_B (the sums would differ by at most 00). So exactly one of "AA has more heads" and "AA has more tails" happens: if hA≤hBh_A \le h_B then tA>tBt_A > t_B, and if hA>hBh_A > h_B then tA=hB+tB+1−hA≤tBt_A = h_B + t_B + 1 - h_A \le t_B.

Step 2 — swapping heads and tails on every coin is a probability-preserving bijection of outcomes that exchanges the two events.

Step 3 — two events of equal probability that partition the space: each has probability 12\tfrac12. The answer is 12\tfrac12 for every nn.

How to find it. Small case n=0n = 0: AA flips one coin, BB none, probability 12\tfrac12. The answer not depending on nn signals a symmetry; the extra coin is exactly what breaks ties, so the two events cover everything.

Example
Worked: coins on a round table (folklore)
12345
The first player takes the centre (1); each later coin of the second player (2, 4) is answered by its reflection through the centre (3, 5).

Two players take turns placing identical coins flat on a round table, without overlapping and without overhanging the edge. The player who cannot move loses. Who wins?

Step 1 — the first player wins: she puts her first coin exactly at the centre, and afterwards answers each coin of the opponent by a coin at its reflection through the centre.

Step 2 — the answer is always legal. Before the opponent's move the position is centrally symmetric (it holds the centre coin and mirror pairs). The opponent's coin CC is legal, so it lies on the table and overlaps nothing; its mirror image C′C' lies on the table too. C′C' overlaps no earlier coin, because such an overlap would mirror to an overlap of CC with an earlier coin. C′C' does not overlap CC itself: two coins symmetric about the centre overlap only if each covers the centre, which is already taken.

Step 3 — so the first player always has a move, and since the table fills up after finitely many coins, the second player is the one who eventually cannot move. ■\blacksquare

How to find it. A game on a symmetric board suggests copying; the only obstacle is the fixed point of the symmetry (a move cannot be answered by itself), and the first player removes it by occupying the centre.

Example
Worked: does the tetrahedron contain the centre? (Putnam 1992 A6)
O
The planar warm-up: three random diameters; of the 8 ways to take one endpoint from each, exactly 2 triangles contain O (one shown).

Four points are chosen independently and uniformly on a sphere. Find the probability that the tetrahedron they span contains the centre of the sphere.

Step 1 — warm-up in the plane, three points on a circle. Choose three random diameters first, then an endpoint of each by a fair coin; this gives three independent uniform points. For fixed diameters, of the 23=82^3 = 8 triangles exactly 22 contain the centre (a triangle and its reflection), so the probability is 28=14\tfrac28 = \tfrac14.

Step 2 — in space, choose three random lines ℓ1,ℓ2,ℓ3\ell_1, \ell_2, \ell_3 through the centre OO with unit direction vectors u1,u2,u3u_1, u_2, u_3, and an independent uniform point PP; the points are PP and εiui\varepsilon_iu_i with independent fair signs εi\varepsilon_i. Almost surely u1,u2,u3u_1, u_2, u_3 are independent, so −P=c1u1+c2u2+c3u3-P = c_1u_1 + c_2u_2 + c_3u_3 uniquely, with every ci≠0c_i \ne 0 almost surely.

Step 3 — OO lies inside the tetrahedron P,ε1u1,ε2u2,ε3u3P, \varepsilon_1u_1, \varepsilon_2u_2, \varepsilon_3u_3 iff 0=λ0P+∑λiεiui0 = \lambda_0P + \sum\lambda_i\varepsilon_iu_i with all λ≥0\lambda \ge 0 and λ0>0\lambda_0 > 0, i.e. −P=∑λiλ0εiui-P = \sum\tfrac{\lambda_i}{\lambda_0}\varepsilon_iu_i; by uniqueness this means εi\varepsilon_i has the sign of cic_i for each ii. Exactly one of the 88 sign choices does.

Step 4 — so the probability is 18\tfrac18.

How to find it. Small dimension first: on a segment, two random points of [−1,1][-1, 1] straddle 00 with probability 12\tfrac12; on a circle 14\tfrac14. The pattern 2−d2^{-d} and the coin-flip structure suggest choosing the lines first and the signs last, which turns a geometric probability into counting sign patterns.

Side note
Where it goes wrong

Rerun the coin argument with nn coins each: "Exactly one of more-heads and more-tails happens, and heads ↔\leftrightarrow tails swaps them, so P(A has more heads)=12P(A \text{ has more heads}) = \tfrac12." For n=1n = 1 the true value is 14\tfrac14: the outcomes are HH, HT, TH, TT for (A,B)(A, B), and only HT has AA ahead. The broken step is "exactly one happens" — with equal numbers of coins, AA and BB can TIE, and then neither event occurs. The symmetry still gives P(more heads)=P(more tails)P(\text{more heads}) = P(\text{more tails}), which is 1−P(tie)2\tfrac{1 - P(\text{tie})}{2}.

Try it
Try it: an exponent that cancels (Putnam 1980 A3)

Evaluate ∫0π/2dx1+(tan⁡x)2\displaystyle\int_0^{\pi/2}\frac{dx}{1 + (\tan x)^{\sqrt2}}.

Show the answer

Let II be the integral and substitute x→π2−xx \to \tfrac\pi2 - x (King's rule): tan⁡x\tan x becomes cot⁡x=1tan⁡x\cot x = \tfrac{1}{\tan x}, so I=∫0π/2dx1+(tan⁡x)−2=∫0π/2(tan⁡x)2(tan⁡x)2+1dxI = \int_0^{\pi/2}\frac{dx}{1 + (\tan x)^{-\sqrt2}} = \int_0^{\pi/2}\frac{(\tan x)^{\sqrt2}}{(\tan x)^{\sqrt2} + 1}dx. Adding the two forms, the integrands sum to 11: 2I=π22I = \tfrac\pi2, so I=π4I = \tfrac\pi4. The exponent 2\sqrt2 is a decoy — any exponent gives π4\tfrac\pi4.