SlideShare a Scribd company logo
Data Structures and
Algorithms
Week 8: Minimum Spanning Trees
Ferdin Joe John Joseph, PhD
Faculty of Information Technology
Thai-Nichi Institute of Technology, Bangkok
Week 8
• Minimum Spanning Trees
• Implementation in Java
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
2
Definition
• A Minimum Spanning Tree (MST) is a subgraph of
an undirected graph such that the subgraph spans
(includes) all nodes, is connected, is acyclic, and
has minimum total edge weight
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
3
Algorithm Characteristics
• Both Prim’s and Kruskal’s Algorithms work with
undirected graphs
• Both work with weighted and unweighted graphs but
are more interesting when edges are weighted
• Both are greedy algorithms that produce optimal
solutions
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
4
Prim’s Algorithm
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
5
Walk-Through
Initialize array
K dv pv
A F ∞ −
B F ∞ −
C F ∞ −
D F ∞ −
E F ∞ −
F F ∞ −
G F ∞ −
H F ∞ −
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
6
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Start with any node, say D
K dv pv
A
B
C
D T 0 −
E
F
G
H
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
7
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A
B
C 3 D
D T 0 −
E 25 D
F 18 D
G 2 D
H
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
8
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A
B
C 3 D
D T 0 −
E 25 D
F 18 D
G T 2 D
H
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
9
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A
B
C 3 D
D T 0 −
E 7 G
F 18 D
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
10
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A
B
C T 3 D
D T 0 −
E 7 G
F 18 D
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
11
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A
B 4 C
C T 3 D
D T 0 −
E 7 G
F 3 C
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
12
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A
B 4 C
C T 3 D
D T 0 −
E 7 G
F T 3 C
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
13
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A 10 F
B 4 C
C T 3 D
D T 0 −
E 2 F
F T 3 C
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
14
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A 10 F
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
15
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A 10 F
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H 3 G
2
Table entries unchanged
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
16
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A 10 F
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
17
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A 4 H
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
18
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A T 4 H
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
19
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Update distances of
adjacent, unselected
nodes
K dv pv
A T 4 H
B 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Table entries unchanged
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
20
4
25
A
H
B
F
E
D
C
G 7
2
10
18
3
4
3
7
8
9
3
10
Select node with minimum
distance
K dv pv
A T 4 H
B T 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
21
4
A
H
B
F
E
D
C
G
2
3
4
3
3
Cost of Minimum
Spanning Tree = Σ dv = 21
K dv pv
A T 4 H
B T 4 C
C T 3 D
D T 0 −
E T 2 F
F T 3 C
G T 2 D
H T 3 G
2
Done
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
22
Java Implementation
https://www.geeksforgeeks.org/prims-minimum-
spanning-tree-mst-greedy-algo-5/
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
23
Kruskal’s Algorithm
Work with edges, rather than nodes
Two steps:
– Sort edges by increasing edge weight
– Select the first |V| – 1 edges that do not
generate a cycle
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
24
Walk-Through
Consider an undirected, weight graph
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
25
Sort the edges by increasing edge weight
edge dv
(D,E) 1
(D,G) 2
(E,G) 3
(C,D) 3
(G,H) 3
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
26
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2
(E,G) 3
(C,D) 3
(G,H) 3
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
27
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3
(C,D) 3
(G,H) 3
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
28
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3
(G,H) 3
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Accepting edge (E,G) would create a cycle
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
29
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
30
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
31
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
32
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
33
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4 χ
(B,F) 4
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
34
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4 χ
(B,F) 4 χ
(B,H) 4
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
35
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4 χ
(B,F) 4 χ
(B,H) 4 χ
(A,H) 5
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
36
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G 3
2
4
6
3
4
3
4
8
4
3
10 edge dv
(B,E) 4 χ
(B,F) 4 χ
(B,H) 4 χ
(A,H) 5 √
(D,F) 6
(A,B) 8
(A,F) 10
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
37
Select first |V|–1 edges which do not
generate a cycle
edge dv
(D,E) 1 √
(D,G) 2 √
(E,G) 3 χ
(C,D) 3 √
(G,H) 3 √
(C,F) 3 √
(B,C) 4 √
5
1
A
H
B
F
E
D
C
G
2
3
3
3
edge dv
(B,E) 4 χ
(B,F) 4 χ
(B,H) 4 χ
(A,H) 5 √
(D,F) 6
(A,B) 8
(A,F) 10
Done
Total Cost = Σ dv = 21
4
}not
considere
d
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
38
Java Implementation
https://www.geeksforgeeks.org/kruskals-minimum-
spanning-tree-algorithm-greedy-algo-2/
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
39
Next Week
Search Algorithms
Lecture series for Data Structures and
Algorithms, Data Science and Analytics,
Thai-Nichi Institute of Technology
40

