Question

5) Consider the following weighted graph G below. Lima 91 Mansted зе 96 63 50 so Newark A) Find a Hamilton Circuit with Columbus as the start and finish. B) Do the same thing except suppose you start and end in Newark. What happens?
0 0
Add a comment Improve this question Transcribed image text
Answer #1

We will use Nearest Neighbor Algorithm to find a Hamilton circuit

Start: Start from any vertex A.
First Step: Travel along the edge of minimal weight joined to A.
Middle Step: From a given vertex select the edge of minimal weight among all of the edges joined to vertices that have not been visited yet.

Last Step: Return to starting point A.

A)

From Columbus, the nearest unvisited city is Newark with distance 40. So, the next visited city is Newark.
From Newark, the nearest unvisited city is Mansfield with distance 55. So, the next visited city is Mansfield.
From Mansfield, the nearest unvisited city is Marion with distance 38. So, the next visited city is Marion.
From Marion, the nearest unvisited city is Lima with distance 54. So, the next visited city is Lima.
From Lima, we will return to first vertex Columbus with distance 96.
So, the Hamilton circuit is Columbus, Newark, Mansfield, Marion, Lima, Columbus with distance = 40 + 55 + 38 + 54 + 96 = 283

B)
From Newark, the nearest unvisited city is Columbus with distance 40. So, the next visited city is Columbus.
From Columbus, the nearest unvisited city is Marion with distance 50. So, the next visited city is Marion.
From Marion, the nearest unvisited city is Mansfield with distance 38. So, the next visited city is Mansfield.
From Mansfield, the nearest unvisited city is Lima with distance 91. So, the next visited city is Lima.
From Lima, we will return to first vertex Newark with distance 116.
So, the Hamilton circuit is Newark, Columbus, Marion, Mansfield, Lima, Newark with distance = 40 + 50 + 38 + 91 + 116 = 335

Add a comment
Know the answer?
Add Answer to:
5) Consider the following weighted graph G below. Lima 91 Mansted зе 96 63 50 so...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 3) Consider the graph G below The following questions refer to the graph G. A) Does...

    3) Consider the graph G below The following questions refer to the graph G. A) Does G have a Hamilton circuit? Why or why not? Write down your answer as a list of consecutive vertices visited on the path. ) Does G have a Hamilton path? Why or why not? Write down your answer as a list of onsecutive vertices visited on the path. fG has a Hamilton path and a Hamilton circuit, find it. Write down your answer as...

  • Consider the following weighted graph G:

    Consider the following weighted graph G: Use Prim's algorithm to find a minimal spanning tree T of this graph starting at the vertex s. You do not need to show every step of the algorithm, but to receive full credit you should: list the edges of T in the order in which they're added; redraw G and indicate which edges belong to T; compute the cost of T.

  • Consider the following undirected weighted graph where you want to find a path from A to...

    Consider the following undirected weighted graph where you want to find a path from A to G. A / \ B --- C \ / \ G --- H Weights (costs) of the edges are W(AB) = 1; W(AC) = 3; W(BC) = 1; W(BG) = 9; W(CG) = 5; W(CH) = 2; W(GH) = 1, and the heuristic estimates (h(n)) to the goal node, G, are h(A) = 5, h(B) = 4, h(C) = 1, h(G) = 0, h(H)...

  • Consider the following weighted, directed graph G. There are 7 vertices and 10 edges. The edge list E is as follows:

    Consider the following weighted, directed graph G. There are 7 vertices and 10 edges. The edge list E is as follows:The Bellman-Ford algorithm makes |V|-1 = 7-1 = 6 passes through the edge list E. Each pass relaxes the edges in the order they appear in the edge list. As with Dijkstra's algorithm, we record the current best known cost D[V] to reach each vertex V from the start vertex S. Initially D[A]=0 and D[V]=+oo for all the other vertices...

  • Liquidity Trap in the IS-LM Model (50 points) Consider a closed economy in which output is...

    Liquidity Trap in the IS-LM Model (50 points) Consider a closed economy in which output is the sum of consumption, investment and government purchases Y = C + I + G, and where C, I and G are respectively given by C = 5000 – 2000 r + 0.8(Y– T), I = 1500 – 3000 r, and G = 2500. Note also that lump-sum taxes T are given by 1250. (a) (5 points) Recalling that national savings equals S =...

  • a.   Find the FV of $1,000 invested to earn 10% annually 5 years from now. Answer...

    a.   Find the FV of $1,000 invested to earn 10% annually 5 years from now. Answer this question by using a math formula and also by using the Excel function wizard. Inputs: PV = 1000 I/YR = 10% N = 5 Formula: FV = PV(1+I)^N = Wizard (FV): $1,610.51 Note: When you use the wizard and fill in the menu items, the result is the formula you see on the formula line if you click on cell E12. Put the...

  • 9. What do you think are most likely reasons for the difference between the experimental and...

    9. What do you think are most likely reasons for the difference between the experimental and accepted values? 13 marks 10. Suppose that the centripetal force acting on an object in circular motion were doubled to a new value, and the object remained in a circular path with the same radius. How would the motion be affected? 13 marks Observations and Data; 17 marks time for 20 Centripe 1/T2 tal force (s2) Number of washers revolutions F/R (N/m) T (s)...

  • i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #...

    i need help making this program the skeleton of the code is below: //Include the following #include <iostream> #include <string> #include <fstream> //you must include this library if you wish to do file i/o using namespace std; /********************************************************* //Following is the declaration of a order record **********************************************************/ class order_record { public: string cell_number; string item_number; double quantity; double price; int processing_plant; double tax_rate; double order_tax; double net_cost; double total_cost; }; //Prototypes for your functions: input, output, and process will go...

  • Consider a cylindrical capacitor like that shown in Fig. 24.6. Let d = rb − ra...

    Consider a cylindrical capacitor like that shown in Fig. 24.6. Let d = rb − ra be the spacing between the inner and outer conductors. (a) Let the radii of the two conductors be only slightly different, so that d << ra. Show that the result derived in Example 24.4 (Section 24.1) for the capacitance of a cylindrical capacitor then reduces to Eq. (24.2), the equation for the capacitance of a parallel-plate capacitor, with A being the surface area of...

  • Please read the article and answer about questions. You and the Law Business and law are...

    Please read the article and answer about questions. You and the Law Business and law are inseparable. For B-Money, the two predictably merged when he was negotiat- ing a deal for his tracks. At other times, the merger is unpredictable, like when your business faces an unexpected auto accident, product recall, or government regulation change. In either type of situation, when business owners know the law, they can better protect themselves and sometimes even avoid the problems completely. This chapter...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT