Answer Key Chapter 6

6th edition

2. a) Hamilton Circuits must pass through all the vertices once and only once and start and stop at the same vertex. Answers will vary. Here are some possible answers ABCDEIHGJFA ABCDHGJIEFA ABGJIHCDEFA AFEIHDCBGJA b) Hamilton Path must pass through all the vertices once and only once. Answers will vary: One possible answer AFEDCHIJGB c) Answers will vary : One possible answer FJABGHCDEI 4. AB and AC must be in every Hamilton Circuit, (it is the only way to include B) Therefore, AC is not in any Hamilton Circuit since B would be cut off There are only 4 Hamilton Circuits 1. ABCDEA 2. AEDCBA 3. ABCEDA 4. ADECBA 6. Answers can vary: a) Hamilton path: ADGCFBE b) Hamilton Circuit ADGCFBEA c) Hamilton path: ADEBFCG d) Hamilton Path FBEADCG 8. a) There are 6 Hamilton Circuits ABCFEDA ADFEBCA ABEDFCA Mirror images ADEFCBA ACBEFDA ACFDEBA

b) These are the same circuits as above except a new reference point DABCFED DFEBCAD DFCABED Mirror images DEFCBAD DACBEFD DEBACFD c) The circuits in part b are the same as the circuits in part a the difference is the starting vertex. 9. It doesn’t have a Hamilton Circuit one reason if you start at F you can’t get back to F unless you go through B again and that violates what a Hamilton circuit is, (visit every vertex once and only once) Or the degree of every vertex in a graph with a Hamilton circuit must be at least 2 because each circuit must “pass through” every vertex. A graph with a Hamilton path can at most have 2 vertices of degree one (starting and ending vertices). This graph has 2 vertices of degree 1. It is not a Hamilton path since edge FB would be needed, AB would be needed, EB would be needed, and CB would be needed. There are 4 edges that are needed to pass through these 5 vertices but B would have more than 2 edges. In order to visit A, E, C, and F the vertex B would have to be visited more than once. 10. It doesn’t have a Hamilton Circuit one reason if you start at F you can’t get back to F unless you go through B again and that violates what a Hamilton circuit is, (visit every vertex once and only once) Or the degree of every vertex in a graph with a Hamilton circuit must be at least 2 because each circuit must “pass through” every vertex. It does have a Hamilton Path. A graph with a Hamilton path can at most have 2 vertices of degree one (starting and ending vertices). This graph has 2 vertices of degree 1. FBAECD OR DCEABF 12. a) DAGFECB (Answers will vary) b) BADCEFG (Answers will vary) c) Any circuit passing through vertex B must contain edge AB. Any circuit passing through D must contain AD. Any circuit passing through G must contain AG. Therefore, any circuit passing through B, D and G must contain at least 3 edges meeting at A and would then pass through vertex A more than once. d) Same reason as part c

Answer Key Chapter 6

6th edition

14. a) weight of AD is 8 b) one possibility: ADEBCA c) one possibility: AEBCDA

part c weight is 8+7+4+6+2= 27 weight is 3+4+6+1+8= 22

18. a) 1.307674368 x 1012 or 1,307,674,000,000= 15! b) 2.652528598 x 1032 = 30! c) 2.028432049 x 1020= 30!/15! 22. a) 121,645,100,408,832,000 = 19! = 20!/20 20! 19!(20) b) 20 = = 20 19! 19! 201! 199!(200)(201) c) 40200 = = (200)(201) = 40200 199! 199!

24. a) 21.05 b) 201.005

(19!+ 21!) = 19!(1 + (20)(21)) = 421 = 21.05

(19!+ 21!) =

or 20! 19!(20) 20 ( 201!+ 199!) = 199!((200(201) + 1) = 40201 = 201.005 200! 199!(200) 200 1 201!+ 199!) 200!((201) + 200 ) ( or = = 201.005 200! 200!

20!

 1  20! + (21)   20  = 21.05 20!

N ( N − 1) 2 K200 is a complete graph with 200 vertices (200)(199)/2 = 19,900 b) 20,100 K201 is a complete graph with 201 vertices (201)(200)/2 = 20100 or 19,900+200 c) 500 y − x is the number of new edges made when adding a new vertex to the complete graph. This new vertex (501st) makes one new edge to all the pervious vertices (500) 28. a) 7 K N = ( N − 1)! 720 = 6! ( N − 1) = 6 so N= 7 N ( N − 1) b) 12 In a complete graph, the number of edges with N vertices is 2 N ( N − 1) → 132 = N ( N − 1) or use algebra N 2 − N − 132 = 0 and solve N 66 = 2 or What two consecutive number whose product is 132? 11*12 N ( N − 1) c) 401 80200 = → 160400 = N ( N − 1) use algebra 2 or What two consecutive number whose product is 160400? 400*401 30. a) Brute Force (4 vertices 6 Hamilton Circuit) ABCDA or ADCBA weight 115 ABDCA or ACDBA weight 150 ACBDA or ADBCA weight 125 ABCDA or ADCBA is the optimal Hamilton Circuit with a weight of 115. b) Nearest Neighbor starting at vertex A ABDCA 20+10+50+70 = 150 c) Nearest Neighbor starting at C CBDAC 15+10+30+70 =125 d) Nearest Neighbor starting at D DBCAD 10+15+70+30 = 125

26. a) 19,900

In a complete graph, the number of edges with N vertices is

Answer Key Chapter 6 Nearest neighbor starting at A ADECBA 185+302+165+305+500=1457 Miles Cost is 1457(8) = $11,656

33. a) ADECBA $11,656. . b) ADBCEA $9,760 c) ABCEDA $11,656

6th edition