More Related Content

What's hot

geekgap.io webinar #1
geekgap.io webinar #1geekgap.io webinar #1
geekgap.io webinar #1
junior Teudjio
 
Recommendation algorithm using reinforcement learning
Recommendation algorithm using reinforcement learningRecommendation algorithm using reinforcement learning
Recommendation algorithm using reinforcement learning
Arithmer Inc.
 
Test for AI model
Test for AI modelTest for AI model
Test for AI model
Arithmer Inc.
 
Data Structure
Data StructureData Structure
Data Structuresheraz1
 
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Stacks in algorithems & data structure
Stacks in algorithems & data structureStacks in algorithems & data structure
Stacks in algorithems & data structure
faran nawaz
 
Tracking the tracker: Time Series Analysis in Python from First Principles
Tracking the tracker: Time Series Analysis in Python from First PrinciplesTracking the tracker: Time Series Analysis in Python from First Principles
Tracking the tracker: Time Series Analysis in Python from First Principles
kenluck2001
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
[系列活動] Machine Learning 機器學習課程
[系列活動] Machine Learning 機器學習課程[系列活動] Machine Learning 機器學習課程
[系列活動] Machine Learning 機器學習課程
台灣資料科學年會
 
4. Recursion - Data Structures using C++ by Varsha Patil
4. Recursion - Data Structures using C++ by Varsha Patil4. Recursion - Data Structures using C++ by Varsha Patil
4. Recursion - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil
widespreadpromotion
 
Week2: Programming for Data Analysis
Week2: Programming for Data AnalysisWeek2: Programming for Data Analysis
Week2: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
Johann Petrak
 
林守德/Practical Issues in Machine Learning
林守德/Practical Issues in Machine Learning林守德/Practical Issues in Machine Learning
林守德/Practical Issues in Machine Learning
台灣資料科學年會
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in java
Muhammad Aleem Siddiqui
 
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
Yuxin Su
 
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
Ichigaku Takigawa
 
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Alexandros Karatzoglou
 
Top-K Dominating Queries on Incomplete Data with Priorities
Top-K Dominating Queries on Incomplete Data with PrioritiesTop-K Dominating Queries on Incomplete Data with Priorities
Top-K Dominating Queries on Incomplete Data with Priorities
ijtsrd
 

What's hot (20)

geekgap.io webinar #1
geekgap.io webinar #1geekgap.io webinar #1
geekgap.io webinar #1
 
Recommendation algorithm using reinforcement learning
Recommendation algorithm using reinforcement learningRecommendation algorithm using reinforcement learning
Recommendation algorithm using reinforcement learning
 
Test for AI model
Test for AI modelTest for AI model
Test for AI model
 
Data Structure
Data StructureData Structure
Data Structure
 
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
16. Algo analysis & Design - Data Structures using C++ by Varsha Patil
 
7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil7. Tree - Data Structures using C++ by Varsha Patil
7. Tree - Data Structures using C++ by Varsha Patil
 
Stacks in algorithems & data structure
Stacks in algorithems & data structureStacks in algorithems & data structure
Stacks in algorithems & data structure
 
Tracking the tracker: Time Series Analysis in Python from First Principles
Tracking the tracker: Time Series Analysis in Python from First PrinciplesTracking the tracker: Time Series Analysis in Python from First Principles
Tracking the tracker: Time Series Analysis in Python from First Principles
 
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil13. Indexing MTrees - Data Structures using C++ by Varsha Patil
13. Indexing MTrees - Data Structures using C++ by Varsha Patil
 
[系列活動] Machine Learning 機器學習課程
[系列活動] Machine Learning 機器學習課程[系列活動] Machine Learning 機器學習課程
[系列活動] Machine Learning 機器學習課程
 
4. Recursion - Data Structures using C++ by Varsha Patil
4. Recursion - Data Structures using C++ by Varsha Patil4. Recursion - Data Structures using C++ by Varsha Patil
4. Recursion - Data Structures using C++ by Varsha Patil
 
