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

Graph Theory Basics For INMO

Uploaded by

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

Graph Theory Basics For INMO

Uploaded by

B V Karthikeya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Narayana INMOTC 2023-24

Graph Theory Basics


Komal Ghadigaonkar

December 18, 2023

A map of the city of Konigsburg is given in Figure below. The city lies on
both banks of a river, and there are two islands in the river. There are seven
bridges connecting the various parts of the city. Can one stroll around the town,
crossing each bridge exactly once?

1 Introduction, Definitions and Notations

1. A graph is a pair of sets G = (V, E) where V is a set of vertices and E


is a collection of edges whose endpoints are in V . It is possible that a
graph can have infinitely many vertices and edges. (infinite graph).

1
2. An edge whose endpoints are the same is called a loop. A graph where
there is more than one edge joining a pair of vertices is called a multi-
graph. A graph without loops and is not a multigraph is said to be
simple. Unless stated otherwise, we assume that all graphs are simple.
3. Two vertices v, w are said to be adjacent if there is an edge joining v
and w. An edge and a vertex are said to be incident if the vertex is an
endpoint of the edge.
4. Given a vertex v, the degree of v is defined to be the number of edges
containing v as an endpoint.

5. A path in a graph G is defined to be a finite sequence of distinct vertices


v0 , v1 , · · ·, vt such that vi is adjacent to vi+1 . (A graph itself can also be
called a path.) The length of a path is defined to be the number of edges
in the path.
6. A cycle in a graph G is defined to be a finite sequence of distinct vertices
v0 , v1 , · · ·, vt such that vi is adjacent to vi+1 for 1 ≤ i ≤ t − 1 and vt is
adjacent to v0 . (A graph itself can also be called a cycle.) The length of
a cycle is defined to be the number of vertices (or edges) in the path.
7. A walk is a sequence of not-necessarily-distinct, pairwise-adjacent ver-
tices.

8. A graph is said to be connected if for any pair of vertices, there exists


a path joining the two vertices. Otherwise, a graph is said to be discon-
nected.
9. The distance between two vertices u, v in a graph is defined to be the
length of the shortest path joining u, v. (In the case the graph is discon-
nected, this may not be well-defined.)
10. Complete graph on n vertices is a graph with each vertex connected to
each other vertex. It is denoted by Kn and | E(Kn ) |= n(n−1)
2

11. Let G = (V, E) be a graph. The complement Gc of G is a graph with


the same vertex set as G and E(Gc ) = {e ∈ / E(G)}. i.e. Gc has edges
exactly where there are no edges in G. So G ∪ Gc = Kn
12. A graph G is said to be bipartite if V (G) can be partitioned into two
non-empty disjoint sets A, B such that no edge has both endpoints in the
same set. A graph is said to be complete bipartite if G is bipartite and
all possible edges between the two sets A, B are drawn. In the case where
|A| = m, |B| = n, such a graph is denoted by Km,n . Clearly E(Km,n ) =
mn. A graph is bipartite iff it does not have an odd cycle.
13. Let k ≥ 2. A graph G is said to be k-partite if V (G) can be partitioned
into k pairwise disjoint sets A1 , ···, Ak such that no edge has both endpoints

2
in the same set. A complete k-partite graph is defined similarly as a
complete bipartite. In the case where |Ai | = ni , such a graph is denoted
by Kn1 ,n2 ,···,nk . (Note that a 2-partite graph is simply a bipartite graph.)
14. If U is a subset of the vertices, then the induced subgraph G[U ] is the
graph obtained by deleting all vertices outside U, keeping only edges with
both endpoints in U.
15. If F is a subset of the edges, then the induced subgraph G[F ] is the
graph obtained by deleting all edges outside F, keeping only vertices that
are endpoints of at least one edge in F .
16. Given a graph G, the chromatic number χ(G) is defined as the minimum
number of colours required to colour the vertices of G such that no
two adjacent vertices are assigned the same colour.
17. (Isomorphism). Let G = (V, E) and let G′ = (V ′, E′). The graphs G
and G′ are isomorphic if there is a bijective mapping f : V → V ′ such
that for all v1 , v2 ∈ V we have: {v1 , v2 } ∈ E ⇐⇒ {f (v1 ), f (v2 )} ∈ E′ In
this case the mapping f is called a graph isomorphism. If G and G′ are
isomorphic, we write G ∼ = G′.

