0% found this document useful (0 votes)
9 views

combinatorics-selected-topics

The document discusses selected topics in combinatorics, focusing on paths, cycles, trees, and spanning trees within graph theory. It includes various propositions, problems, and solutions related to graph properties, connectivity, and algorithms like depth-first search and breadth-first search. Additionally, it presents challenges from mathematical contests and proofs related to graph structures and their characteristics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

combinatorics-selected-topics

The document discusses selected topics in combinatorics, focusing on paths, cycles, trees, and spanning trees within graph theory. It includes various propositions, problems, and solutions related to graph properties, connectivity, and algorithms like depth-first search and breadth-first search. Additionally, it presents challenges from mathematical contests and proofs related to graph structures and their characteristics.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Selected Topics in Combinatorics

Dragomir Grozev
May 2023

1 Paths and Cycles


Notions
1. Vertex, edge.
2. Vertex incident with an edge

3. Adjacent vertices, neighbours.


4. Independent vertex set.
5. Isomorphic graphs
n(n−1)
6. Complete graph Kn , |E| = 2

7. Subgraphs. Induced subgraph on a vertex set.


8. Degree, max degree ∆, min degree δ, average degree.
9. Paths, walks, cycles,

10. Connected graph. Connected component.


Proposition 1.1. (see [1], Proposition 1.3.1) Any graph has a path with length
at least δ and a cycle of length at least δ + 1 (if δ ≥ 2).
Problem 1.1. Is it possible to change the state in Fig.1-left to the state in Fig.1
- right by moving the knights several times? (In the figure, W stands for white
knight, and B stands for black knight . knight should be moved by following the
international chess regulation)
Proposition 1.2. Hand-Shaking Lemma.
X
2|E| = d(v)
v∈V

Proposition 1.3. In any graph G, the number of vertices with odd degree is
even.

1
Фигура 1:

Problem 1.2. Every city in one country has 100 roads connecting to other
cities, and any city can be reached from any other city. Now, one road is closed
for repair. Prove that any city can still be reached from any other city.
Problem 1.3. There are 99 members in a club, and every member claims that
he would play bridge only with someone he knows. Each member knows at least
other 67 members. Prove that there must be 4 members who can play bridge
together. (Polish Mathematics Contest in 1996)

Problem 1.4. Graph consisting of 100 vertices is given.No triangles in the


graph.Each vertex has degree greater than 40.Prove that there is no cycle with
length 5.
Solution. Assume on the contrary, there is a 5 cycle: v1 , v2 , . . . , v5 and consider
the set V ′ of the rest of the vertices. So |V ′ | = 195. If some vi is connected
with vj other than the two ones from the cycle, we get a triangle, so each
vi , i = 1, 2, . . . , 5 is connected with at least 39 vertices in V ′ . Since 5 · 39 > 2 · 95,
there exists a vertex v ∈ V ′ which is connected with at least three vertices
among vi , i = 1, 2, . . . , 5. Two of them are connected and we get a triangle, a
contradiction.

Problem 1.5. There are n points on the plane. Prove that the number of pairs
3
n2 n
of points whose distance is 1 would not exceed √ +
2 4
Comment. There are more precise estimates - see Unit distance graph.

Problem 1.6. There are n cities in a country. Any two of them are connected
either by a road or an airway. A tourist wants to visit each city exactly once
and return to the city at which he started the trip. Prove that he can choose a
starting city and make a path, changing means of transportation at most once.
Solution. https://artofproblemsolving.com/community/c6h2209751p16799288

Proposition 1.4. Characterization of 2-connected graphs Every 2-connected


graph can be constructed starting from a cycle an adding H-paths to already
constructed graph H.
(Diestel, Graph theory, proposition 3.1.2)

2
Problem 1.7. (Korea NMO 2015, final, p.3) Let G be a simple graph with at
least three vertices and a path P of √ length L. Prove that if G is 2-connected,
there exists a cycle of length at least 2L.
Solution See also here. Let a and b be the end vertices the path P . Since G is
2-connected
√ there is a cycle C through√ a, b. Denote by m the length of C. If
m ≥ 2L we are done, so assume m < 2L Consider how the path P intersects
C. There will be two vertices a′ , b′ of P lying on the cycle C, so that the segment
of the path between a′ and b′ does not intersect C and has length at least m L
.
Consider the cycle C = a P b Ca , where b Ca is the bigger arc of the cycle
′ ′ ′ ′ ′ ′

connecting a′ and b′ . The length of C ′ is at least


L m
+ .
m 2
√ √
As a function of m, for m ∈ [3, 2L] it attains its√minimum when m = 2L,
and in that case the length of C would be at least 2L.

Problem 1.8. (R.Diestel, Graph theory, [1] Ch.1, exercise 3) Let G be a graph
containing a cycle C, and assume that G contains a path of length at least √k
between two vertices of C. Show that G contains a cycle of length at least k.
Is this best possible?
What is the the
√ greatest positive constant c for which there always exists a cycle
with length c k ?

2 Trees. Spanning Trees


Depth-first-search algorithm (DFS)
Breadth-first-search algorithm (BFS)
Important properties. Given a connected graph G. In the resulting spanning
tree T obtained by DFS algorithm, there do not exist edges in E(G) \ E(T ) that
are cross edges in T .
In the spanning tree obtained by BFS algorithm, there do not exist edges in
E(G) \ E(T ) that connect comparable vertices.
Proposition 2.1. A connected graph T with n vertices is a tree if and only if
it has exactly n − 1 edges.(What about T is not connected?)

Proposition 2.2. Suppose T is a tree and G is a graph with δ(G) ≥ |T | − 1.


Then G contains a subgraph like (isomorphic to) T .
Problem 2.1. All Russian Olympiad There are 1000 cities in a country and
there are some two-way roads between them such that there are at least one path
of roads between each two cities.prove that there exist 90 cities in this country
such that the distance between each of the other cities to at least one of these
90 cities is equal or less than 10(10 roads).

3
Solution. Consider the corresponding graph G(V, E), where V are the cities
and E are the roads among them. The statement implies G is connected. Then
we can delete some edges (roads), so that the remaining system of roads still
connects all cities but there are no cycles. In other words let T(V, E’) be a
spanning tree for the graph G(V, E). Fix some R ∈ V and declare it as a root of
T . Make all edges(roads) of T directed(one way), outbound from R to the leafs
of T .
Tag each vertex V of T with the number of edges of the longest possible
path from V to some leaf of T . (all possible paths consist of directed edges). If
R is tagged with a number less or equal to 10 we are done since the single city
R satisfies the requirements. Otherwise we mark some vertex V1 , tagged with
number 10, and delete V1 and all vertices of the branch of the tree originated
from V1 . Note that the deleted vertices are at least 11.
After that, apply the same procedure for the remaining graph over and over
again. The number of the remaining vertices after applying the described procedure
90 times will be at most 1000−90·11 = 10. Then the last marked vertex will be at
distance at most 10 to all of them. Thus, the marked vertices/cities(V1 , V2 , . . . ),
which are at most 90, will do the job.
Problem 2.2. (Bulgarian MC, 2013) A simple graph with n vertices and more
than 3(n − 1)/2 edges is given. Prove that two different vertices x, y of G can
be found, such that there exist 3 non-intersecting each other paths connecting x
and y. (two paths connecting x and y are non-intersecting if they do not share
a vertex different from x and y)

Hint. Use BFS spanning tree.


Problem 2.3. AoPS thread Let G be a simple graph with 2n + 1 vertices and
at least 3n + 1 edges. Prove that there exist a cycle having an even numbers of
edges, Prove that this is not always true if the graph has only 3n edges

Solution. suppose the graph is connected. Otherwise we apply it to some of its


components. Let T be a spanning tree on G, obtained by a breadth-first search.
It means, all edges of G, which are not edges in T , are cross edges with respect
to T . Further, T has 2n edges. Consider the additional n + 1 edges. The number
of vertices incident with them is 2n + 2, so at least some two of them e1 , e2 share
a common vertex. Considering T plus e1 , e2 gives us 3 cycles. It’s easy to see
one of them is of even length.
Problem 2.4. St Petersburg Olympiad 2007, Grade 9, P7 There are n ≥ 3
cities, that connected by roads. We can reach every city from another city. It is
known, that if we close any cyclic route, then we cannot reach every city from
another city. What maximum number of roads can be?

Solution. It is possible to construct a graph with 2n − 3 edges that satisfies the


given condition. Name the vertices u1 , u2 , v1 , v2 , v3 , . . . , vn−2 . Then draw the
edges ui vj for all i, j, as well as u1 , u2 . Any cycle will involve one of the vi ’s,
and thus that vertex will be disconnected from the rest.