Nearest neighbor starting at B BCEADB 305+165+205+185+360=1220 Miles Cost is 1220(8) = $9,760 Rewrite the circuit starting at A Optimal must use Brute Force but AB must be first

The lowest mileage is 1457 miles. The Cost then is 1457(8)=$11,656 36. a) Nearest Neighbor starting at Nashville Nashville, Louisville, St. Louis, Pittsburgh, Boston, Dallas, Houston, Nashville 168+263+588+561+1748+243+769=4,340 miles b) Nearest Neighbor starting at St. Louis St Louis, Louisville, Nashville, Pittsburg, Boston, Dallas, Houston, St Louis 263+168+553+561+1748+243+779 = 4,315 miles 37.

Starting Vertex Hamilton Circuit Length of the Circuit A ADEBCA 2.1+1.2+2.8+2.6+2.3=11 B BADECB 2.2+2.1+1.2+3.1+2.6=11.2 C CDEABC 1.4+1.2+2.4+2.2+2.6=9.8 D DEABCD 1.2+2.4+2.2+2.6+1.4=9.8 E EDCABE 1.2+1.4+2.3+2.2+2.8=9.9 The shortest is CDEABC or DEABCD with weight 9.8 (notes these are the same circuits just with different starting vertex) This circuit starting at A is ABCDEA or AEDCBA with weight 9.8

Answer Key Chapter 6

6th edition

38. Starting Vertex Hamilton Circuit Length of the Circuit A AFEBCDA 8+12+10+14+19+17=80 B BEFACDB 10+12+8+13+19+18=80 C CAFEBDC 13+8+12+10+18+19=80 D DAFEBCD 17+8+12+10+14+19=80 E EBCAFDE 10+14+13+8+21+32=98 F FACBEDF 8+13+14+10+32+21=98 There 2 circuits (not counting direction) with the same total weight 80 which is the lowest of the 6 Starting at D: DBEFACD or DCAFEBD DAFEBCD or DCBEFAD 42. Boston Pittsburg Louisville Nashville St Louis Dallas Houston Boston 561+388+168+299+630+243+1804= 4,093 miles Dallas Houston Nashville Louisville St Louis Pittsburg Boston Dallas 243+769+168+263+588+561+1748= 4,340 miles Houston Dallas St Louis Louisville Nashville Pittsburg Boston Houston 243+630+263+168+553+561+1804=4 ,222 miles Louisville Nashville St Louis Pittsburg Boston Dallas Houston Louisville 168+299+588+561+1748+243+928= 4,535 miles Pittsburg Louisville Nashville St Louis Dallas Houston Boston Pittsburg 388+168+299+630+243+1804+561= 4,093 miles Nashville Louisville St. Louis Pittsburgh Boston Dallas Houston Nashville 168+263+588+561+1748+243+769=4,340 miles St Louis Louisville Nashville Pittsburg Boston Dallas Houston St Louis 263+168+553+561+1748+243+779 = 4,315 miles The shortest circuit with a distance of 4,093 miles The Hamilton Circuit: Boston Pittsburg Louisville Nashville St Louis Dallas Houston Boston 44. Cheapest link Order c AF 8 d EB 10 e EF 12 f AC 13 g BD 18 h DC 19 Total 80 miles the Hamilton Circuit BDCAFEB 48. SEE exercise 42 if you used the nearest neighbor Our Schedule said to do this by Cheapest link Nashville-Louisville 168 Dallas-Houston 243 Louisville-St Louis 263 Pittsburgh-Nashville 553 Boston-Pittsburgh 561 St Louis-Dallas 630 Houston-Boston 1804 Total mileage is 4222 miles Circuit is Nashville, Louisville, St Louis, Dallas, Houston, Boston, Pittsburgh, Nashville

Answer Key Chapter 6

6th edition

50. a) 4350 minutes = 72.5 hours = 3.02 days First, find the number of paired cities. This is the number of edges in a K30 (30)(29)/2 = 435 edges. Each edge takes 10 minutes so 10(435) = 4350 minutes b) Brute Force is a really bad idea. There are 29! Hamilton Circuits in K30 29! = 8.84x 1030 = 8,841,769,940,000,000,000,000,000,000,000. Because of mirror images there is only half of these that you actually have to calculate. 4,420,884,970,000,000,000,000,000,000,000. If it took only 1 second per calculation it would take over 1.4 x 1023 years to find all the calculations. He’ll be dead long before he gets to even .000000001% done. 100 years only 3,153,600,000 done 52. a)

b) The graph is based on distance. Using logic, it seems that FBEDACF is optimal. The length is 32 miles (Any algorithm can apply) But logic gives the optimal HC

57. The alphabetical order of the vertices is the Hamilton Circuit and connecting T to A (Answers can vary)

64. Using nearest neighbor algorithm the cheapest edge would always be part of the circuit. It might be easier to explain by using an example, any of the work above that used repetitive nearest neighbor would show that every these Hamilton Circuit does have the lowest weighted edge Explanation: Suppose the cheapest edge in a graph is the edge joining vertices X and Y. Using nearest neighbor algorithm we will eventually visit one of these vertices. Let us suppose that the first one we visit is X. Then since edge XY is the cheapest edge in the graph it will be the cheapest edge from X. We have not visited vertex Y yet therefore XY will be picked. 67 A graph that has a bridge cannot have a Hamilton Circuit. Using the definition of a bridge: Given a connected graph, if an edge is removed and the graph becomes disconnected, then the edge is called a bridge Using the graph below CD is a bridge. Once edge CD is used in order to return to the starting vertex you must pass though this edge again which mean we would be visiting vertices C and D twice. Making it impossible to make a Hamilton Circuit.

b) Using the graph above a Hamilton path is BACDEFGHI