Presentation is loading. Please wait.

Presentation is loading. Please wait.

Connected Components Minimum Spanning Tree

Similar presentations


Presentation on theme: "Connected Components Minimum Spanning Tree"— Presentation transcript:

1 Connected Components Minimum Spanning Tree
Graph Algorithms 1 Connected Components Minimum Spanning Tree

2 Problem: Connected Components
Instance: Given an undirected graph G=(V,E) Question: Print out the sets of vertices that are connected to each other. Note: A vertex u is connected to a vertex v iff there is a path connecting the vertices.

3 Connected Components Algorithm

4 Problem: Strongly Connected Components
Instance: Given an directed graph G=(V,E) Question: Print out the sets of vertices that are connected to each other. Note: A vertex u is connected to a vertex v iff there is a path connecting the u to v and a path from v to u.

5 Strongly Connected - Algorithm

6 Problem: Minimum Spanning Tree
Instance: Given a graph G=(V,E) Question: What is the minimum edge weight subgraph G’=(V,E’) that can be constructed from G such that the graph G’ is connected?

7 Kruskel’s Algorithm for MST

8 Kruskel’s Algorithm Code

9 Prim’s Algorithm for MST

10 Prim’s Algorithm - Code

11 Prim’s Algorithm - Analysis


Download ppt "Connected Components Minimum Spanning Tree"

Similar presentations


Ads by Google