Graph THEORY QN Solutions
Graph THEORY QN Solutions
Soln. Define a graph where each vertex corresponds to a participant and where two
vertices are adjacent iff the two participants they represent know each other. Take a
vertex a of maximum degree. We claim that this vertex is adjacent to every other vertex.
Suppose, on the contrary, that there is a vertex b which is not adjacent to a. Then every
pair of vertices in the neighbourhood N (a) of a are adjacent. Furthermore, at least one of
the vertices in N (a) is adjacent to b. The degree of this vertex is larger than that of a, a
contradiction.
(Note: It’s not hard to see that in fact at least n − 3 vertices have this property (see
Problem 12.
2. In a group of 2n people, n ≥ 2, each one knows at least n other people. Prove that in
this group, there are four people who can be seated at a round table so that so that each
person knows both his neighbours.
Soln. Define a graph where each vertex corresponds to a person and where two vertices
are adjacent iff the two people they represent know each other. We need to prove that
there is 4 cycle in the graph. If the graph is complete, then there is a 4-cycle. If the
graph is not complete, then there is pair of vertices, say a, b, which are nonadjacent. Since
|N (a)| and |N (b)| are both ≥ n and there are only 2n − 2 vertices other than a and b,
|N (a) ∩ N (b)| ≥ 2. Let c, d ∈ N (a) ∩ N (b). Then the four vertices a, b, c, d form a 4-cycle.
3. There are n people in a gathering. Some of them are mutual friends. Prove that it is
possible to divide them into two groups so that each person has at least half of his friends
in a different group.
Soln. Choose A and B such that A ∪ B = V and that the number of edges joining a
vertex in A to a vertex in B is maximized.
4. In a group of 100 people, each one knows at least 67 other people. Prove that there
exist 4 people who are mutual friends.
Soln. For any vertex a, |N (a)| ≥ 67. Thus the number of vertices not in N (a) is at most
32. Let b ∈ N (a). Then |N (b) ∩ N (a)| ≥ 34. Let c ∈ N (a) ∩ N (b). Since there are only
66 vertices which are not in N (a) ∩ N (b), c is adjacent to at least one vertex, say d, in
N (a) ∩ N (b). The four vertices a, b, c, d form a K4 .
5. Suppose you want to modify the above problem by changing the number 100 to 1000.
How should 67 be altered so that the conclusion remains the same?
1
6. There are 500 participants in a conference. Every participant has 400 friends. Is it
possible to find a group of 6 mutual friends?
Soln. Construct a graph where each vertex represents a participant and two vertices are
adjacent iff the corresponding participants are mutual strangers. The graph consisting of
5 disjoint copies of K100 shows that the answer is no.
7. What is your answer if everyone has 401 friends?
Soln. Consider K18 and colour its edges using two colours, red and blue. At any vertex
a, there are 9 edges of the same colour, say ab1 , . . . , ab9 are red. Since in K9 there is either
a red C3 , which together with a will give a red K4 or a blue K4 .
9. There are 18 contestants in a tournament. In each round the contests are paired and
play each other once. Prove that after 8 rounds, there are three contestant who have not
played against each other.
Soln. Consider the graph formed when two vertices are joined by a edge iff they have not
played each other. Thus each vertex is of degree 9. We need to prove that in this graph
there is a 3-cycle. Suppose on the contrary that there are no 3 cycles. Let the vertices
be a1 , . . . , a9 , b1 , . . . , b9 . Let the neibhgours of a1 be b1 , . . . , b9 . Since there are no C3 ,
the neighbours of b1 must be a1 , . . . , a9 . The same goes for b2 , . . . , b9 . Thus in this graph
each ai is adjacent to b1 , . . . , b9 and each bi is adjacent to a1 , . . . , a9 . (This is known as a
complete bipartite graph.) Thus in each round, the players labeled a1 , . . . , a9 are paired.
But this is impossible. So there must be a 3-cycle.
10. Let G be a graph with 10 vertices. Among any three vertices of G, at least two
are adjacent. Find the least number of edges that G can have. Find a graph with this
property.
Soln. The answer is 20. An example is the graph consisting of two copies of K5 . To
prove that the answer is 20, let G be a graph with the prescribed property. If a is a vertex
with deg a ≤ 2, then the vertices outside N (a) must induced a subgraph which is complete
and hence has more than 20 edges. If a a vertex with deg a = 3, then the vertices outside
a induces a complete graph on 6 vertices and has 15 edges. Let b, c, d ∈ N (a). There is an
edge in each of {b, c, x}, {b, d, y} and {c, d, z}, where x, y, z are three distinct vertices not
in N (a) ∪ a. Thus there are at least 21 edges. Thus every vertex of G is of degree at least
4 and hence G has at least 20 edges.
11. In an n × n matrix, the rows are pairwise distinct. Prove that there is a column,
whose removal results in an n × (n − 1) matrix with the same property.
2
Soln. Let v1 , . . . , vn represent the n rows of the matrix. Suppose the conclusion does
not hold, then after deleting the first column, two rows will be identical. Join the two
rows by an edge and label it 1. After that replace column 1. Do the same for all the
other columns. We will have n edges labeled 1, 2, . . . , n. The graph contains at least one
cycle, say a1 , a2 , . . . , ak , a1 with the edge ai ai+1 labeled as ti . Then a1 and a2 differ only
in column t1 , a2 and a3 differ only in column t2 . Thus a1 and a3 differ in columns t1 , t2 .
Continuing this way, we know that a1 and ak differ in columns t1 , . . . , tk−1 . We also know
that these two rows differ only in column tk . This leads to a contradiction.
12. In a group of 1997 people, among 4 of them there is at least one who knows the other
three. What is minimum of people in the group who knows everybody else?
Soln. Construct a a graph in which each person is a vertex and two vertices are adjacent
if the corresponding persons know each other. Then the question asks for the minimum
number of vertices with degree 1996. If every pair of vertices are adjacent, then every
vertex is of degree 1996.
If a and b are not adjacent, then c and d are adjacent. If a and b are both adjacent to
every vertex in the graph, then there are 1995 vertices with degree 1996. If a and c are not
adjacent, then each of a, b, c is adjacent to every other vertex in the graph. Thus there
are 1994 vertices of degree 1996. Thus the answer is 1994.
13. At the end of a birthday party, the hostess wants to give away candies. She has 6
types of cookies. Each child is given a gift packet which contains two types of cookies.
Each type of cookie is used is combination with at least three others. Prove there are three
children, who between them, have all the six types of cookies.
Soln. Form a graph with each type of candies corresponding to a vertex. Two vertices
are joined by an edge if the corresponding types of candies are used together in a gift pack.
In this graph every vertex is of degree ≥ 3. To solve the problem, we need to show that the
graph contains three edges which are pairwise nonadjacent (such a set of edges are said to
be independent.). Let a be a vertex and b, c, d be 3 of its neighbours. Let the remaining
two vertices be e, f (these may also be neighbours of a). Finally, let A = {a, b, c, d} and
B = {b, c, d}. Note that |N (e) ∩ A| ≥ 2 and |N (f ) ∩ A| ≥ 2. If |(N (e) ∪ N (f )) ∩ B| ≥ 2,
then there exists 2 vertices in B, say b and c, such that be and cf are edges. Then be, cf
and ad are 3 independent edges. If |(N (e) ∪ N (f )) ∩ B| = 1, say b is the common neighbour
of e and f , then e and f are both adjacent to a. Since the degree of d is ≥ 3, and d is not
adjacent to e, f , d must be adjacent to c and b. Thus ae, bf cd are 3 independent edges.
14. In a grooup of people, any two mutual friends have no common friends while any pair
of mutual strangers have exactly two common friends. Prove that there are two persons
in this group who have the same number of friends.
Soln. Construct a graph where each vertex represents a person and two vertices are
adjacent if the two corresponding persons are friends. For any vertex a, the vertices in
N (a) are pairwise nonadjacent. Let b be a vertex adjacent to a. Then the two sets
N (a) − {b}, N (b) − {a} are disjoint. Moreover, for any vertex x ∈ N (a) − {b}, there is
3
unique vertex y ∈ N (b) − {a} such that y and a are the common neightbours of b and x.
This sets up a 1-1 correspondence and proves that |N (a)| = |N (b)|.
15. In a party there are 12k guests. Every guest knows exactly 3k + 6 other guests.
Suppose that if x knows y, then y knows x too. For every two guests x and y in this party
there are exactly n guests who know both x and y. (n is a constant). Prove that
Soln. There are v = 12k vertices and deg(x) = 3k + 6 for every vertex x. For every pair
of vertices x, y, define deg(x, y) to be the
number of vertices adjacent
P to both x and y.
12k 12k
Thus deg(x, y) = n. Since there are 2 pairs of vertices, we have deg(x, y) = n 2 .
deg(x, y) = 12k 3k+6
P
Since deg(x) = 3k + 6 for every vertex, we have 2 and hence
3k+6 12k
12k 2 = n 2 . This gives the desired equation. We can solve the equation as follows:
From the equation, one concludes that n is divisible by 3 and by 2. Thus it is a multiple
of 6. Consider the equation as a quadratic equation in k. Since its solution is an integer,
we have
(33 − 12n)2 − 36(30 + n) = m2
for some integer m. Since m is a multimple of 3, we can write m = 3m0 . Dividing
throughout by 9, we have
2
16n2 − 92n + 1 − m0 = 0.
By completing square, we have
Thus in any factorization of 525 into two factors a × b, we must have a + b = 16n − 46.
Since n is multiple of 6, we see that a + b must leave a remainder of 2 when divided by 3.
There are 6 factorization of 525 = 3 × 7 × 52 :
Only 5 × 105 and 15 × 35 have this property. The first gives n = 39 and the second gives
n = 6. Consequently, n = 6 and k = 3.
16. Given n points on the plane such that the distance between every pair of points is
at least 1, prove that there are at most 3n pairs of points such that the distance between
two points in each pair is 1.
Soln. Take the points as vertices and a pair of vertices are joined by an edge iff their
distance apart is 1. At any point draw a circle of radius 1. Since the points are of distance
at least 1, there are at most six points on the circle. Thus the degree of every vertex is at
most 6 and there are at most 6n/2 = 3n edges.
4
17. There are 9 mathematicians in a meeting. It was discovered that each of them
can speak at most three languages and among any three of them at least two can speak
a common language. Prove that three are three mathematicians who speak a common
language.
Soln. Construct a graph with each mathematician as a vertex and two vertices are joined
by an edge iff the corresponding mathematicians speak a common language. If there is
vertex a with deg a = 4 since a speaks at most three languages, two of the neighbours of
a must speak a language in common with a and we are done. Otherwise the degree of
every vertex is at most 3. Consider a vertex a, there are at least 5 vertices which are not
adjacent to a, and suppose that b is one of them. Since b has at most three neighbours,
there is vertex, say c, outside N (a) ∪ N (b). Thus a, b, c are three vertices with no edge
joining any two of them, a contradiction. Thus the second case is impossible.
18. Can you place one number chosen from {0, 1, . . . , 9} on each of the vertices of polygon
with 45 sides, so that for every pair of of integers, a, b, 0 ≤ a < b ≤ 9, there is a side of
the polygon whose ends have the numbers a and b?
0, 1, 2, . . . , 10, 0, 2, 4, . . . , 9, 0, 3, 6, . . . , 8, 0, 4, 8, . . . , 7, 0, 5, 10, . . . , 6.
20. There are 3 schools each with n students. Every students knows n + 1 students from
the other two schools. Prove that it is possible to find one student from each of the schools
such that the three students know each other.
Soln. Let the schools be A, B, C. Represent each student by a vertex and a pair of
vertices are joined by an edge iff two corresponding students know each other. For each
vertex x 6∈ A, define NA (x) to be the set of vertices in A which are adjacent to x. Let
m = max{|NY (x)| : x 6∈ Y } and let |NA (b)| = m where b ∈ B. Then b is adjacent
to m vertices in A and at least one vertex, say c, in C. Since |NB (c)| ≤ m, we have
|NA (c) ≥ n + 1 − m. But |NA (b)| = m. Thus NA (c) ∩ NA (b) must contain at least one
vertex, say a. Then a, b, c know each other.
21. There are n people in a room. Any group of m(≥ 3) people in the room have a
unique common friend. Can you determine n in terms of m?
Soln. Construct a graph in the naturally way. If the graph contains Ki as a subgraph
for some i ≤ m, then every vertex of this subgraph is adjacent to a common vertex. Thus
it also contains a Ki+1 . From the hypothesis, the graph contains a K2 . Thus it contains a
5
Km+1 . Let A = {a1 , . . . , am+1 } be the vertex set of this Km+1 . Suppose there is a vertex
b 6= ai , i = 1, . . . , m+1 and that b is adjacent to two vertices, say am , am+1 , in A. Then am
and am+1 are the common neighbours of the m vertices b, a1 , . . . , am−1 , a contradiction.
So there are m vertices, say a1 , . . . , am , in A which are not adjacent to b. The m vertices
b, a3 , . . . , am+1 have a common neighbour, say c. Now c 6= ai , i = 1, . . . , m + 1 but c is is
adjacent to m − 1(≥ 2) vertices in A, which is impossible. Thus the graph is just Km+1
and n = m + 1.
22. (IMO 1990) Let n ≥ 3 and consider a set E of 2n − 1 distinct points on a circle.
Suppose that exactly k of these points are to be colored black. Such a coloring is good if
there is at least one pair of black points such that the interior of one of the arcs between
them contains exactly n points from E. Find the smallest value of k so that every such
coloring of k points of E is good.
points.
23. Find the smallest positive integer n such that in any set of n irrational numbers,
there are three numbers such that the sum of every two of them is again irrational.
√ √
Soln. If n = 4, then in any three of the four numbers ± 2, 1 ± 2, there are two whose
sum is rational. Thus n ≥ 5. Now consider any set of 5 irrational number. Construct a
graph G whose vertices corresponds to the numbers such that two vertices are adjacent
iff the corresponding numbers sum to a rational number. Then G contains no C3 for if
x + y, y + z, z + x are rational, then x, y, z are all rational. Similarly, G does not C5 . These
imply that the graph is bipartite. One of the partite sets contains three vertices a, b, c, say.
Then then sum of any 2 of them remains irrational.
(Note: If you don’t know bipartite graphs then you can proceed as follows: If there
is a vertex of degree at least three, say a is adjacent to b, c, d, then b, c, d are pairwise
nonadjacent. If there is a vertex of degree 1 say x, then among the three vertices which
not adjacent to a, there two, say y, z which are nonadjacent. Then x, y, z are three pairwise
nonadjacent vertices. If every vertex if of degree two, then the graph is a C5 , which is
impossible.)
24. (IMO shortlist 2002) Let n be an even integer. Show that there exists a permutation
x1 , x2 , . . . , xn of 1, 2, . . . , n such that xi+1 is one of 2xi , 2xi − 1, 2xi − n, 2xi − n − 1 (take
xn+1 = x1 ).
6
Soln. Let n = 2m. When xi ≤ m, 2xi − n < 0 and 2xi − n − 1 < 0. Thus xi+1 is either
2xi or 2xi − 1. When xi > m, 2xi > n and 2xi − 1 > n and thus xi+1 is either 2xi − n or
2xi − n − 1. This means that for any xi , xi+1 is one of the two numbers 2k − 1 and 2k for
some k ∈ {1, . . . , m}.
Conversely, for any xi = 2k or 2k − 1, xi−1 one of two numbers k and k + m, where
k ∈ {1, . . . , m}, taking x0 = xn .
We now construct a graph with m vertices as follows. The vertex vi represents the
two numbers 2i − 1 and 2i. We draw two arrows from vi : e2i to the vertex that represents
the possible value(s) of xi+1 when xi = 2i, and e2i−1 to the vertex that represents the
possible value(s) of xi+1 when xi = 2i − 1. These arrows may join a vertex to itself; it
does not matter.
Then there will be exactly two arrowheads and two arrowtails connected to each
vertex. Choose an arbitrary vertex. Follow the arrows in order, i.e. leaving a vertex by
an arrowtail and reaching a vertex by an arrowhead. Because each vertex is connected
to exactly two arrowheads and two arrowtails, it must be possible to form an eulerian
trail, say ey1 , ey2 , . . . , eyn , following the arrows in order if the graph is connected. Then
y1 , y2 , . . . , yn is the required permutation.
We now prove that the graph is connected. v1 and v2 are connected because 4 = 2 × 2.
We assume that v1 , v2 , . . . , vi−1 are connected. But now since 2i = 2 × i, vi is connected
to the vertex representing i which is vj for some j < i. Thus by the induction hypothesis
the graph is connected.
7
Graph colourings Problems/Solns
1. Given 6 lines in space such that no three lie on the same plane, prove that there exist
three lines which satisfy one of the following:
(i) they are pairwise skew;
(ii) they are parallel;
(iii) they are concurrent.
Soln. Represent the six lines by the 6 vertices in K6 . Colour an edge red and blue if
its two incident vertices represent a pair of skew and coplanar lines, respectively. There
is always a monochromatic triangle. If the triangle is red, then there are three pairwise
skew lines. If the triangle is blue, then either case (ii) or case (iii) will happen. This can
be shown as follows. Two of lines, say A and B, are either parallel of concurrent. If A and
B are parallel, the third line C, being coplanar with both A and B, can only be parallel
to them and we have case (ii). If A and B are concurrent, C being coplanar with both A
and B can only be concurrent with each of them. Thus we have case (iii).
2. Given 6 points in the plane, no three collinear, prove that there are two triangles
whose vertices are among the 6 given points such that the longest of one of them is the
shortest side of the other.
Soln. Form a graph in the normal way and label the vertices a, b, c, d, e, f . Colour the
longest side of every triangle red. (If there are edges of equal length, then we order them
once and for all in an arbitrary manner.) If there is a red triangle, then the shortest side
of this triangle is the longest side of another triangle. Thus it suffices to prove that there
is a red triangle. If there is vertex a which is incident to three red edges, say ab, ac, ad
are all red. Then one of the edges, say bc, in the triangle bcd must be red yielding a red
triangle abc. Thus it also suffices to prove that there is a vertex which is incident to three
red edges.
Now consider the shortest side, say ab. The two vertices a, b together with each of the
remaining 4 vertices, form 4 triangles. Thus there are 4 red edges incident to a or b. If
at least three of these four red edges are incident to a, then we know that a red triangle
will be form. We now suppose that ac, ad, be, bf are red. Consider bcd. If the longest side
of this triangle is cd, then acd is a red triangle. If either bc or bd is the longest side, then
there are three red edges incident to b. Again a red triangle will be form. Thus there
is always a red triangle. The shortest of this red triangle is the longest side of another
triangle because every red edge is the longest side of some triangle.
3. Prove that any colouring of the edges of K6 using two colours produces two monochro-
matic triangles.
Soln. Call a pair of adjacent edges a monochromatic pair if they have the same colour.
There are at least 4 monochromatic pairs at each vertex, giving a minimum of 24 such
8
pairs. On the other hand each monochromatic triangle has three such pairs while a triangle
which is not monochromatic has only one such pair.
4. Prove that among a group of 9 people there are 3 mutual friends or there are 4 mutual
strangers. (This means r(3, 4) ≤ 9.)
Soln. We need to prove that if we colour the edges of K9 either red or blue, then there
is either blue K3 or a red K4 . Suppose there is vertex say a which is incident to at least
4 blue edges, say ab1 , . . . , ab4 . If there is a blue edge joining a pair of vertices among
b1 , . . . , b4 , then there is blue K3 . Otherwise b1 , . . . , b4 form a red K4 .
Now we consider the case where every vertex is incident to at most three blue edges. We
can’t have every vertex incident to exactly three blue edges (because the number of vertices
of odd degree in any graph must be even.) Thus there is a vertex, say c, which is incident
to 6 red edges, say cd1 , . . . , cd6 . Then among d1 , . . . , d6 , there is either a blue K3 or a red
K3 . Thus there is either a blue K3 or a red K4 . 5. Prove that r(3, 4) = 9.
Soln. In K8 , colour the edges of a C8 together with its main diagonals red and the rest
blue.
6. Prove that among a group of 14 people there are 3 mutual friends or there are 5 mutual
strangers.
Soln. Similar to 4.
7. Colour the integral points (x, y), where 1 ≤ x ≤ 16 and 1 ≤ y ≤ 9, using three colours.
Prove that there exists a monochromatic rectangle whose sides are parallel to the axes.
Soln. At least 46 points have the same colour, say red. At least 6 of these points lie
on the same horizontal line. Restrict to these 6 vertical columns. If any of the 8 rows
has two red points, we are done. Otherwise there are at least 40 points which are either
blue or white. By continuing the argument we will eventually get either a white or a blue
rectangle.
8. Colour the points on the plane either red or blue. Prove that√ there exists a monochro-
matic equilateral triangle whose sides are of length either 1 or 3.
Soln. Draw a circle of radius 1. If the points on the circumference have the same colour,
we are done. Otherwise two of the points say A and B have different colours. Erect an
isosceles triangle ABC with AC = BC = 2. Suppose A and C have different colours,
say A is red and C is blue. Let M be the mid point of AC and assume, without loss of
generality, that M is red. Let D, E be points such that M DA and M EA are equilateral
triangles. Consider the points A, C, D, E and M . If one of D, E is red, we have a red
equilateral
√ triangle of side 1. If both D, E are blue, we have a blue equilateral triangle of
side 3.
9. Colour the points on the plane using three colours. Prove that there are two points
with the same colour and are unit distance apart.
9
Soln. Consider two pairs of equilateral triangles of side 1, ABC, BCD and AEF , EF G.
If the vertices of the triangles do not receive distinct colours, we are done. Otherwise D
and G are of the same colour. DG can be made to be equal 1.
10. (Home work problem) Let G be a graph with 9 vertices and m edges. Find the
smallest m so that in any colouring of the edges of G with one of two colours, there is a
monochromatic C3 . (This is actually Q3 of IMO1991)
Soln. If m = 33, G always contains a K6 . Let {a, b}, {c, d}, {e, f } be three pairs of
nonadjacent vertices in G. (The other pairs are all adjacent.) These 6 vertices need not be
distinct. But there are 3, say a, c, e, which are pairwise adjacent. There are also 3 other
vertices, say x, y, z. The six vertices a, c, e, x, y, z form a K6 . Since in any 2 colouring of
the edges of K6 , there is a monochromatic C3 , G has a monochromatic C3 .
It is not hard to contruct a graph with m = 32 and a 2 colouring that produces no
monochromatic C3 .
It is not hard to contruct a graph with m = 32 and a 2 colouring that produces no
monochromatic C3 . For example, let G be the graph with x, a1 , b1 , . . . , a4 , b4 as vertices
and with all pairs of vertices adjacent except for ai bi , i = 1, . . . , 4. By i → j, we mean
the set of edges {ai bj : i = 1, 2, j = 1, 2}. Also by x → j, we mean the set of edges
{xaj , xbj : j = 1, 2}. Now we colour the following edges red:
x → 1, x → 2, 2 → 3, 3 → 4, 4 → 1.
The other edges are coloured blue. Then there is no monochromatic C3 . Thus m = 33.
10