8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil8. Graph - Data Structures using C++ by Varsha Patil
8. Graph - Data Structures using C++ by Varsha Patil
 
Week2: Programming for Data Analysis
Week2: Programming for Data AnalysisWeek2: Programming for Data Analysis
Week2: Programming for Data Analysis
 
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
Semantics2018 Zhang,Petrak,Maynard: Adapted TextRank for Term Extraction: A G...
 
林守德/Practical Issues in Machine Learning
林守德/Practical Issues in Machine Learning林守德/Practical Issues in Machine Learning
林守德/Practical Issues in Machine Learning
 
Data structures and algorithm analysis in java
Data structures and algorithm analysis in javaData structures and algorithm analysis in java
Data structures and algorithm analysis in java
 
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
[SIGIR17] Learning to Rank Using Localized Geometric Mean Metrics
 
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
Machine Learning and Model-Based Optimization for Heterogeneous Catalyst Desi...
 
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
 
Top-K Dominating Queries on Incomplete Data with Priorities
Top-K Dominating Queries on Incomplete Data with PrioritiesTop-K Dominating Queries on Incomplete Data with Priorities
Top-K Dominating Queries on Incomplete Data with Priorities
 

Similar to Data Structures and Algorithm - Week 8 - Minimum Spanning Trees

Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
Associate Professor in VSB Coimbatore
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection
aftab alam
 
Sorting_project_2.pdf
Sorting_project_2.pdfSorting_project_2.pdf
Sorting_project_2.pdf
VrushaliSathe2
 
Information technology syllabus
Information technology syllabusInformation technology syllabus
Information technology syllabus
Mustapher Matias
 
MS Thesis
MS ThesisMS Thesis
MS Thesis
Jatin Agarwal
 
MS Thesis
MS ThesisMS Thesis
MS Thesis
Jatin Agarwal
 
FDS_dept_ppt.pptx
FDS_dept_ppt.pptxFDS_dept_ppt.pptx
FDS_dept_ppt.pptx
SatyajitPatil42
 
presentation
presentationpresentation
presentationjie ren
 
Analysis of Tree in Computer Based Application
Analysis of Tree in Computer Based ApplicationAnalysis of Tree in Computer Based Application
Analysis of Tree in Computer Based Application
Nazmul Hyder
 
An optimal and progressive algorithm for skyline queries slide
An optimal and progressive algorithm for skyline queries slideAn optimal and progressive algorithm for skyline queries slide
An optimal and progressive algorithm for skyline queries slide
WooSung Choi
 
Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2
gregoryg
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
Pavithra Thippanaik
 
FAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case PrioritizationFAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case Prioritization
brenoafmiranda
 
Unsupervised learning networks
Unsupervised learning networksUnsupervised learning networks
Unsupervised learning networks
Dr. C.V. Suresh Babu
 
Hybrid predictive modelling of geometry with limited data in cold spray addit...
Hybrid predictive modelling of geometry with limited data in cold spray addit...Hybrid predictive modelling of geometry with limited data in cold spray addit...
Hybrid predictive modelling of geometry with limited data in cold spray addit...
Daiki Ikeuchi
 
pattern_evaluaiton_methods.ppt
pattern_evaluaiton_methods.pptpattern_evaluaiton_methods.ppt
pattern_evaluaiton_methods.ppt
NaniAnyam1
 
Multimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-AnsweringMultimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-Answering
NAVER D2
 
04-Data-Analysis-Overview.pptx
04-Data-Analysis-Overview.pptx04-Data-Analysis-Overview.pptx
04-Data-Analysis-Overview.pptx
Shree Shree
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
Victor Asanza
 

Similar to Data Structures and Algorithm - Week 8 - Minimum Spanning Trees (20)

final_presentation
final_presentationfinal_presentation
final_presentation
 
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
Comparative Study on DES and Triple DES Algorithms and Proposal of a New Algo...
 
Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection Compressing Graphs and Indexes with Recursive Graph Bisection
Compressing Graphs and Indexes with Recursive Graph Bisection
 
Sorting_project_2.pdf
Sorting_project_2.pdfSorting_project_2.pdf
Sorting_project_2.pdf
 
Information technology syllabus
Information technology syllabusInformation technology syllabus
Information technology syllabus
 
MS Thesis
MS ThesisMS Thesis
MS Thesis
 
MS Thesis
MS ThesisMS Thesis
MS Thesis
 
FDS_dept_ppt.pptx
FDS_dept_ppt.pptxFDS_dept_ppt.pptx
FDS_dept_ppt.pptx
 
