{"id":143,"date":"2023-02-01T00:03:22","date_gmt":"2023-02-01T00:03:22","guid":{"rendered":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/chapter\/putting-it-together-graph-theory\/"},"modified":"2023-02-01T00:03:22","modified_gmt":"2023-02-01T00:03:22","slug":"putting-it-together-graph-theory","status":"publish","type":"chapter","link":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/chapter\/putting-it-together-graph-theory\/","title":{"raw":"Putting It Together: Graph Theory","rendered":"Putting It Together: Graph Theory"},"content":{"raw":"\nAt the start of this module, you were thinking about finding the fastest route from one client to another. &nbsp;Thankfully, now you know how to use graph theory to figure it out. &nbsp;Take another look at the diagram. &nbsp;Now you know it is a graph in which each vertex represents a client and each edge represents a path between clients. &nbsp;The numbers, or weights, indicate the length of time (minutes) required to travel from one vertex to another.\n\n<a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165259\/graph1.png\"><img class=\"wp-image-2369 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165259\/graph1-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units.\" width=\"521\" height=\"375\"><\/a>\n\nOne vertex, A, is degree 1. Some vertices are degree 2, such as C and E, and H. &nbsp;Others are degree 3, such as D and G. Still others are degree 4, such as B, F, and I. &nbsp;What does that mean for you? &nbsp;It means that there are multiple paths leading from each client and several different routes you can take traveling from one to the other.\n\nYou were faced with the problem of having to get from Client G to Client C using the fastest route. &nbsp;Start by marking the ending vertex with a time of 0. &nbsp;Then find all vertices leading to the current vertex. &nbsp;Calculate their distances to the end.\n\n<a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165408\/graph2.png\"><img class=\"wp-image-2371 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165408\/graph2-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, and 7 by B.\" width=\"521\" height=\"375\"><\/a>\n\nMark C as visited, and mark the vertex with the smallest recorded time as current. &nbsp;So B will be designated current. &nbsp;Again find all vertices leading to the current vertex. &nbsp;For each vertex leading to B, and not to a visited vertex, find the time from the end.\n\n<a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165457\/graph3.png\"><img class=\"wp-image-2373 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165457\/graph3-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 27 by F, 15 by A, and 17 by I.\" width=\"521\" height=\"375\"><\/a>\n\nMark B as visited, and mark the vertex with the smallest recorded time as current. &nbsp;So D will be designated current. &nbsp;Add CD to DE, 10 + 8 = 18.\n\n<a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165621\/graph4.png\"><img class=\"aligncenter wp-image-2375\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165621\/graph4-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 27 by F, 15 by A, 17 by I, and 18 by E.\" width=\"521\" height=\"375\"><\/a>\n\nCompare the time at E with that at I. &nbsp;The time at I is lower so mark E as visited, and mark I as current. &nbsp;So C to G through I has a total of 32 minutes. &nbsp;But the time at H is only 22 minutes. &nbsp;Since it is lower, keep going. Mark I as visited and H as current. &nbsp;The total time from C to G through H is 27 minutes. &nbsp;This is the fastest route.\n\n<a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165656\/graph5.png\"><img class=\"aligncenter wp-image-2376\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165656\/graph5-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 25 by F, 15 by A, 17 by I, 18 by E, 27 by G, and 22 by H.\" width=\"521\" height=\"375\"><\/a>\n\n&nbsp;\n\nSo it will take you 27 minutes to get back to Client C to pick up your sample. &nbsp;It may have looked as if a different route, perhaps D, would have been faster but it turns out not to be the case. &nbsp;Using the graph confirmed the best route.\n\nNow you have to get all the way to your next client at H. &nbsp;You can tell by the work you have already done that the fast route back to H is from C to B to I to H. &nbsp;And how long will that take? &nbsp;It will take a speedy 22 minutes. &nbsp;Drawing a graph may seem complex, but in the end it really helps you make definite calculations rather than estimating. &nbsp;And that can mean the difference between closing the deal or missing the client altogether.\n\n&nbsp;\n","rendered":"<p>At the start of this module, you were thinking about finding the fastest route from one client to another. &nbsp;Thankfully, now you know how to use graph theory to figure it out. &nbsp;Take another look at the diagram. &nbsp;Now you know it is a graph in which each vertex represents a client and each edge represents a path between clients. &nbsp;The numbers, or weights, indicate the length of time (minutes) required to travel from one vertex to another.<\/p>\n<p><a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165259\/graph1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2369 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165259\/graph1-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units.\" width=\"521\" height=\"375\" \/><\/a><\/p>\n<p>One vertex, A, is degree 1. Some vertices are degree 2, such as C and E, and H. &nbsp;Others are degree 3, such as D and G. Still others are degree 4, such as B, F, and I. &nbsp;What does that mean for you? &nbsp;It means that there are multiple paths leading from each client and several different routes you can take traveling from one to the other.<\/p>\n<p>You were faced with the problem of having to get from Client G to Client C using the fastest route. &nbsp;Start by marking the ending vertex with a time of 0. &nbsp;Then find all vertices leading to the current vertex. &nbsp;Calculate their distances to the end.<\/p>\n<p><a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165408\/graph2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2371 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165408\/graph2-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, and 7 by B.\" width=\"521\" height=\"375\" \/><\/a><\/p>\n<p>Mark C as visited, and mark the vertex with the smallest recorded time as current. &nbsp;So B will be designated current. &nbsp;Again find all vertices leading to the current vertex. &nbsp;For each vertex leading to B, and not to a visited vertex, find the time from the end.<\/p>\n<p><a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165457\/graph3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2373 aligncenter\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165457\/graph3-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 27 by F, 15 by A, and 17 by I.\" width=\"521\" height=\"375\" \/><\/a><\/p>\n<p>Mark B as visited, and mark the vertex with the smallest recorded time as current. &nbsp;So D will be designated current. &nbsp;Add CD to DE, 10 + 8 = 18.<\/p>\n<p><a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165621\/graph4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2375\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165621\/graph4-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 27 by F, 15 by A, 17 by I, and 18 by E.\" width=\"521\" height=\"375\" \/><\/a><\/p>\n<p>Compare the time at E with that at I. &nbsp;The time at I is lower so mark E as visited, and mark I as current. &nbsp;So C to G through I has a total of 32 minutes. &nbsp;But the time at H is only 22 minutes. &nbsp;Since it is lower, keep going. Mark I as visited and H as current. &nbsp;The total time from C to G through H is 27 minutes. &nbsp;This is the fastest route.<\/p>\n<p><a href=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165656\/graph5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2376\" src=\"https:\/\/s3-us-west-2.amazonaws.com\/courses-images\/wp-content\/uploads\/sites\/1141\/2017\/03\/29165656\/graph5-300x216.png\" alt=\"Graph diagram connects locations A through E. A connects to B by 8 units, B to C by 8 units, C to D by 10 units, D to E by 8 units, E to F by 7 units, F to G by 5 units, G to H by 5 units, and H to I by 5 units. In addition, B connects to D by 14 units, B to F by 20 units, F to I by 15 units, and G to I by 12 units. A red 0 is placed near C, 10 by D, 7 by B, 25 by F, 15 by A, 17 by I, 18 by E, 27 by G, and 22 by H.\" width=\"521\" height=\"375\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>So it will take you 27 minutes to get back to Client C to pick up your sample. &nbsp;It may have looked as if a different route, perhaps D, would have been faster but it turns out not to be the case. &nbsp;Using the graph confirmed the best route.<\/p>\n<p>Now you have to get all the way to your next client at H. &nbsp;You can tell by the work you have already done that the fast route back to H is from C to B to I to H. &nbsp;And how long will that take? &nbsp;It will take a speedy 22 minutes. &nbsp;Drawing a graph may seem complex, but in the end it really helps you make definite calculations rather than estimating. &nbsp;And that can mean the difference between closing the deal or missing the client altogether.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"author":538461,"menu_order":24,"template":"","meta":{"_candela_citation":"[]","CANDELA_OUTCOMES_GUID":"047c0561-dd6c-461a-8ab1-481920e0c38e","pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-143","chapter","type-chapter","status-publish","hentry"],"part":119,"_links":{"self":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/chapters\/143","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/wp\/v2\/users\/538461"}],"version-history":[{"count":0,"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/chapters\/143\/revisions"}],"part":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/parts\/119"}],"metadata":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/chapters\/143\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/pressbooks\/v2\/chapter-type?post=143"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/wp\/v2\/contributor?post=143"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/courses.lumenlearning.com\/ct-state-quantitative-reasoning\/wp-json\/wp\/v2\/license?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}