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

Disccompbeamer

The document discusses key concepts in graph theory, including: - Definitions of graphs, vertices, edges, degrees, adjacency, and subgraphs - Methods for representing graphs through adjacency and incidence matrices - Common graph terminology like neighborhoods, isolated vertices, and the Handshaking Theorem - Examples are provided to illustrate graph concepts and properties

Uploaded by

PRINCE Teddy
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)
93 views

Disccompbeamer

The document discusses key concepts in graph theory, including: - Definitions of graphs, vertices, edges, degrees, adjacency, and subgraphs - Methods for representing graphs through adjacency and incidence matrices - Common graph terminology like neighborhoods, isolated vertices, and the Handshaking Theorem - Examples are provided to illustrate graph concepts and properties

Uploaded by

PRINCE Teddy
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/ 148

Discrete Mathematics and Combinatorics

By: Masreshaw Temere (MSc)


Department of Mathematics

Haramaya University

August, 2021
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 1 / 148
Chapter 4
Elements of Graph Theory

Basic Terminologies

Definition
A graph G consists of a finite non-empty set V(G) of elements called
vertices together with a finite set E(G) of unordered pairs of (not
necessarily distinct) vertices called edges.
A vertex on which no edges are incident is called isolated vertex.

The following are examples of graphs with vertices V(G) and edges
E(G).

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 2 / 148
...Cont’d
(i) Consider the graph G

V = {v1 , v2 , v3 , v4 , v5 }, E = {v1 v2 , v1 v3 , v2 v3 , v2 v4 , v3 v4 , v3 v5 }.
(ii) Consider the graph G

V = {v1 , v2 , v3 , v4 , v5 }, E = {v1 v2 , v2 v2 , v2 v3 , v2 v4 , v3 v4 (twice), v4 v5 }.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 3 / 148
...Cont’d

(iii) Consider the graph G

V = {v1 , v2 , v3 , v4 , v5 , v6 , v7 }, E = {v1 v2 , v2 v3 , v2 v4 , v3 v4 , v5 v6 } and


v7 is an isolated vertex.
Definition
In a graph, two or more edges joining the same pair of vertices are called
multiple(parallel) edges. In a graph G, an edge which joins a vertex to
itself is called a loop. A graph with no multiple edges or loops is called a
simple graph.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 4 / 148
...Cont’d

♠ Thus, the graphs in the above example (i) and (iii) are simple graph,
but (ii) is not, it is a non-simple graph.
♠ The first and second graphs are not simple graphs but the third graph is
simple graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 5 / 148
...Cont’d

Definition
A graph G is known as a multi-graph if it contains parallel edges. It is to
be noted that every simple graph is a multi-graph but the converse is not
true.
A graph G is known as pseudo graph if we allow both parallel edges and
loops. It is to be noted that every simple graph and multi-graph are
pseudo graph but the converse is not true. Consider the graph G as

♠ Here, the edges e1 and e5 are parallel edges. It is also pseudo graph.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 6 / 148
...Cont’d

The following graph represents a pseudo graph.

Definition
Two vertices u and v in an undirected graph G are called adjacent (or
neighbors) in G if u and v are end points of an edge e of G. Such an edge
e is called incident with the vertices u and v ( or u and v are incident
with the edge e) and e is said to connect u and v. Similarly, two edges are
adjacent if they have a vertex in common. A vertex that is an end point of
a loop is said to be adjacent to itself.

♠ v1 and v2 are adjacent in the following graph, each being incident with
edge e1 . We call v1 and v2 the end-vertices of e1 .
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 7 / 148
...Cont’d
Also edges e1 and e2 are adjacent edges.

Example
In the graph below, the vertices u and x are adjacent, vertex w, is incident
with edges 2, 3, 4 and 5, and edge 6 is incident with the vertex x.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 8 / 148
...Cont’d

Definition
The set of all neighbors of a vertex v of G(V, E), denoted by N (v), is
called the neighborhood of v. If A is a subset of V , we denote by N (A)
the set ofSall vertices in G that are adjacent to at least one vertex in A. So,
N (A) = v∈A N (v).

Definition
In a graph G, the degree of a vertex v is the number of edges incident with
v and denoted by deg(v). Each loop counted twice. Each loop
contributes 2 to the degree of the corresponding vertex because it has two
ends joined to that vertex.
A vertex with a loop ”sees” itself as an adjacent vertex from both ends of
the edge. Thus, adding two, not one, to the degree.
A leaf vertex (also pendant vertex) is a vertex with degree one.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 9 / 148
...Cont’d

Remark
♠ The degree of an isolated vertex is zero.

Example
What are the degrees and what are the neighborhoods of the vertices in
the graphs G and H displayed in figure below?

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 10 / 148
...Cont’d
Solution:
In G
deg(a) = 2, deg(b) = deg(c) = deg(f ) = 4, deg(d) = 1,
deg(e) = 3, deg(g) = 0.

The neighborhoods of these vertices are


N (a) = {b, f }, N (b) = {a, c, e, f }, N (c) = {b, d, e, f },
N (d) = {c}, N (e) = {b, c, f }, N (f ) = {a, b, c, e}, N (g) = ∅.
In H
deg(a) = 4, deg(b) = deg(e) = 6, deg(c) = 1, deg(d) = 5.

The neighborhoods of these vertices are


N (a) = {b, d, e}, N (b) = {a, b, c, d, e}, N (c) = {b},
N (d) = {a, b, e}, N (e) = {a, b, d}.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 11 / 148
...Cont’d

Example
Consider the graphs in (a) and (b) given below.

(a) deg(u)= 2, deg(v)= 1, deg(w)= 4, deg(x)= 3, deg(y)=0

(b) deg(u)= 2, deg(v)= 5, deg(w)= 4, deg(x)= 5, deg(y)= 0.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 12 / 148
...Cont’d
Definition
The degree sequence of a graph G is the sequence obtained by listing the
vertex degrees of G in ascending order, with repeats as necessary.

Example
For the graphs in (a) and (b) given in the above example, we have the
degree sequences 0, 1, 2, 3, 4 and 0, 2, 4, 5, 5 respectively.

Definition
The order of a graph G(V, E) is the number of vertices, |V |, where V is
the set of vertices and the number of edges is its size, denoted by |E|.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 13 / 148
...Cont’d

Example (Consider the following graph G)

The order of G is |V | = 4.
The size of G is |E| = 8.

Theorem (Handshaking [ Degree Sum] Theorem)


For a graph with vertex set {v1 , v2 , ..., vn } and m edges,
Pn
k=1 deg(vk ) = 2m.

Note that this applies even if multiple edges and loops are present.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 14 / 148
...Cont’d
Proof.
In any graph, each edge has two ends and hence it contributes exactly 2 to
the sum of the vertex degrees.
Therefore, the result follows immediately.

Example
How many edges are there in a graph with 10 vertices each of degree six?
Solution:
The sum of the degrees of the vertices is 6 ∗ 10 = 60, it follows that
2m = 60, where m is the number of edges. Therefore, m = 30.

Definition (Subgraphs)
A subgraph of a graph G is a graph all of whose vertices are vertices of G
and all of whose edges are edges of G.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 15 / 148
...Cont’d
Remark: A graph G is a subgraph of itself.
Example
The following graphs are all subgraphs of the graph G on the left, with
vertices {u, v, w, x} and edges {1, 2, 3, 4, 5}.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 16 / 148
...Cont’d

Suppose that G and H be two graphs with vertex sets V(G) and
V(H). Let the edge sets E(G) and E(H). Now H is said to be
subgraph of G if V(H) ⊆ V(G) and E(H) ⊆ E(G).

Vertex deleted subgraph

Suppose G(V, E) be a graph. If we delete a subset U of the set V and


all the edges, which have a vertex in U as an end, then the resultant
graph is termed as vertex deleted subgraph of G. Consider the graph
G as

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 17 / 148
...Cont’d