Exercise 1:
The exercises in this section, while not of the olympiad nature, will familiarize
you with the techniques that might be required to solve olympiad problems. It
is important that you know how to solve all of these problems.
1. Are these two graphs the isomorphic?

2. Let G be a graph with n vertices, e edges and the degrees of the n vertices
n
are d1 , d2 , · · ·, dn . Prove that di = 2e .
P
i=1

3. The number of vertices of odd degree in a graph is always even.

3
4. Show that every graph has at least two vertices with equal degree.
5. A domino consists of two squares, each of which is marked with 0,1,2,3,4,5,
or 6 dots. Verify that there are 28 different dominoes. Is it possible to
arrange them all in a circle so that the adjacent halves of neighboring
dominoes show the same number?

6. Let G be a connected. An edge e is said to be a cut-edge if its removal


disconnects the graph. Prove that e is not a cut-edge if and only if e is an
edge of a cycle.
7. Prove that a graph is bipartite if and only if it does not contain an odd
cycle.
8. Suppose that a graph has at least as many edges as vertices. Show that
it contains a cycle.

Olympiad problems 1
1. Is it possible to change the state in figure 1 to the figure 2 by moving the
knights several times? (In figure W, B stand for white and black knights
respectively. The knights should be moved by following international chess
regulations.)
fig 1 fig 2 fig 3
W W W B 1 4 7
2 5 8
B B B W 3 6 9
2. Let there are 2000 people in a tour group, in any group of 4, there is
one person in the group having acquaintance with the other three.What is
the least number of people having acquaintance with all other in the tour
group? (knowing is a mutual relation .If A knows B implies B knows A.)
3. All the chairs in a classroom are arranged in a square n × n array (in other
words, n columns and n rows), and every chair is occupied by a student.
The teacher decides to rearrange the students according to the following
two rules:
• Every student must move to a new chair.
• A student can only move to an adjacent chair in the same row or to an
adjacent chair in the same column.
In other words, each student can move only one chair horizontally or
vertically. (Note that the rules above allow two students in adjacent chairs
to exchange places.) Show that this procedure can be done if n is even,
and cannot be done if n is odd.
4. In Orientalia all the roads are one-way roads, and you can reach each town
from any other by driving along no more than two roads. One of the roads
is closed for repair, but it is still possible to drive from each town to any

4
other. Prove that now this can be done by driving along at most three
roads.
5. NASA has proposed populating Mars with 2,004 settlements. The only
way to get from one settlement to another will be by a connecting tunnel.
A bored bureaucrat draws on a map of Mars, randomly placing N tunnels
connecting the settlements in such a way that no two settlements have
more than one tunnel connecting them. What is the smallest value of
N that guarantees that, no matter how the tunnels are drawn, it will be
possible to travel between any two settlements?

1.1 Planar graph


A graph is said to be planar if it can be drawn such that a pair of edges can
only cross at a vertex. Convince yourself that K5 and K3,3 are not planar.
1. In any connected planar graph, we have F + V = E + 2

2. Suppose a (simple) planar graph G has n ≥ 3 vertices. Prove that G has


at most 3n−6 edges. (Hint: Doesn’t a planar graph look like a polyhedron
to you?)
3. Prove that K5 or K3,3 are not planar.

4. Kuratowski’s Theorem: A graph is planar if and only if it does not contain


K5 or K3,3 as a subgraph.
We assume this without the proof
5. Any connected planar graph with V vertices and whose smallest face fea-
tures S edges contains at most S−2
S
(V − 2) edges.

6. G is a graph with 11 or more vertices. Prove that G or Gc is not a planar


graph.

1.2 Chromatic number


Given a graph G, the chromatic number χ(G) is defined as the minimum num-
ber of colours required to colour the vertices of G such that no two adjacent
vertices are assigned the same colour. Let n be the number of edges in G.