4
We will prove that for a connected graph with 2n − 2 edges it is possible to
remove a cycle so that the remaining graph is still connected. Let G be a graph
with 2n − 2 edges. Take a spanning tree T with root v0 such that all edges in
G incident with v0 are also edges in T (for example we can construct T with
breadth-first search algorithm). T has n − 1 edges, so there remain n − 1 edges
which connect some vertices among V (G) \ {v0 }. Thus, we have n − 1 edges,
connecting n − 1 vertices, hence there is a cycle. Removing that cicle we still
have a connected graph, since the edges of T are intact.
Problem 2.5. Bulgarian NMO 2023, p1. A graph with n ≥ 6 vertices is given.
Every vertex has degree at least 3. Let us enumerate all the cycles in this graph as
C1 , C2 , . . . , Ck . Determine all possible values of d := gcd (|C1 |, |C2 |, . . . , |Ck |) ,
where |C| denotes the length of a cycle C.
Problem 2.6. St. Petersburg 2019 9.2 In the city built are 2019 metro stations.
Some pairs of stations are connected by tunnels, and from any station through
the tunnels you can reach any other. The mayor ordered to create several metro
lines: each line should include several different stations connected in series by
tunnels (several lines can pass through the same tunnel), and in each station
must lie at least on one line. To save money no more than k lines should be
made. It turned out that the order of the mayor is not feasible. What is the
largest k it could to happen?
Solution. The answer is 1008. An example of a metro system which cannot be
covered with 1008 lines is when the metro station S1 is connected to all the
others stations Si , i = 2, 3, . . . , 2019, and there are no other tunnels. Further,
it’s enough to show any metro system can be covered with 1009 lines. In fact, we
have a connected graph G and want to cover its vertices with paths. Consider
a spanning tree T of G. It contains 2018 edges. We delete all other edges of G
which are not edges in T . Clearly, for any two edges of T , there is a path in
T that contains both edges. Thus, we partition the edges of T into pairs and
construct 1009 paths that cover them. Obviously, they also cover all the vertices
of T (and so of G).
Problem 2.7. Let T be a tree with at least mn vertices, m > 2, n ≥ 1, and each
vertex has degree at most m. Prove that there exists a path with length at least
2n.

Доказателство. Take the longest path P in T. Suppose, on the contrary, its


length is ℓ < 2n. Let v0 be the "middle"vertex of P. Then all paths that start
from v0 , except eventually a path that
  includes one of the edges of P that is
incident to v0 , have length at most 2ℓ ≤ n − 1. So, the number of vertices of
T is at most

5
1 + (m − 1) + (m − 1)(m − 1)1 + . . . (m − 1)(m − 1)n−2
+ 1 + (m − 1) + (m − 1)2 + · · · + (m − 1)n−1
= 2(1 + (m − 1) + (m − 1)2 + . . . (m − 1)n−1 )
(m − 1)n − 1
=2·
m−2
 n
2 1
< 1− mn ≤ mn
m−2 m

which contradicts to |T | ≥ mn
Theorem 2.1. (Konig lemma) Every infinite, locally finite graph has an infinite
ray.
locally finite: each vertex has a finite degree.
infinite ray: an infinite path starting from a vertex
Доказателство. We prove it for trees. General case is similar. Take a vertex
v0 ∈ V (T ) as a root. By Tu we denote the subgraph "starting"from u. Note that
N (v0 ) is a finite set, hence for some u ∈ N (v0 ), the sub-tree Tu is also infinite
(otherwise T would be finite). We set v1 := u, and further proceed in the same
way with v1 . Thus, an infinite path v0 v1 . . . is obtained.
Problem 2.8. Infinite sequence of sets A1 , A2 , ... be an infinite sequence of sets,
each consisting of finitely many elements. For any finite collection of them, like
Ai1 , Ai2 , ..., Aim , there exist pairwise distinct elements x1 , x2 , ..., xm such that
xj ∈ Aij for all 1 ≤ j ≤ m. Prove that there exists pairwise distinct elements
y1 , y2 , y3 , ... such that for every 1 ≤ t we have: yt ∈ At .
Solution. Consider a graph with vertices in the set

X := {(x1 , x2 , . . . , xn ) : n ∈ N, xi ∈ Ai , i = 1, 2, . . . , n are distinct}.

We connect x, y ∈ X iff x = (x1 , x2 , . . . , xn ), y = (x1 , x2 , . . . , xn , xn+1 ). Thus,


we obtain a graph G with vertices in X.
By the given condition, all degrees of G are finite, and G is a forest of finite
number of trees with roots (x1 ), x1 ∈ A1 . One of those trees is infinite and
by the Konig lemma it has an infinite path, which means there exist distinct
(x1 , x2 , . . . ), xi ∈ Ai , i ∈ N.

3 Bipartite graphs
Definition. A graph G is called bipartite if its vertices can be partitioned into
two sets A and B such that there is no edge with both of his ends either in A or
in B. A graph like that is denoted as G(A, B).

6
A graph is called n-partite if its vertices can be partitioned into n parts such
that every edge has its ends in different parts.
Every tree is a bipartite graph. Apparently, each bipartite graph has no odd
cycle. This condition is also sufficient.

Theorem 3.1. Proposition 1.6.1 in Diestels’s book [1] A graph is bipartite if


and only if it contains no odd cycle.
Problem 3.1. A bipartite graph G(A, B) is given with |A| < |B|. There are no
isolated vertex in G. prove that there exist two vertices a ∈ A, b ∈ B which are
connected and d(a) > d(b).

Problem 3.2. German Olympiad Given a m × n grid board, n > m, a non


negative number is written in each of its cells. Each column contains at least
one positive number. Prove that there exists a square in the grid with a positive
number inside it, for which the sum of the numbers in its row is greater than
the sum of the numbers in its column.

Problem 3.3. (Bulgarian TST,2020 (also RMM SL 2020)). Ivan plays a game
on n × n chessboard. He consecutively places checkers on the board, each time
complying to the following rule. The square, the checker is placed on, must be
empty and there must be even number of checkers placed on the 2n − 2 squares
lying on the same row and column. The game is over if Ivan cannot place a
checker any more. Find the minimal number of checkers on the table after the
game ends.
Solution. Consider a bipartite graph G(R, C) with vertices being the rows and
columns of the n × n table, thus |R| = |C| = n. We may interpret an edge in G,
connecting r ∈ R and c ∈ C, as the square where r and c intersect. The game
being played can be translate as follows. Initially G(R, C) has no edges. Each
move connects a vertex r ∈ R with a vertex in c ∈ C providing the degrees of
r, c have the same parities. Find the minimum number of edges when the game
is over.
The key observation. After each move (an edge being created) the number of
vertices with even (odd) degrees in R and C is the same. Indeed, each new edge
flips the parities of its incident vertices. Suppose at the final position R0 , R1
are the vertices with even, resp. odd degree in R; and C0 , C1 - the vertices with
even/odd degrees in C. Denote k := |R0 | = |C0 |; ℓ := |R1 | = |C1 |. We cannot
add any edge, so all edges between R0 and C0 are drawn. The same holds for
R1 and C1 . It means

|E(G)| ≥ k 2 + ℓ2 , k + ℓ = n (1)
The minimum value of the RHS is attained when k and ℓ are equal or almost
equal. It remains a bit more work to be done in order to nail the right estimate.
The parity of n is essential, and we consider the two possible cases.
1) n is odd, n = 2k + 1. By (1) it follows

7
E(G) ≥ k 2 + (k + 1)2
The estimate can be attained. Partition R, resp. C into two sets R0 , R1 ,
resp. C0 , C1 where |R0 | = |C0 | = k, |R1 | − |C1 | = k + 1. It’s enough to construct
a valid sequence of edges leading to a final position where all vertices in R0 are
connected to all vertices in C0 and all vertices in R1 are connected to all vertices
in C1 and no more edges are drawn. Since |R0 |, |R1 | have different parities, it’s
a final position, no more edge can be drawn. To construct a valid sequence of
moves leading to full bipartite graph G(X, Y ), where |X| = |Y | = ℓ, we make ℓ
steps. At each step i = 0, 1, . . . , ℓ − 1 we connect xs with xs+i , s = 1, 2, . . . , ℓ
where s + i is taken modulo ℓ.
2) n is even, n = 2k. The above construction is no more valid since |R0 |, |R1 |
have the same parity, no matter how R is partitioned. Let G(R, C) be a final
position, R0 , C0 be vertices with even degrees, R1 , C1 - the odd ones and |R0 | =
|C0 | = k + s, |R1 | = |C1 | = k − s, 0 ≤ s ≤ k. Then, all edges between R0 and
C0 are present and the same holds for edges between R1 , C1 . There must exist
additional edges, because the degrees of, say R1 and C1 , have to be increased
with at least 1. Thus, there are at least 2(k − s) additional edges. Hence