presentation
presentationpresentation
presentation
 
Analysis of Tree in Computer Based Application
Analysis of Tree in Computer Based ApplicationAnalysis of Tree in Computer Based Application
Analysis of Tree in Computer Based Application
 
An optimal and progressive algorithm for skyline queries slide
An optimal and progressive algorithm for skyline queries slideAn optimal and progressive algorithm for skyline queries slide
An optimal and progressive algorithm for skyline queries slide
 
Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2Boetticher Presentation Promise 2008v2
Boetticher Presentation Promise 2008v2
 
Instance Based Learning in Machine Learning
Instance Based Learning in Machine LearningInstance Based Learning in Machine Learning
Instance Based Learning in Machine Learning
 
FAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case PrioritizationFAST Approaches to Scalable Similarity-based Test Case Prioritization
FAST Approaches to Scalable Similarity-based Test Case Prioritization
 
Unsupervised learning networks
Unsupervised learning networksUnsupervised learning networks
Unsupervised learning networks
 
Hybrid predictive modelling of geometry with limited data in cold spray addit...
Hybrid predictive modelling of geometry with limited data in cold spray addit...Hybrid predictive modelling of geometry with limited data in cold spray addit...
Hybrid predictive modelling of geometry with limited data in cold spray addit...
 
pattern_evaluaiton_methods.ppt
pattern_evaluaiton_methods.pptpattern_evaluaiton_methods.ppt
pattern_evaluaiton_methods.ppt
 
Multimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-AnsweringMultimodal Residual Learning for Visual Question-Answering
Multimodal Residual Learning for Visual Question-Answering
 
04-Data-Analysis-Overview.pptx
04-Data-Analysis-Overview.pptx04-Data-Analysis-Overview.pptx
04-Data-Analysis-Overview.pptx
 
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
⭐⭐⭐⭐⭐ Device Free Indoor Localization in the 28 GHz band based on machine lea...
 

More from Ferdin Joe John Joseph PhD

Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022
Ferdin Joe John Joseph PhD
 
Week 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud ComputingWeek 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Ferdin Joe John Joseph PhD
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Ferdin Joe John Joseph PhD
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Ferdin Joe John Joseph PhD
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Ferdin Joe John Joseph PhD
 
Hadoop in Alibaba Cloud
Hadoop in Alibaba CloudHadoop in Alibaba Cloud
Hadoop in Alibaba Cloud
Ferdin Joe John Joseph PhD
 
Cloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba CloudCloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba Cloud
Ferdin Joe John Joseph PhD
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approach
Ferdin Joe John Joseph PhD
 
Week 11: Programming for Data Analysis
Week 11: Programming for Data AnalysisWeek 11: Programming for Data Analysis
Week 11: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 10: Programming for Data Analysis
Week 10: Programming for Data AnalysisWeek 10: Programming for Data Analysis
Week 10: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 

More from Ferdin Joe John Joseph PhD (20)

Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022
 
Week 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud ComputingWeek 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud Computing
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud Computing
 
Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud Computing
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
 
Hadoop in Alibaba Cloud
Hadoop in Alibaba CloudHadoop in Alibaba Cloud
Hadoop in Alibaba Cloud
 
Cloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba CloudCloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba Cloud
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approach
 
Week 11: Programming for Data Analysis
Week 11: Programming for Data AnalysisWeek 11: Programming for Data Analysis
Week 11: Programming for Data Analysis
 
Week 10: Programming for Data Analysis
Week 10: Programming for Data AnalysisWeek 10: Programming for Data Analysis
Week 10: Programming for Data Analysis
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
 

Recently uploaded

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
enxupq
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 

Recently uploaded (20)

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 
一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单一比一原版(QU毕业证)皇后大学毕业证成绩单
一比一原版(QU毕业证)皇后大学毕业证成绩单
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 

