{"id":2718,"date":"2023-05-12T19:24:19","date_gmt":"2023-05-12T19:24:19","guid":{"rendered":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/?post_type=chapter&#038;p=2718"},"modified":"2025-08-29T20:16:14","modified_gmt":"2025-08-29T20:16:14","slug":"euler-and-hamiltonian-paths-and-circuits-learn-it-5","status":"web-only","type":"chapter","link":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/chapter\/euler-and-hamiltonian-paths-and-circuits-learn-it-5\/","title":{"raw":"Euler and Hamiltonian Paths and Circuits: Learn It 5","rendered":"Euler and Hamiltonian Paths and Circuits: Learn It 5"},"content":{"raw":"<h2>Spanning Trees<\/h2>\r\n<p>A company requires reliable internet and phone connectivity between their five offices (named [latex]A[\/latex], [latex]B[\/latex], [latex]C[\/latex], [latex]D[\/latex], and [latex]E[\/latex] for simplicity) in New York, so they decide to lease dedicated lines from the phone company. The phone company will charge for each link made. The costs, in thousands of dollars per year, are shown in the graph.<\/p>\r\n<center>\r\n[caption id=\"attachment_2722\" align=\"aligncenter\" width=\"573\"]<img class=\"wp-image-2722 size-full\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723.png\" alt=\"graph with 5 vertices and 11 edges. between A and B is $4, between B and C is $10, between C and D is $7, between D and E is $13, between A and E is $5, between E and B is $6, between E and C is $11, between A and D is $9, between A and C is $8, between B and D is $14.\" width=\"573\" height=\"331\" \/> Figure 1. A map with five vertices, [latex]A[\/latex], [latex]B[\/latex], [latex]C[\/latex], [latex]D[\/latex], and [latex]E[\/latex], representing offices with the amount charged for each link[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>In this case, we don\u2019t need to find a circuit, or even a specific path; all we need to do is make sure we can make a call from any office to any other. In other words, we need to be sure there is a path from any vertex to any other vertex. We can use a <strong>spanning tree<\/strong>.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>spanning tree<\/h3>\r\n<p>A <strong>spanning tree<\/strong> is a connected graph using all vertices in which there are no circuits.<\/p>\r\n<p>In other words, there is a path from any vertex to any other vertex, but no circuits.<\/p>\r\n<\/div>\r\n<\/section>\r\n<section class=\"textbox proTip\">\r\n<p>When deciding whether a graph is a spanning tree, check the following characteristics:<\/p>\r\n<ul>\r\n\t<li>All vertices are included.<\/li>\r\n\t<li>No vertices are adjacent that were not adjacent in the original graph.<\/li>\r\n\t<li>The graph is connected.<\/li>\r\n\t<li>There are no cycles.<\/li>\r\n<\/ul>\r\n<\/section>\r\n<p>Some examples of spanning trees are shown below. Notice there are no circuits in the trees, and it is fine to have vertices with degree higher than two.<\/p>\r\n<center>\r\n[caption id=\"attachment_2723\" align=\"aligncenter\" width=\"777\"]<img class=\"wp-image-2723\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155921\/Screen-Shot-2017-03-16-at-4.37.02-PM-1-e1726168314244.png\" alt=\"Five triangular graphs where there are no Euler circuits, but every vertex has a path to every other vertex.\" width=\"777\" height=\"112\" \/> Figure 2. Five different spanning trees[\/caption]\r\n<\/center>\r\n<section class=\"textbox example\">Use the figure below to determine which of graphs [latex]M1, M2, M3,[\/latex] and [latex]M4[\/latex], are spanning trees of [latex]Q[\/latex].<center><img class=\"aligncenter wp-image-8807 size-large\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-1024x319.png\" alt=\"Five graphs. Graph Q has six vertices: a, b, c, d, e, and f. The edges are a b, a c, a d, b d, d f, c d, c e, c f, and e f. Graph M 1 has six vertices: a, b, c, d, e, and f. The edges are a b, b d, d c, c e, f, and f d. Graph M 2 has six vertices: a, b, c, d, e, and f. The edges are a b, a d, d f, f e, and e c. Graph M 3 has six vertices; a, b, c, d, e, and f. The edges are b d, d f, a f, f e, and e c. Graph M 4 has six vertices: a, b, c, d, e, and f. The edges are a b, c e, e f, and f d.\" width=\"1024\" height=\"319\" \/><\/center>[reveal-answer q=\"997648\"]Show Solution[\/reveal-answer] [hidden-answer a=\"997648\"]\r\n\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li>Graph [latex]M1[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because it has a cycle ([latex]c, d, f, e[\/latex]).<\/li>\r\n\t<li>Graph [latex]M2[\/latex] is a spanning tree of Graph [latex]Q[\/latex] because it has all the original vertices, no vertices are adjacent in [latex]M2[\/latex] that weren\u2019t adjacent in Graph [latex]Q[\/latex], Graph [latex]M2[\/latex] is connected and it contains no cycles.<\/li>\r\n\t<li>Graph [latex]M3[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because vertices [latex]a[\/latex] and [latex]f[\/latex] are adjacent in Graph [latex]M3[\/latex] but not in Graph [latex]Q[\/latex].<\/li>\r\n\t<li>Graph [latex]M4[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because it is not connected.<\/li>\r\n<\/ol>\r\n\r\nSo, only graph [latex]M2[\/latex] is a spanning tree of Graph [latex]Q[\/latex]. [\/hidden-answer]<\/section>\r\n<p>Usually, we have a starting graph to work from, like in the phone example above. In this case, we form our spanning tree by finding a <strong>subgraph<\/strong> \u2013 a new graph formed using all the vertices but only some of the edges from the original graph. No edges will be created where they didn\u2019t already exist.<\/p>\r\n<p>Suppose that you wanted to find a spanning tree within a graph. One approach is to find paths within the graph. You can start at any vertex, go any direction, and create a path through the graph stopping only when you can\u2019t continue without backtracking as shown in the figure below.<\/p>\r\n<center>\r\n[caption id=\"attachment_8814\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-8814 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-300x252.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.\" width=\"300\" height=\"252\" \/> Figure 3. A spanning tree within a graph[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>Once you have stopped, pick a vertex along the path you drew as a starting point for another path. Make sure to visit only vertices you have not visited before as shown in the figure below.<\/p>\r\n<center>\r\n[caption id=\"attachment_8815\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-8815 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-300x186.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.\" width=\"300\" height=\"186\" \/> Figure 4. Pick a vertex as a starting point for another path[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>Repeat this process until all vertices have been visited as shown in the figure below.<\/p>\r\n<center>\r\n[caption id=\"attachment_8816\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-8816 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-300x202.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here. Two edges are highlighted in purple.\" width=\"300\" height=\"202\" \/> Figure 5. Repeat until all vertices have been visited[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>The end result is a tree that spans the entire graph as shown in the figure below.<\/p>\r\n<center>\r\n[caption id=\"attachment_8817\" align=\"aligncenter\" width=\"300\"]<img class=\"wp-image-8817 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-300x204.png\" alt=\"A graph with 23 vertices and 22 edges.\" width=\"300\" height=\"204\" \/> Figure 6. The end result, a tree spanning the entire graph[\/caption]\r\n<\/center>\r\n<p>&nbsp;<\/p>\r\n<p>Notice that this subgraph is a tree because it is connected and acyclic. It also visits every vertex of the original graph, so it is a spanning tree. However, it is not the only spanning tree for this graph. By making different turns, we could create any number of distinct spanning trees.<\/p>\r\n<section class=\"textbox example\">\r\n<p>Construct two distinct spanning trees for the graph below.<\/p>\r\n<center><img class=\"aligncenter size-medium wp-image-8819\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c-300x252.png\" alt=\"Graph L has 11 vertices and 19 edges. The graph resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines.\" width=\"300\" height=\"252\" \/><\/center>[reveal-answer q=\"997621\"]Show Solution[\/reveal-answer] [hidden-answer a=\"997621\"] Two possible solutions are given below.<center><img class=\"wp-image-8820 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-300x225.png\" alt=\"Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.\" width=\"300\" height=\"225\" \/><\/center><center><span style=\"font-size: 10pt;\"><strong>First Spanning Tree for Graph [latex]L[\/latex]<\/strong><\/span><\/center>\r\n<p>&nbsp;<\/p>\r\n<center><img class=\"wp-image-8821 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-300x225.png\" alt=\"Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.\" width=\"300\" height=\"225\" \/><\/center><center><strong><span style=\"font-size: 10pt;\">Second Spanning Tree for Graph [latex]L[\/latex] [\/hidden-answer]<\/span><\/strong><\/center><\/section>\r\n<p>Of course, any random spanning tree isn\u2019t really what we want. We want the <strong>minimum cost spanning tree (MCST)<\/strong>.<\/p>\r\n<p>In many applications of spanning trees, the graphs are weighted and we want to find the spanning tree of least possible weight. For example, the graph might represent a computer network, and the weights might represent the cost involved in connecting two devices. So, finding a spanning tree with the lowest possible total weight, or minimum spanning tree, means saving money!<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>minimum cost spanning tree (MCST)<\/h3>\r\n<p>The <strong>minimum cost spanning tree<\/strong> is the spanning tree with the smallest total edge weight.<\/p>\r\n<\/div>\r\n<\/section>\r\n<p>A nearest neighbor style approach doesn\u2019t make as much sense here since we don\u2019t need a circuit, so instead we will take an approach similar to sorted edges.<\/p>\r\n<section class=\"textbox keyTakeaway\">\r\n<div>\r\n<h3>Kruskal\u2019s algorithm<\/h3>\r\n<ol>\r\n\t<li>Choose any edge with the minimum weight of all edges.<\/li>\r\n\t<li>Choose another edge of minimum weight from the remaining edges. The second edge does not have to be connected to the first edge.<\/li>\r\n\t<li>Choose another edge of minimum weight from the remaining edges, but do not select any edge that creates a cycle in the subgraph you are creating.<\/li>\r\n\t<li>Repeat step 3 until all the vertices of the original graph are included and you have a spanning tree.<\/li>\r\n<\/ol>\r\n<\/div>\r\n<\/section>\r\n<p>Watch the following video on how to use Kruskal's Algorithm to find minimum spanning trees.<\/p>\r\n<section class=\"textbox watchIt\"><iframe src=\"\/\/plugin.3playmedia.com\/show?mf=12471491&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=FfgXmie2NxY&amp;video_target=tpm-plugin-mdo12htm-FfgXmie2NxY\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe>\r\n<p>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Quantitative+Reasoning+-+2023+Build\/Transcriptions\/Use+Kruskal's+Algorithm+to+find+Minimum+Spanning+Trees+in+Graph+Theory.txt\" target=\"_blank\" rel=\"noopener\">transcript for \u201cUse Kruskal's Algorithm to find Minimum Spanning Trees in Graph Theory\u201d here (opens in new window).<\/a><\/p>\r\n<\/section>\r\n<section class=\"textbox example\">Using our phone line graph from above, begin adding edges:<center>[latex]\\begin{array}{r@{\\hfill}l}<br \/>\r\nAB &amp;&amp; \\$4 &amp;&amp; \\text{OK} \\\\<br \/>\r\nAE &amp;&amp; \\$5 &amp;&amp; \\text{OK} \\\\<br \/>\r\nBE &amp;&amp; \\$6 &amp;&amp; \\text{reject \u2013 closes circuit ABEA} \\\\<br \/>\r\nDC &amp;&amp; \\$7 &amp;&amp; \\text{OK} \\\\<br \/>\r\nAC &amp;&amp; \\$8 &amp;&amp; \\text{OK} \\\\<br \/>\r\n\\end{array}[\/latex]<\/center><center><img class=\"aligncenter size-full wp-image-2730\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237.png\" alt=\"A graph with five vertices labeled A through E. A to B is $4, A to E is $5, B to E is $6, D to C is $7, A to C is $8. AB, AC, AE, and DC are shown in red.\" width=\"573\" height=\"333\" \/><\/center>\r\n<p>&nbsp;<\/p>\r\n\r\nAt this point we stop \u2013 every vertex is now connected, so we have formed a spanning tree with cost [latex]$24[\/latex] thousand a year.<\/section>\r\n<section class=\"textbox example\">\r\n<p>A computer network will be set up with six devices. The vertices in the graph below represent the devices, and the edges represent the cost of a connection. Find the network configuration that will cost the least. What is the total cost?<\/p>\r\n<center><img class=\"aligncenter size-medium wp-image-8825\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-300x256.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars.\" width=\"300\" height=\"256\" \/><\/center>[reveal-answer q=\"997543\"]Show Solution[\/reveal-answer] [hidden-answer a=\"997543\"] A minimum spanning tree will correspond to the network configuration of least cost. We will use Kruskal\u2019s algorithm to find one. Since the graph has six vertices, the spanning tree will have six vertices and five edges.\r\n\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li style=\"list-style-type: none;\">\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li><strong>Step 1:<\/strong> Choose an edge of least weight. We have sorted the weights into numerical order. The least is [latex]$100[\/latex]. The only edge of this weight is edge [latex]AF[\/latex] as shown in the figure below.<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8826\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edge, A F is in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100 is struck through.\" width=\"300\" height=\"196\" \/><\/center><\/li>\r\n\t<li style=\"list-style-type: none;\"><center><span style=\"font-size: 10pt;\"><strong>Step 1 Select Edge [latex]AF[\/latex]<\/strong><\/span><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol start=\"2\">\r\n\t<li><strong>Step 2:<\/strong> Choose the edge of least weight of the remaining edges, which is [latex]BD[\/latex] with [latex]$120[\/latex]. Notice that the two selected edges do not need to be adjacent to each other as shown in the figure below.<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8827\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, and B D are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100 and 120 are struck through.\" width=\"300\" height=\"196\" \/><\/center><\/li>\r\n\t<li style=\"list-style-type: none;\"><center><strong><span style=\"font-size: 10pt;\">Step 2 Select Edge [latex]BD[\/latex]<\/span><\/strong><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol start=\"3\">\r\n\t<li><strong>Step 3:<\/strong> Select the lowest weight edge of the remaining edges, as long as it does not result in a cycle. We select [latex]DF[\/latex] with [latex]$150[\/latex] since it does not form a cycle as shown in the figure below.<\/li>\r\n<\/ol>\r\n<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8828\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, and 150 are struck through.\" width=\"300\" height=\"196\" \/><\/center><center><strong><span style=\"font-size: 10pt;\">Step 3 Select Edge [latex]DF[\/latex]<\/span><\/strong><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li style=\"list-style-type: none;\">\r\n<ol start=\"4\">\r\n\t<li><strong>Repeat Step 3:<\/strong> Select the lowest weight edge of the remaining edges, which is [latex]BE[\/latex] with [latex]$160[\/latex] and it does not form a cycle as shown in figure below. This gives us four edges so we only need to repeat step 3 once more to get the fifth edge.<\/li>\r\n<\/ol>\r\n<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8829\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, and 160 are struck through.\" width=\"300\" height=\"196\" \/><\/center><center><span style=\"font-size: 10pt;\"><strong>Repeat Step 3 Select Edge [latex]DF[\/latex]<\/strong><\/span><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li style=\"list-style-type: none;\">\r\n<ol start=\"5\">\r\n\t<li><strong>Repeat Step 3:<\/strong> The lowest weight of the remaining edges is [latex]$170[\/latex]. Both [latex]BF[\/latex] and [latex]CE[\/latex] have a weight of [latex]$170[\/latex], but [latex]BF[\/latex] would create cycle ([latex]b, d, f[\/latex]) and there cannot be a cycle in a spanning tree as shown in the figure below.<\/li>\r\n<\/ol>\r\n<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8830\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, and DF are in dashed lines. Edge, B F is in red. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, and 160 are struck through. 170 is crossed out.\" width=\"300\" height=\"196\" \/><\/center><center><strong><span style=\"font-size: 10pt;\">Repeat Step 3 Do Not Select Edge [latex]BF[\/latex]<\/span><\/strong><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li style=\"list-style-type: none;\">So, we will select [latex]CE[\/latex], which will complete the spanning tree as shown in the figure below.<\/li>\r\n<\/ol>\r\n<center><img class=\"size-medium wp-image-8831\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, C E, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, 160, and 170 are struck through. 170 is crossed out.\" width=\"300\" height=\"196\" \/><\/center>\r\n<p>&nbsp;<\/p>\r\n<ol style=\"list-style-type: decimal;\">\r\n\t<li style=\"list-style-type: none;\">The minimum spanning tree is shown below. This is the configuration of the network of least cost. The spanning tree has a total weight of [latex]$100+$120+$150+$160+$170=$700[\/latex], which is the total cost of this network configuration.\r\n\r\n<p>&nbsp;<\/p>\r\n<center><img class=\"size-medium wp-image-8832\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-300x273.png\" alt=\"A graph has six vertices labeled A to F. The edges are as follows. A F, curved edge, 100 dollars. B E, 160 dollars. B D, 120 dollars. C E, 170 dollars. D F, 150 dollars.\" width=\"300\" height=\"273\" \/><\/center><center><strong><span style=\"font-size: 10pt;\">Final Minimum Spanning Tree<\/span><\/strong><\/center><\/li>\r\n<\/ol>\r\n\r\n[\/hidden-answer]<\/section>\r\n<section class=\"textbox tryIt\">\r\n<p>[ohm2_question hide_question_numbers=1]6967[\/ohm2_question]<\/p>\r\n<\/section>","rendered":"<h2>Spanning Trees<\/h2>\n<p>A company requires reliable internet and phone connectivity between their five offices (named [latex]A[\/latex], [latex]B[\/latex], [latex]C[\/latex], [latex]D[\/latex], and [latex]E[\/latex] for simplicity) in New York, so they decide to lease dedicated lines from the phone company. The phone company will charge for each link made. The costs, in thousands of dollars per year, are shown in the graph.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_2722\" aria-describedby=\"caption-attachment-2722\" style=\"width: 573px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2722 size-full\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723.png\" alt=\"graph with 5 vertices and 11 edges. between A and B is $4, between B and C is $10, between C and D is $7, between D and E is $13, between A and E is $5, between E and B is $6, between E and C is $11, between A and D is $9, between A and C is $8, between B and D is $14.\" width=\"573\" height=\"331\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723.png 573w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723-300x173.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723-65x38.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723-225x130.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155746\/Screenshot-2023-05-15-115723-350x202.png 350w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><figcaption id=\"caption-attachment-2722\" class=\"wp-caption-text\">Figure 1. A map with five vertices, [latex]A[\/latex], [latex]B[\/latex], [latex]C[\/latex], [latex]D[\/latex], and [latex]E[\/latex], representing offices with the amount charged for each link<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>In this case, we don\u2019t need to find a circuit, or even a specific path; all we need to do is make sure we can make a call from any office to any other. In other words, we need to be sure there is a path from any vertex to any other vertex. We can use a <strong>spanning tree<\/strong>.<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>spanning tree<\/h3>\n<p>A <strong>spanning tree<\/strong> is a connected graph using all vertices in which there are no circuits.<\/p>\n<p>In other words, there is a path from any vertex to any other vertex, but no circuits.<\/p>\n<\/div>\n<\/section>\n<section class=\"textbox proTip\">\n<p>When deciding whether a graph is a spanning tree, check the following characteristics:<\/p>\n<ul>\n<li>All vertices are included.<\/li>\n<li>No vertices are adjacent that were not adjacent in the original graph.<\/li>\n<li>The graph is connected.<\/li>\n<li>There are no cycles.<\/li>\n<\/ul>\n<\/section>\n<p>Some examples of spanning trees are shown below. Notice there are no circuits in the trees, and it is fine to have vertices with degree higher than two.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_2723\" aria-describedby=\"caption-attachment-2723\" style=\"width: 777px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2723\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15155921\/Screen-Shot-2017-03-16-at-4.37.02-PM-1-e1726168314244.png\" alt=\"Five triangular graphs where there are no Euler circuits, but every vertex has a path to every other vertex.\" width=\"777\" height=\"112\" \/><figcaption id=\"caption-attachment-2723\" class=\"wp-caption-text\">Figure 2. Five different spanning trees<\/figcaption><\/figure>\n<\/div>\n<section class=\"textbox example\">Use the figure below to determine which of graphs [latex]M1, M2, M3,[\/latex] and [latex]M4[\/latex], are spanning trees of [latex]Q[\/latex].<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-8807 size-large\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-1024x319.png\" alt=\"Five graphs. Graph Q has six vertices: a, b, c, d, e, and f. The edges are a b, a c, a d, b d, d f, c d, c e, c f, and e f. Graph M 1 has six vertices: a, b, c, d, e, and f. The edges are a b, b d, d c, c e, f, and f d. Graph M 2 has six vertices: a, b, c, d, e, and f. The edges are a b, a d, d f, f e, and e c. Graph M 3 has six vertices; a, b, c, d, e, and f. The edges are b d, d f, a f, f e, and e c. Graph M 4 has six vertices: a, b, c, d, e, and f. The edges are a b, c e, e f, and f d.\" width=\"1024\" height=\"319\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-1024x319.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-300x93.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-768x239.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-1200x374.png 1200w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-65x20.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-225x70.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb-350x109.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05174522\/f3fbb7719e89eeea73dd473cb838dcfc46c429cb.png 1288w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q997648\">Show Solution<\/button> <\/p>\n<div id=\"q997648\" class=\"hidden-answer\" style=\"display: none\">\n<ol style=\"list-style-type: decimal;\">\n<li>Graph [latex]M1[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because it has a cycle ([latex]c, d, f, e[\/latex]).<\/li>\n<li>Graph [latex]M2[\/latex] is a spanning tree of Graph [latex]Q[\/latex] because it has all the original vertices, no vertices are adjacent in [latex]M2[\/latex] that weren\u2019t adjacent in Graph [latex]Q[\/latex], Graph [latex]M2[\/latex] is connected and it contains no cycles.<\/li>\n<li>Graph [latex]M3[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because vertices [latex]a[\/latex] and [latex]f[\/latex] are adjacent in Graph [latex]M3[\/latex] but not in Graph [latex]Q[\/latex].<\/li>\n<li>Graph [latex]M4[\/latex] is not a spanning tree of Graph [latex]Q[\/latex] because it is not connected.<\/li>\n<\/ol>\n<p>So, only graph [latex]M2[\/latex] is a spanning tree of Graph [latex]Q[\/latex]. <\/p><\/div>\n<\/div>\n<\/section>\n<p>Usually, we have a starting graph to work from, like in the phone example above. In this case, we form our spanning tree by finding a <strong>subgraph<\/strong> \u2013 a new graph formed using all the vertices but only some of the edges from the original graph. No edges will be created where they didn\u2019t already exist.<\/p>\n<p>Suppose that you wanted to find a spanning tree within a graph. One approach is to find paths within the graph. You can start at any vertex, go any direction, and create a path through the graph stopping only when you can\u2019t continue without backtracking as shown in the figure below.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_8814\" aria-describedby=\"caption-attachment-8814\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8814 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-300x252.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.\" width=\"300\" height=\"252\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-300x252.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-65x55.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-225x189.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe-350x294.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175734\/ef99964a8d3fad0aa134bb1ef8a10b8c47e44cfe.png 606w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-8814\" class=\"wp-caption-text\">Figure 3. A spanning tree within a graph<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Once you have stopped, pick a vertex along the path you drew as a starting point for another path. Make sure to visit only vertices you have not visited before as shown in the figure below.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_8815\" aria-describedby=\"caption-attachment-8815\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8815 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-300x186.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here.\" width=\"300\" height=\"186\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-300x186.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-65x40.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-225x140.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53-350x218.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175754\/169d12260ad17c13d6c54be0872cea4f76e88f53.png 658w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-8815\" class=\"wp-caption-text\">Figure 4. Pick a vertex as a starting point for another path<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Repeat this process until all vertices have been visited as shown in the figure below.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_8816\" aria-describedby=\"caption-attachment-8816\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8816 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-300x202.png\" alt=\"A graph with 23 vertices and 35 edges. Ten edges are highlighted in blue. Ten edges are highlighted in green. Two vertices are labeled started here and stopped here. Two edges are highlighted in purple.\" width=\"300\" height=\"202\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-300x202.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-65x44.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-225x152.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3-350x236.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175813\/2731159c1c78073c6a13f4492aed443eaa5626e3.png 606w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-8816\" class=\"wp-caption-text\">Figure 5. Repeat until all vertices have been visited<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>The end result is a tree that spans the entire graph as shown in the figure below.<\/p>\n<div style=\"text-align: center;\">\n<figure id=\"attachment_8817\" aria-describedby=\"caption-attachment-8817\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8817 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-300x204.png\" alt=\"A graph with 23 vertices and 22 edges.\" width=\"300\" height=\"204\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-300x204.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-65x44.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-225x153.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22-350x238.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05175828\/c5c86e6d14cecf3c41ec1bb89b0ef5e0412f0e22.png 602w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><figcaption id=\"caption-attachment-8817\" class=\"wp-caption-text\">Figure 6. The end result, a tree spanning the entire graph<\/figcaption><\/figure>\n<\/div>\n<p>&nbsp;<\/p>\n<p>Notice that this subgraph is a tree because it is connected and acyclic. It also visits every vertex of the original graph, so it is a spanning tree. However, it is not the only spanning tree for this graph. By making different turns, we could create any number of distinct spanning trees.<\/p>\n<section class=\"textbox example\">\n<p>Construct two distinct spanning trees for the graph below.<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-8819\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c-300x252.png\" alt=\"Graph L has 11 vertices and 19 edges. The graph resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines.\" width=\"300\" height=\"252\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c-300x252.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c-65x55.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c-225x189.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180101\/1250bb8bfb5fa16e143711f487243e892e0e795c.png 334w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q997621\">Show Solution<\/button> <\/p>\n<div id=\"q997621\" class=\"hidden-answer\" style=\"display: none\"> Two possible solutions are given below.<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8820 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-300x225.png\" alt=\"Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.\" width=\"300\" height=\"225\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-300x225.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-768x577.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-65x49.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-225x169.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f-350x263.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180131\/696f85086a08cedf86c1835e6693c127af7cd31f.png 788w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><span style=\"font-size: 10pt;\"><strong>First Spanning Tree for Graph [latex]L[\/latex]<\/strong><\/span><\/div>\n<p>&nbsp;<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-8821 size-medium\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-300x225.png\" alt=\"Two graphs depict removing edges from graph L. The first graph has 11 vertices and 19 edges. It resembles a square resting below a triangle on either side. The triangles are connected via a trapezoid. The squares have diagonal lines. 6 edges are in green, 2 edges are in purple, and 2 edges are in blue. Green represents phase 1, blue represents phase 2, and purple represents phase 3. The second graph is the final tree. The black edges from the first graph are removed.\" width=\"300\" height=\"225\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-300x225.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-768x577.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-65x49.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-225x169.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc-350x263.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180152\/0eec94521a56b1c2572d21f38c4b7299e1a72adc.png 788w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><strong><span style=\"font-size: 10pt;\">Second Spanning Tree for Graph [latex]L[\/latex] <\/div>\n<\/div>\n<p><\/span><\/strong><\/div>\n<\/section>\n<p>Of course, any random spanning tree isn\u2019t really what we want. We want the <strong>minimum cost spanning tree (MCST)<\/strong>.<\/p>\n<p>In many applications of spanning trees, the graphs are weighted and we want to find the spanning tree of least possible weight. For example, the graph might represent a computer network, and the weights might represent the cost involved in connecting two devices. So, finding a spanning tree with the lowest possible total weight, or minimum spanning tree, means saving money!<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>minimum cost spanning tree (MCST)<\/h3>\n<p>The <strong>minimum cost spanning tree<\/strong> is the spanning tree with the smallest total edge weight.<\/p>\n<\/div>\n<\/section>\n<p>A nearest neighbor style approach doesn\u2019t make as much sense here since we don\u2019t need a circuit, so instead we will take an approach similar to sorted edges.<\/p>\n<section class=\"textbox keyTakeaway\">\n<div>\n<h3>Kruskal\u2019s algorithm<\/h3>\n<ol>\n<li>Choose any edge with the minimum weight of all edges.<\/li>\n<li>Choose another edge of minimum weight from the remaining edges. The second edge does not have to be connected to the first edge.<\/li>\n<li>Choose another edge of minimum weight from the remaining edges, but do not select any edge that creates a cycle in the subgraph you are creating.<\/li>\n<li>Repeat step 3 until all the vertices of the original graph are included and you have a spanning tree.<\/li>\n<\/ol>\n<\/div>\n<\/section>\n<p>Watch the following video on how to use Kruskal&#8217;s Algorithm to find minimum spanning trees.<\/p>\n<section class=\"textbox watchIt\"><iframe loading=\"lazy\" src=\"\/\/plugin.3playmedia.com\/show?mf=12471491&amp;p3sdk_version=1.10.1&amp;p=20361&amp;pt=375&amp;video_id=FfgXmie2NxY&amp;video_target=tpm-plugin-mdo12htm-FfgXmie2NxY\" width=\"800px\" height=\"450px\" frameborder=\"0\" marginwidth=\"0px\" marginheight=\"0px\"><\/iframe><\/p>\n<p>You can view the <a href=\"https:\/\/course-building.s3.us-west-2.amazonaws.com\/Quantitative+Reasoning+-+2023+Build\/Transcriptions\/Use+Kruskal's+Algorithm+to+find+Minimum+Spanning+Trees+in+Graph+Theory.txt\" target=\"_blank\" rel=\"noopener\">transcript for \u201cUse Kruskal&#8217;s Algorithm to find Minimum Spanning Trees in Graph Theory\u201d here (opens in new window).<\/a><\/p>\n<\/section>\n<section class=\"textbox example\">Using our phone line graph from above, begin adding edges:<\/p>\n<div style=\"text-align: center;\">[latex]\\begin{array}{r@{\\hfill}l}<br \/>  AB && \\$4 && \\text{OK} \\\\<br \/>  AE && \\$5 && \\text{OK} \\\\<br \/>  BE && \\$6 && \\text{reject \u2013 closes circuit ABEA} \\\\<br \/>  DC && \\$7 && \\text{OK} \\\\<br \/>  AC && \\$8 && \\text{OK} \\\\<br \/>  \\end{array}[\/latex]<\/div>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-2730\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237.png\" alt=\"A graph with five vertices labeled A through E. A to B is $4, A to E is $5, B to E is $6, D to C is $7, A to C is $8. AB, AC, AE, and DC are shown in red.\" width=\"573\" height=\"333\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237.png 573w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237-300x174.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237-65x38.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237-225x131.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/15161254\/Screenshot-2023-05-15-121237-350x203.png 350w\" sizes=\"(max-width: 573px) 100vw, 573px\" \/><\/div>\n<p>&nbsp;<\/p>\n<p>At this point we stop \u2013 every vertex is now connected, so we have formed a spanning tree with cost [latex]$24[\/latex] thousand a year.<\/section>\n<section class=\"textbox example\">\n<p>A computer network will be set up with six devices. The vertices in the graph below represent the devices, and the edges represent the cost of a connection. Find the network configuration that will cost the least. What is the total cost?<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-8825\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-300x256.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars.\" width=\"300\" height=\"256\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-300x256.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-768x655.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-65x55.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-225x192.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3-350x299.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180640\/f386a6cc69f02b2935c722fcf48f12a049515af3.png 873w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div class=\"qa-wrapper\" style=\"display: block\"><button class=\"show-answer show-answer-button collapsed\" data-target=\"q997543\">Show Solution<\/button> <\/p>\n<div id=\"q997543\" class=\"hidden-answer\" style=\"display: none\"> A minimum spanning tree will correspond to the network configuration of least cost. We will use Kruskal\u2019s algorithm to find one. Since the graph has six vertices, the spanning tree will have six vertices and five edges.<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li style=\"list-style-type: none;\">\n<ol style=\"list-style-type: decimal;\">\n<li><strong>Step 1:<\/strong> Choose an edge of least weight. We have sorted the weights into numerical order. The least is [latex]$100[\/latex]. The only edge of this weight is edge [latex]AF[\/latex] as shown in the figure below.<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8826\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edge, A F is in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100 is struck through.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-768x502.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180843\/5df8c4236964f13ab46951e14245e30cc5fe2bca.png 1139w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<\/li>\n<li style=\"list-style-type: none;\">\n<div style=\"text-align: center;\"><span style=\"font-size: 10pt;\"><strong>Step 1 Select Edge [latex]AF[\/latex]<\/strong><\/span><\/div>\n<p>&nbsp;<\/p>\n<ol start=\"2\">\n<li><strong>Step 2:<\/strong> Choose the edge of least weight of the remaining edges, which is [latex]BD[\/latex] with [latex]$120[\/latex]. Notice that the two selected edges do not need to be adjacent to each other as shown in the figure below.<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8827\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, and B D are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100 and 120 are struck through.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-768x502.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05180924\/277f3a9e034faca851dfa638851b8e71e88527e6.png 1139w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<\/li>\n<li style=\"list-style-type: none;\">\n<div style=\"text-align: center;\"><strong><span style=\"font-size: 10pt;\">Step 2 Select Edge [latex]BD[\/latex]<\/span><\/strong><\/div>\n<p>&nbsp;<\/p>\n<ol start=\"3\">\n<li><strong>Step 3:<\/strong> Select the lowest weight edge of the remaining edges, as long as it does not result in a cycle. We select [latex]DF[\/latex] with [latex]$150[\/latex] since it does not form a cycle as shown in the figure below.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8828\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, and 150 are struck through.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-768x503.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181047\/997487d7b11c8e1131a25f869ff0060fc277705c.png 1138w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><strong><span style=\"font-size: 10pt;\">Step 3 Select Edge [latex]DF[\/latex]<\/span><\/strong><\/div>\n<p>&nbsp;<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li style=\"list-style-type: none;\">\n<ol start=\"4\">\n<li><strong>Repeat Step 3:<\/strong> Select the lowest weight edge of the remaining edges, which is [latex]BE[\/latex] with [latex]$160[\/latex] and it does not form a cycle as shown in figure below. This gives us four edges so we only need to repeat step 3 once more to get the fifth edge.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8829\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, and 160 are struck through.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-768x502.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181148\/247b0fdd4698611d149e6b517afbb1fedadf1d23.png 1139w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><span style=\"font-size: 10pt;\"><strong>Repeat Step 3 Select Edge [latex]DF[\/latex]<\/strong><\/span><\/div>\n<p>&nbsp;<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li style=\"list-style-type: none;\">\n<ol start=\"5\">\n<li><strong>Repeat Step 3:<\/strong> The lowest weight of the remaining edges is [latex]$170[\/latex]. Both [latex]BF[\/latex] and [latex]CE[\/latex] have a weight of [latex]$170[\/latex], but [latex]BF[\/latex] would create cycle ([latex]b, d, f[\/latex]) and there cannot be a cycle in a spanning tree as shown in the figure below.<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8830\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, and DF are in dashed lines. Edge, B F is in red. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, and 160 are struck through. 170 is crossed out.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-768x502.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181239\/8d4752a443c637aaf673116d9991ee582e7eb6bc.png 1139w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><strong><span style=\"font-size: 10pt;\">Repeat Step 3 Do Not Select Edge [latex]BF[\/latex]<\/span><\/strong><\/div>\n<p>&nbsp;<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li style=\"list-style-type: none;\">So, we will select [latex]CE[\/latex], which will complete the spanning tree as shown in the figure below.<\/li>\n<\/ol>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8831\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-300x196.png\" alt=\"A graph represents the airfares between six different cities. The graph has 6 vertices. The vertices are A, B, C, D, E, and F. Edges from A leading to B, C, D, E, and F are labeled 250 dollars, 210 dollars, 300 dollars, 200 dollars, and 100 dollars. Edges from B leading to C, D, E, and F are labeled 220 dollars, 120 dollars, 160 dollars, and 170 dollars. Edges from C to D, E, and F are labeled 310 dollars, 180 dollars, and 330 dollars. Edges from D to E and F 270 dollars and 150 dollars. An edge from E to F is labeled 350 dollars. Edges, A F, B D, B E, C E, and D F are in dashed lines. Cost in dollars are as follows: 100, 120, 150, 160, 170, 170, 200, 210, 220, 250, 270, 300, 310, 330, and 350. 100, 120, 150, 160, and 170 are struck through. 170 is crossed out.\" width=\"300\" height=\"196\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-300x196.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-1024x670.png 1024w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-768x503.png 768w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-65x43.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-225x147.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741-350x229.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181321\/1eda95b6e31177f300fb0ae4e936726cded5a741.png 1138w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<p>&nbsp;<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li style=\"list-style-type: none;\">The minimum spanning tree is shown below. This is the configuration of the network of least cost. The spanning tree has a total weight of [latex]$100+$120+$150+$160+$170=$700[\/latex], which is the total cost of this network configuration.\n<p>&nbsp;<\/p>\n<div style=\"text-align: center;\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-8832\" src=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-300x273.png\" alt=\"A graph has six vertices labeled A to F. The edges are as follows. A F, curved edge, 100 dollars. B E, 160 dollars. B D, 120 dollars. C E, 170 dollars. D F, 150 dollars.\" width=\"300\" height=\"273\" srcset=\"https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-300x273.png 300w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-65x59.png 65w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-225x205.png 225w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17-350x319.png 350w, https:\/\/content-cdn.one.lumenlearning.com\/wp-content\/uploads\/sites\/18\/2023\/05\/05181407\/5326318c53343ab1d4b18adc8d63d1cda1672d17.png 769w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/div>\n<div style=\"text-align: center;\"><strong><span style=\"font-size: 10pt;\">Final Minimum Spanning Tree<\/span><\/strong><\/div>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/section>\n<section class=\"textbox tryIt\">\n<iframe loading=\"lazy\" id=\"ohm6967\" class=\"resizable\" src=\"https:\/\/ohm.one.lumenlearning.com\/multiembedq.php?id=6967&theme=lumen&iframe_resize_id=ohm6967&source=tnh\" width=\"100%\" height=\"150\"><\/iframe><br \/>\n<\/section>\n","protected":false},"author":15,"menu_order":13,"template":"","meta":{"_candela_citation":"[{\"type\":\"original\",\"description\":\"Revision and Adaptation\",\"author\":\"\",\"organization\":\"Lumen Learning\",\"url\":\"\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"cc\",\"description\":\"Math in Society\",\"author\":\"David Lippman\",\"organization\":\"\",\"url\":\"http:\/\/www.opentextbookstore.com\/mathinsociety\/\",\"project\":\"\",\"license\":\"cc-by\",\"license_terms\":\"\"},{\"type\":\"copyrighted_video\",\"description\":\"Use Kruskal\\'s Algorithm to find Minimum Spanning Trees in Graph Theory\",\"author\":\"Quin Hearn (MsHearnMath.com)\",\"organization\":\"\",\"url\":\"https:\/\/youtu.be\/FfgXmie2NxY\",\"project\":\"\",\"license\":\"arr\",\"license_terms\":\"\"},{\"type\":\"cc-attribution\",\"description\":\"Contemporary Mathematics\",\"author\":\"Donna Kirk\",\"organization\":\"OpenStax\",\"url\":\"https:\/\/openstax.org\/books\/contemporary-mathematics\/pages\/12-10-trees\",\"project\":\"12.10 Trees\",\"license\":\"cc-by\",\"license_terms\":\"Access for free at https:\/\/openstax.org\/books\/contemporary-mathematics\/pages\/1-introduction\"}]","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"part":75,"module-header":"learn_it","content_attributions":null,"internal_book_links":[],"video_content":null,"cc_video_embed_content":{"cc_scripts":"","media_targets":[]},"try_it_collection":null,"_links":{"self":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2718"}],"collection":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/users\/15"}],"version-history":[{"count":61,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2718\/revisions"}],"predecessor-version":[{"id":15931,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2718\/revisions\/15931"}],"part":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/parts\/75"}],"metadata":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapters\/2718\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/media?parent=2718"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/pressbooks\/v2\/chapter-type?post=2718"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/contributor?post=2718"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/content.one.lumenlearning.com\/quantitativereasoning\/wp-json\/wp\/v2\/license?post=2718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}