E(G) ≥ (k + s)2 + (k − s)2 + 2(k − s) =


= 2k 2 + 2k + 2s2 − 2s ≥ 2k 2 + 2k
The equality is attained when s = 0 or s = 1. The example is a bit harder
than in the previous case. It’s possible to obtain a final configuration when s = 1.
We partition R, resp. C into two sets, R0 , R1 , resp. C0 , C1 with |R0 | = |C0 | =
k − 1, |R1 | = |C1 | = k plus two additional vertices r ∈ R, c ∈ C. We initiate a
process of making full bipartite graphs G1 (R0 , C0 ), G2 (R1 , C1 ) as shown above,
and at each step switch {r, v} to G1 and G2 . Finally, we obtain two full bipartite
graphs G1 (R0 , C0 ) and G′2 (R1 ∪ {r}, C1 ∪ {c}) and moreover r, c are connected
to all vertices in C0 resp. R0 .

4 Hall’s Marriage Theorem.


Definition. Let G(A, B) be a bipartite graph. A set of independent edges is
called matching. If these edges cover A it is called a full (perfect) matching with
respect to A. One may view this matching as a injection f : A → B, where the
edges are (a, f (a)), a ∈ A.
Theorem 4.1. (Hall’s Theorem) Let G(A, B) be a bipartite graph that satisfies
the following condition. For any subset A′ ⊂ A it holds
|N (A′ )| ≥ |A′ |
Then there is a perfect matching from A to B.
Remark. By N (A′ ) we denote all the neighbours of A′ , that is, the set of
all vertices in B each of which is connected to some vertex in A′ . The condition
of Hall’s theorem is called Hall’s condition.

8
Problem 4.1. Take a standard deck of 52 cards, and deal them out into 13
piles of 4 cards each. Show that we can select 1 card from each pile such that
the 13 selected card contain exactly one card of each rank - ace, 2,3, ... , Queen,
King.
Solution. Let A be the set of all piles and B be the the set of ranks, i.e. ace,
2,3, ... , Queen, King. Consider a bipartite graph with vertices in A and B such
that a ∈ A is connected to b ∈ B if the rank b is present in b-th pile. What we
want to prove is that there is a perfect matching from A to B. Let’s check the
Hall’s condition. Take a vertex set B ′ ⊂ B. Note that the neighbours N (B ′ ) of
B ′ consists of all piles that contain each of the 4 · |B ′ | cards that corresponds
to ranks in B ′ . It means that 4 · |N (B ′ )| ≥ 4 · |B ′ | or |N (B ′ )| ≥ |B ′ |. By Hall’s
marriage theorem, there is a perfect matching.
Problem 4.2. Let G(A, B) be a bipartite graph. Each vertex has the same degree
d ≥ 1. Prove that there is a perfect matching in G.
Solution. Obviously |A| = |B|. We will apply Hall’s theorem. Take A′ ⊂ A.
It’s enough to prove |N (A′ )| ≥ |A′ |. Suppose on the contrary N (A′ ) ≤ |A′ | − 1.
Consider the induced graph G′ on A′ ∪ N (A′ ). Let’s count its edges. Each vertex
in A′ has degree d, so E(G′ ) = |A′ | · d. Each degree in N (A′ ) is at most d, hence
E(G′ ) ≤ (|A′ | − 1) · d, contradiction.
Remark. Graphs whose vertices have the same degree are called regular.
We proved that every regular bipartite graph has a perfect matching.
Problem 4.3. Bulgarian TST 2022 Let S = {1, 2, . . . , n}, n ∈ N. For positive
integers k, ℓ with ℓ < k and k +ℓ = n we denote by Sk and Sℓ correspondingly all
subsets of S consisting of k resp. ℓ elements. Prove that there exists a bijection
f : Sk → Sℓ , such that
f (X) ⊂ X, ∀X ∈ Sk
Problem 4.4. (Putnam 2012, B3) Suppose 2m teams play a round-robin tournament.
Over a period of 2m − 1 days, every team plays every other team exactly once.
There are no ties.
Show that for each day we can select a winning team, without selecting the same
team twice.
Solution. Consider a graph G(T, D) where T is the vertex set that corresponds
to the teams and D corresponds to the days. So, |T | = 2m, |D| = 2m−1. Connect
any d ∈ D to t ∈ T if and only if team t have won on day d. We must show
that there is a matching from D to T. Let’s check the Hall’s condition. Take any
subset D′ ⊂ D. Denote k := |D| Assume, on the contrary, that |N (D′ )| ≤ k − 1.
Since k − 1 ≤ 2m − 1 − 1 < 2m there is t ∈ T \ N (D′ ). But N (D′ ) is the set of
teams that have won at least once for the set of days D′ . It means that t lost on
each day among these in D′ That is, t lost k times to k distinct teams each of
which won on some of those days. It implies |N (D′ )| ≥ k, contradiction. Hence
the Hall’s condition holds.
Thus, applying the Hall’s marriage theorem, the result follows.

9
Problem 4.5. (Kazakhstan 2003) We are given two square sheets of paper with
area 2003. Suppose we divide each of these papers into 2003 polygons, each of
area 1. (The divisions for the two piece of papers may be distinct.) Then we place
the two sheets of paper directly on top of each other. Show that we can place 2003
pins on the pieces of paper so that all 4006 polygons have been pierced.
Problem 4.6. (AMSP C3 2014) Let n ∈ {1, 2, ..., 8}. Consider an 8×8 chessboard
with the property that on each column and each row there are exactly n pieces.
Prove that we can choose 8 pieces such that no two of them are in the same row
or same column
Solution. Let R be the set of 8 rows and C be the set of 8 columns. Consider a
bipartite graph G(C, R). Connect a row r to a column c if and only if there is
a piece on the intersection cell of r and c. We obtain a bipartite graph G which
is regular, that is, each vertex of G(R, C) has degree exactly n. It is easy to
see that any regular bipartite graph has a perfect matching (as done above -
Bulrarian TST 2020 problem).
Problem 4.7. (Canada 2006) In a rectangular array of non-negative reals with
m rows and n columns, each row and each column contains at least one positive
element. Moreover, if a row and a column intersect in a positive element, then
the sums of their elements are the same. Prove that m = n.
Problem 4.8. (Baltic Way 2013/6) Santa Claus has at least n gifts for n
children. For i ∈ {1, 2, ..., n}, the i-th child considers xi > 0 of these items to be
desirable. Assume that
n
X 1
≤ 1.
x
i=1 i

Prove that Santa Claus can give each child a gift that this child likes.
Hint.. Consider appropriate bipartite graph G(C,P) - children, presents. Check
that Hall’s condition holds. Let C ′ ⊂ C and assume on the contrary |N (C ′ )| <
|C ′ |. This brings us to contradiction with the condition given.
Problem 4.9. (AMSP C3 2014) An n × n table is filled with 0 and 1 so that if
we choose any n cells, no two of them on the same row or column, then at least
one contains 1. Prove that we can find i rows and j columns so that i+j ≥ n+ 1
and their intersection contains only 1’s.
Solution.. We model the n × n table as a bipartite graph. We met already this
approach. The condition that for any set of n cells not two in the same column
or row, there is 0 inside some of them, can be interpreted as there is no set of
n zeroes no two of them in the same row, or column. This said, let consider a
bipartite graph G(R, C) with vertices the set of rows R and columns C. Connect
r ∈ R to c ∈ C if there is 0 in the cell of their intersection.
What we know is that there is no perfect matching in this graph. What we want
is to find an independent set with at least n + 1 vertices among R ∪ C.
Since there is no perfect matching from R to C, the Hall’s condition does not

10
hold. It means that there exists R′ ⊂ R such that |N (R′ )| < |R|. Consider the set
of vertices X := (C \N (R′ ))∪R. This is independent set with n−|N (R′ )|+|N | ≥
n + 1 vertices.
Problem 4.10. (BMO Shortlist, 2022, C1) There are 100 positive integers
written on a board. At each step, Alex composes 50 fractions using each number
written on the board exactly once, brings these fractions to their irreducible form,
and then replaces the 100 numbers on the board with the new numerators and
denominators to create 100 new numbers. Find the smallest positive integer n
such that regardless of the values of the initial 100 numbers, after n steps Alex
can arrange to have on the board only pairwise coprime numbers.

