0% found this document useful (0 votes)
20 views23 pages

Presentation (Graph Theory)

The presentation by Dugassa Bekele at Wallaga University focuses on Kruskal's Algorithm, a method for finding the Minimum Spanning Tree (MST) in a connected, undirected, weighted graph. It covers preliminary concepts, the algorithm's steps, and applications, along with a historical overview of Joseph Kruskal's contributions. Additionally, it briefly compares Kruskal's Algorithm with other MST algorithms like Prim's and Reverse-Deletion.

Uploaded by

Dugasa Bekele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views23 pages

Presentation (Graph Theory)

The presentation by Dugassa Bekele at Wallaga University focuses on Kruskal's Algorithm, a method for finding the Minimum Spanning Tree (MST) in a connected, undirected, weighted graph. It covers preliminary concepts, the algorithm's steps, and applications, along with a historical overview of Joseph Kruskal's contributions. Additionally, it briefly compares Kruskal's Algorithm with other MST algorithms like Prim's and Reverse-Deletion.

Uploaded by

Dugasa Bekele
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Wallaga University

College of Natural and Computational Science


Department of Mathematics

Graph Theory and Algorithm(PhD)

Presentation Topic : Kruskal’s Algorithms

By:Dugassa Bekele

February 5, 2025
Outlines Of Presentation
 Preminary Concepts
 Undirected Graph
 Connected Graph
 Weighted Graph
 Tree
 Spanning Tree
 Minimum Spanning Tree
 Algorithms
 Algorithms used to determine MST
 Kruskal’s Algorithm with Examples
 Application of Kruskal’s Algorithm
Preminary Concepts

 Undirected graph: A graph with edges do not have an associated direction.


 Weighted Graph: A graph with weight(values) associated with each edges.

 Tree: tree is a connected acyclic graph.


 Spanning Tree: is a tree that contains every vertices of a connected graph
 If graph G is connected graph with n vertices and e edges ,then
the spanning tree of graph G must have:
 n-1 edges and
 the number of edges deleted from the graph to obtain the spanning
tree is equal to e-n+1.
Cont..
 Minimum spanning Tree: The minimum spanning tree of weighted, connected,
undirected graph G is a graph T consists of all vertices of graph G together with
enough edges of such that:
I. T is connected
II. T is acyclic
III. T has Minimal weight
Example: Consider the graph given below:
Graph Algorithm
An algorithm is a step-by-step procedure to solve
a given problem
It is a finite set of instructions working on some
input to produce some useful output.
A graph algorithm works on graphs to find a
solution to a problem represented by the graphs.
Algorithms Used To Metermine Minimum Spanning Trees

• The most common algorithms used to find a Minimum Spanning


Tree (MST) in a graph are Prim's algorithm and Kruskal's algorithm.
• There are basic algorithms used for finding minimum-weighted
spanning tree :
 Kruskal’s Algorithm
 Prim’s Algorithm
 Reverse-Deletion Algorithm
Kruskal’s Algorithm: The Kruskal algorithm is used to find the minimum spanning tree (MST)
of a connected, undirected, weighted graph. It works by sorting the edges in non-decreasing
order of their weight, and then selecting edges one by one if they do not form a cycle with
the previously selected edges.
Start with no vertices or edges in the spanning tree, and repeatedly add the smallest weight
edge that does not create a cycle.
In this algorithm ,we provide the spanning tree to consists of edge only.
Cont…
• Joseph Kruskal was an American Mathematician, Statistician and Computer Science
scientist, who worked in Combinatorics and Graph Theory.
• He was earning his a Bachelor of science in mathematics in the year of 1948 and
Master of Science in Mathematics in 1949 at Chicago university
• And also he completed his PhD in Mathematics in 1954 at University of Princeton.
• Joseph Kruskal first published Kruskal's algorithm in 1956.
• Loberman and Weinberger rediscovered the algorithm in 1957.
• Joseph Kruskal's most significant contribution to mathematics is the development of
"Kruskal's Algorithm," a fundamental algorithm in graph theory used to find the
Minimum Spanning Tree (MST) within a weighted graph

• In statistic Kruskal’s most infuential works is his seminal contribution to the formulation
of multidimensional scaling
• In computer science his best known work is Kruskal’s Algorithm for computing of the
MST of weighted graph.
• He Died in September 19, 2010
Cont…
Algorithm Of Kruskal’s
1: Input : A connected weighted graph G // G = (V, E,w)
2: Output :A minimum spanning tree T // MST T of G
3: T ← Ø
4: Q ←sorted edges in non-decreasing weights of E
5: while Q = Ø do \\continue until all edges are checked
6: pick an edge (u, v) from Q
7: if (u, v) does not make a cycle with vertices in T then
8: add (u, v) to T
9: end if
10: end while
Thus, finding an edge of smallest weighted can be done just by sorting the edges.
Cont…
Example of Kruskal’s Algorithm
Consider the undirected weighted graph given
below:

 None of the edges are highlighted


Cont…
1. AD and CE are the
smallest edges , with
length 5, and AD has
been arbitrary chosen
and it highlighted
2. CE is now the smallest
edge that does not
form a cycle with length
5, and it is highlighted
as second edge
Cont…
3. The next smallest edge is DF
with length 6 and it is highlighted.

4. The next smallest edges are


AB and BE with the same length 7
and AB is chosen arbitrary and it
is highlighted.
Here the edge BD has been
highlighted by red, b/c if it were
chosen it would form a cycle
(ABD)
Cont…
5. The process continues
highlighted the next smallest edge
BE with length 7.Here many more
edges are highlighted in red at this
stage: BC b/c it forms a cycle BCE, DE
it forms a cycle DEBA, and FE b/c it
forms a cycle FEBAD.
6. Finally, the process finishes with
the edge EG of length 9, and it
highlighted.
Thus, the minimum spanning tree is
obtained with edges highlighted in
green and it has weight 39.
Prim’s Algorithm
 Prim’s Algorithm: start with any one vertex in
the spanning tree, and rapidly add the
smallest weight edge, and the vertex it leads
to, for which the vertex is not already in the
spanning tree.
 In this algorithm, we consists of both vertices
and edges.
Cont…
Algorithm Of Prim’s
1: Input : G(V, E, w)
2: Output : MST T (V, ET ) of G
3: VT ← {s} // s is the vertex selected
4: T ← Ø
5: while VT = V do // continue until all vertices are visited
6: select the edge (u, v) with minimal weight such that u ∈ T
and v ∈ G \ T
7: VT ← VT ∪ {v}
8: ET ← ET ∪ {(u, v)}
9: end while
Cont..
Example Of Prim’s Algorithm

This our original weighted graph given.


Cont…
Cont…
Cont…
Reverse-Deletion Algorithm
Reverse-Deletion Algorithm: we can start with all edges of the
graph and delete edges that will never be included in the MST
until we have a connected graph that has the tree property.
 I t is acyclic or has n − 1 edges.

 We delete edges in the order of decreasing weights as long as

removal of a such edge does not disconnect the graph since


any bridge of the graph should be contained in the MST.
Cont…
Reverse-Delete Algorithm

1: Input: An undirected weighted graph G = (V, E, w)

2: Output: An MST T of G

3: Sort edges of G in non-decreasing order into Q


4: Let T = G
5: Repeat
6: Dequeue the first edge (u, v) from Q

7: Remove (u, v) from T

8: If such removal leaves T disconnected then

9: Join (u, v) to T

10: Until Q = Ø
Cont…
Example Of Reverse-Delete
Cont…
.

THANK YOU FOR ATTENTION!

You might also like