Professional Documents
Culture Documents
1 Notations EN
1 Notations EN
1 Notations EN
Discrete Mathematics 2
2 http://www.ptit.edu.vn
Undirected Simple Graph
⦁ Definition 1: Undirected simple graph 𝐺 = < 𝑉, 𝐸 >:
o 𝑉 is the set of vertices
o 𝐸 is the set of edges, consisting of unordered pairs of two distinct
vertices in 𝑉
o There is at most one edge connecting two vertices
3 http://www.ptit.edu.vn
Undirected Multigraph
⦁ Definition 2: Undirected multigraph 𝐺 = < 𝑉, 𝐸 >:
o 𝑉 is the set of vertices
o 𝐸 is the set of edges, consisting of unordered pairs of two distinct
vertices in 𝑉
o 𝑒1 ∈ 𝐸, 𝑒2 ∈ 𝐸 are called multiple edges if they connect the same
two vertices, 𝑒1 = 𝑢, 𝑣 , 𝑒2 = 𝑢, 𝑣
4 http://www.ptit.edu.vn
Undirected Pseudograph
⦁ Definition 3: Undirected pseudograph 𝐺 = < 𝑉, 𝐸 >
o 𝑉 is the set of vertices
o 𝐸 is the set of edges, consisting of unordered pairs of two (maybe
the same) vertices in 𝑉
5 http://www.ptit.edu.vn
Directed Simple Graph
⦁ Definition 4: Directed simple graph 𝐺 = < 𝑉, 𝐸 >:
o 𝑉 is the set of vertices
o 𝐸 is the set of edges (arrows), consisting of ordered pairs of two
distinct vertices in 𝑉
o There is at most one edge (arrow) from a vertex to another one
6 http://www.ptit.edu.vn
Directed Multigraph
⦁ Definition 5: Directed multigraph 𝐺 = < 𝑉, 𝐸 >:
o 𝑉 is the set of vertices
o 𝐸 is the set of edges (arrows), consisting of ordered pairs of two
distinct vertices in 𝑉
o 𝑒1 ∈ 𝐸, 𝑒2 ∈ 𝐸 are called multiple arrows if they connect the same
two vertices, 𝑒1 = 𝑢, 𝑣 , 𝑒2 = 𝑢, 𝑣
7 http://www.ptit.edu.vn
Convention
⦁ We will focus on Undirected Simple Graph and Directed
Simple Graph
⦁ “Undirected Graph” means “Undirected Simple Graph”
⦁ “Directed Graph” means “Directed Simple Graph”
8 http://www.ptit.edu.vn
Contents
⦁ Graph Definitions
⦁ Basic Terms in Undirected Graphs
⦁ Basic Terms in Directed Graphs
⦁ Some Special Types of Graphs
9 http://www.ptit.edu.vn
Vertex Degree
⦁ Definition 1: Two vertices 𝑢 and 𝑣 of undirected graph
𝐺 =< 𝑉, 𝐸 > are said to be adjacent if there is an edge
connecting them. If 𝑒 = (𝑢, 𝑣) is an edge of undirected
graph 𝐺, e is said to be incident to 𝑢 and 𝑣; two vertices
𝑢 and 𝑣 are said to be the endpoints of edge 𝑒.
10 http://www.ptit.edu.vn
Example
⦁ deg(𝑎) = 2, deg(𝑏) = deg(𝑐) = deg(𝑓) = 4;
⦁ deg(𝑒) = 3, deg(𝑑) = 1, deg(𝑔) = 0.
11 http://www.ptit.edu.vn
S u m of Degrees of Vertices Theorem
⦁ Theorem 1: Suppose an undirected graph 𝐺 =< 𝑉, 𝐸 >
has m edges, then we have: σ 𝑣∈𝑉 deg 𝑣 = 2𝑚.
⦁ Proof: for each edge 𝑒 = (𝑢, 𝑣), degree is counted one
time in deg(𝑢) and one time in deg(𝑣). Therefore, sum of
the degrees of the vertices equals twice the number of
edges.
12 http://www.ptit.edu.vn
Path, Circuit
⦁ Definition 1: Path with length 𝑛 from vertex 𝑢 to vertex 𝑣 in
undirected graph 𝐺 =< 𝑉, 𝐸 > is sequence 𝑥0, 𝑥1, . . . , 𝑥𝑛−1, 𝑥 𝑛,
in which 𝑛 is a positive integer, 𝑥0 = 𝑢, 𝑥𝑛 = 𝑣, (𝑥𝑖, 𝑥𝑖+1) ∈ 𝐸,
𝑖 = 0, 1, 2, . . . , 𝑛 − 1.
⦁ The above path can be represented as a sequence of edges
(𝑥0 , 𝑥1 )(𝑥1 , 𝑥2 ) , . . . , (𝑥𝑛 −1 , 𝑥𝑛 ).
⦁ 𝑢 is the starting point and 𝑣 is the ending point of the path
13 http://www.ptit.edu.vn
Example
⦁ 𝑎, 𝑑, 𝑐, 𝑓, 𝑒 is a simple path with length 4
⦁ 𝑑, 𝑒, 𝑐, 𝑏 is not a path because (𝑒, 𝑐) is not an edge
⦁ 𝑏, 𝑐, 𝑓, 𝑒, 𝑏 is a circuit with length 4
⦁ Path with length 5 𝑎, 𝑏, 𝑒, 𝑑, 𝑎, 𝑏 is not simple because
(𝑎, 𝑏) appears twice
14 http://www.ptit.edu.vn
Connected Graph
⦁ Definition 2: An undirected graph is said to be
connected if there is a path between every pair of
vertices
16 http://www.ptit.edu.vn
Bridge, C u t Vertex
⦁ Definition 3: In an undirected graph, a bridge is an
edge of the graph whose deletion increases its number of
connected components. A cut vertex is a vertex whose
deletion (with its boundary edges) increases its number
of connected components.
⦁ Examples: (5,9) and (5,10),… are bridges; 5,6,… are
cut vertices
17 http://www.ptit.edu.vn
Contents
⦁ Graph Definitions
⦁ Basic Terms in Undirected Graphs
⦁ Basic Terms in Directed Graphs
⦁ Some Special Types of Graphs
18 http://www.ptit.edu.vn
Indegree and Outdegree
⦁ Definition 1: If 𝑒 = (𝑢, 𝑣) is an arrow of directed graph
𝐺, then 𝑢 and 𝑣 is said to be adjacent. Vertex 𝑣 is called
the head end and vertex 𝑢 is called the tail end of arrow
(𝑢, 𝑣).
19 http://www.ptit.edu.vn
Example
⦁ 𝑑𝑒𝑔+ 𝑎 = 2, 𝑑𝑒𝑔+ 𝑏 = 2, 𝑑𝑒𝑔+ 𝑐 = 0,
𝑑𝑒𝑔+(𝑑) = 2, 𝑑𝑒𝑔+(𝑒) = 1.
⦁ 𝑑𝑒𝑔− 𝑎 = 1, 𝑑𝑒𝑔− 𝑏 = 1, 𝑑𝑒𝑔− 𝑐 = 2,
𝑑𝑒𝑔−(𝑑) = 2, 𝑑𝑒𝑔−(𝑒) = 1.
20 http://www.ptit.edu.vn
S u m of Indegrees/Outdegrees
of Vertices Theorem
⦁ Theorem 1: For any directed graph 𝐺 =< 𝑉, 𝐸 >, we
have: σ 𝑣∈𝑉 𝑑𝑒𝑔+(𝑣) = σ 𝑣∈𝑉 𝑑𝑒𝑔−(𝑣) = |𝐸|.
⦁ Proof: Each arrow (𝑢, 𝑣) is counted one time in 𝑑𝑒𝑔− 𝑣
and one time in 𝑑𝑒𝑔+ 𝑣 .
⦁ Notes:
o Many properties of directed graphs do not depend on directions.
In some cases, we can ignore the directions on arrows.
o The undirected graph receiving by removing directions on arrows
is called the corresponding undirected graph.
21 http://www.ptit.edu.vn
Path, Circuit
⦁ Definition 1: Path with length 𝑛 from vertex 𝑢 to vertex
𝑣 in directed graph 𝐺 =< 𝑉, 𝐸 > is sequence
𝑥0 , 𝑥1 , . . . , 𝑥𝑛 −1 , 𝑥𝑛 , in which 𝑛 is a positive integer, 𝑥0 =
𝑢, 𝑥𝑛 = 𝑣, (𝑥𝑖 , 𝑥𝑖 +1 ) ∈ 𝐸, 𝑖 = 0, 1, 2, . . . , 𝑛 − 1.
⦁ The above path can be represented as a sequence of
arrows (𝑥0 , 𝑥1 )(𝑥1 , 𝑥2 ) , . . . , (𝑥𝑛 −1 , 𝑥𝑛 )
⦁ 𝑢 is the starting point and 𝑣 is the ending point of the
path
22 http://www.ptit.edu.vn
Strongly Connected Graph,
Weakly Connected Graph
Definition 2: Directed graph 𝐺 =< 𝑉, 𝐸 > is said to be
strongly connected if there is a path between every pair of
vertices.
Definition 3: Directed graph 𝐺 =< 𝑉, 𝐸 > is said to be
weakly connected if its corresponding undirected graph is
connected.
23 http://www.ptit.edu.vn
Orientation
⦁ Definition 4: An orientation of an undirected graph is
an assignment of a direction to each edge, turning the
initial graph into a directed graph. A strong orientation is
an orientation that results in a strongly connected graph.
24 http://www.ptit.edu.vn
Contents
⦁ Graph Definitions
⦁ Basic Terms in Undirected Graphs
⦁ Basic Terms in Directed Graphs
⦁ Some Special Types of Graphs
25 http://www.ptit.edu.vn
Complete Graph
⦁ Complete graph 𝑛 vertices, denoted by 𝐾𝑛, is a simple
undirected graph that exists an edge connecting between
two every vertices
𝑛 (𝑛 −1
⦁ Number of edges: ) 2
26 http://www.ptit.edu.vn
Cycle Graph
⦁ Cycle graph 𝑛 vertices, denoted by 𝐶𝑛 (𝑛 ≥ 3) is a
simple undirected graph consisting of edges
(1,2), (2,3), … , (𝑛 − 1, 𝑛), (𝑛, 1)
27 http://www.ptit.edu.vn
Wheel Graph
⦁ Wheel graph 𝑛 vertices, denoted by 𝑊𝑛is a graph
formed by connecting a single vertex to all vertices of a
cycle graph 𝐶𝑛−1.
28 http://www.ptit.edu.vn
Bipartite Graph (Bigraph)
⦁ Bigraph 𝐺 =< 𝑉, 𝐸 > is a graph whose vertices can be
divided into two disjoint sets 𝑋 and 𝑌 and such that
every edge connects a vertex in to one in, i.e. (𝑥, 𝑦), in
which 𝑥 ∈ 𝑋 and 𝑦 ∈ 𝑌.
29 http://www.ptit.edu.vn
Exercise 1
⦁ Determine the degree of each vertex in the below
undirected graph
2 5
1 7
4
3 6
30 http://www.ptit.edu.vn
Exercise 2
⦁ Determine the indegree and outdegree of each vertex in
the below directed graph
2 5
1 7
4
3 6
31 http://www.ptit.edu.vn