On deleting the vertex v1 , the vertex deleted subgraph H is given as

Edge deleted subgraph

Suppose G(V, E) be a graph. If a subset F from the set of edges E is


deleted from the graph G, then the resultant graph is edge deleted
subgraph of G. Consider the graph G as

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 18 / 148
...Cont’d

On deleting the edges e1 and e2 , the edge deleted subgraph is given


as [G − {e1 , e2 }]

The idea of a subgraph can be extended to unlabelled graphs.

♠ The following graphs are all subgraphs of the unlabelled graph H


on the left; the configuration in graph (c) occurs at each corner of H.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 19 / 148
Matrix Representation of a Graph

Although drawings are a convenient means of specifying graphs, they


are clearly not suitable for storing graphs in computers, or for
applying mathematical methods to study their properties.

A matrix is a convenient way to represent a graph. A computer to


analyze them can use such a representation.

For these purposes, we consider two matrices associated with a graph,


its adjacency matrix and incidence matrix.

Adjacency Matrices

Let G be a graph with n vertices labeled by v1 , v2 , ..., vn .


The adjacency matrix A of G is the n × n matrix given by

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 20 / 148
...Cont’d
 
a11 a12 · · · a1n
 a21 a22 · · · a2n 
A= .
 
.. .. .. 
 .. . . . 
