Professional Documents
Culture Documents
Project 595
Project 595
Dahiru Abdurrahman
Theorem
1 If a connected graph G has exactly two vertices of odd degree, then G
has atleast one Euler path, but no circuit. Each Euler path must start
at one of the odd vertices and end at the other one.
2 If a connected graph G has no vertices of odd degree (all the vertices
of G has even degree) then G has atleast one Euler circuit (which by
definition is also an Euler path). The Euler circuit can start and end
at any vertex.
3 If a connected graph G has more than two vertices of odd degree,
then G has neither Euler path nor Euler circuit.
NOTE: The above theorem (Euler’s theorem) only indicate the existence
of an Euler’s path or Euler’s circuit in a graph but it does not tell us how
to find the Euler’s path or Euler’s circuit.
an Euler path), choose one of the vertices with odd degree as the
starting point (since the Euler path must start at one of these vertices
of odd degree and end at the other one). If G has no vertices of odd
degree (and therefore an Euler circuit), choose any vertex as the
starting point.
2 Assign numbers to the edges of the graph as you trace through the
Clearly the vertices a, d and e has even degree while the vertices b and c
has odd degree. So, G has exactly 2 vertices of odd degree and thus by
Euler’s theorem, G has an Euler path which must start at one of these odd
vertices and end at the other one. By using Fleury’s algorithm, we will
found that b → a → d → a → e → d → c → e → b → c
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 9 / 30
Example 2:
Detemine whether the following graph has an Euler path or Euler circuit
and if it has, use Fluery’s Algorithm to find one.
Clearly from the graph above all the vertices of G has an even degree and
so by Euler’s theorem G has an Euler circuit.
By using Fleury’s algorithm, we will found that
E →B→C →A→D→C →F →D→H→G →F →E
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 10 / 30
MATRIX TREE ALGORITHM
Example
Step 2: Replace all the diagonal entries of A with the degrees of the
vertices
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 12 / 30
3 1 1 1
1 2 0 1
A=
1
0 2 1
1 1 1 3
Step 3: Replace all the non-diagonal entries equals 1 with -1
3 −1 −1 −1
−1 2 0 −1
A= −1 0
2 −1
−1 −1 −1 3
Hence t(G ) = 8.
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 13 / 30
KRUSKAL’S ALGORITHM
In 1956, the American Mathematician Joseph Kruskal’s discovered the
procedure that will always yield a minimum spanning tree for a weighted
graph. The main idea of Kruskal’s Algorithm is to always choose the edge
with the smallest number (minimum weight) but avoid creating any circuit.
Below is the procedure for finding the minimum spanning tree from a
weighted graph:
1 Choose any edge with the minimum weight in the graph. If there is
more than one, choose any one at random. Mark it using any
designation.
2 Choose any edge with minimum weight from those not yet selected.
If there is more than one, pick any one at random and mark it with
any designation.
3 Continue to choose edges of minimum weight from those not yet
selected except selecting any edge that will create a circuit in the
subgraph until all vertices of the graph have been included. The tree
formed by the edges marked with the designation will give the desired
minimum spanning tree of the weighted graph.
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 14 / 30
Example
Use Kruskal’s Algorithm to find one minimum spanning tree in the
weighted graph below:
Example
Step 2: Now, we look at the edges that are incident to C and travel along
the edge with the least cost. Now, we travel along the edge CD as it has
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 21 / 30
the least cost among the other edges incident to C
Step 3: Now, we see that among the edges incident to D, the edge DE
has the least cost and so we travel along it.
Step 4: Among, the edges incident to E, we will see that EB and EC have
the least cost. But we have already visited the vertex C and so we travel
Dahiru Abdurrahman (KFUPM) Short title November 29, 2021 22 / 30
along the edge EB.
Example