combinatorics-jbmo-camp-2023
combinatorics-jbmo-camp-2023
JBMO 2023
Team Camp.
Dragomir Grozev
June 2023
2. Choose two points of opposite colors with exactly one point in between
them, and flip the color of both of them
Is it possible to achieve a configuration where each point has a color opposite
to its initial color with these operations?
Solution. No. Label the positions of the points consecutively 1, −1, 1, −1, . . .
and let ℓi , i = 1, . . . , 2022 be the values of these labels. Set ci := 1 if the color
P2022
of the i-th point is white, otherwise ci = −1. Consider S := i=1 ℓi ci . This
value is invariant under the allowed recolorings. But S has different values for
the initial and desired configurations.
Problem 1.2. (JBMO shortlist 2014 C1) There are some (positive?) real numbers
on the board (at least two). In every step we choose two of them, for example
ab
a and b, and then we replace them with a+b . We continue until there is one
number. Prove that the last number does not depend on which order we choose
the numbers to erase.
Доказателство.
Pk Let x1 , x2 , . . . , xk be the numbers in some phase. Then prove
that i=1 x1i is invariant.
1
Problem 1.4. (JBMO Shortlist 2019, C2) In a certain city there are n straight
streets, such that every two streets intersect, and no three streets pass through the
same intersection. The City Council wants to organize the city by designating
the main and the side street on every intersection. Prove that this can be done
in such way that if one goes along one of the streets, from its beginning to its
end, the intersections where this street is the main street, and the ones where it
is not, will appear in alternating order.
Solution. We prove that a greedy algorithm works. We pick up a street and
assign alternating traffic signs at each intersection on this street, from the first
intersection to the last one. Then we mark the street. After that, we pick up
another street, and start placing signs from some intersection of this street
with an already marked street, and so on. Assume that the street ℓ0 is the
first street for which it is impossible to do this procedure because there is a
conflict of traffic signs. This means that starting from an intersection x of ℓ0 ,
that has already a sign assigned, and placing signs, we reach an intersection
y which already has a set sign and it conflicts the sign we are going to place.
Let X = ℓ0 ∩ ℓ1 , Y = ℓ0 ∩ ℓ2 . Thus, ℓ1 and ℓ2 have been marked without any
Фигура 1:
conflicts. Let Z := ℓ1 ∩ ℓ2 . Clearly, our conflict at the point Y can only happen
if the number of intersections on ℓ1 between X and Z (without these points)
plus the number of intersections on ℓ2 between Z and Y has a different parity
than the number of intersections on ℓ0 between X and Y. This would mean that
the number of intersections on the triangle XY Z (not counting X, Y, Z) is odd.
Let us now see why it is impossible.
Note that any line that intersects a side of the triangle XY Z in an interior point,
also intersects another side of this triangle in an interior point. That is, each line
either doesn’t intersect the triangle or intersects exactly two of its sides. That’s
why the number of the intersections on X, Y, Z (not counting the vertices) is
even. So, this way no conflict is possible and we can set up all the traffic signs
as needed.
Problem 1.5. (JBMO 2021, p4) Let M be a subset of the set of 2021 integers
{1, 2, 3, ..., 2021} such that for any three elements (not necessarily distinct) a, b, c
2
of M we have |a+b−c| > 10. Determine the largest possible number of elements
of M
Solution. Putting a = b = c yields that M ⊂ [11..2021]. It boils down to
show that for any M ⊂ [11..2021], |M | = 1007 there exist a, b, c ∈ M with
|a + b − c| ≤ 10.
The following claim with proper adjustment was used repeatedly in BMO
2023, p4.
Claim. For any set M of 1007 (or more) integers in [11, m], m ≤ 2021, there
exist a, b ∈ M with a + b = m + 10.
Proof. Let’s prove it for m = 2021 to avoid some casework; m odd and m even
have to be considered. I just want to present the idea. Assume on the contrary
that it is not true. Consider the pairs (1015 − i, 1016 + i, i = 0, 1, . . . , 1004). In
each of these pairs there is only one element of M. (otherwise the sum of the
numbers of that pair would be 2031). This means that the numbers in M that
are up to 2020 are at most 1005. Hence, |M | ≤ 1006, contradiction. □
Assume now, searching for contradiction, that for any a, b, c ∈ M we have
|a+b−c| > 10. Applying the Claim, we get a, b ∈ M with a+b = 2031. It means
2021 ̸∈ M. So, we have a set M with 1007 elements all of them in [11, 2020].
We apply the same Claim but with 2020 instead of 2021. Analogously, we get
a, b ∈ M with a + b = 2030, which means 2020 ̸∈ M and so on. Thus, in the
end, we get that no integer in [11, 2021] belongs to M, contradiction.
Problem 1.6. (IMO 2021, p5) Two squirrels, Bushy and Jumpy, have collected
2021 walnuts for the winter. Jumpy numbers the walnuts from 1 through 2021,
and digs 2021 little holes in a circular pattern in the ground around their
favourite tree. The next morning Jumpy notices that Bushy had placed one
walnut into each hole, but had paid no attention to the numbering. Unhappy,
Jumpy decides to reorder the walnuts by performing a sequence of 2021 moves.
In the k-th move, Jumpy swaps the positions of the two walnuts adjacent to
walnut k.
Prove that there exists a value of k such that, on the k-th move, Jumpy swaps
some walnuts a and b such that a < k < b.
Solution. A typical problem where everything depends on the point of view!
Forget about the trajectory of the swapped walnuts and focus on the disposition
of the consecutive numbers. Suppose at every move we mark the k-th walnut
k = 1, 2, . . . , 2021. Focus on the process of marking that eventually exhaust
all walnuts. If there is a position where we mark a walnut and only one of its
two adjacent ones is already marked then we are done. Indeed, in this case the
walnut that has already been marked has a smaller number than the current
one and the one that has not yet been marked has a larger number than the
current one. Call this marking a good marking.
We claim such a position will arise sooner or later, due to the fact 2021 is an
odd number. Note that any marking that is not good retains the disposition
of the already marked walnuts, and we just mark anther walnut that either is
between two unmarked ones or is between two marked walnuts. Every time we
3
mark a walnut, either it is a good marking or after that there is a block of even
number (not zero) consecutive unmarked walnuts surrounded by marked ones.
Thus, sooner or later if we avoid good marking, we would arrive at a position
of two consecutive unmarked walnuts, surrounded by marked ones. So, when it
comes to mark any of them it would be a good marking.
Фигура 2:
4
Problem 2.2. (JBMO Shortlist, 2020 C1) Alice and Bob play the following
game: starting with the number 2 written on a blackboard, each player in turn
changes the current number n to a number n + p, where p is a prime divisor of
n. Alice goes first and the players alternate in turn. The game is lost by the one
| {z }. Assuming perfect play, who
who is forced to write a number greater than 22...2
2020
will win the game.
Problem 2.3. (JBMO Shortlist 2021, C4) Alice and Bob play a game together
as a team on a 100 × 100 board with all unit squares initially white. Alice sets
up the game by coloring exactly k of the unit squares red at the beginning. After
that, a legal move for Bob is to choose a row or column with at least 10 red
squares and color all of the remaining squares in it red. What is the smallest k
such that Alice can set up a game in such a way that Bob can color the entire
board red after finitely many moves?
Solution. Clearly, Bob can do the job when k = 100. Alice initially colors a
square 10 × 10 and Bob colors the entire board. We’ll prove it cannot be done
in case k < 100. Consider a more general problem. Let a, b ∈ N. Bob can cover
an entire row if it has at least a cells on it or a column if it contains at least b
cells. We are looking for a minimum k = k(a, b) such that it’s possible to color
the entire board. As expected k = ab. Note that the size of the board doesn’t
matter, as long as it’s larger than a and b. We can assume we have an infinite
board. It means that if we can color a finite board we can color also an infinite
board and vise versa.
Consider the first move of Bob. He either colors a row or a column. Assume he
colrs a row. In this case, we have at least a cells on it that were colored initially.
In each subsequent move Bob’s environment is as if he were playing the same
game but with the pair (a, b − 1) instead of (a, b). Indeed, at each following step
the legal moves of both games are the same. It means
In case Bob’s first move is to color a column, the same argument yields
Solution. We will proof by induction that the only way the equality to occur is
in case n = 2k and the arrangements are made in the following way. We make k
rounds, each time partitioning the numbers into pairs and do the operation for
5
each pair.
Suppose it is proved for all numbers less than n. Assume, we proceed with a
sequence of steps starting from n 1’s and at the last step we have only two
numbers a and b. Then, a is obtained by applying some operations to r of the
initial 1’s and b is obtained by applying it to the remaining s of them, r + s = n.
By the induction hypothesis
1 1
a≥ ;b≥ (1)
r s
The final x number equals (a + b)/4 and we obtain,
a+b 1 1 22 1
x= ≥ + ≥ = (2)
4 4r 4s 4r + 4s r+s
where the AM-HM inequality is applied. Note that the equality in (2) is attained
only when r = s, and in (1) - only when r, s are both powers of 2 (and the
operation is taken as explained). The induction step is finished.
Problem 2.5. (JBMO 2023 TST) The number 2 is written onqa board n times,
n ≥ 2. At each step we can delete two numbers a, b and write ab+12 instead of
them. After n − 1 steps there is only one number remaining.
a)
q Prove that no matter of the steps, the last number is great than or equal to
n+3
n . b) When can equality be achieved?
Solution. The same approach as used above. We will proof by induction that
the inequality is true and the only way the equality to occur is in case n = 2k
and with the following arrangement. We make k rounds, each time partitioning
the numbers into pairs and do the operation for each pair.
Suppose it is proved for all numbers less than n. Assume, we proceed with
sequence of steps starting from n 2’s and at the last step we have only two
numbers a and b. Then, a is obtained by applying some operations to r of
the initial 2’s and b is obtained applying it to the remaining s of them where
r + s = n. By the induction hypothesis
r sp p
ab + 1 (r + 3)/r (s + 3)/s + 1
≥ .
2 2
We have to prove that
sp p
(r + 3)/r (s + 3)/s + 1 p
≥ (r + s + 3)/(r + s) (1)
2
6
q q
3 3
1+ r 1+ s3 +1
≥1+
2 r+s
r r
3 3 2·3
1+ 1+ ≥1+
r s r+s
2
3 3 2·3
1+ 1+ ≥ 1+
r s r+s
3 3 9 22 · 3 36
1+ + + ≥1+ + (2)
r s rs r + s (r + s)2
Now, (2) holds due to the following two inequalities:
1 1 22
+ ≥
s r r+s
which is AM-HM inequality and
1 4
≥
rs (r + s)2
which is AM-GM. Hence, (1) is true. Note that the equality in the above chain
of inequalities is reached only when r = s. The induction step is done.
Problem 2.6. (Indonesian competition, 2019, final) King Midas and Medusa
alternatively play on an infinite chessboard. Initially, all of the cells of the
chessboard are made of stones. In each of his turn, Midas chooses three squares
which are in the same column or row, and turns them into gold. In each of
Medusa’s turn, she can choose any 2 × 2 grid square and turns its 4 cells into
stone. King Midas wins if he can make a 2019 × 2019 grid square entirely of
gold. Medusa wins if she can always prevent Midas doing so. Who wins?
Solution. If it’s possible Midas to win, he must place multiple threats of making
gold squares on many well apart areas. He should use his advantage of placing
threats on 3 well apart areas at a time, while Medusa could eliminate only 2 of
them.
The strategy of Midas. We prove King Midas always can make a 2019 × 2019
gold square. Moreover, Midas, in a good mood can allow Medusa to stone any
4 cells, that are intersection of 2 rows and 2 columns.
Let M be a large enough positive integer which will be determined later.
The king chooses an infinite family Q of disjoint 2019 × 2019 squares lined up in
a row. In every move he turns into gold the upper-left cells of 3 different empty
squares in Q. After M turns, he marks the upper-left corner of 3M sets in Q
and Medusa can erase at most 2M of them, since she can operate over no more
than 2 sets in Q at a time. Once Medusa operates over a square in Q, Midas
considers it as unusable and does not take any action on its cells.
Thus, after the first phase, we get M squares in Q with golden upper-left cell.
We denote the family of those 2019 × 2019 squares as Q1 . Further, Midas aims
7
at M cells, each one in distinct set in Q1 , disposed at the same positions inside
the big squares, and begins turning them into gold, 3 at a time. He manages to
do it in M/3 moves, while Medusa can damage at most 2M/3 sets in Q1 . At
this moment we have M − 2M/3 = M/3 sets of Q1 with two golden cells each,
disposed at the same positions. Denote that subfamily of Q1 as Q2 .
Midas proceeds in the same spirit obtaining each next phase a family Qn of
M/3n−1 sets with n golden squares each, disposed at the same positions. For
n = 2019 · 2019 there will be at fully golden 2019 × 2019 square, providing we
have chosen M ≥ 32019·2019−1 .
Pairing argument
Problem 2.7. (XIX Olimpı́ada Matemática Rioplatense (2010)) Alice and Bob
play the following game. To start, Alice arranges the numbers 1, 2, . . . , n in some
order in a row and then Bob chooses one of the numbers and places a pebble
on it. A player’s turn consists of moving the pebble on a number that is at
an adjacent position under the restriction that the pebble can be placed on the
number k at most k times. The two players alternate taking turns beginning with
Alice. The first player who cannot make a move loses. For each positive integer
n, determine who has a winning strategy.
Solution. Let me rephrase it in the following way. We have n sets with 1, 2, . . . , n
elements respectively. Alice places them (as she wishes) in consecutive positions
numbered as 1, 2, . . . , n. Bob marks an element of some set and then each player
in turn marks an element in a set that is placed at an adjacent position to the
set whose element was marked on the previous move. No element can be marked
twice. If n·(n+1)
2 is even then Alice has a winning strategy, otherwise Bob wins.
Фигура 3:
8
the number of its elements). Matching can be done from left to right: The first
element is matched to an element of the second set. Each of the two remaining
elements from the second set is matched to an element of the 3th set and so on,
till we get to the n-th set.
9
point out a strategy for one of the players, we just know that some strategy
does not exist (or exists). Let’s start with the following game.
Two-step chess. This game has the same rules as the usual chess, except
that each player can make one or two moves at a time. We will prove that
White is guaranteed at least a draw. That is, if White plays optimally Black
cannot win. Proof. Assume that Black has a winning strategy and White knows
this strategy. At first move White plays Kb2 on a3 and then back on b2, i.e. a
move that leaves the original position intact. Then it’s Black’s turn, and after
they make a move, White will plays as if they were the second player and use
the Black’s strategy to respond to their opponent’s moves. Thus, they will win,
which is a contradiction since it is impossible for both players to win.
Hex game. This game is played on an board that consists of empty hexagonal
cells like in fig. 4. The usual size of the board is 11 × 11 but it could be of any
size. Each player in turn places a counter of their color (blue or red) on an empty
cell. The counters cannot be moved once placed.
Фигура 4:
The first player that forms a connected path, linking the opposite sides of
the board marked by their own color wins, see figure 5.
Фигура 5:
10
which is painted blue. If this connected component contains the left side of the
board then Blue has won. If not, consider the red counters along boundary of
this component. They form a red path that connects the top and the bottom
sides. In this case Red wins.
Let’s now prove that the first player always wins. This was shown by John
Nash, the same guy that the movie A Beautiful Mind was made about. He
introduced the strategy-winning argument in 1940’s.
Since a draw is not possible, and the game is fully deterministic, one of the
players has a winning strategy. Assume, for the sake of contradiction, this is the
second player, say Red. The first player (Blue) knows this strategy. Blue plays
an arbitrary move putting a blue counter at a position P1 . Then Blue forgets
about this counter and plays, responding, as if he were the second player, to
Red’s moves using their own winning strategy, as if this counter was not there.
If, at some moment, Blue (according to the strategy) has to put a counter on
position P1 , he puts it on an arbitrary free cell P2 and marks in his mind that
he has put a counter on P1 and forgets about the counter on P2 . They go on
like this. Note that there is one less counter in Blue’s mind. There is actually
one more blue counter on the board. If Blue can win without that counter, he
will also win with it, an extra blue counter is even better. Thus, Blue wins,
contradiction.
A game of sets. The following problem is a warm-up for the last one, although
it’s also interesting as a standalone and has a bit different strategy.
Problem 3.1. Let F be a family of subsets with 2 elements of some base set
X. It is known that for any two elements x, y ∈ X there exists a permutation π
of the set X such that π(x) = y, and for any A ∈ F
π(A) := {π(a) : a ∈ A} ∈ F.
A bear and crocodile play a game. At a move, a player paints one element of
the set X in his own color: brown for the bear, green for the crocodile. The first
player to fully paint one of the sets in F in his own color loses. If this does not
happen and all the elements of X have been painted, it is a draw. The bear goes
first. Prove that he doesn’t have a winning strategy.
Solution. Assume for the sake of contradiction, the bear has a winning strategy.
Note that for any y ∈ X the bear also wins by painting at his first move y.
Indeed, consider a permutation σ, σ(x) = y that satisfies the condition in the
statement. Assume that there are two bears that play on two different copies of
X. The original (winning) bear plays on the first board and starts by painting
x. The second bear paints y on the second board and waits for the crocodile’s
move. When the crocodile on the second board paints, say, z the second bear
passes σ −1 (z) painted in green to the first bear. The first bear plays x1 and the
second bear plays σ(x1 ) and so on.
Assume now, the bear starts with his winning strategy by painting an element
x1 ∈ X brown. Let {x1 , y1 } ∈ F. Suppose, the crocodile knows the winning
11
strategy of the bear. He makes in his mind the following scenario. Assume that
he, as the bear, starts by painting y1 in green, and the bear (as the crocodile)
responds by painting x1 brown. Then the crocodile (as if he were the bear) in
order to win plays by painting y2 green.
Now the crocodile acts. He paints y2 and y1 green, but the latter element
only in his mind. In subsequent moves, he responds to the bear using bear’s
own strategy. Note that the bear cannot touch y1 because if he paints it brown,
he instantly loses since {x1 , y1 } ∈ F. So, the bear cannot prevent the crocodile
from using his own strategy and winning in the end. Contradiction!
Problem 3.2. (Russian TST 2018, day 4, p2) Let F be a finite family of subsets
of some set X. It is known that for any two elements x, y ∈ X there exists a
permutation π of the set X such that π(x) = y, and
π(A) := {π(a) : a ∈ A} ∈ F , ∀A ∈ F.
A bear and crocodile play a game. At a move, a player paints one or more
elements of the set X in his own color: brown for the bear, green for the crocodile.
The first player to fully paint one of the sets in F in his own color loses. If this
does not happen and all the elements of X have been painted, it is a draw. The
bear goes first. Prove that he doesn’t have a winning strategy.
Solution. Assume on the contrary, the bear wins by painting at his first move a
set Y ⊂ X. Of course, Y ̸= X. Note that for any x ∈ X, x ̸∈ Y, the bear also wins
by painting at his first move some set Y ′ ⊂ X, |Y ′ | = |Y |, x ∈ Y ′ . Indeed, take
any y ∈ Y and consider a permutation σ, σ(y) = x that satisfies the condition
of the statement. Then, the bear also wins by painting at his first move the set
Y ′ := σ(Y ). This can be shown by the following symmetry argument. Imagine
that there are two bears that play on two different copies of X. The original
(winning) bear plays on the first board and starts by painting Y brown. The
second bear paints Y ′ = σ(Y ) brown and waits for the crocodile’s move. After
the crocodile responds with painting, say, a set Z ′ , the second bear passes to
the first bear the set Z := σ −1 (Z ′ ) painted green. The first bear paints Y1 ,
according to his strategy. The second bear then paints Y1′ := σ(Y1 ) and so on.
So, now the bear with his winning strategy paints at first Y. The crocodile
makes the following calculation in his mind. Assume, he knows the bear’s
strategy and he, as if he were the bear, starts by painting Y ′ green. Suppose the
bear (as the crocodile) responds by painting the set Y \ Y ′ brown. The crocodile
(as the bear) must win and let his winning move in this situation be to paint
(green) some set Y1 .
Now, the crocodile acts. He paints in his first move the set (Y ′ \ Y ) ∪ Y1
green. Then he follows the bear’s winning strategy and wins because the only
difference is that Y ′ ∩ Y is painted brown, instead of green, but if he wins when
Y ′ ∩ Y is painted green, he will also win in this situation. Contradiction!
12