Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!

Similar presentations


Presentation on theme: "Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!"— Presentation transcript:

1

2 Tree Diagrams

3 A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!

4 Spanning Trees A spanning tree is created from another graph by removing edges while still maintaining a path to each vertex. There are many different spanning trees for most graphs.

5 Examples Below are two more examples of spanning trees for the same graph.

6 Try this. In your notes, create two different spanning trees for the following graph. Start drawing edges that connect the vertices. Remember to AVOID making a circuit.

7 Minimum-Cost Spanning Trees 12 + 13 + 8 = 33 12 + 6 + 8 = 2612 + 13 + 6 = 31 This is the minimum cost spanning tree. The minimum cost is 26.

8 How to find the minimum cost spanning tree. 1.Select the lowest-cost edge on the graph. 2.Select the next lowest-cost edge that does not form a circuit with the first edge. 3.Select the next lowest-cost edge that does not form a circuit with the previously selected edges. 4.Continue selecting the lowest-cost edges that do not form circuits with previously selected edges. 5.Once you have reached every vertex, you have the minimum cost spanning tree.

9 Example Find the minimum-cost spanning tree using Kruskal’s Algorithm. 18 20 10 9 7 5 The lowest cost edge has cost 5. The next lowest cost edge has cost 7. The next lowest cost edge has cost 9. The next lowest cost edge has cost 10. The next lowest cost edge has cost 12. We can’t use this edge, because it would form a circuit. The next lowest cost edge has cost 13. We can’t use this edge, because it would form a circuit. The next lowest cost edge has cost 14. We can’t use this edge, because it would form a circuit. The next lowest cost edge has cost 15. We can’t use this edge, because it would form a circuit. The next lowest cost edge has cost 18. The next lowest cost edge has cost 20. The edges that cost 21 and 22 should never be considered. They cost too much. This is the minimum cost spanning tree. The total cost is 20+10+9+7+5+18 = 69

10 Try this. In your notes, use the space provided to find the minimum-cost spanning tree for the following graph using Kruskal’s Algorithm.

11 Example Each tree diagram can be made to look like the familiar family tree by simply moving the vertices around.

12


Download ppt "Tree Diagrams A tree is a connected graph in which every edge is a bridge. There can NEVER be a circuit in a tree diagram!"

Similar presentations


Ads by Google