an1 an2 · · · ann
(
k, if k be the number of edges from vi to vj
where aij =
0, otherwise.

Remark
In the adjacency matrix if the main diagonal elements are zero and
the entries other than the main diagonal are either 1 or 0, then the
graph is said to be a simple graph.

Adjacency matrix of an undirected graph G is always symmetric.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 21 / 148
...Cont’d

Example
Use the adjacency matrix to represent the graphs shown below.

Solution:
(a) We order the vertices as v1 , v2 , v3 , v4 . Since there are four vertices, the
adjacency matrix representing the graph will be a square
 
0 1 1 1
1 0 1 0
matrix of order four. A = 1 1 0 1.

1 0 1 0
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 22 / 148
...Cont’d

Example
Draw the graph G correspondingto adjacencymatrix A given by
1 2 0 0
2 0 1 1
A= 0

1 2 2
0 1 2 0

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 23 / 148
...Cont’d
Solution:
Since the given adjacency matrix A is square matrix of order 4, G has
four vertices, say v1 , v2 , v3 , v4 .

Draw n edges from vi to vj where aij = n. Moreover, draw n loops


at vertex vi .
Thus, the required graph is given below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 24 / 148
...Cont’d

F Use an adjacency matrix to represent the pseudograph shown


below.

Incidence Matrices

Let G be a graph with n vertices and m edges.


 The incidence matrix

a11 a12 · · · a1m
 a21 a22 · · · a2m 
I of G is the n × m matrix given by I =  .
 
. .. .. .. 
 . . . . 
an1 an2 · · · anm

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 25 / 148
...Cont’d
(
1, if an edge ej is incident with vi
where aij =
0, otherwise.

Example
Find the incidence matrix which represents the graph given below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 26 / 148
...Cont’d
Solution: The incidence matrix is

F Represent the pseudograph shown below using an incidence matrix.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 27 / 148
...Cont’d

Isomorphism of Graphs

The simple graphs G1 = (V1 , E1 ) and G2 = (V2 , E2 ) are isomorphic if


there exists a one to-one and onto function f from V1 to V2 with the
property that a and b are adjacent in G1 if and only if f (a) and f (b)
are adjacent in G2 , for all a and b in V1 .
Such a function f is called an isomorphism. Two simple graphs that
are not isomorphic are called non-isomorphic.

Example
Show that the graphs G = (V, E) and G = (W, F ), displayed in the figure
below, are isomorphic.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 28 / 148
...Cont’d

Solution:
The function f with f (u1 ) = v1 , f (u2 ) = v4 , f (u3 ) = v3 , and f (u4 ) = v2
is a one to-one correspondence between V and W .
To see that this correspondence preserves adjacency, note that adjacent
vertices in G are u1 and u2 , u1 and u3 , u2 and u4 and u3 and u4 , and
each of the pairs f (u1 ) = v1 and f (u2 ) = v4 , f (u1 ) = v1 and
f (u3 ) = v3 , f (u2 ) = v4 and f (u4 ) = v2 , and f (u3 ) = v3 and f (u4 ) = v2
consists of two adjacent vertices in H.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 29 / 148
...Cont’d

F It is often difficult to determine whether two simple graphs are


isomorphic. There are n! possible one-to-one correspondences
between the vertex sets of two simple graphs with n vertices.
Testing each such correspondence to see whether it preserves
adjacency and non-adjacency is impractical if n is at all large.
Sometimes it is not hard to show that two graphs are not isomorphic.
In particular, we can show that two graphs are not isomorphic if we
can find a property only one of the two graphs has, but that is
preserved by isomorphism.
A property preserved by isomorphism of graphs is called a graph
invariant.
For instance, isomorphic simple graphs must have the same number
of vertices, because there is a one-to-one correspondence between the
sets of vertices of the graphs.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 30 / 148
...Cont’d

Isomorphic simple graphs also must have the same number of edges,
because the one-to-one correspondence between vertices establishes a
one-to-one correspondence between edges.
In addition, the degrees of the vertices in isomorphic simple graphs
must be the same.
That is, a vertex v of degree d in G must correspond to a vertex f (v)
of degree d in H, because a vertex w in G is adjacent to v if and only
if f (v) and f (w) are adjacent in H.
One helpful way to do this is to use adjacency matrices. In particular,
to show that f is an isomorphism, we can show that the adjacency
matrix of G is the same as the adjacency matrix of H, when rows and
columns are labeled to correspond to the images under f of the
vertices in G that are the labels of these rows and columns in the
adjacency matrix of G.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 31 / 148
...Cont’d
Example
Show that the graphs displayed in figure below are not isomorphic.

Solution:
Both G and H have five vertices and six edges. However, H has a
vertex of degree one, namely, e, where as G has no vertices of degree
one. It follows that G and H are not isomorphic.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 32 / 148
Path and Connectivity of a Graph

Many applications of graphs involve getting from one vertex to


another.

For example, you may wish to find the shortest route between one
town and another; the routing of a telephone call between one
subscriber and another, the flow of current between two terminals of
an electrical network, and the tracing of a maze.

Definition
A walk of length k in a graph is a succession of k edges of the form
uv, vw, wx, ..., yz. This walk is denoted by uvwx...yz, and is referred to
as a walk between u and z.
A closed walk in a graph is a succession of edges of the form
uv, vw, wx, ...yz, zu, that starts and ends at the same vertex and it is
open otherwise.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 33 / 148
...Cont’d

We can think of such a walk as going from u to v, then from v to w,


then from w to x, and so on, until we arrive eventually at the vertex
z. Since the edges are undirected, we can also think of it as a walk
from z to y and eventually, to x, w, v and u.

So we can equally well denote this walk by zy...xwvu, and refer to it


as a walk between z and u. Note that we do not require all the
edges or vertices in a walk to be different.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 34 / 148
...Cont’d

Example
In the following graph, uvwxywvzzy is a walk of length 9 between the
vertices u and y, which includes the edge vw twice and the vertices
v, w, y and z twice.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 35 / 148
...Cont’d

Definition
A trail is a walk in which no edge has been traversed more than once (in
either direction) but repeated vertices are allowed.

A closed trail (circuit) is a closed walk in which all the edges are
different and it is open otherwise.

A path is a walk in which all the edges and all the vertices are different.
A simple circuit(cycle) is a closed walk in which all the edges and the
intermediate vertices are different.

In other words, if there is a path which starts from vertex v and


terminates into the same vertex v, then the path is known as a cycle.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 36 / 148
...Cont’d

Example
In the graph below,
acbdce is an open trail.
acbdcea is a closed trail.
acbdcbe is not a trail, since edge cb has been traversed twice, but it is
a walk.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 37 / 148
...Cont’d

Path Matrix

Suppose that G be a simple graph with n vertices. Then the n × n


matrix(P = [pij ]n×n defined by
1, if there is a path from vi to vj
pij =
0, otherwise
is known as the path matrix or reachability matrix.
F Consider the Graph G as

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 38 / 148
...Cont’d

The path matrix P of the above graph G is relative to the ordering


v1 , v2 , v3 , v4 , v5 is given as
 
0 1 0 1 1
1 0 0 1 1
 
P = 0 0 0 0 0
.
1 1 0 0 1
1 1 0 1 0

Definition
An undirected graph G is called connected if there is a path between every
pair of distinct vertices of the graph G and is disconnected otherwise.
An edge in a connected graph G is a bridge if its removal leaves a
disconnected graph G. Every disconnected graph G can be split up into a
number of connected subgraphs, called components.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 39 / 148
...Cont’d

In the graph below, the edge tz is a bridge since its removal leaves a
disconnected graph.

The graph below a disconnected graph and it has three components.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 40 / 148
...Cont’d

Null Graphs
These are graphs with no edges and are denoted by Nn . The null graph on
4 vertices is given by

Cycles
A cycle Cn , n ≥ 3, consists of n vertices v1 , v2 , ..., vn and edges
{v1 , v2 }, {v2 , v3 }, ..., {vn−1 , vn }, and {vn , v1 }.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 41 / 148
...Cont’d

The cycles C3 , C4 , C5 , and C6 are displayed in figure below.

Complete Graphs
The complete graph on n vertices, denoted by Kn , is the simple graph in
which every pair of vertices is joined by an edge.
F The following graphs are complete graphs

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 42 / 148
...Cont’d

Regular Graphs
A graph G is regular if all its vertices have the same degree.
F A regular graph G is r- regular, or regular of degree r, if the degree of
each vertex is r . For example, Kn is regular of degree n − 1.
Regular graphs of degree 3 are called cubic graphs. The number of edges
of a complete graph with n vertices is given by n(n − 1)/2.
F In the mathematical field of graph theory, the Petersen graph is an
undirected graph with 10 vertices and 15 edges. The following regular
graph, called the Petersen graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 43 / 148
...Cont’d
F The following graphs are all regular.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 44 / 148
...Cont’d

Theorem
Let G be an r-regular graph with n vertices. Then G has nr/2 edges.

Proof.
Let G be a graph with n vertices, each of degree r. Then the sum of the
degrees of all the vertices is nr. Hence, by the handshaking theorem, the
number of edges is half of this sum, which is nr/2.

Bipartite Graphs
A simple graph G is called bipartite if its vertex set V can be partitioned
into two disjoint sets V1 and V2 such that every edge in the graph
connects a vertex in V1 and a vertex in V2 (so that no edge in G connects
either two vertices in V1 or two vertices in V2 ). When this condition holds,
we call the pair (V1 , V2 ) a bipartition of the vertex set V of G.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 45 / 148
...Cont’d

Consider the graph G as

Let V1 = {v1 , v3 , v5 , v7 } and V2 = {v4 , v2 , v6 , v8 }. Now, V1 ∩ V2 = ∅


and each edge of G has one vertex in V1 and other vertex at V2 .
So, G is said to be a bipartite graph.

Complete Bipartite Graphs


A complete bipartite graph Km,n is a graph that has its vertex set
partitioned into two subsets of m and n vertices, respectively with an edge
between two vertices if and only if one vertex is in the first subset and the
other vertex is in the second subset.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 46 / 148
...Cont’d

Example
The complete bipartite graphs K1,5 , K2,2 , K2,4 , K3,3 are displayed in
the figure below and draw the graph with K3,5 , K2,6 , K2,3 and also
compute the number of edges.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 47 / 148
Eulerian and Semi-Eulerian Graphs

Definition
A connected graph G is Eulerian if there is a closed trail containing every
edge of G. We call such a trail an Eulerian trail (G has an Euler circuit).

Theorem
A connected graph G is Eulerian if and only if every vertex has even
degree. To find an Eulerian trail in a given graph G, start in an arbitrary
vertex and traverse along the edges, ensuring all the edges are traversed
before returning to the starting vertex.

If G is not Eulerian, but there is an open trail containing every edge


of G, then G is Semi-Eulerian ( G has an Euler path).

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 48 / 148
...Cont’d

Theorem
A connected graph G is Semi-Eulerian if and only if precisely two of its
vertices have odd degree. To obtain a Semi-Eulerian trail in a given graph
G, you must start at one of the odd degree vertices and end in the other
odd degree vertex.

F The following graphs are Eulerian (have an Euler circuit).

F In the first graph one Eulerian trail is given as bcgf egb.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 49 / 148
...Cont’d

F The following graph is Semi-Eulerian (has an Euler path).

Make the unlabelled graph G be labelled and try to find an Euler path.

The following graph is neither Eulerian nor Semi-Eulerian.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 50 / 148
Hamiltonian and Semi-Hamiltonian Graphs

Definition
A connected graph G is Hamiltonian if there is a simple circuit ( cycle)
that passes through every vertex of G. Such a cycle is a Hamiltonian cycle.

F If G is not Hamiltonian, but there is an open path which includes every


vertex of G, then G is semi-Hamiltonian (G has a Hamiltonian path).
F Consider the following unlabelled graphs.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 51 / 148
...Cont’d

Theorem (Ore’s Theorem)


Let G be a simple graph with n ≥ 3 vertices. If deg(u) + deg(v) ≥ n for
each pair of non-adjacent vertices u and v, then G has a Hamiltonian cycle.

Theorem (Dirac’s Theorem)


Let G be a simple graph with n ≥ 3 vertices. If deg(v) ≥ n/2 for every
vertex v, then G has a Hamiltonian cycle.

Both Ore’s and Dirac’s theorem provide sufficient conditions for a


connected simple graph to have a Hamilton cycle.

However, these theorems do not provide necessary conditions for the


existence of a Hamilton cycle.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 52 / 148
...Cont’d

For example, the graph C5 has a Hamilton cycle but does not satisfy
the hypotheses of either Ore’s or Dirac’s theorem.

Remark
The complete graphs Kn , n ≥ 3 are Hamiltonian.

Bipartite graphs can only be Hamiltonian if sets V1 and V2 of vertices


have the same number of vertices.
It follows that if the total number of vertices in a bipartite graph is
odd, then it cannot be Hamiltonian.

There is no known general criterion for testing whether a graph is


semi-Hamiltonian or not.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 53 / 148
...Cont’d

Example

F How many Hamiltonian cycles does Kn have?


If n = 2, there are no cycles, so we consider n ≥ 3. Suppose that the
vertices of Kn are 1, 2, ..., n.

If we begin at vertex 1, there are n − 1 choices for the second vertex


in a cycle, then n − 2 choices for the third vertex and so on.
There are (n − 1)! Hamiltonian cycles.
(n − 1)!
Since a Hamiltonian cycle is an undirected cycle, there are
2
different Hamiltonian cycles in Kn .

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 54 / 148
...Cont’d

Example

F Consider the following graphs:

(a) It is both Eulerian and Hamiltonian.


(b) It is Eulerian; an Eulerian trail is bcgf egb; it is not Hamiltonian;
(c) It is Hamiltonian; a Hamiltonian cycle is bcgef b ; it is not
Eulerian;
(d) It is neither Eulerian nor Hamiltonian.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 55 / 148
Planar Graphs

Definition
A graph G is called planar if it can be drawn in the plane without any
edges crossing . Such a drawing is called a planar representation of the
graph G. A graph G is non-planar if no plane drawing of G exists.

F A graph G may be planar even if it is usually drawn with crossings,


because it may be possible to draw it in a different way without crossings.
F Is K4 ( with two edges crossing) planar?

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 56 / 148
...Cont’d
Solution:
K4 is planar because it can be drawn without crossings, as shown below.
Here is a plane drawings.

F The graph K2,3 is planar.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 57 / 148
...Cont’d

Here is a plane drawing

F For some graphs, such as K3,3 , it is impossible to find a drawing that


involves no crossings, therefore, K3,3 is an example of non-planar graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 58 / 148
...Cont’d
F A planar representation of a graph splits the plane into regions,
including an unbounded region.
Definition
A plane graph divides the plane into regions called faces; one face is of
infinite extent and is the infinite face. If we denote the ith face by fi , then
|fi | represents the number of edges bordering fi .

Remark: The regions do not include the vertices and edges forming their
boundaries.

Graph (i) has 4 faces and graph (ii) has 5 faces.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 59 / 148
...Cont’d

Theorem
Let G be a connected plane graph, and let n, m P
and f be the respective
number of vertices, edges and faces of G. Then fi=1 |fi | = 2m.

Theorem (Euler’s Formula)


Let G be a connected planar simple graph with e edges and v vertices.
Let r be the number of faces in a planar representation of G. Then
r = e − v + 2.

Example
Suppose that a connected planar simple graph has 20 vertices, each of
degree 3. Into how many regions (faces) does a representation of this
planar graph split the plane?

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 60 / 148
...Cont’d
Solution:
This graph has 20 vertices, each of degree 3, so v = 20. Because the sum
of the degrees of the vertices, 3v = 3 ∗ 20 = 60, is equal to twice the
number of edges, 2e, we have 2e = 60 ⇒ e = 30.
Consequently, from Eulers formula, the number of regions is
r = e − v + 2 = 30 − 20 + 2 = 12.

Corollary
(1) If G is a connected planar simple graph with e edges and v vertices,
where v ≥ 3, then e ≤ 3v − 6.

(2) If G is a connected planar simple graph, then G has a vertex of degree


not exceeding five.

(3) If a connected planar simple graph has e edges and v vertices with
v ≥ 3 and no circuits of length three, then e ≤ 2v − 4.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 61 / 148
Graph Coloring
Definition
A coloring of a simple graph G is the assignment of a color to each vertex
of the graph G so that no two adjacent vertices are assigned the same
color and the graph G is said to be k-colourable.

Definition
The chromatic number of a graph G is the least number of colors needed
for a coloring of this graph. The chromatic number of a graph G is
denoted by χ(G).

Example
χ(G) = 1 iff G has no edges, that is, G is a null graph.
χ(G) = 2 iff G is bipartite and non-null.
χ(Kn ) = n, where Kn is a complete graph with n vertices.
χ(Ceven ) = 2 and χ(Codd ) = 3, where C is a cycle graph with even or
odd number of vertices.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 62 / 148
...Cont’d

Theorem (The Four Color Theorem)


The chromatic number of a planar graph G is no greater than four.

Example
What are the chromatic numbers of the graphs G and H shown in figure
below?

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 63 / 148
...Cont’d

Solution:

χ(G) = 3 and χ(H) = 4.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 64 / 148
...Cont’d

Example ( Scheduling Final Exams)


How can the final exams at a university be scheduled so that no student
has two exams at the same time?
Solution:
This scheduling problem can be solved using a graph model, with
vertices representing courses and with an edge between two vertices if
there is a common student in the courses they represent. Each time
slot for a final exam is represented by a different color. A scheduling
of the exams corresponds to a coloring of the associated graph.

For instance, suppose there are seven finals to be scheduled. Suppose


the courses are numbered 1 through 7. Suppose that the following
pairs of courses have common students: 1 and 2, 1 and 3, 1 and 4, 1
and 7, 2 and 3, 2 and 4, 2 and 5, 2 and 7, 3 and 4, 3 and 6, 3 and 7,
4 and 5, 4 and 6, 5 and 6, 5 and 7, and 6 and 7.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 65 / 148
...Cont’d

The chromatic number of this graph is 4, four time slots are needed.

A coloring of the graph using four colors and the associated schedule
are shown in figure below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 66 / 148
...Cont’d

Exercise
Schedule the final exams for Math 115, Math 116, Math 185, Math 195,
CS 101, CS 102, CS 273, and CS 473, using the fewest number of
different time slots, if there are no students taking both Math 115 and CS
473, both Math 116 and CS 473, both Math 195 and CS 101, both Math
195 and CS 102, both Math 115 and Math 116, both Math 115 and Math
185, and both Math 185 and Math 195, but there are students in every
other pair of courses.

Definition
An edge coloring of a graph is an assignment of colors to edges so that
edges incident with a common vertex are assigned different colors.
The edge chromatic number of a graph is the smallest number of colors
that can be used in an edge coloring of the graph. The edge chromatic
number of a graph G is denoted by χ0 (G).
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 67 / 148
...Cont’d

Chromatic Polynomials
The chromatic polynomial is defined as the number of different colorings
of a graph G using at most k colors and denoted by ρG (k).

Example
Let H be the path on 3 vertices.

So, the chromatic polynomial is ρH (k) = k(k − 1)2 .

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 68 / 148
...Cont’d

Example
Null Graphs: If G = Nn is the null graph with n vertices, then

ρG (k) = k n .

Trees: If G = T is any tree with n vertices, then

ρG (k) = k(k − 1)n−1 .

Complete Graphs: If G = Kn is a complete graph with n vertices,


then
ρG (k) = k(k − 1)(k − 2) . . . (k − n + 1).

Deletion-Contraction Theorem
G − e denotes the graph obtained from G by deleting edge e, and G\e
denotes the graph obtained by contracting e.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 69 / 148
...Cont’d
Theorem
Let e be an edge in a graph G, then ρG (k) = ρG−e (k) − ρG\e (k).

Example
Find the chromatic polynomial of G by applying the above result.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 70 / 148
...Cont’d

Solution:

ρG (k) = ρG−e (k) − ρG\e (k)


= k(k − 1)2 (k − 2)2 − k(k − 1)(k − 2)(k − 3)
= k(k − 1)(k − 2)[(k − 1)(k − 2) − (k − 3)]
= k(k − 1)(k − 2)(k 2 − 4k + 5)

Hence, ρG (1) = ρG (2) = 0, but ρG (3) = 12 . So, χG (k) = 3 and G


has 12 three-colourings.

Note that the quadratic expression in ρG (k) cannot be factorized


(unless complex numbers are used), and that is why G could not be
labelled in a conflict free manner.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 71 / 148
Directed Graphs

Definition
A directed graph (digraph), consists of a set V of vertices(nodes) together
with a set E of ordered pairs of elements of V called edges(arcs). The
vertex a is called the initial vertex of the edge (a, b), and the vertex b is
called the terminal vertex of this edge.
An edge (arc) of the form (a, a) is represented using an arc from the
vertex a back to itself. Such an edge (arc) is called a loop.

Example
The directed graph with vertices {a, b, c, d} and edges
E = {(a, b), (a, d), (b, b), (b, d), (c, a), (c, b), (d, b)} is displayed in figure
below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 72 / 148
...Cont’d

Exercise
(1) The directed graph of the relation
E = {(1, 1), (1, 3), (2, 1), (2, 3), (2, 4), (3, 1), (3, 2), (4, 1)} on the set
of vertices {1, 2, 3, 4}. Sketch the digraph G.
(2) What are the ordered pairs in the relation R represented by the
directed graph shown in figure below?
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 73 / 148
...Cont’d

Definition
In a digraph D, two or more arcs joining the same pair of vertices in the
same direction are multiple arcs. A digraph G with no multiple arcs or
loops is a simple digraph.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 74 / 148
...Cont’d
Example
A digraph (a) below has multiple arcs and digraph (b) has a loop, so
neither is a simple digraph. A digraph (c) has no multiple arcs or loops,
and is therefore a simple digraph.

Definition
The vertices v and w of a digraph are adjacent vertices if they are joined
(in either direction) by an arc e. An arc e that joins v to w is incident
from v and incident to w; v is incident to e, and w is incident from e.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 75 / 148
...Cont’d

Example
In the digraph below, the vertices u and x are adjacent, vertex w is
incident from arcs 2 and 5 and incident to arcs 3 and 4, and arc 6 is
incident to (and from) the vertex x.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 76 / 148
...Cont’d
Definition
A sub digraph of a digraph D is a digraph all of whose vertices are vertices
of D and all of whose arcs are arcs of D. A digraph D is a sub digraph of
itself.

Example
The following digraphs are all sub digraphs of the digraph D shown on the
left with vertices {u, v, w, x} and arcs {1, 2, 3, 4, 5, 6}.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 77 / 148
...Cont’d
Example
The following digraphs are all sub digraphs of the unlabelled digraph C on
the left

Definition
The underlying graph of a digraph D is the graph obtained by replacing
each arc of D by the corresponding undirected edge.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 78 / 148
...Cont’d

Definition
In a digraph D, the in-degree of a vertex v, denoted by deg − (v), is the
number of arcs with v as their terminal vertex (incident to v). The
out-degree of v, denoted by deg + (v), is the number of arcs with v as
their initial vertex (incident from v).

Remark
A loop at a vertex contributes 1 to both the in-degree and the
out-degree of this vertex.

Example
Find the in-degree and out-degree of each vertex in the graph G with
directed edges shown in figure below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 79 / 148
...Cont’d

Solution:

The in-degrees in G are:


deg − (a) = 2, deg − (b) = 2, deg − (c) = 3, deg − (d) = 2, deg − (e) = 3,
and deg − (f ) = 0.
The out-degrees in G are:
deg + (a) = 4, deg + (b) = 1, deg + (c) = 2, deg + (d) = 2, deg + (e) = 3,
and deg + (f ) = 0.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 80 / 148
...Cont’d

Exercise
Consider the digraph D given below and find the out-degree and
in-degree of each vertices of D.

Definition
The out-degree sequence of a digraph D is the sequence obtained by
listing the out-degrees of D in an increasing order, with repeats as
necessary and the in-degree sequence of D is defined analogously.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 81 / 148
...Cont’d

Theorem
Let D = (V, E) be a a digraph. Then
X X
deg − (v) = deg + (v) = |E|.
v∈V v∈V

Isomorphism

Definition
Two digraphs C and D are isomorphic if D can be obtained by relabeling
the vertices of C, that is, if there is a one-one correspondence between the
vertices of C and those of D, such that the arcs joining each pair of
vertices in C agree in both number and direction with the arcs joining the
corresponding pair of vertices in D.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 82 / 148
...Cont’d
Example
The digraphs C and D represented by the diagrams are not the same but
they are isomorphic.

We can relabel the vertices in the digraph C to get the digraph D, using
the following one-one correspondence: C ↔ D;
u ↔ 2, v ↔ 3, w ↔ 4, x ↔ 1.
The two arcs from u to v in C correspond to the two arcs from 2 to 3
in D; the arcs wx and xw in C correspond to the arcs 41 and 14 in D;
the loop ww in C corresponds to the loop 44 in D.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 83 / 148
Matrix Representation of Digraphs

Adjacency Matrix and Incidence Matrix

Definition
Let D be a digraph with n vertices labeled by v1 , v2 , v3 , . . . , vn . Then the
adjacency matrix A of D is an n × n matrix given by
 
a11 a12 . . . a1n
 a21 a22 . . . a2n 
A= .
 
.. .. .. 
 .. . . . 
an1 an2 . . . ann
(
k, if k be the number of arcs from vi to vj
where, aij =
0, otherwise.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 84 / 148
...Cont’d
Example
Find the adjacency matrix of the given directed multi-graph with respect
to the vertices listed in alphabetic order.

Solution:  
1 1 1 1
0 1 0 1
A=
1

0 1 0
1 1 1 1
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 85 / 148
...Cont’d
Exercise
Draw the digraph D corresponding to the adjacency matrix
 
0 0 1 1
0 0 1 0
A= 1 1 0 1

1 1 1 0

Definition
Let D be a digraph with n vertices and m arcs. Then the incidence matrix
I of D is an n × m matrix given by
 
a11 a12 . . . a1m
 a21 a22 . . . a2m 
I= .
 
.. .. .. 
 .. . . . 
an1 an2 . . . anm
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 86 / 148
...Cont’d
where,
1,
 if arc j is incident from vertex i or arc j is outgoing
aij = −1, if arc j is incident to vertex i or arc j is incoming

0, otherwise.

Example
Find the incidence matrix which represents the digraph shown in figure
below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 87 / 148
...Cont’d

Exercise
Draw the digraph represented by each of the following incidence matrices.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 88 / 148
Paths and Connectivity

Definition
A walk of length k in a digraph is a succession of k arcs of the form
uv, vw, wx, . . . , yz. This walk is denoted by uvwx . . . yz, and is referred
to as a walk from u to z.
A trail is a walk in which all the arcs, but not necessarily all the vertices,
are different.
A path is a walk in which all the arcs and all the vertices are different.

Example
In the following diagraph, the walk vwxyvwyzzu is a walk of length 9
from v to u, which includes the arc vw twice and the vertices v, w, y and z
twice. The walk uvwyvz is a trail which is not a path, since the vertex v
occurs twice, whereas the walk vwxyz has no repeated vertices and is
therefore a path.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 89 / 148
...Cont’d

Definition
A closed walk in a digraph is a succession of arcs of the form
uv, vw, wx, . . . , yz, zu. A closed trail is a closed walk in which all the
arcs are different. A cycle is a closed trail in which all the intermediate
vertices are different.

In the digraph above, the closed walk uvwyvzu is a closed trail


which is not a cycle (since the vertex v occurs twice), whereas the
closed trails zz, wxw, vwxyv and uvwxyzu are all cycles.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 90 / 148
...Cont’d
Definition
A digraph is weakly connected (simply connected) if its underlying
graph is a connected graph, and is disconnected otherwise.
A digraph is strongly connected if for every pair of distinct vertices u
and v in G, there is a directed path from u to v and also from v to u.

Example ( Consider the following digraphs)

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 91 / 148
...Cont’d
Digraph (a) is disconnected, since its underlying graph is a
disconnected graph.
Digraph (b) is connected but is not strongly connected since, for
example, there is no path from z to y.
Digraph (c) is strongly connected, since there are paths joining all
pairs of vertices.
Alternatively, you can think of driving around a one-way street system
in a town.
If the town is strongly connected, then you can drive from any part of
the town to any other, following the directions of the one-way streets
as you go.
If the town is merely connected, then you can still drive from any part
of the town to any other, but you may have to ignore the directions
of the one-way streets.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 92 / 148
Eulerian and Hamiltonian Digraphs
Definition
A connected digraph is Eulerian if it contains a closed trail that
includes every arc; such a trail is an Eulerian trail.
A connected digraph is Hamiltonian if it contains a cycle that
includes every vertex; such a cycle is a Hamiltonian cycle.

Example
Consider the following four digraphs

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 93 / 148
...Cont’d

Digraph (a) is Eulerian, an Eulerian trail is abcdef gcegf a and


Hamiltonian, a Hamiltonian cycle is abcdegf a.

Digraph (b) is Eulerian, an Eulerian trail is bcgf egb, and it is not


Han1iltonian.

Digraph (c) is Hamiltonian, a Hamiltonian cycle is bcdegf b, and it is


not Eulerian.

Digraph (d) is neither Eulerian nor Hamiltonian.

Theorem
(1) A connected digraph is Eulerian if and only if, for each vertex, the
out-degree equals the in-degree.

(2) An Eulerian digraph can be split into cycles, no two of which have an
arc in common.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 94 / 148
Weighted Graphs and Their Applications

Definition
A weighted graph G is a graph in which each edge e has been assigned a
nonnegative number w(e) called the weight (or length) of e.

Example
The graph given below shows a weighted graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 95 / 148
...Cont’d
Definition
The weight (or length) of a path in a weighted graph G is defined to be
the sum of the weights of the edges in the path.

Remark
A weighted digraph is called a network.

Definition
A graph ( or digraph) is known as a weighted graph (or digraph) if each
edge of the graph has some weights.

Example
Consider V = {1, 2, 3, 4, 5} and E = {e1 , e2 , e3 , e4 , e5 }, where
e1 = (1, 2), e2 = (1, 3), e3 = (2, 4), e4 = (3, 4), e5 = (4, 5) and
w(e1 ) = 5, w(e2 ) = 6, w(e3 ) = 1, w(e4 ) = 6, w(e5 ) = 3.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 96 / 148
...Cont’d

Hence, the weighted graph G becomes

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 97 / 148
TREES
Definition
A tree is a connected undirected graph with no simple circuits. A tree
cannot contain multiple edges or loops. Therefore, any tree must be a
simple graph.

Theorem
An undirected graph G is a tree if and only if there is a unique simple path
between any two of its vertices. Any tree that has more than one vertex
has at least one vertex of degree 1.

If G is a tree, then G is bipartite, i.e., all of its vertices can be labelled


with either a or b so that every edge is an ab edge (no aa or bb
edges).
At each stage, the tree remains connected, so any two vertices must
be connected by at least one path.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 98 / 148
...Cont’d

However, they cannot be connected by more than one path, since any
two such paths would contain a cycle.

In particular, any two adjacent vertices are connected by exactly one


path the edge joining them. If this edge is removed, then there is no
path between the two vertices.

It follows that the removal of any edge of a tree disconnects the tree.
Moreover, any two vertices v and w are connected by a path, and the
addition of the edge vw produces a cycle, the cycle consisting of the
path and the added edge vw. So, joining any two vertices of a tree by
an edge creates a cycle.

Theorem
Let T be a tree with n vertices. Then the following statements are
equivalent.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 99 / 148
...Cont’d
(i) T is connected and has no cycles.

(ii) T has n − 1 edges and has no cycles.

(iii) Any two vertices in T are connected by exactly one path.

(iv) T is connected and the removal of any edge disconnects T.

(v) T contains no cycle but the addition of any new edge to T creates
exactly one cycle.

Definition
Graphs containing no simple circuits that are not necessarily connected are
called forests and have the property that each of their connected
components is a tree.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 100 / 148
...Cont’d

F The following is an example of a forest.

Definition
A rooted tree is a tree in which one vertex has been designated as the
root and every edge is directed away from the root.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 101 / 148
...Cont’d

F A rooted tree has the following fundamental terminologies.

(a) Node: The main component of a tree is the node. This stores the
actual data and links to the other node.
(b) Child: Child of a node is the immediate successor of a node.
Child, which is at the left side, is called left child and the child, which
is at the right side, is called right child.
(c) Parent: Parent of a node is the immediate predecessor of a node.
(d) Root: A node that has no parent is termed as the root of the tree.
(e) Leaf: The node which is at the end and which doesn’t have any child
is called leaf node. Leaf node is also termed as terminal node and
external node.
(f) Level: The level of a vertex v in a rooted tree is the length of the
unique path from the root to this vertex. The level of the root is
defined to be zero.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 102 / 148
...Cont’d

(g) Height: The height h of a rooted tree is the maximum of the levels
of vertices. In other words, the height h of a rooted tree is the length
of the longest path from the root to any vertex.
F Consider the rooted tree (with root a) given below.

F Height of the rooted tree=maximum level=3.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 103 / 148
...Cont’d

(h) Sibling: The nodes, which have the same parent, are termed as
siblings. In the above figure h and i are siblings. Similarly, l and m
are siblings.

(i) Ancestor: The ancestors of a vertex other than the root are the
vertices in the path from the root to this vertex, excluding the vertex
itself and including the root (that is, its parent, its parent’s parent,
and so on, until the root is reached).

F The descendants of a vertex v are those vertices that have v as


an ancestor. Vertices that have children are called internal vertices.

F The root is an internal vertex unless it is the only vertex in the


graph G, in which case it is a leaf. If a is a vertex in a tree, the
subtree with a as its root is the subgraph of the tree consisting of a
and its descendants and all edges incident to these descendants.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 104 / 148
...Cont’d

Example

F In the rooted tree T (with root a) shown below, find the parent of c,
the children of g, the siblings of h, all ancestors of e, all descendants of b,
all internal vertices, and all leaves. What is the subtree rooted at g?

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 105 / 148
...Cont’d

Solution: The parent of c is b. The children of g are h, i, and j.


The siblings of h are i and j. The ancestors of e are c, b, and a.
The descendants of b are c, d, and e. The internal vertices are
a, b, c, g, h, and j. The leaves are d, e, f, i, k, l, and m.
The subtree rooted at g is given by

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 106 / 148
...Cont’d

Definition
A rooted tree is called an m-ary tree if every internal vertex has no
more than m children.
The tree is called a full m-ary tree if every internal vertex has exactly
m children.
An m-ary tree with m = 2 is called a binary tree. A binary tree is a
rooted tree in which every parent has at most two children.
A complete m-ary tree is a full m-ary tree in which every leaf is at
the same level.
A rooted m-ary tree of height h is balanced if all leaves are at
levels h or h − 1.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 107 / 148
...Cont’d

Example
Are the rooted trees in the figure below full m-ary trees? m ∈ Z+ .

Solution:
T1 is a full binary tree because each of its internal vertices has two
children. T2 is a full 3-ary tree because each of its internal vertices has
three children. In T3 each internal vertex has five children, so T3 is a full
5-ary tree. T4 is not a full m-ary tree for any m because some of its
internal vertices have two children and others have three children.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 108 / 148
...Cont’d

Example
Which of the rooted trees shown below are balanced?

Solution:
T1 is balanced, because all its leaves are at levels 3 and 4. However, T2 is
not balanced, because it has leaves at levels 2, 3, and 4. Finally, T3 is
balanced, because all its leaves are at level 3.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 109 / 148
...Cont’d

In a binary tree, if an internal vertex has two children, the first child is
called the left child and the second child is called the right child.

The tree rooted at the left child of a vertex is called the left subtree
of this vertex, and the tree rooted at the right child of a vertex is
called the right subtree of the vertex.

Theorem
A tree with n vertices has e = n − 1 edges.

Theorem
If m is a positive integer and T is a full m-ary tree with k internal vertices,
then T has a total of n = mk + 1 vertices and has l = (m − 1)k + 1
terminal vertices (leaves).

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 110 / 148
...Cont’d

Proof.
Suppose k is a positive integer and T is a full m-ary tree with k internal
vertices.
Observe that the set of all vertices of T can be partitioned into two
disjoint subsets: the set of all vertices that have a parent and the set of all
vertices that do not have a parent.
Now there is just one vertex that does not have a parent, namely the root.
Also, since every internal vertex of a full m-ary tree has exactly m
children, the number of vertices that have a parent is m times the number
of parents, or mk, since each parent is an internal vertex.
Hence, [the total number of vertices of T]=[the number of vertices that
have a parent]+[the number of vertices that do not have a parent]
= mk + 1.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 111 / 148
...Cont’d

But it is also true that the total number of vertices of T equals the
number of internal vertices plus the number of terminal vertices.

Thus, [the total number of vertices of T]=[the number of internal


vertices]+[the number of terminal vertices] = k + [the number of
terminal vertices].

Now equate the two expressions for the total number of vertices of T:
mk + 1 = k+ [the number of terminal vertices].

Solving this equation gives, [the number of terminal vertices]


= (mk + 1) − k = (m − 1)k + 1.

Thus, the total number of vertices is n = mk + 1 and the number of


terminal vertices is l = (m − 1)k + 1.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 112 / 148
...Cont’d

Theorem
A full m-ary tree with
(i) n vertices has k = (n − 1)/m internal vertices and
l = [(m − 1)n + 1]/m leaves.

(ii) k internal vertices has n = mk + 1 vertices and l = (m − 1)k + 1


leaves.

(iii) l leaves has n = (ml − 1)/(m − 1) vertices and k = (l − 1)/(m − 1)


internal vertices.

Example
Suppose that someone starts a chain letter. Each person who receives the
letter is asked to send it on to four other people. Some people do this, but
others do not send any letters.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 113 / 148
...Cont’d
How many people have seen the letter, including the first person, if
no one receives more than one letter and if the chain letter ends after
there have been 100 people who read it but did not send it out?
How many people sent out the letter?
Solution:
The chain letter can be represented using a 4-ary tree. The internal
vertices correspond to people who sent out the letter, and the leaves
correspond to people who did not send it out. Because 100 people did
not send out the letter, the number of leaves in this rooted tree is
l = 100.
Hence, the number of people who have seen the letter is
n = (4 ∗ 100 − 1)/(4 − 1) = 133.
Also, the number of internal vertices is k = 133 − 100 = 33.
So, 33 people sent out the letter.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 114 / 148
...Cont’d
Theorem
There are at most mh leaves in an m-ary tree of height h.

Proof.
First, consider m-ary trees of height 1. These trees consist of a root with
no more than m children, each of which is a leaf. Hence, there are no
more than m1 = m leaves in an m-ary tree of height 1.
Assume that it is true for all m-ary trees of height less than h.
Let T be an m-ary tree of height h. The leaves of T are the leaves of the
subtrees of T obtained by deleting the edges from the root to each of the
vertices at level 1.
Each of these subtrees has height less than or equal to h − 1. So, each of
these rooted trees has at most mh−1 leaves. Because there are at most m
such subtrees, each with a maximum of mh−1 leaves, there are at most
m ∗ mh−1 = mh leaves in the rooted tree.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 115 / 148
...Cont’d

Corollary
 
If an m-ary tree of height h has l leaves,
 then
 h ≥ log m l
 .If the m-ary
tree is full and balanced, then h = logm l . (Recall that x is the
smallest integer greater than or equal to x.)

Proof.
We know that l ≤ mh . Taking logarithms to the base
 m shows
 that
logm l ≤ h. Because h is an integer, we have h ≥ logm l .
Now suppose that the tree is balanced. Then each leaf is at level h or h1,
and because the height is h, there is at least one leaf at level h. It follows
that there must be more than mh−1 leaves. Because l ≤ mh , we have
mh−1 < l ≤ mh . Taking logarithms to the base m in this inequality gives
h − 1 < logm l ≤ h. Hence, h = logm l .

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 116 / 148
...Cont’d

Definition
Let G be a connected graph. Then a spanning tree in G is a subgraph of
G that includes every vertex of G and is also a tree.

Example
The following diagram shows a graph G and three of its spanning trees.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 117 / 148
...Cont’d

Given a connected graph G, we can construct a spanning tree by


using either of the following two methods.

(i) Building-up method: Select edges of the graph G one at a time, in


such a way that no cycles are created; repeat this procedure until all
vertices are included.

In the above graph G, we select the edges vz, wx, xy, yz, then no
cycles are created.
We obtain the following spanning tree.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 118 / 148
...Cont’d

(ii) Cutting-down method: Choose any cycle and remove any one of its
edges; repeat this procedure until no cycles remain.
F From the above graph G, we remove the edges vy (destroying the cycle
vwyv), yz (destroying the cycle vwyzv), xy (destroying the cycle wxyw).

We obtain the following spanning tree.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 119 / 148
Application of Graphs

Minimal Spanning Trees

Definition
A minimal spanning tree in a connected weighted graph is a spanning
tree that has the smallest possible sum of weights of its edges.

Algorithms for Minimum Spanning Trees

(A) Kruskal’s Algorithm

To find a minimal spanning tree T of a connected weighted graph G


where G has n vertices (in which case T must have n − 1 edges).

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 120 / 148
...Cont’d

The procedures are: The input is a connected weighted graph G with


n vertices.

Step 1: Arrange the edges in G in non-decreasing order of their


weights.

Step 2: Choose an edge in G with the minimum weight.

Step 3: Add an edge of least weight to T if it does not form a cycle


with the edges already selected.

Step 4: Repeat step 3 until the number of edges selected is n − 1,


where n denotes the number of vertices in G.

Step 5: Exit

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 121 / 148
...Cont’d
Example
Using Kruskal’s Algorithm, find a minimal spanning tree for the following
graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 122 / 148
...Cont’d
Solution:
Step 1: Arrange the edges in non-decreasing order of their weights.

Step 2: Choose edge (a, b) since it has the smallest weight, include
it in T.

Step 3: An edge with the next smallest weight is (a, d). It does not
form a cycle with the edge in T, so include it in T.

Step 4: Edge (b, d) forms a cycle with the edges in T; discard it.

Step 5: Edge (b, e) does not produce a cycle with the edges in T;
include it in T.

Step 6: Edge (a, e) creates a cycle; reject it.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 123 / 148
...Cont’d
Step 7: Edge (c, e) is selected.
Step 8: Edge (b, c), (c, d), (d, e) and (a, c) form a cycle, and
rejected.

The weight of the minimal spanning tree is 7 + 10 + 11 + 12 = 40.


By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 124 / 148
...Cont’d

Exercise
Using Kruskal’s Algorithm, find a minimal spanning tree of the following
weighted graph.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 125 / 148
...Cont’d
(B) Prim’s Algorithm
Another method for finding a minimal spanning tree T, Prim’s
Algorithm, was discovered by the American engineer Robert Clay
Prim in 1957.
F The following steps outline it.
Step 1: Arrange the edges in non-decreasing order of their weights.
Step 2: Choose an edge with the least weight.
Step 3: Include it in T.
Step 4: Select an edge of least weight that is incident with a vertex
of an edge in T.
Step 5: If it does not create a cycle with the edges in T, then include
it in T; otherwise, discard it.
Step 6: Repeat steps 4 and 5 until T contains n − 1 edges.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 126 / 148
...Cont’d

Example
Using Prim’s Algorithm, construct a minimal spanning tree for the graph
given below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 127 / 148
...Cont’d
Solution:
Step 1: Arrange the edges in non-decreasing order of weights.

Step 2: Choose an edge with the least weight: (a, b).


Step 3: Include it in T.
Step 4: Select a lightest edge incident with a or b. Edges (a, d) &
(b, d) are two candidates. Neither of them forms a cycle (a, b), so
select one of them, say, (b, d).
Step 5: Adjoin it to T.
Step 6: Look for a lightest edge incident with a vertex in T; (a, d).
Step 7: Edge (a, d) creates a cycle in T; reject it.
Step 8: Edge (b, e) is the next candidate.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 128 / 148
...Cont’d
Step 9: Add it to T.
Step 10: Look for an edge incident with a vertex in T; (a, e) & (c, e)
are two possibilities.
Step 11: Edge (a, e) forms a cycle in T, so discard it.
Step 12: (c, e) does not produce a cycle, so include it in T.
T now contains 4 edges.
The weight of the minimal spanning tree is 7 + 10 + 11 + 12 = 40.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 129 / 148
...Cont’d
Remark
A connected weighted graph may have more than one minimal spanning
tree. Nonetheless, they weigh the same.

Shortest Path Problems

An algorithm discovered by the Dutch Mathematician Edsger Wybe


Dijkstra in 1959.

Dijkstra’s Algorithm

F The basic steps of the algorithm are:


Step 1: To each vertex
( v of G assign a label as follows:
0, if v = a(the initial vertex)
L(v) =
∞, if v 6= a.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 130 / 148
...Cont’d

F Define a set S − {a}

Step 2: Let v be a vertex of G which has most recently been added


into S and consider each vertex v not in S.
Then label v as follows.
(
L(u) + w(u, v), if L(u) + w(u, v) < L(v)
L(v) =
L(v), otherwise .

Step 3: Choose among the vertices not in S, a vertex v with the


smallest label and add it to S.
The choice could be also from vertices which are not in S but
necessary adjacent to the vertex u.

Step 4: Repeat step 2 and 3 until the destination vertex Z is added.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 131 / 148
...Cont’d

Example
What is the length of the shortest path between a to z in the weighted
graph given below.

Solution:
Step 1: Initialization
L(a) = 0, L(v) = ∞, ∀v ∈ V (G) − {a}
S = {a}
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 132 / 148
...Cont’d

Step 2: The labeled vertices adjacent to a are b and c.

L(b) = min{∞, L(a) + W (a, b)}

L(b) = min{∞, 0 + 4}
L(b) = min{∞, 4}
L(b) = 4.
and

L(c) = min{∞, L(a) + W (a, c)}

L(c) = min{∞, 0 + 2}
L(c) = min{∞, 2}
L(c) = 2.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 133 / 148
...Cont’d
Step 3: vertex c is the one with the smallest label w/c is not yet in S.
Add c into S, i.e, S = {a, c}.
z is not yet in S, and then continues.
Vertices adjacent to c not in S are b, d and e.
L(b) = min{4, L(c) + W (c, b)}
L(b) = min{4, 2 + 1}
L(b) = min{4, 3}
L(b) = 3.

L(d) = min{∞, L(c) + W (c, d)}


L(d) = min{∞, 2 + 8}
L(d) = min{∞, 10}
L(d) = 10.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 134 / 148
...Cont’d

L(e) = min{∞, L(c) + W (c, e)}


L(e) = min{∞, 2 + 10}
L(e) = min{∞, 12}
L(e) = 10.

Step 4: vertex b is with minimum label which is not yet in S, add b


into S, i.e, S = {a, c, b}.
A vertex adjacent to b not an element of S is d.
L(d) = min{10, L(b) + W (b, d)}
L(d) = min{10, 3 + 5}
L(d) = min{10, 8}
L(d) = 8.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 135 / 148
...Cont’d
Step 5: L(d) is updated (i.e, from 10 to 8).
Add d into S (i.e, S = {a, c, b, d})
Vertices adjacent to d not in S are e and z.
L(e) = min{12, L(d) + W (d, e)}
L(e) = min{12, 8 + 2}
L(e) = min{12, 10}
L(e) = 10.

L(z) = min{∞, L(d) + W (d, z)}


L(z) = min{∞, 8 + 6}
L(z) = min{∞, 14}
L(z) = 14.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 136 / 148
...Cont’d

Step 6: vertex e is the one with smallest label which is not yet in S.
Add e in to S (i.e, S = {a, c, b, d, e}.)
z is not yet in S (continues).
Vertex adjacent to e not in S is z.

L(z) = min{14, L(e) + W (e, z)}

L(z) = min{14, 10 + 3}
L(z) = min{14, 13}
L(z) = 13.
Now, z is the next selected vertex, i.e, S = {a, c, b, d, e, z}.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 137 / 148
...Cont’d

The shortest path from a to z is the unique path in the sub graph S,
going a to z.
Its length or weight is L(z) = 13 and the shortest path is

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 138 / 148
...Cont’d

Exercise
Find the shortest path from S to T and the shortest distance from S to T
for the following weighted digraphs.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 139 / 148
...Cont’d
Critical Path Problems

Definition
The sequence of critical activities in a network is called the critical path.
It is the longest path from the starting event to the ending event in the
network that defines the minimum time required to complete the project.
This path identifies all the critical activities of the project and it is
denoted by double line in the network. For the activity (i, j) to lie on the
critical path, the following conditions must be satisfied:

(i) ESi = LFi


(ii) ESj = LFj
(iii) ESj − ESi = LFj − LFi = tij , where ESi and ESj are the earliest
start and finish time of event i and j; LFi and LFj are the latest
start and finish time of event i and j.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 140 / 148
...Cont’d

F The procedure/method of finding the critical path in the network is


called the critical path method. The iterative procedure of determining
the critical path is as follows:

Step 1: List all the jobs and then draw arrow (network) diagram.
Each job is included by an arrow with the direction of the arrow
showing the sequence of jobs.
The length of the arrows has no significance. The arrows are placed
based on the predecessor, successor and concurrent relation within the
job.
Step 2: Indicate the normal time (tij ) for each activity (i, j) above
the arrow which is deterministic.

Step 3: Calculate the earliest start time and earliest finish time for
each event and write the earliest time Ei for each event i.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 141 / 148
...Cont’d
Step 4: Tabulate the various times namely normal time, earliest time
and latest time on the arrow diagram.
Step 5: Determine the total float for each activity by taking the
difference between the earliest start and latest start time.
Step 6: Identify the critical activities and connect them with the
beginning event and the ending event in the network diagram by
double line arrow, which gives the critical path.
Step 7: Calculate the total project direction.
To find the earliest time we consider the tail event of the activity. Let
the starting time of the project, namely ES1 = 0.
Add the normal time with the starting time to get the earliest finish
time. The earliest starting time for the tail event of the next activity
is given by the maximum of the earliest time for the head event of the
previous activity.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 142 / 148
...Cont’d
Similarly, to get the latest time, we consider the head event of the
activity.
The latest finish time of the head event of final activity is given by
the target time of the project.
The latest start time can be obtained by subtracting normal time of
that activity.
The latest finish time for the head event of the next activity is given
by the minimum of the latest start time for the tail event of the
previous activity.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 143 / 148
...Cont’d

Example
Find the critical path for a project network shown below.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 144 / 148
...Cont’d
Solution:

First we calculate the value of the earliest start time (ESi ) and the
earliest finish time (ESj ). The earliest time for the event ij’s
calculated by Ej = max(ESi + tij ). Thus, we have

E1 = ES1 = 0. This is obtained by letting ES1 = 0.

E2 = ES2 = ES1 + t12 = 0 + 4 = 4


E3 = ES3 = ES1 + t13 = 0 + 1 = 1
E4 = ES4 = max(ES2 + t24 , ES3 + t34 )
= max(4 + 1, 1 + 1) = max(5, 2) = 5
E5 = ES5 = ES3 + t35 = 1 + 6 = 7
E6 = ES6 = ES5 + t56 = 7 + 4 = 11
E7 = ES7 = ES5 + t57 = 7 + 8 = 15
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 145 / 148
...Cont’d

E8 = ES8 = max(ES6 + t68 , ES7 + t78 ) = max(11 + 1, 15 + 2)


= max(12, 17) = 17
E9 = ES9 = ES4 + t49 = 5 + 5 = 10
E10 = ES10 = max(ES9 + t9 10 , ES8 + t8 10 )
= max(10 + 7, 17 + 5) = max(17, 22) = 22.

Next we calculate the latest start time and the latest finish time.
The latest time Li for an event i is obtained by

Li = min(LFj − tij ),

where LFj is the latest finish time for the event j and tij is the
normal time of the activity.
Hence, we start with L10 = 22 and L10 − t9 10 = 22 − 7 = 15.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 146 / 148
...Cont’d

L8 = L10 − t8 10 = 22 − 5 = 17

L7 = L8 − t78 = 17 − 2 = 15

L6 = L8 − t68 = 17 − 1 = 16

L5 = min(L6 − t56 , L7 − t57 ) = min(16 − 4, 15 − 8) = 7

L4 = L9 − t49 = 15 − 5 = 10

L3 = min(L4 − t34 , L5 − t35 ) = min(10 − 1, 7 − 6) = 1

L2 = L4 − t24 = 10 − 1 = 9

L1 = min(L2 − t12 , L3 − t13 ) = min(9 − 4, 1 − 1) = 0.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 147 / 148
...Cont’d

Therefore, we obtain the critical path to be

1 → 3 → 5 → 7 → 8 → 10

as shown by double arrows in the following network with the total


project duration of 22.

By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 148 / 148

You might also like