
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































(spanning)
An undirected graph (^) Result of a BFS
starting from top
Result of a DFS starting from top
Minimum weight spanning tree (MST)
14
15
15
14
13 13 16
16
12 12
14 14
14
15
15
14
13 13 16
16
12 12
14 14
14
15
15
14
13 13 16
16
12 12
14 14
14
15
15
14
13 13 16
16
12 12
14 14
14
15
15
14
13 13 16
16
12 12
14 14
14
15
15
14
13 13 16
16
12 12
14 14
Skip
Skip {5,6} to avoid cycle
Skip
14
15
15
14
13 13 16
16
12 12
14 14
MST is formed
14
15
15
14
13 13 16
16
12 12
14 14
Start from any arbitrary vertex
14
15
15
14
13 13 16
16
12
14 14
Weight:
The best choice is {1,2}
12 What’s next?