Presentation is loading. Please wait.

Presentation is loading. Please wait.

7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.

Similar presentations


Presentation on theme: "7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the."— Presentation transcript:

1 7.1 and 7.2: Spanning Trees

2 A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the original graph) –The network must span the original graph (must include all the vertices of the original graph) A tree is a network with no circuit A spanning tree is a sub-graph that connects all the vertices of the network and has no circuits Minimum spanning tree (MST): the spanning tree with the least total weight.

3 Tree or not Tree Tree Not a tree (disconnected graph) Tree No a tree (has a circuit)

4 Properties of trees Property 1 –In a tree, there is one and only one path joining any two vertices. –If there is one and only one path joining any two vertices of the graph, then the graph must be a tree. Property 2 –In a tree, every edge is a bridge. –If the graph is connected and every edge is a bridge, then the graph must be a tree. Property 3 –A tree with N vertices has (N – 1) edges. –If a connected graph has N vertices and (N-1) edges, then it must be a tree.

5 G is a graph with no loops or multiple edges. Choose the option that best applies and explain why. (I) G is definitely a tree; (II) G is definitely not a tree; (III) G may or may not be a tree 1)G is connected, has 4 vertices and 5 edges II (needs to have 3 edges, not 5 edges) 2)G has 7 vertices, 6 edges III (explain in class) 3)G has 10 vertices and for every pair of vertices X and Y in G, there is at least one path from X to Y III (explain in class) 4)G has 5 vertices, no circuit III (explain in class) 5)G has 5 vertices, connected and every vertex has degree 2 II (sum of the degree = 10, a tree with 5 vertices must have the sum of the degree = 8) 6)G is connected, has 8 vertices and 7 bridges) I (property #3)

6 Counting Spanning Trees in a network If a network is a tree, then there is only 1 spanning tree If a network has one circuit (with P edges), then there are P spanning trees. If a network has 2 circuits (one circuit has P edges, the other circuit has Q edges), no shared edge between the 2 circuits, then there are (P x Q) edges. If a network has 2 circuits (one circuit has P edges, the other circuit has Q edges), one shared edge between the 2 circuits, then there are [(P x Q) – 1] edges.

7 How many spanning trees? This is a tree, so there is only 1 spanning tree

8 How many spanning trees?

9 This network has a circuit with 3 edges, so there are 3 spanning trees

10 How many spanning trees?

11 This network has a circuit with 4 edges, so there are 4 spanning trees

12 How many spanning trees?

13 This network has 2 circuits (one with 4 edges and the other with 3 edges, no shared edge, so there are 4x3 =12 spanning trees.

14 How many spanning trees?

15 This network has 2 circuits (one with 4 edges and the other with 3 edges, one shared edge, so there are 4x3 - 1=11 spanning trees. Two possible spanning trees. 9 more spanning trees will be showed on the board


Download ppt "7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the."

Similar presentations


Ads by Google