Professional Documents
Culture Documents
Table of contents
4 Practice
Definition 1
A graph is a collection of vertices, or nodes, and edges
between some or all of the vertices. The graph is usually
denoted by G = (V , E ), where V is the set of its vertices and
E is the set of its edges. Two vertices v , w are called
adjacent if there is an edge between v and w .
Definition 2
The degree of a vertex v is the number of edges connecting it
to the other vertices.
Definition 3
A path is a sequence of distinct vertices such that any two
consecutive vertices are adjacent.
Definition 4
A cycle is a sequence of distinct vertices V1 , V2 , . . . , Vn
(n ≥ 3) such that
are adjacent.
Theorem 2
Given a positive integer n ≥ 3 and a graph G = (V , E ) such
that |V | = n and |E | ≥ n. Then, G consists at least one cycle.
Exercise
Consider the graph below.
Connected graph
Definition 5
A graph is called connected if for any two vertices, there
exists a path from a vertex to the other one.
Components
Definition 6
For any graph G = (V , E ), V can be partitioned uniquely into
disjoint subsets such that two vertices in V are in the same
subset if and only if there exists a path between them. Each
subset in the partition, together with the edges between
vertices in that set, forms a connected subgraph a of G . This
subgraph is called the component of G .
a
G ′ = (V ′ , E ′ ) is a subgraph of G if V ′ ⊂ V and E ′ ⊂ E
Theorem 3
Given a connected graph consisting of n vertices, where n ≥ 2
is a positive integer. Then, this graph has at least n − 1 edges.
Tree
Definition 7
A connected graph is no cycle is called a tree.
Theorem 4
Given a tree with n vertices. Then, this graph contains exactly
n − 1 edges.
Complete graph
Definition 8
A graph is called complete if any two vertices in that graph
are adjacent. For any positive integer n, Kn denotes the
complete graph with n vertices.
In the figure below are the graphs K5 and K6 .
Definition 9
A graph is called bipartite if their vertices can be partitioned
into two disjoint subsets, called A, B, such that any two
vertices in the same set are not adjacent. If for any pair of
vertices (a, b) with a ∈ A, b ∈ B are adjacent, this graph is
called complete bipartite. Similarly as above, for any two
positive integers m, n, Km,n denotes the complete bipartite
graph with |A| = m, |B| = n.
Examples
Exercise
Theorem 5
A graph is bipartite if and only if it doesn’t contain any cycle
with an odd number of vertices.
Problem 1
Consider a graph with 9 cells of a 3 × 3 chessboard as vertices.
In this graph, two cells are adjacent if the knight can move
from a cell to the other one in exactly one step.
1 Is this graph bipartite ?
Problem 2
Given a graph with n ≥ 3 vertices labelled 1, 2, . . . , n. Two
vertices i, j are adjacent if and only if |i − j| ≤ 2.
1 Is this graph bipartite ?
Problem 3
Given a connected graph G = (V , E ). An edge e ∈ E is called
bridge if the graph formed by removing e from G isn’t
connected. Prove that an edge is a bridge if and only if it is
not the edge of any cycle.
Problem 4
A bipartite graph is called maximal if it is impossible to add
any edge into this graph such that the new graph we obtain
(with one more edge) is still bipartite. Prove that a bipartite
graph is maximal if and only if it is a complete bipartite graph.
Problem 5
A graph is called uniquely bipartite if there is exactly one
way to divide its vertices into two subsets such that any two
vertices in the same subset are not adjacent. Prove that a
graph is uniquely bipartite if and only if it is bipartite and
connected.
Problem 6
Doctor Dung draws the graph Kn on the board. Every minute,
if the graph still contains some edges, Doctor Dung will tell
Hung to divide the graph into two parts, called A, B and erase
all the remaining edges that connect a vertex in A with a
vertex in B (Hung must erase at least one edge in each turn).
After at most how many minutes will all the edges be erased
by Hung ?