Disccompbeamer
Disccompbeamer
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
♠ 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
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.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 11 / 148
...Cont’d
Example
Consider the graphs in (a) and (b) given below.
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
The order of G is |V | = 4.
The size of G is |E| = 8.
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).
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 17 / 148
...Cont’d
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 18 / 148
...Cont’d
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 19 / 148
Matrix Representation of a Graph
Adjacency Matrices
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.
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 correspondingto adjacencymatrix 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 .
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 24 / 148
...Cont’d
Incidence Matrices
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
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 27 / 148
...Cont’d
Isomorphism of Graphs
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
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
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
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.
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
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 38 / 148
...Cont’d
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.
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
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
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.
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.
Make the unlabelled graph G be labelled and try to find an Euler path.
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.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 51 / 148
...Cont’d
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.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 53 / 148
...Cont’d
Example
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 54 / 148
...Cont’d
Example
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.
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.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 57 / 148
...Cont’d
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.
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.
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.
(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
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:
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 64 / 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.
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 .
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:
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:
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
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.
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
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
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.
However, they cannot be connected by more than one path, since any
two such paths would contain a cycle.
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.
(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
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
(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.
(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).
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
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.
Now equate the two expressions for the total number of vertices of T:
mk + 1 = k+ [the number of terminal vertices].
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.
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
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).
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 119 / 148
Application of Graphs
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.
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 120 / 148
...Cont’d
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.
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.
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.
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.
Dijkstra’s Algorithm
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
L(b) = min{∞, 0 + 4}
L(b) = min{∞, 4}
L(b) = 4.
and
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.
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.
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, 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:
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
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
L4 = L9 − t49 = 15 − 5 = 10
L2 = L4 − t24 = 10 − 1 = 9
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 147 / 148
...Cont’d
1 → 3 → 5 → 7 → 8 → 10
By:Masreshaw Temere (MSc) Discrete Mathematics and Combinatorics August, 2021 148 / 148