0% found this document useful (0 votes)
131 views4 pages

Understanding Invariance in Combinatorial Problems

Uploaded by

life is good
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views4 pages

Understanding Invariance in Combinatorial Problems

Uploaded by

life is good
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Invariance

The idea behind invariance is to exploit something is “unchanging” despite other things changing. This
unchanging can be multiple things. Many of these problems are combinatorics, but not necessarily so.
Many of these problems involves “moves”.

First form: Something stays the same

1) Positional changes:
• Classic example: a standard 8 x 8 chessboard has two diagonally opposite corners removed,
leaving 62 squares. Can you cover it with 31 dominoes of size 1 × 2

Notice that each domino covers exactly 1 white and 1 black square each, regardless of
position of the dominoes. This means that 31 dominoes will cover 31 white and 31 black
squares… but there are 30 white and 32 black squares.

2) Things that are constant between moves:


• 100 lemmings are placed on a 100m wide ledge (with cliffs on either side of the ledge), no
two lemmings at the same location. All lemmings walk at a rate of 1 m/s either left or right.
When two lemmings would meet, they both simultaneously turn around and walk the other
way. What is the best placement of lemmings in order to keep at least one lemming alive
for as long as possible.

Imagine the lemmings do not turn around but instead pass through each other. Then notice
that when they meet, in both cases, we end up with 1 lemming going right and 1 lemming
going left. Hence, we can replace the “turning around” move with a walking through move
without changing the problem. Therefore, the longest time you can have a lemming alive is
100 seconds (put a lemming on the very end, headed for the other end).

• Island of chameleons. When two of different colors meet, they will both change to the third
color. If the starting populations are 100, 107, 108, is it possible for the chameleons to
eventually all be the same color?

Notice that after each move, the values of the different groups of chameleons are {0, 1, 2}
modulo 3. So it is impossible to end up with all the same color (which would have values of
{0, 0, 0} modulo 3.

A side note: another thing to notice with this is in the second form where the each “move”
has the same effect on all of the modulos.

Second form: Something changes in the same way

1) There are 10 red and 10 green balls in bag.

Each turn, we take remove two balls and:

• If they are both red, put a green ball into the bag
• If they are red and green, put a red ball in to the bag
• If they are both green, put a green ball into the bag.

What color is the final ball?

Solution

The possible moves end up being:

−2𝑅 +1𝐺
0𝑅 −1𝐺
0𝑅 −1𝐺

In all cases, the parity of the number of red balls is unchanged. Hence at the end, if there is one
ball left, the parity of the number of red balls must still be even. Hence there are 0 red balls,
and so the last ball is green.

Notice that it must be shown that this process must terminate! After all, if you do not ever end
up with 1 ball, then you can’t answer the question. Usually this is a pretty easy question though
you do need to prove it. In this case, the total number of balls decreases by 1 each time and
there is a minimum (0).

2) 2020 points are on the plane, no 3 collinear. Each of the points are connected in pairs by 1010
line segments. If there is a pair of line segments (AB, CD) that intersect, we replace the line
segments with AC, BD. Continue doing this as long as more line segments intersect.

Prove that eventually there will be no more line segments intersecting.

Solution:
A natural instinct would be to consider the number of intersection points, after all we are
“uncrossing” a pair of lines. However, it is quickly obvious that the number of intersection
points can increase.

However, it turns out that 𝐴𝐵 + 𝐶𝐷 < 𝐴𝐶 + 𝐵𝐷 (triangle inequality). So the total length of all
line segments is a constantly decreasing number. Since there is only a finite number of
2020
( )
possibilities (less then 2 2 … the total number of graphs on 2020 vertices), it must eventually
end.

2020
( )
Notes: 2 2 is a gross overestimating as to the number of possibilities. It doesn’t matter
though, so long as the number of possibilities is finite.

3) 2000 dwarves each have their own mono-colored houses. Each month, the 𝑛𝑡ℎ dwarf will go
out and paint his house to match the most common color of among his friends (as long as it is
more then his current color). In the case of ties, the dwarf will choose one of the colors.
Friendships are mutual. They will continue in that order indefinitely.

Prove that eventually the dwarves will stop painting their houses.

Solution:

Notice that when each dwarf paints his house, it feels like there is a bigger “color” group then
before. This motivates our invariance. Let 𝐷𝑛 be the number of friends that the 𝑛𝑡ℎ dwarf has.
Then when the 𝑛𝑡ℎ dwarf paints his house, 𝐷𝑛 will increase. All of his current house-matching
friends’ numbers will decrease by one, while all of his new house-matching friends increase by
one. Since there are more new house matches then old house matches, the total sum of all 𝐷𝑛
increases (by an integer amount) with each painting.

Since the total sum is limited by the number of friendships, eventually they must stop painting.

4) 65 beetles are placed on a typical 9 × 9 chessboard. Each minute, each beetle will move to an
adjacent square, either horizontally or vertically, but never twice in the same orientation. So a
beetle could move Left, Up, Left, Down, but could not go Left then Right.

Prove that eventually 2 beetles will be on the same square.

Solution:

Let us consider one beetle.


→ ↑

Now ideally, we want to eliminate the beetles choices as relevant. So if the beetle starts by
moving vertically, the next choice is horizontal. In order to remove the beetles choices, we will
color both options the same color. (Red) The next move is vertical, so we color both options the
same color again.


→ ↑

If we continue this, we’ll have a 4-coloring of the chessboard. Now it is easy to see that
regardless of the choices the beetle makes, each beetle will cover one of each color over 4
moves. But there are only 16 orange squares, so over 4 moves, 64 orange squares. But all 65
beetles need to be on a square, so there will be at least 2 beetles on an orange square.

You might also like