Solution. Interpret it as a complete graph K(V, E) of 100 vertices (which are


placeholders for the numbers). At each step we take a complete matching and
cancel the gcd of each matched pair. We will prove that each edge must be part
of a matching at some step. Tag each edge e of K with a distinct prime number
p(e). To each vertex v ∈ V map the number n(v) as follows
Y
n(v) := p(e)
e: e incident with v

In this way for any e = vu, p(e) = gcd(u, v) and it can be cancelled only if we
choose e as a matching at some step. Since all edges of K are 50 · 99 and at each
step we choose exactly 50 edges, the minimum number of steps is 99.
It remains to see that the edges of K can be decomposed into 99 edge disjoint
perfect matchings. (round robin tournament).
Remark. As a standalone problem it is interesting to prove that the edges
any complete graph of 2n vertices can be decomposed into 2n−1 disjoint perfect
matchings which is used in any round robin tournament.

5 Invariants and Monovariants


Problem 5.1. An 8 × 8 chessboard has two opposite corners removed. Is it
possible to tile the remaining 62 squares with 31 dominoes?
Solution. No. Each domino covers two squares of opposite color.
Problem 5.2. The numbers 1, 2, 3, . . . , n are written in a row. It is permitted
to swap any two numbers. If 2023 such operations are performed, is it possible
that the final arrangement of numbers coincides with the original?
Solution. Every move changes the parity of the permutation.
Problem 5.3. In the sequence 1, 0, 1, 0, 1, 0, 3, 5, . . . each term starting with the
seventh is equal to the last digit of the sum of the preceding six terms. Prove
that this sequence does not contain six consecutive terms equal to 0, 1, 0, 1, 0, 1
respectively.

11
Solution. Consider the value xi := ai + 2ai+1 + 3ai+2 + 4ai+3 + 5ai+4 + 6ai+5 .
Show that xi (mod 5) is invariant.
Problem 5.4. (Kyiv City MO 2022) 2022 points are arranged in a circle, one
of which is colored in black, and others in white. In one operation, The Hedgehog
can do one of the following actions:

1. Choose two adjacent points of the same color and flip the color of both of
them (white becomes black, black becomes white)
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 5.5. A bug starts at the number 1. Each turn, if it is at x, it can
either jump to x2 , to x + 10, or to 3x − 4. Is it possible, after some series of
hops, for the bug to ever land on 2022?

Solution. No. Each time x (mod 4) is either 1 or −1.


Problem 5.6. Several stones are placed on an infinite (in both directions) strip
of squares. As long as there are at least two stones on a single square, you may
pick up two such stones, then move one to the preceding square and one to the
following square. Is it possible to return to the starting configuration after a
finite sequence of such moves? Show that the final position does not depend on
the sequence of moves.
Solution. It’s not possible. For a set of stones S take the value
X
f (S) := (p(s))2
s∈S

where p(s) denotes the position of a stone s. If two stones are at a position x
then they take part in f with a value 2x2 . After they are moved it becomes
(x − 1)2 + (x + 1)2 = 2x2 + 2. It means f (S) strictly increases after each move,
so it’s not possible the initial position to be repeated.

Problem 5.7. (ARMO 1997, 10.8) On an infinite (in both directions) strip of
squares, indexed by the integers, are placed several stones (more than one may
be placed on a single square). We perform a sequence of moves of one of the
following types:

12
1. Remove one stone from each of the squares n − 1 and n and place one
stone on square n + 1.
2. Remove two stones from square n and place one stone on each of the
squares n + 1, n − 2.

Prove that any sequence of such moves will lead to a position in which no
further moves can be made, and moreover that this position is independent of
the sequence of moves.

Solution. Label the n-th square of the grid by φn , where φ = 1+2 5
, n ∈ Z.
Then the sum of the labels remains invariant. Now, prove that if
X X
φj = φj
j∈A j∈B

where A, B ⊂ Z do not contain successive numbers, then A = B.


This invariant allows also to prove that any sequence of moves finally stops.
Let at n-th move the possitions of the stones are described by the (multi)set
An ⊂ Z. Consider: X
φj
j∈An

It remains constant, therefore the rightmost element of An is bounded. Suppose


its max value is attained at k-th move and take a stone placed at that rightmost
position. This stone remains fixed at that position ever since the k-th move,
since if removed, a stone will appear at the next to the right position, which will
contradict with the corresponding max value. Forget about this stone, virtually
it’s out of the game. Consider the remaining ones and apply the same argument,
over again until all of the stones become fixed.

Problem 5.8. On an n × n board, there are n2 squares, n − 1 of which are


infected. Each second, any square that is adjacent to at least two infected squares
becomes infected. Show that at least one square always remains uninfected.
Solution. The perimeter of the infected area does not increase.
Problem 5.9. The vertices of a regular n-sided polygon have rational coordinates.
Show that n = 4.
Solution. It’s not possible for n ≥ 7. The side length then is less than the radius
of the circumference. By translating its sides to the origin we’ll get a smaller n-
gon. For n = 5 consider a symmetry and obtain a regular 10 gon. If it’s possible
for n = 6, it would be possible for n = 3 and vise versa. It remains to check
n = 3 is not possible.
Problem 5.10. (USA TST for 2020) Let G = (V, E) be a finite simple graph
on n vertices. An edge e of G is called a bottleneck if one can partition V into
two disjoint sets A and B such that

13
• at most 100 edges of G have one endpoint in A and one endpoint in B;
and
• the edge e is one such edge (meaning the edge e also has one endpoint in
A and one endpoint in B).
Prove that at most 100n edges of G are bottlenecks.
Solution. Take a bottleneck edge and remove it along with all of its accomplices.
What happens after removing these (at most 100) bottleneck edges? The graph
becomes more disconnected! That is, the number of its connected components
increases at least by one. Since the number of all connected components of a
graph with n vertices cannot exceed n, we can do this procedure at most n − 1
times, deleting at most 100 bottleneck edges each time. This means that after
deleting at most 100(n − 1) bottlenecks, no such edges will remain. We proved
an even stronger estimate. The number of bottlenecks cannot exceed 100(n − 1).
That’s the idea, and that’s the solution. It remains to brush it up.
Actually, it remains to be seen that after deleting a bottleneck with all of its
companions, the number of connected components increases. Let G1 , G2 , . . . , Gm
be the connected components of the remaining graph before some step. If there
exists a bottleneck edge e, it is inside some component, say, Gk . Consider the
initial graph G. It can be partitioned into two vertex sets A and B such that the
number of edges (in G) between A and B are at most 100. Some of these edges
may already have been deleted. Apply the next step and remove the remaining
ones. The component Gk further splits into (at least) two disjoint sets A ∩ Gk
and B ∩ Gk with no edge between them. Both are non-empty since each one
contains an end of e.
Problem 5.11. (IMO Shortlist 2013, C3) A crazy physicist discovered a new
kind of particle wich he called an imon, after some of them mysteriously appeared
in his lab. Some pairs of imons in the lab can be entangled, and each imon can
participate in many entanglement relations. The physicist has found a way to
perform the following two kinds of operations with these particles, one operation
at a time.
(i) If some imon is entangled with an odd number of other imons in the lab,
then the physicist can destroy it.
(ii) At any moment, he may double the whole family of imons in the lab by
creating a copy I ′ of each imon I. During this procedure, the two copies I ′ and
J ′ become entangled if and only if the original imons I and J are entangled, and
each copy I ′ becomes entangled with its original imon I; no other entanglements
occur or disappear at this moment.

Prove that the physicist may apply a sequence of such operations resulting
in a family of imons, no two of which are entangled.
Solution. The idea is we can decrease some kind of "complexity". Let’s show
that starting from a graph G the steps (i) and (ii) can be applied in such a
way that the chromatic number χ(G) decreases. First to see that "cloning"the

14
graph does not increase χ(G). Indeed let k := χ(G) and partition V (G) into
k sets V1 , V2 , . . . , Vk so that Vi is independent vertex set. Suppose each Vi is
assigned the color i. After "cloning"we get another vertex sets Vi′ , i = 1, . . . , k
which are copies of Vi . Assign to them any permutation of the colors 1, 2, . . . , n
without fixed point. For instance, assign to Vi′ the color i+1 (with the convection
k + 1 = 1). This is a proper coloring.
Now, let’s see that we can decrease χ using (i) and (ii). First, we consecutively
remove all vertices of G with odd degrees and in the end every vertex of the
resulting graph (again denoted by G) is of even degree. Let V1 , V2 , . . . , Vk be the
vertex sets of each color. Then we "clone"G and color G′ as shown above. So,
V1 and Vk′ are colored in the color 1. Note that all degrees of G′ are odd and
V1 ∪ Vk′ is independent set in G′ . We remove one by one the vertices in V1 ∪ Vk′
without any interference between two of them, and the color 1 is eliminated.
Problem 5.12. (Tournament of Towns Fall 2015 Senior A-level) A group of
n children no two of the same height stand in a line. The following two-step
procedure is applied: first, the line is split into the least possible number of groups
so that in each group all children are arranged from the left to the right in
ascending order of their heights (a group may consist of a single child). Second,
the order of children in each group is reversed, so now in each group the children
stand in descending order of their heights. Prove that in result of applying this
procedure n − 1 times the children in the line will stand from the left to the right
in descending order of their heights.

