Lectures On Graph Theory

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Lectures on Graph Theory:

Table of content:
1) Definition of graph
2) Some definitions that are related
3) Problems

Author: Hoang Van Phu


I. DEFINITION OF GRAPH
We call 𝐺 = (𝑉; 𝐸) a graph with 𝑉 is the set of vertices and 𝐸 is the set of edges between vertices.

Fig. 1: Example of graphs


2 vertices are “adjacent” if there exists an edge between them, otherwise they are not adjacent.
A vertex 𝑣 and an edge 𝑒 is adjacent if 𝑒 has 𝑣 as an endpoint.
A graph is “simple” if between 2 vertices there is only 1 edge, and the whole graph contains no loops.

Author: Hoang Van Phu


Fig. 2: 2 types of graph
From now on, we will work with simple, undirected graphs.
The degree of a vertex 𝑣 is the number of edges that has 𝑣 as an endpoint, denoted by deg 𝑣
II. RELATED DEFINITIONS
a) A path is a sequence of vertices and edges that DOES NOT intersect itself:

Fig. 3: Example of a path

Author: Hoang Van Phu


We can denote a path in 3 ways:
1) 𝐴𝑎𝐵𝑏𝐶𝑐 … (vertex – edge – vertex – …)
2) 𝑎𝑏𝑐𝑑𝑒 … (edge – edge – edge – …)
3) 𝐴𝐵𝐶𝐷 … (vertex – vertex – vertex – …)
b) A cycle is a closed path (i.e. the first and the last vertex coincide)

Fig. 4: Example of a cycle


c) The length of a path or cycle is the number of edges that form the path or cycle
Take Fig. 3 and Fig. 4 for example, the length of both red paths are 3
d) The distance between 2 vertices 𝑥, 𝑦 of 𝐺 is the minimal length of all paths that connect them (if that exists,
of course), denoted by dist(𝑥, 𝑦)
e) Connectivity:
1) A graph 𝐺 is connected if there exists a path between any 2 vertices of 𝐺
2) A graph 𝐺 has 𝑘 connected components (𝑘 ≥ 2) if 𝐺 can be partitioned into 𝑘 parts, each part is itself a
connected sub–graph and every 2 of those are not connected

Author: Hoang Van Phu


Fig. 5: Example of connectivity
f) The diameter of a graph 𝐺 is the maximal distance, denoted by diam(𝐺)
III. PROBLEMS
Problem 1: Prove that ∀𝐺 = (𝑉; 𝐸)∃𝑚 ∈ ℕ: ∑𝑣∈𝑉 deg 𝑣 = 2𝑚
Proof: We count the number of pairs (𝑣, 𝑒) (𝑣 ∈ 𝑉, 𝑒 ∈ 𝐸) that 𝑣, 𝑒 are adjacent.
Select any 𝑒 ∈ 𝐸, since 𝐺 is a simple graph → each edge corresponds to only 2 pairs → the numbers of (𝑣, 𝑒) must be
even. On the other hand the numbers of (𝑣, 𝑒) is equal to ∑𝑣∈𝑉 deg 𝑣 → Statement proved!
𝑛
Problem 2: Given a graph 𝐺 = (𝑉; 𝐸) with |𝑉| = 𝑛. Assume that ∀𝑣 ∈ 𝑉: deg 𝑣 ≥ ⌈ ⌉. Prove that 𝐺 is connected.
2
Proof:
Assume the contrary. Then 𝐺 has at least 2 components, say 𝐺1 , 𝐺2 .
𝑛
Let 𝑣 be any vertex of 𝐺1 → every adjacent vertices of 𝑣 must be in 𝐺1 . Hence, 𝐺1 contains at least deg 𝑣 + 1 ≥ + 1
2
𝑛
vertices. Similarly, 𝐺2 contains at least + 1 vertices. Therefore, 𝐺 has at least 𝑛 + 2 vertices, which is a
2
contradiction.
Problem 3: Given 𝐺 = (𝑉; 𝐸) with diam 𝐺 = 𝑑. Does this statement true?

Author: Hoang Van Phu


𝑑
“There exists a vertex 𝑣 such that ∀𝑢 ∈ 𝑉: dist(𝑢, 𝑣) ≤ ⌈ ⌉ ”
2
The statement is false. Consider the following graph that has diameter 3, but 2 opposite vertices has distance 3,
3
bigger than ⌈ ⌉
2

Problem 4: Given a graph 𝐺 = (𝑉; 𝐸) that satisfy ∀𝑣 ∈ 𝑉, deg 𝑣 ≥ 2. Prove that 𝐺 has a cycle:
Proof:
We start at any vertex 𝑣 of 𝐺. We will choose one of the adjacent vertices to 𝑣 (there are at least 2 anyway ),
call it 𝑣1 . Then we choose one of the adjacent vertices of 𝑣1 that is different from 𝑣
(we can choose because deg 𝑣1 ≥ 2). Repeat this process. Because the graph is finite so this process must loop back
to some point on the way, by then we will get a cycle.
Problem 5: Given a connected graph 𝐺 = (𝑉; 𝐸) with |𝑉| = 𝑛. Prove that |𝐸| ≥ 𝑛 − 1
Proof:

Author: Hoang Van Phu


Consider the following sequence of actions: Consider the graph 𝐺′ = (𝑉; 𝐸′) with |𝑉| = 𝑛, |𝐸| = 0.
The number of connected components of 𝐺′ is 𝑛
Each time, we will “add” an edge connecting 2 vertices of the graph. We can easily see that each time we add an
edge, the number of connected components goes down by at most 1. So we need at least 𝑛 − 1 steps to get all the
vertices connected, hence |𝐸| ≥ 𝑛 − 1.

Author: Hoang Van Phu

You might also like