Read · 1 min

Invariants (Part 1)

Invariant is something that doesn't change after some operation. This is a very useful technique in maths, and we'll see a few applications of invariants.

Examples of invariant

For example, if we let s(n)s(n) denote the sum of digits of nn, then it is well-known that s(n)≡n(mod9)s(n) \equiv n \pmod{9}. So, we can say that the remainder upon division by 99 of n−s(n)n - s(n) is invariant.

Consider this problem :

At first, a room is empty. Each minute, either one person enters or two people leaves. After exactly 319993^{1999} minutes, could the room contain exactly 31000+23^{1000} + 2 people?

The crucial fact is :

At any fixed time tt, all the possible values of population of the room differ from one another by multiples of 3.

Indeed, if there are nn people in the room, then after one minute, there could be n+1n + 1 or n−2n - 2 people. The difference between these two possible outcomes is 33. In 319993^{1999} minutes, one possible population is clearly 319993^{1999}, a multiple of 33, thus all possible populations must be a multiple of 33, so the answer is no.

A seemingly hard problem is solved instantly with invariants. This shows the power of invariance.

Preparing for a math contest?

Working through past problems on one idea at a time is one of the most effective ways to prepare. These are real problems from the AMC 8, AMC 10, AMC 12 and AIME, the national math competitions for middle and high school students, each with a worked solution on LIVE by Po-Shen Loh.

Read · 1 min

Invariants (Part 2)

Parity

This is a nice problem that demonstrate the power of parity.

Let a1,a2,...,ana_1, a_2, ..., a_n represent an arbitary permutation of the numbers 1,2,...,n1, 2, ..., n. Prove that if nn is odd, then (a1−1)(a2−2)...(an−n)(a_1 - 1)(a_2 - 2)...(a_n - n) is even.

This is not a hard problem. Consider the sum of the terms. Clearly, it is equal to 00, so the sum of the numbers is invariant. However, there are odd number of ai−ia_i - is, and thus one of them must be even. (or else 00 is odd, a contradiction.). Thus, the product is even.

Interactive · 1 question

Invariants (Part 3)

Monovariants

Monovariants are values that is either nondecreasing all the time or nonincreasing all the time. A simple example of a monovariant is this :

In an elimination-style tournament of tennis, once you lose, you are out. The tournament ends when there is only 11 person left. How many games will be played if nn people joined the tournament?

Choose one answer

Interactive · 2 questions

Invariants are, typically, things that stay invariant (don't change) during a process. Here's an example.

You see a marching band with exactly five people per row. You tried counting the number of people in the band row by row, but lost count. Which of the following are possible numbers of marching band members?

Choose all correct answers

Type a concept, like “slope” or “photosynthesis”.

↑ ↓ to choose · Enter to openSearch explanations and problems