Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spanning Trees Alyce Brady CS 510: Computer Algorithms.

Similar presentations


Presentation on theme: "Spanning Trees Alyce Brady CS 510: Computer Algorithms."— Presentation transcript:

1 Spanning Trees Alyce Brady CS 510: Computer Algorithms

2 Spanning Trees Tree: a Directed Acyclic Graph (DAG) Tree: a Directed Acyclic Graph (DAG) Spanning Tree of a Graph: Spanning Tree of a Graph: –a subgraph such that the subgraph contains all the vertices of the original graph (spans all vertices) the subgraph contains all the vertices of the original graph (spans all vertices) the subgraph contains a subset of the edges of the original graph such that the subgraph is a tree, i.e., contains no cycles (spanning tree) the subgraph contains a subset of the edges of the original graph such that the subgraph is a tree, i.e., contains no cycles (spanning tree)

3 1 2 3 4567 8 Breadth-First Spanning Tree 3

4 1 2 4567 8 3

5 1 2 4567 8 3

6 1 2 4567 8 3

7 1 2 4567 8 3

8 1 2 4567 8 3

9 1 2 4567 8 3

10 1 2 4567 8 3

11 1 2 4567 8 Done! 3

12 1 2 3 4567 8 Depth-First Spanning Tree 3

13 1 2 3 4567 8 3

14 1 2 3 4567 8 3

15 1 2 3 4567 8 3

16 1 2 3 4567 8 3

17 1 2 3 4567 8 3

18 1 2 3 4567 8 3

19 1 2 3 4567 8 3

20 1 2 3 4567 8 3 Done!


Download ppt "Spanning Trees Alyce Brady CS 510: Computer Algorithms."

Similar presentations


Ads by Google