1. a) Let G = (V, E) be a graph, χ(G) its chromatic number. Prove that


χ(G)(χ(G) − 1) ≤ 2 | E | .
Suppose χ(G)(χ(G) − 1) = 2 | E | prove that G is a complete graph (up
to isolated vertices). q
b) Prove that χ(G) ≤ 1
2 + 2n + 41 .

5
2. The chromatic number of a graph is always less than or equal to its max-
imum degree plus one.
3. In a graph G every vertex has degree at least k ≥ 2. Show that G has a
cycle of length at least k + 1.

4. Let G1 , G2 , G3 be three (possibly overlapping) graphs on the same vertex


set, and suppose that G1 can be properly colored (vertex colouring) with
2 colors, G2 can be properly colored with 3 colors, and G3 can be properly
colored with 4 colors. Let G be the graph on the same vertex set, formed
by taking the union of the edges appearing in G1 , G2 , G3 . Prove that G
can be properly colored with 24 colors.

Olympiad Exercises
1. (IMO shortlist.) A country has 1983 cities. Every pair of cities is con-
nected by a road. Each road is owned by one of 10 companies. Prove that
there must be a way to travel in a circuit of odd length along a sequence
of roads that are all owned by a single company.

2 Tree:

Trees : A tree is defined to be a connected graph that does not contain any
cycles. We will first give characterizations to such graphs.
Lemma: (Characterization of Trees) Let G be a connected graph with n
vertices. The following statements are equivalent.
1. Let G is a tree. It is acyclic and connected.
2. G contains exactly n − 1 edges
3. For any two vertices, there exists exactly one path joining the two ver-
tices .
4. The removal of any edge disconnects the graph G. Hence it is said to be
minimally connected, i.e. G is connected but G − e is disconnected for
every edge e ∈ G ;(That is every edge is a cut edge)

A forest is a not-necessarily-connected graph with no cycles.

Corollary:
Let G be a connected graph with n vertices and at least n edges. Then there
exists an edge whose removal does not disconnect the graph.
Warm-Up Exercises

1. Every tree has at least two pendent vertices.

6
2. Prove that, if a graph has n vertices and n + 1 edges, then there are at
least 2 cycles.
3. If T is a tree, then
1) T is connected, but after deleting any edge e of T , the graph T − e is
disconnected. (T is called minimally connected.)
2) T has no cycle but after adding any edge e to T , the graph T + e is
cyclic.
Conversely (1) and (2) implies T is a tree.
4. T is a tree iff there exist unique path between any two vertices of T.

5. In a certain region, twenty players of a tennis club have played fourteen


singles. every person plays at least once. Prove that there are six pairs
players, in which twelve players are distinct.
6. In a lecture there are 5 mathematicians. Each of them took a nap twice
and every two of them took naps at the same time. Prove that there must
be three person who took nap at the same time.
7. (MOP Test 2008/8/1.) Prove that if the edges of a complete graph on
n vertices are colored such that no color is assigned to more than n − 2
edges, there must contain a 3-cycle in which each edge is a distinct color.

Olympiad Exercises
1. (USAMO 2007) An animal with n cells (unit squares like on chess board)
is a connected figure consisting of n equal-sized cells.(Animals are also
called polyominoes) A dinosaur is an animal with at least 2007 cells. It
is said to be primitive it its cells cannot be partitioned into two or more
dinosaurs.
Two cells are adjacent if they share a complete edge.
A single cell is an animal, and given an animal with n cells, one with n + 1
cells is obtained by adjoining a new cell by making it adjacent to one or
more existing cells.
Find with proof the maximum number of cells in a primitive dinosaur.

3 Hamiltonian and Eulerian Paths and Cycles

• An Eulerian circuit is a walk that traverses every edge exactly once,


and returns to its starting point.
• A Hamiltonian path is a path that includes every vertex exactly once.
A Hamiltonian cycle is a cycle that includes every vertex.

7
Given a graph G, an Eulerian walk is defined to be a sequence of successive
adjacent vertices that encounter every edge in the graph exactly once. An
Eulerian cycle is a sequence of successive adjacent vertices that begin and
ends at the same vertex, that encounter every edge in the graph exactly once.