Solution. It’s the official solution. Number the children 1, 2, . . . , n. The greater
the number the taller the child is. Take any number k, 1 ≤ k ≤ n. Call any child
with number less than k a dwarf. All other children call giants. The place where
after a dwarf follows a giant call a junction. Map to each junction a weight equal
to the number of dwarfs on the left side plus the number of giants on the right.
These weights are between 2 and n. After each operation the maximum weight
strictly decreases, hence after at most n − 1 steps we have a block of giants
followed by a block of dwarfs. Since we can vary k the result follows.
Remark. This idea could be called the threshold trick.
Problem 5.13. (Sozopol math festival 2017) We say that a polygon is orthogonal
when all of its angles are 90◦ or 270◦ . Is it true that each orthogonal polygon,
which sides are with lengths equal to odd numbers only, cannot be tiled with 1×2
domino tiles?
Solution. Suppose our rectangular polygon P can be tiled by 1 × 2 dominoes.
We consider a graph G, which vertices are the nodes of the tiling (where the
corners of 1 × 2 tiles are placed). Two vertices of G are joined whenever they
lie along the long side (with length 2) of some 1 × 2 tile. In case they lie along
the long sides of two clinging together dominoes, that edge has multiplicity 2.
Shortly, the edges of G are the long sides of all dominoes.
Now, the key observation. Every corner of P (as a vertex in G) has degree
1 and all the other vertices of G have even degrees (either 2 or 4, counted

15
with their multiplicity). Thus, starting an Eulerian path from any corner of P
(corresponding to v ∈ G) , it will not terminate until reaching another corner
of P , corresponding to v ′ ∈ G.
We will prove there exists a corner v, such that both v and v ′ lie on the same
side of P . Indeed, if it doesn’t hold for some v, v ′ there will exist another vertex
v1 ̸= v, v ′ somewhere on the contour of the polygon P , between v and v ′ . We
construct another Eulerian path v1 v1′ starting from v1 . If that path crosses the
path v v ′ we switch to the first one and may assume v1′ = v ′ . Thus, the distance
on the contour between v1 and v1′ is shorter than the same kind of distance
between v and v ′ (Here, it is crucial P does not have holes).
Keeping shortening that distance, we finally reach a vertex vi such that both vi
and vi′ lie on the same side of P . But then, the length of that side of the polygon
would be an even number, since all the segments of the path, connecting its ends,
are of even lengths and parallel to the axes. Contradiction.
This problem can be viewed as an generalization of the following theorem.
Theorem 5.1. (De Bruijn) If a rectangle A1 × A2 can be tiled into tiles with
size a1 × a2 then ai divides some of the values A1 or A2 for i = 1, 2.
Proof. Suppose the rectangle can be tiled. Take some ai and consider a graph
with vertices the knots of domino and edges that are along each side with length
ai (the same trick as in the previous problem.)
Problem 5.14. (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

k(a, b) ≥ a + k(a, b − 1).

16
In case Bob’s first move is to color a column, the same argument yields

k(a, b) ≥ b + k(a − 1, b).

Obviously, k(1, 1) = 1 which gives us k(a, b) ≥ ab. Hence, k(a, b) = ab.

6 The probabilistic method.


Definition. (Probability space) Discrete probabilistic space (Ω, P ) where Ω consists
of
Pm finite number of objects (points) ω1 , ω2 , . . . , ωm and p : Ω → [0, 1] such that
i=1 P (ωi ) = 1.
Ω is interpreted as probabilistic space, which consists of finite number of elementary
events ωi ∈ Ω and P (ωi ) is interpreted as the probability to happen the elementary
event ωi . For any A ⊂ Ω we can consider
X
P (A) := P (ω)
ω∈A

which is called the probability that the event A happens. Thus anu subset A of
Ω is called event.
This definition can be generalized to cover non discrete case, but it’s outside the
scope of this course.
Further we deal only with discrete probability spaces which for brevity we
call probability spaces.
Definition. (Independent events) Let (Ω, P ) be a probability space and A, B ⊂
Ω be two events. Then A ∩ B is also event. We call A and B independent if
and only if
P (A ∩ B) = P (A) · P (B).

Definition. (Conditional probability) For any two events A, B we set

P (A ∩ B)
P (B|A) :=
P (A)

it is interpreted as the probability of event B given event A happens. Note that


if A and B are independent we get

P (A ∩ B) P (A) · P (B)
P (B|A) = = = P (B)
P (A) P (A)

It just means that when A, B are independent, the information that A happens
does not impact the probability of the event B.
Definition. (Random variable) Given a probability space (Ω, P ) and a set Y
let X : Ω → Y be a certain function. We call X random variable. That is, X

17
takes "random"values from Y. For any y ∈ Y the probability that X takes value
y is equal to
P (X = y) = P ({ω ∈ Ω : X(ω) = y})
We mostly consider the case Y = R and refer to it as a real random variable.
Definition. (Expectation ) Let X be a real random variable that takes values
x1 , x2 , . . . , xm . We define the expectation E[X] of X as
m
X
E[X] := P (X = xi ) · xi .
i=1

Theorem. (Linearity of expectation) Let Xi , i = 1, 2, . . . , k are random variables


Pk
and X := i=1 Xi . Then
Xk
E[X] = E[Xi ].
i=1

Further we mark two principles/techniques that are applicable to many


problems.

Principle 1. Let B1 , B2 , . . . , Bk be certain events (interpreted as "bad"events).


Pk
If i=1 P (Bi ) < 1 then there is a positive probability that none of Bi occurs.
Indeed,
Xk
P (B := (B1 ∪ B2 ∪ · · · ∪ Bk )) ≤ P (Bi ) < 1
i=1

thus,
P (Ω \ B) = 1 − P (B) > 0.
This is useful, since if we probability of a certain (good) event is positive, then
there is a configuration that satisfies the "requirements"of that event.

Principle 2. Let X be a real random variable and m := E[X]. Then X


takes a value that is greater than or equal to m as well as a value that is less
than or equal to m.

In fact, Principle 2 is a more general one. Indeed, for the hypothesis of


Principle 1 let 1Bi be the indicator random variable that corresponds to he
event Bi , i.e. (
1 if Bi happens
1Bi :=
0 otherwise

18
Note that P (1Bi = 1) = P (Bi ) and P (1Bi = 0) = 1 − P (Bi ). Then
E[1Bi ] = 1 · P (1Bi = 1) + 0 · P (1Bi = 0) = P (Bi )
Consider the random variable defined as
k
X
X := 1Bi .
i=1

The value of X is equal to the number of the "bad"events Bi that occur. By


linearity of expectation
k
X k
X
E[X] = E[1Bi ] = P (Bi ) < 1.
i=1 i=1

By Principle two it follows X takes values less than 1 and since X takes only
integer values, it means X takes a value 0. Therefore, there is a situation that
non of Bi occurs.
This argument is often used.
Problem 6.1. (Ramsey’s numbers) By definition R(k, ℓ) denotes the smallest
number n such that each edge coloring of a complete graph of n vertices in white
and black either contains a k-clique colored in white or a ℓ-clique colored in
black. Ramsey’s theorem says that this definition is correct. Show that
R(k, k) ≥ 2k/2
First proof. Let Kn (V, E) be a complete graph of n vertices. Color all its edges
randomly in two colors - white and black. For any clique Q ⊂ V of k vertices
we denote by BQ the (bad) event that all edges of Q are colored in the same
color. Clearly
P (BQ ) = 2 · 2−k(k−1)/2
Let [
B := BQ .
Q⊂V

In other words, B s the event that at least one clique of size k is colored
monochromatically. We have
 
X n
P (B) ≤ P (BQ ) = 2 · 2−k(k−1)/2
k
Q

Suppose now n < 2k/2 . In this case


2
2k /2 −k2 /2+k/2
P (B) < ·2 < 1.
k!
Since P (B) < 1 we get P (B) > 0, that is, there is a positive chance to happen
the "good"event that non of Bi occurs. So, there is a coloring without a k-clique
of the same color. Thus R(k, k) ≥ 2k/2 .

19
Second proof. Let Kn (V, E) be a complete graph of n vertices. Color all its
edges randomly in two colors - white and black. Let Q ⊂ V be a fixed clique of
k vertices. Consider a random variable 1Q which takes value 1 if all edges in Q
are colored in the same color. Note that

P(1Q = 1) = 2 · 2−k(k−1)/2

Let X be a random variable defined as


X
X := 1Q .
Q⊂V,|Q|=k

X is equal to the number of k-cliques colored in the same color. We have


 
X n
E[X] = E[1Q ] = 2 · 2−k(k−1)/2 .
k
Q⊂V,|Q|=k

Suppose now n < 2k/2 . In this case


2
2k /2 −k2 /2+k/2
E[X] < ·2 < 1.
k!
It means that X must take values less than 1. Since X takes only non-negative
integer values, X takes value 0 for some coloring. This coloring does not have
monochromatic k-clique. Hence

R(k, k) ≥ 2k/2 .

Third proof. It can be done without any probabilistic arguments. Consider the
set S of all possible colorings of the edges of Kn in two colors. Then |S| =
2n(n−1)/2 . For each k-clique Q Let BQ ⊂ S consists of all colorings for which Q
is colored monochromatically. Apparently,

|BQ | = 2 · 2n(n−1)/2−k(k−1)/2 .

Let B := BQ . We have
S
Q
 
X n
|B| ≤ |BQ | = · 2 · 2n(n−1)/2−k(k−1)/2 .
k
Q

Assume that |B| < |S|. It would imply that S \ B ̸= ∅, hence there should be a
coloring not in B, that is, without a monochromatical k-clique. Now, |B| < |S|
is equivalent to  
n
2 · 2−k(k−1)/2 < 1
k
The same argument, as above shows that it holds when n < 2k/2 , hence R(k, k) ≥
2k/2 .

20
Problem 6.2. Let G(V, E) be a simple graph. Prove that the vertices can be
partitioned into two groups V0 , V1 such that the edges between V0 and V1 are at
least |E|/2.
Solution. Assign to each vertex randomly and independently 0 or 1. Put the
vertices tagged with 0 into V0 and those with 1 - into V1 . For each edge e ∈ E
consider the random variable 1e which is 1 if the vertices of e are tagged with
different numbers. So, P (1e = 1) = 1/2 and E[1e ] = 1/2. Let
X
X := 1e .
e∈E

In other words, X is equal to the number of edges between V0 and V1 . We have


X |E|
E[X] = E[1e ] = .
2
e∈E

Thus, X takes a value that is at least |E|/2. which implies that there exists an
assignment of 1 or 0 to each vertex that leads to at least |E/2 cross edges.
Problem 6.3. (Szele, 1943) There is a tournament on n vertices with at least
n!21−n directed Hamilton paths.
This was the first use of the probabilistic method.
Solution. Take a full graph Kn and direct its edges randomly. Consider any
permutation σ := vi1 vi2 . . . vin of its vertices. Let 1σ be the random variable that
takes value 1 if the vertices taken in this order form a directed Hamiltonian path
and 0 otherwise. Note that P (1σ = 1) = 21−n . Consider the random variable
X
X := 1σ .
σ∈Sn

It counts the number of Hamiltonian paths with a randomly assigned direction


of the edges. We have
X
E[X] = E[1σ ] = n!21−n .
σ∈Sn

Thus, there exists some direction of edges with X ≥ n!21−n , that is, with at
least n!21−n directed Hamiltonian paths.
One should remember that a random variable is not just a vague quantity
that we take to vary randomly. It has a clear definition that needs to be known
to avoid inaccuracies, as below.
Problem 6.4. Prove that any subgraph of Kn,n with at least n2 − n + 1 edges
has a perfect matching.

21
Фигура 2:

This is an easy problem. Hall’s marriage condition kills it instantly. It’s


included just as an example on linearity of expectation. Let’s see first a flawed
solution presented in a paper.
A flawed solution. So let’s be really careless and just randomly pair off one set
of points with the other, regardless of whether there is actually an edge present
[green pairs on the picture]. We call the score of such a pairing the number
of pairs which are actually connected by an edge. We wish to show that some
pairing has score n, as this will be the desired perfect matching. So what’s the
expected value of a random pairing? Number the pairs 1, 2, . . . , n and define
(
1 if the ith pair is connected by an edge,
Xi :=
0 otherwise.
Then the score of the configuration is X = X1 + X2 + · · · + Xn . Given any
red point and any blue point, the probability they are connected by an edge is
n2 − n + 1 n2 − n + 1
at least . This means that E[X i ] = , so
n2 n2
E[X] = E[X1 ] + · · · + E[Xn ]
n2 − n + 1
= n · E[X1 ] =
n
1
=n−1+ .
n
Since X takes only integer values, there must be some configuration which
achieves X = n. Thus, we’re done.
So, what’s wrong (or rather, incorrect) with this argument? It’s the definition
of the random variables X1 , X2 , . . . , Xn . Ok, one can randomly pair off the

22
set of points, it’s ok. The sample space of outcomes consists of all possible
pairings "blue - red"vertices, each pairing taken with equal probability. That’s,
each outcome is a set of n disjoint pairs. I underlined on purpose the word
"set because there is no order in the set. So, one cannot just say "Number the
pairs 1, 2, . . . , n". The way of enumeration does matter! It should be explicitly
pointed out how to enumerate a set. For example, if you enumerate the pairs by
the corresponding blue vertex each of them is incident with, then you cannot
n2 − n + 1
guarantee that the probability P (X1 = 1) is at least . Indeed, suppose
n2
the top blue vertex is connected with only one red one (all the others edges are
1
present). So, in this case P (X1 = 1) = . Thus, the definition of the random
n
variables is not correct, because different enumerations may lead to absolutely
different r.v. Moreover, the most natural enumeration - by the blue vertex of
the corresponding pair - doesn’t do the job, E[X1 ] could be whatever we want!
Fixed solution. One way to fix it is to take randomly the ensemble of the
pairs and enumerate them randomly 1, 2, . . . , n (another randomness). Maybe,
a clearer way is to enumerate them by the blue vertices they are incident with,
but this time P (Xi = 1) would have different values, depending on the degree of
the corresponding blue vertex. But, it doesn’t matter much, since if P (Xi = 1)
is small (as above) the other ones would be big. So, a rapid calculation shows
1
the sum E[X1 ] + · · · + E[Xn ] would be the same as above: n − 1 + .
n
Problem 6.5. (US, MOP). A simple graph G(V, E) is given with d(v) ≤ 5, ∀v ∈
V. Prove that the vertices can be coloured in two colours such that at least 3/5
of all edges have ends coloured in different colours.
Solution. We can color the vertices of G in 6 colors, say, C := {1, 2, 3, 4, 5, 6, }
such that it is a proper coloring (no two neighbouring vertices are of the same
color). It can be done with a greedy algorithm due to d(v) ≤ 5, ∀v ∈ V. Take a
random three colors in C. It means that our probability space Ω consists of all
subsets of C with 3 elements.
 Each element (subset) in Ω has equal probability
to happen. Thus, |Ω| = 63 = 20, P (ω) = 1/20, ∀ω ∈ Ω. Further, for any ω ∈ Ω
(which in fact consists of three colors {c1 , c2 , c3 } in C) we select all vertices in
V that are colored in either c1 , c2 , c3 and recolor them in a completely different
color α. We recolor the remaining vertices in another color β. Let e = uv be
any edge of G. Let us calculate the probability that u and v are recolored in
different colors. It happens when originally the color of u was among {c1 , c2 , c3 }
and the color of v was not, or the color ofu was not among {c1 , c2 , c3 } but the
color of v was. There are exactly 42 + 42 = 12 ways for this to happen. That
is, P (e is properly colored) = 12/20 = 3/5. In what follows, we use the same
technique as in the previous examples. For any e ∈ E let 1e be the random
variable that takes 1 if e is properly recolored or 0 otherwise. We have E[1e ] =
3/5. Consider the random variable
X
X := 1e .
e∈E

23
X is equal to the number of edges colored properly.
X 3
E[X] = E[1e ] = |E|.
5
e∈E

This means that there exists a recoloring with at least 3|E|/5 edges colored
properly.
Problem 6.6. (Bulgarian spring competition, 2022, p9.4.) There are 14 students
in a Math training camp. Each student has k favourite numbers. The coordinators
want to give each student a t-shirt with their favourite number on it. Find the
least possible natural number k for which this is always possible providing that:
а) The students are arranged in a circle and the t-shirts have to be given in a
way that any two neighbouring students have t-shirts with different numbers on
it.
б) They are 7 boys and 7 girls and the t-shirts must be distributed in a way that
each pair boy-girl have different numbers on their t-shirts.
Solution. Here, we consider only part b). There is an example that for k = 3
it is not possible to satisfy the conditions. Let’s prove that when k = 4 we can
distribute the t-shirts appropriately. We interpret the situation as a bipartite
graph G(S, N ) where S is the set of students and N is the set of all numbers
that are favourites to students. s ∈ S is connected to n ∈ N if n is a favourite
number of s. Thus, d(s) = 4, ∀s ∈ S. Let S0 ⊂ S be the subset of boys and
S1 ⊂ S consists of the girls. The problem boils down to partition N into two
sets N0 and N1 such that each vertex in S0 is connected to a vertex in N0 and
each vertex in S1 is connected to a vertex in N1 . If so, we can give to a boy
a number in N0 and to a girl - a number in N1 . To prove such partitioning
does exist we assign randomly to each vertex in N either 0 or 1 then put the
vertices with 0 into N0 and those with 1 - into N1 . The probability space Ω
consists of all assignment of 0 and 1 which number is 2|N | . Each assignment has
probability 2−|N | . Take a vertex s ∈ S0 and let Bs be the "bad"event that to all
neighbours of s are assigned 1’s. In this case this partitioning fails for s. Clearly
P (Bs ) = 2−d(s) = 1/16. Similarly, for any s ∈ S1 let Bs be the event that s is
connected to only 0’s. In the same way P (Bs ) = 1/16. Therefore
!
[ X 1 7
P Bs ≤ P (Bs ) = 14 · = < 1.
16 8
s∈S s∈S

It means that the probability non of Bs happens is positive, that is, there is an
assignment that satisfies what needed.
Remark. The exact ration of boys to girls 7-7 was never used. The same
argument goes for any ration. The total number of S is important. The same
argument with a refinement can prove that k = 4 even for 16 students.
Definition. (Sum-free set). We call a set A ⊂ R a sum-free set if for any
a1 , a2 ∈ A we have a1 + a2 ̸∈ A.

24
Theorem. (Erdos, 1965, Sum-free subset large enough) Every set of n nonzero
integers contains a sum-free subset of size ≥ n/3.
First proof. Let X be a set of nonzero integers with size n. The main idea is
that if for some ξ ∈ R and a subset A of X we know that ξ · A := {ξ · a : a ∈ A}
is a sum-free subset modulo 1, then A is also sum-free. Indeed, suppose A is not
sum-free. Then a1 + a2 = a3 for some a1 , a2 , a3 ∈ A. It means ξa1 + ξa2 ≡ ξa3
(mod 1), hence ξ · A is not sum-free
 modulo 1, contradiction.
Further, notice that the set I := 31 , 23 is sum-free modulo 1. The main idea is


to choose ξ ∈ [0, 1] such that as much as possible elements of ξ · A hit I modulo


1.
Choose ξ uniformly at random in [0, 1]. For any x ∈ X let 1x be the random
(indicator) variable that takes value 1 if ξ · x ∈ I (mod 1) and value 0 otherwise.
Then P(1x = 1) = 1/3, that is, E[1x ] = 1/3. Consider the random variable
X
X := 1x .
x∈X

X counts the number of x ∈ X for which ξx ∈ I (mod 1). We have


X
E[X] = E[1x ] = n/3.
x∈X

This simply means that there exists ξ ∈ [0, 1] such that the set A := {x ∈ X :
ξ · x ∈ I (mod 1)} consists of at least n/3 elements. As said, A is sum-free.

Remark. We didn’t define what is a random event on a probability space


that is not discrete. In this case we take at random a number ξ in the interval
[0, 1]. We know intuitively what’s the meaning. For our purpose, it’s enough
to know that for any interval I ⊂ [0, 1], P(ξ ∈ I) = |I|, where |I| denotes the
length of I. Another way of proving this claim is shown in the second proof.

Second proof. The idea is to take a prime number p greater than all the elements
of X. For any s ∈ [1..p−1] if the set s·A is sum free modulo p then A is sum-free.
Let I := p3 , 2p
3 . For any x, y ∈ I, x + y (mod p) ̸∈ I. We take a random s in
[1..p − 1. For any x ∈ X let 1x be the random variable that takes value 1 if
s · x ∈ I (mod p) and 0 otherwise. Note that as s runs through 1, 2, . . . , p − 1,
the residue of s · x modulo p hits all the numbers 1, 2, . . . , p − 1 exactly once.
It means that the probability of s · x ∈ I (mod p) is equal to the number of
integers in I divided by p − 1. That is,

|I| − 1
E[1x ] = P(1x = 1) ≥ . (1)
p−1
Consider the random variable
X
X := 1x .
x∈X

25
It counts the number of x ∈ X for which s · x ∈ I (mod p). We have
X p/3 − 1 n p−3
E[X] = E[1x ] ≥ n · = · .
p−1 3 p−1
x∈X

It remains to see that the right hand side is greater than ⌈n/3⌉ − 1 when p is
large enough. Since X takes only integer values, it means that X takes value
⌈n/3⌉ , that is, there exists s ∈ [1..p − 1 such that

A := {x ∈ X : s · x ∈ I (mod p)}

consists of at least n/3 elements. This set is sum-free.

Problem 6.7. (Bulgarian spring competition, 2022, p11.4) Let n ≥ 2 be a


natural number. A set M consists of 2n2 − 3n + 2 positive rational numbers.
Prove that there exists a subset A of M with n elements satisfying the property:
for each integer k, 2 ≤ k ≤ n the sum of any k not necessary different numbers
in A does not belong to A.
(Aleksandar Ivanov.)
Solution. Take a prime number p greater than all numbers in M. We will show
that there exist a set A ⊂ M such that sum of any  k numbers in A is not in A
p 2p
modulo p for k = 2, . . . , n. Take the interval I := , . his interval
2n − 1 2n − 1
has a property that sum of any k, 2 ≤ k ≤ n integer numbers in I is not in I
modulo p. So, if at least n numbers in M are in I we are done. But, we are also
done if for some integer s, 1 ≤ s < p at least n of the numbers {s · x : x ∈ M }
hit I. We use probabilistic method. Take randomly an integer s in the interval
[1, p − 1]. Fix some a ∈ M and let 1a,I be the random (indicator) variable that
takes value 1 if s · a ∈ I (mod p) and 0 otherwise. Since s · a, s = 1, 2, . . . , n − 1
when bijectively covers all integers in [1..p − 1] we have
p
|I| − 1 2n−1 −1 1 1
P (1a,I = 1) ≥ = > − .
p−1 p−1 2n − 1 p − 1
Consider the random variable
X
X := 1a,I
a∈M

This variable counts the number of x ∈ M such that s · x hits I modulo p. We


have  
X 1 1
E[X] = E[1a,I ] > m · − (∗)
2n − 1 p − 1
a∈M

where m := |M |. Assume we checked that the right hand side of (∗) is greater
than n − 1. It would mean that E[X] > n − 1 and since X takes only integer
values, it takes a value at least n. It implies that there exists s ∈ [1..p − 1 such

26
that the set A′ := {x ∈ M : s·x ∈ I} has at least n elements. Clearly A′ satisfies
the requirement of the statement.
Now, it remains to check
 
2 1 1
(2n − 3n + 2) · − >n−1
2n − 1 p − 1

Since we can choose p as big as we want and n is fixed, it’s enough to check

2n2 − 3n + 2
>n−1
2n − 1
which clearly holds.
Remark. We never used the fact that the numbers are positive. It’s irrelevant.
It also can be proved that the claim holds for any real numbers (see [5])
Problem 6.8. (Caro - Wei theorem) Let G(V, E) be a simple graph with n
X 1
vertices. Then it contains an independent vertex set with at least
d(v) + 1
v∈V
vertices.
Proof. Label randomly the vertices with the numbers 1, 2, . . . , n. For any v ∈ V
let Ev be the event that the label of v is less than each label on its neighbours.
Note that if Ev happens for every v ∈ V ′ ⊂ V then V ′ must be an independent
set, because if v1 , v2 ∈ V ′ are connected it’s impossible ℓ(v1 ) < ℓ(v2 ) and ℓ(v2 ) <
ℓ(v1 ) to hold simultaneously, where ℓ(v) denotes the label of v. So, it’s enough
to prove that the expected number of vertices for which Ev happens is at least
X 1
. As usual, we introduce the random variables (indicator variables)
d(v) + 1
v∈V
1Ev , v ∈ V as follows: 1Ev takes value 1 if Ev happens and value 0 in case it
doesn’t. The number N of all v ∈ V for which Ev happens is equal to
X
N= 1 Ev .
v∈V

N is a random variable too. We have


X
E[N ] = E [1Ev ] . (1)
v∈V

Note that
E [1Ev ] = P(Ev ).
Let us compute E [1Ev ] . If v is labelled with k, then Ev happens if and only
if each vertex in the set of neighbours N (v) is labelled with a number greater
than k. This probability equals to
n−k n−k−1 n−k−d+1
· ···
n−1 n−2 n−d

27
where we have denoted d := d(v). It means
n−d d
X 1 Y n−k−j+1
P(Ev ) = ·
n j=1 n−j
k=1
n−d    −1
X 1 n−k n−1
=
n d d
k=1
 −1  
1 n−1 n
=
n d d+1
1
= .
d+1
Therefore, from (1) it yields
X 1
E[N ] =
d(v) + 1
v∈V

X 1
which means that there is a permutation of labels such that N ≥
d(v) + 1
v∈V
and as said the corresponding vertices for which Ev happens form an independent
vertex set.

Problem 6.9. (Turan’s theorem) Let G(V, E) be a graph without r + 1 clique.


Then it holds
1 n2
 
|E| ≤ 1 − .
r 2
Let us consider the complement graph G′ of G. It has no independent set of
order r + 1 and each vertex v has degree

dG′ (v) = n − dG (v) − 1.

By Caro - Wai theorem


X 1
≤ r.
n − dG (v)
v∈V

Further, AM-HM gives

n2 X 1
≤ ≤ r.
n2 − 2|E| n − dG (v)
v∈V

Hence
n2 ≤ n2 r − 2r|E|
1 n2
 
|E| ≤ 1 − .
r 2

28
Problem 6.10. (Romanian TST 2022) Given an integer k ≥ 2, determine
the smallest positive integer n such that amongst any n points in the plane,
there exist k points whose pairwise distances are either all at most 2 or they are
(strictly) greater than 1.
Definition. (Sperner family) Given are a base set of n elements and a family
containing some of its subsets. This family is called a Sperner family if no two
subsets exist one including the other.
Theorem. (Sperner’s theorem)
 For a base set of n elements the maximum size
n
of a Sperner family is . Moreover, the only family that achieve this
⌊n/2⌋
maximum size consists of all sets of size n/2 in case n is even. In case n is odd
there are only two such families: one that consists of all sets of size ⌊n/2⌋ and
the other one - all the sets with size ⌈n/2⌉.
Problem 6.11. (Lubell–Yamamoto–Meshalkin (LYM) inequality) Let F be a
Sperner family of subsets of a base set S of n elements. It holds
X 1
  ≤1 (1)
n
F ∈F
|F |

Solution. This probabilistic approach is due to Noga Alon and can be found in
[4]. Let F be a Sperner family of subsets of S := {1, 2, . . . , n}. If ∅ ∈ F we are
done, since F consists only of the empty set. Further we assume ∅ ∈ / F. Let σ
be a randomly taken permutation of {1, 2, . . . , n}. Consider the family of sets

Pσ := {σ(1), σ(2), . . . , σ(k)} : k = 1, 2, . . . , n
Let X be the random variable that equals the number of sets in Pσ that
belong to F. Note that X ≤ 1 because it’s impossible two sets of Pσ be both in
F (one contains the other). Thus, X takes only values 0, 1. For any set F ∈ F
let 1F be the random (indicator) variable that takes value 1 if F ∈ Pσ and 0
otherwise. Clearly
X
X= 1F
F ∈F

Linearity of expectation yields


X
E[X] = E[1F ] (2)
F ∈F

To calculate E[1F ] we observe that there are exactly |F |! n−|F |! permutations




σ for which F ∈ Pσ . Indeed, the elements of F must be located on the first |F |


places of σ. So, they can be obtained by permuting the elements in F and ones
not in F . Since all the permutations are n! we get

29

|F |! n − |F | ! 1
E[1F ] = =  .
n! n
|F |
Hence, (2) yields
X 1
E[X] =  .
n
F ∈F
|F |
As said, X takes only values 1 and 0, thus E[X] ≤ 1 which proves (1).

 Remark.
 Note that according to (1), F would have maximum size when
n
achieves its maximum possible value, that is, when |F | = n/2 in case of
|F |
even n, and |F | = ⌊n/2⌋ or |F | = ⌈n/2⌉ in case of odd n. This implies Sperner’s
theorem when n is even. But, when n is odd we can only conclude the maximum
possible Sperner family consists of subsets of size almost n/2 but it does not
rule out the possibility they have different sizes. So, it is not right to say LMY
inequality is stronger than Sperner’s theorem. Loosely speaking, it is, but it
does not imply Sperner’s theorem in its full strength.
Problem 6.12. (MEMO 2011, 2011 - team competition. T-4) Let n ≥ 3 be
an integer. At a MEMO-like competition, there are 3n students, there are n
languages spoken, and
 each student speaks exactly three different languages.
Prove that at least 2n9 of the spoken languages can be chosen in such a way
that no participant speaks more than two of the chosen languages.
To see some pitfalls in using the probabilistic method let me show a flawed
solution.

A flawed solution. Take random subset S of languages, where |S| = m = ⌊ n3 ⌋


(every subset with equal probability). Expected value participants with degree 3
m
m n
will be equal n3  · 3n < 3n( )3 ≤ , so there exist subset P , where |P | = ⌊ n3 ⌋
3
n 9
and there are at most ⌊ n9 ⌋ guys with degree 3. Now we delete from P one
language for every guy and we get subset of at least ⌊ n3 ⌋ − ⌊ n9 ⌋ languages.
We’re not done only when n ≡ 1, 2, 5 (mod 9), but while proving this cases it’s
sufficient to more precisely estimate expected value.
At first glance it’s ok. But look at the calculation of the expected value of
the participants with degree 3 [with respect to the languages in S] . It equals the
probability of one fixed student to have degree 3 multiplied by the number of
the participants. Let’s see what is the probability one fixed participant p to have
m
degree 3. In the above solution it’s 3
n . But why? It’s as if the set S is fixed and
3
the tree languages ℓ1 , ℓ2 , ℓ3 , that p speaks, vary with equal probability! But, the

30
staging as described at the beginning of the solution, is something different. The
languages ℓ1 , ℓ2 , ℓ3 are fixed and the set S with m elements is randomly
 chosen.

n−3
So, the number of the outcomes with ℓi ∈ S, i = 1, 2, 3 is exactly
  n−3
 −3
m
n
and all outcomes are . Thus, the probability in question is m−3
n
 . One
m m
can see the corrected probability leads to completely different expectation and
unfortunately the approach cannot be saved. It seems, taking all subsets of m
languages as a probability sample of events is not appropriate for this problem.
A correct solution. The correspondence "students - spoken languages"can be
viewed as a bipartite graph G(S, L) with |S| = 3n, |L| = n. Each  vertex in S
has degree 3. We have to show there exists L1 ⊂ L with at least 2n vertices,

9
such that each v ∈ S has a neighbour outside L1 . It means the set L′ := L \ L1
is a dominating set, i.e. it covers S. That’s, N (L′ ) = S, where N (X) means the
set of all neighbours of vertices in X.
Thus, the equivalent version, but moremeaningful, is to prove the existence of
a dominating set L′ ⊂ L with at most 7n vertices.

9
Choose randomly and independently each vertex in L with probability p, 0 <
p < 1. The exact value of p will be determined later. For any vertex ℓ ∈ L
let 1ℓ denote the random variable that takes 1 if ℓ is chosen and 0 otherwise.
For each s ∈ S let 1s be the random variable that indicates whether s is not
covered by the chosen vertices. That is, 1s takes value 1 if it is not covered
and 0 if it is covered by some chosen vertex in L. Clearly, P(1ℓ = 1) = p and
P(1s = 1) = (1 − p)3 . Let
X X
XL := 1ℓ ; XS := 1s
ℓ∈L s∈S

and X := XL + XS . The key idea: If X takes value less than or equal to 7n 9


then we can "cover"S with at most 7n/9 vertices in L. Indeed, there are XS
uncovered vertices in S. For each of them choose a vertex in L that covers it.
These vertices and the chosen ones, which number is XL cover all the vertices
in S. So, it is enough to show E[X] ≤ 7n/9. We have
X X
E[X] = 1ℓ + 1s = np + 3n(1 − p)3 .
ℓ∈L s∈S

It remains to minimize the RHS of the expression. It can be seen that p = 2/3
yields E[X] = 7n/9.

References.

[1] R. Diestel, Graph Theory.


[2] A Point of View (Blog)

31
[3] Olympiad Graph Theory.
[4] The Probabilistic Method, Noga Alon, Joel Spencer.
[5] Bulgarian 2022 spring math competition, p11.4.

32

You might also like