Invariance

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1 Invariance principle Typos may be reported to [email protected].

Suggested readings
• Evan Chen’s
– advice On reading solutions, available at https://blog.evanchen.
cc/2017/03/06/on-reading-solutions/.
– Advice for writing proofs/Remarks on English, available at https:
//web.evanchen.cc/handouts/english/english.pdf.

• Evan Chen discusses why math olympiads are a valuable experience for
high schoolers in the post on Lessons from math olympiads, available at
https://blog.evanchen.cc/2018/01/05/lessons-from-math-olympiads/.

List of problems and examples


1.1 Example (Moscow MO 1959 Grade 7 Day 2 P5) . . . . . . . . . 1
1.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

§1 Invariance principle
Example 1.1 (Moscow MO 1959 Grade 7 Day 2 P5). Consider n numbers
x1 , . . . , xn , each equal to 1 or −1. Prove that if

x1 x2 + x2 x3 + · · · + xn−1 xn + xn x1 = 0, (1)

then n is divisible by 4.

Solution 1. Since each of the summands of x1 x2 + x2 x3 + · · · + xn−1 xn + xn x1


is equal to 1 or −1, using Eq. (1), it follows that the number of the summands
of x1 x2 + x2 x3 + · · · + xn−1 xn + xn x1 equal to 1 coincides with the number
of the summands of x1 x2 + x2 x3 + · · · + xn−1 xn + xn x1 equal to −1. These
two numbers add up to n, and hence n is even, i.e. n = 2m for some positive
integer m.
Note that m is equal to the number of the summands of x1 x2 + x2 x3 + · · · +
xn−1 xn + xn x1 , which are equal to −1. In other words, m is equal to the
number of alterations, i.e. pairs of consecutive terms of the sequence

x1 , x2 , . . . , xn , x1 ,

whose signs differ. Since the initial and the final term of the above sequence are
equal, their signs remain unchanged, and hence the number of the alterations
of the above sequence has to be an even number. Since m is even, it follows
that n is divisible by 4. ■

Some style files, prepared by Evan Chen, have been adapted here. 1
2 June 2024 https://jpsaha.github.io/MOTP/

Remark. An elementary congruence argument may also be used to observe


that n is even. Note that

n = x21 x22 + x22 x23 + · · · + x2n−1 x2n + x2n x21


≡ x1 x2 + x2 x3 + · · · + xn−1 xn + xn x1 (mod 2),

and hence n is even.


One may also proceed as follows. For 1 ≤ i ≤ n, write
(
1 if xi and xi+1 are of the same sign,
εi :=
−1 otherwise,

where xn+1 := x1 . In other words,

εi = xi xi+1 .

Note that

n = x21 x22 + x22 x23 + · · · + x2n−1 x2n + x2n x21


= ε1 x1 x2 + ε2 x2 x3 + · · · + εn−1 xn−1 xn + εn xn x1
= (ε1 − 1)x1 x2 + (ε2 − 1)x2 x3 + · · · + (εn−1 − 1)xn−1 xn + (εn − 1)xn x1
X
=2 (−xi xi+1 )
1≤i≤n,εi =−1

= 2 × the number of alternations of the sequence x1 , . . . , xn , x1 .

Note that to arrive at the above, we did not use the fact that n is even. Moreover,
the prior argument tells us that any (finite) sequence of ±1’s, with equal initial
and final terms, have an even number of alterations. Hence, n is a multiple of 4.

Upshot — At times, algebraic techniques might be quite useful.

Example 1.2. [Eng98, p. 5] Let a1 , a2 , . . . , an be n numbers such that each


ai is either 1 or −1. If
a1 a2 a3 a4 + a2 a3 a4 a5 + · · · + an a1 a2 a3 = 0,
then prove that 4 divides n.

Solution 2. The solution relies on the following claim.

Claim — Let y1 , y2 , . . . , yn be a sequence of integers such that each yi is


1 or −1. Let 1 ≤ m ≤ n be an integer. Then the sum

y1 y2 y3 y4 + y2 y3 y4 y5 + · · · + yn y1 y2 y3 ,

and the new sum obtained by replacing ym by −ym in the above sum,

10 The material posted here and at this blog by Evan Chen are quite useful.
References Typos may be reported to [email protected].

leave the same remainder upon divisiona by 4.


a If b is a positive integer, and a is an integer, then there are integers q, r such that
a = qb + r, 0≤r≤b
hold. The integer q is called the quotient and r is called the remainder.
Note that one may divide any integer (even the negative ones) by a positive integer
and obtain the quotient and the remainder. For example, if 9 is divided by 4, it
leaves a remainder of 1. If −11 is divided by 4, then (after writing −11 = (−3) · 4 + 1,
one finds that) it leaves a remainder of 1. If −53 is divided by 4, then (after writing
−53 = (−14) · 4 + 3, one finds that) it leaves a remainder of 3.

Proof of the Claim. In the above cyclic sum, ym appears in precisely four
summands. Since the remaining summands are unchanged, it suffices to show
that the sum of those four summands (denoted by A), and the new sum
obtained by replacing ym by −ym in A (to be denoted by B), leave the same
remainder upon division by 4.
In fact, it reduces to showing that if A is a sum of four terms where each
term is equal to 1 or −1, then A and −A leave the same remainder upon
division by 4, or equivalently, their difference, which is 2A is a multiple of 4,
which is equivalent to saying A is even.
If all the terms of A are equal, then A is even. If three of the terms of A
are 1 and the remaining one is −1, then A is even. Moreover, if two of the
terms of A are 1 and the other twos are −1, then A is even. Further, if only
one term of A is 1 and the others are equal to −1, then A is also even. The
Claim follows.

In the given sum

a1 a2 a3 a4 + a2 a3 a4 a5 + · · · + an a1 a2 a3 ,

we continue to replace all the ai ’s which are equal to −1 by 1’s. In the first
step, S is divisible by 4. By the above Claim, at the end of each step, the new
sum obtained is also divisible by 4. At the very last step, the sum will change
to n, and hence, n is divisible by 4. ■
For more exercises on the invariance principle, we refer to [Eng98, Chapter
1].

References
[Eng98] Arthur Engel. Problem-solving strategies. Problem Books in Math-
ematics. Springer-Verlag, New York, 1998, pp. x+403. isbn: 0-387-
98219-1 (cited pp. 10, 11)

Some style files, prepared by Evan Chen, have been adapted here. 11

You might also like