Eulerian Walk and Cycle Characterization:


A connected graph has an Eulerian walk if and only if the number of vertices
with odd degree is 0 or 2. A connected graph has an Eulerian cycle if and
only if every vertex has even degree.

A Hamiltonian path is a path that encounters every vertex in the graph.


A Hamiltonian cycle is a cycle that encounters every vertex in the graph. A
graph containing a Hamiltonian cycle is said to be Hamiltonian. It is in general
difficult to determine whether these paths and cycles exist. The only real useful
tool at our disposal is Dirac’s Theorem.
Theorem (Ore, 1960).
Let G = (V ; E) be a simple graph, where | V |= n ≥ 3. If for every two vertices
u, w ∈ V the implication (u; w) ∈ / E =⇒ deg(u) + deg(w) ≥ n holds, then the
graph G is Hamiltonian.
Proof:
If n = 3 then the only graph satisfying the assumption is K3 . It is Hamiltonian.
Let n ≥ 4. Let the assumption of the theorem hold, but let the conclusion be
wrong. Means the degree sum of any pair of nonadjacent vertices is greater than
or equal to n but graph G is not hamiltonian. If we add edges to the graph, the
assumption will still hold. Add edges to G until we reach the graph G′ such that
it is not Hamiltonian, but addition of any new edge would give a Hamiltonian
graph.
Let e = (u; w) ∈ V xV be an edge not present in G′ . The graph G′ ∪ e has a
Hamiltonian cycle
e
u = v0 → v1 → · · · → vn−1 = w → u

So the graph G′ has a hamiltonian walk.

u = v0 → v1 → · · · → vn−1 = w with n − 1 edges.


Let
• Eu be the set of edges (vi , vi+1 ) where (u, vi+1 ) ∈ E

8
• Ew be the set of edges (vi , vi+1 ) where (vi , w) ∈ E
Using the assumption of the theorem, since (u; w) ̸= E,
we get | Eu | + | Ew |≥ n.
Thus, there is an edge (vi , vi+1 ) ∈ Eu ∩ Ew . Besides, i ̸= 0 and i ̸= n − 2.

We have found a Hamiltonian cycle in G′ .

Dirac’s Theorem:
Let n ≥ 3. Suppose a graph G has n vertices and the degree of each vertex is
at least ⌈ n2 ⌉. Then G has a Hamiltonian cycle.
Properties:
1. A complete graph with more than two vertices is Hamiltonian
2. Every cycle graph is Hamiltonian as well as Eulerian.
3. A tournament is a directed complete graph (round robin). Every tourna-
ment has an odd number of Hamiltonian paths .
4. Every platonic solid, considered as a graph, is Hamiltonian.
5.

Problems
1. A domino consists of two squares, each of which is marked with 0,1,2,3,4,5,
or 6 dots. Verify that there are 28 different dominos. Is it possible to
arrange them all in a circle so that the adjacent halves of neighboring
dominos show the same number?
2. Consider a graph with ,where every vertex has degree exactly 2k. Show
that it is possible to orient each edge such that the maximum in-degree is
exactly k.
3. Given a 8 × 8 board, find all pairs of squares on the board, such that the
remaining 62 squares can be tiled using 2 × 1 tiles.

Olympiad Level Problems


1. Let G be a graph on n vertices. Let u, v be two non-adjacent vertices such
that deg(u) + deg(v) ≥ n. Then G is Hamiltonian if and only if G + {uv}
is Hamiltonian.
2. There are 2n people in a room where each person is enemies with at most
n − 1 people in the room. Prove that the 2n people can sit at a circular
table so that no two enemies are sitting next to each other.

9
3. (INMO2021/P4)A Magician and a Detective play a game. The Magician
lays down cards numbered from 1 to 52 face-down on a table. On each
move, the Detective can point to two cards and inquire if the numbers
on them are consecutive. The Magician replies truthfully. After a finite
number of moves, the Detective points to two cards. She wins if the
numbers on these two cards are consecutive, and loses otherwise.
Prove that the Detective can guarantee a win if and only if she is allowed
to ask at least 50 questions.

10

You might also like