Data Structures and Algorithm - Week 8 - Minimum Spanning Trees

  • 1. Data Structures and Algorithms Week 8: Minimum Spanning Trees Ferdin Joe John Joseph, PhD Faculty of Information Technology Thai-Nichi Institute of Technology, Bangkok
  • 2. Week 8 • Minimum Spanning Trees • Implementation in Java Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 2
  • 3. Definition • A Minimum Spanning Tree (MST) is a subgraph of an undirected graph such that the subgraph spans (includes) all nodes, is connected, is acyclic, and has minimum total edge weight Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 3
  • 4. Algorithm Characteristics • Both Prim’s and Kruskal’s Algorithms work with undirected graphs • Both work with weighted and unweighted graphs but are more interesting when edges are weighted • Both are greedy algorithms that produce optimal solutions Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 4
  • 5. Prim’s Algorithm Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 5
  • 6. Walk-Through Initialize array K dv pv A F ∞ − B F ∞ − C F ∞ − D F ∞ − E F ∞ − F F ∞ − G F ∞ − H F ∞ − 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 6
  • 7. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Start with any node, say D K dv pv A B C D T 0 − E F G H 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 7
  • 8. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A B C 3 D D T 0 − E 25 D F 18 D G 2 D H 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 8
  • 9. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A B C 3 D D T 0 − E 25 D F 18 D G T 2 D H 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 9
  • 10. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A B C 3 D D T 0 − E 7 G F 18 D G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 10
  • 11. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A B C T 3 D D T 0 − E 7 G F 18 D G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 11
  • 12. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A B 4 C C T 3 D D T 0 − E 7 G F 3 C G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 12
  • 13. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A B 4 C C T 3 D D T 0 − E 7 G F T 3 C G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 13
  • 14. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A 10 F B 4 C C T 3 D D T 0 − E 2 F F T 3 C G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 14
  • 15. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A 10 F B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 15
  • 16. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A 10 F B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H 3 G 2 Table entries unchanged Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 16
  • 17. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A 10 F B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 17
  • 18. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A 4 H B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 18
  • 19. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A T 4 H B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 19
  • 20. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Update distances of adjacent, unselected nodes K dv pv A T 4 H B 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Table entries unchanged Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 20
  • 21. 4 25 A H B F E D C G 7 2 10 18 3 4 3 7 8 9 3 10 Select node with minimum distance K dv pv A T 4 H B T 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 21
  • 22. 4 A H B F E D C G 2 3 4 3 3 Cost of Minimum Spanning Tree = Σ dv = 21 K dv pv A T 4 H B T 4 C C T 3 D D T 0 − E T 2 F F T 3 C G T 2 D H T 3 G 2 Done Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 22
  • 23. Java Implementation https://www.geeksforgeeks.org/prims-minimum- spanning-tree-mst-greedy-algo-5/ Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 23
  • 24. Kruskal’s Algorithm Work with edges, rather than nodes Two steps: – Sort edges by increasing edge weight – Select the first |V| – 1 edges that do not generate a cycle Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 24
  • 25. Walk-Through Consider an undirected, weight graph 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 25
  • 26. Sort the edges by increasing edge weight edge dv (D,E) 1 (D,G) 2 (E,G) 3 (C,D) 3 (G,H) 3 (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 26
  • 27. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 (E,G) 3 (C,D) 3 (G,H) 3 (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 27
  • 28. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 (C,D) 3 (G,H) 3 (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 28
  • 29. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 (G,H) 3 (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Accepting edge (E,G) would create a cycle Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 29
  • 30. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 30
  • 31. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 31
  • 32. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 32
  • 33. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 33
  • 34. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 χ (B,F) 4 (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 34
  • 35. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 χ (B,F) 4 χ (B,H) 4 (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 35
  • 36. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 χ (B,F) 4 χ (B,H) 4 χ (A,H) 5 (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 36
  • 37. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 3 2 4 6 3 4 3 4 8 4 3 10 edge dv (B,E) 4 χ (B,F) 4 χ (B,H) 4 χ (A,H) 5 √ (D,F) 6 (A,B) 8 (A,F) 10 Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 37
  • 38. Select first |V|–1 edges which do not generate a cycle edge dv (D,E) 1 √ (D,G) 2 √ (E,G) 3 χ (C,D) 3 √ (G,H) 3 √ (C,F) 3 √ (B,C) 4 √ 5 1 A H B F E D C G 2 3 3 3 edge dv (B,E) 4 χ (B,F) 4 χ (B,H) 4 χ (A,H) 5 √ (D,F) 6 (A,B) 8 (A,F) 10 Done Total Cost = Σ dv = 21 4 }not considere d Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 38
  • 39. Java Implementation https://www.geeksforgeeks.org/kruskals-minimum- spanning-tree-algorithm-greedy-algo-2/ Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 39
  • 40. Next Week Search Algorithms Lecture series for Data Structures and Algorithms, Data Science and Analytics, Thai-Nichi Institute of Technology 40