Question: Worst Case for Greedy Algorithm: 1. Come up with an 8 node graph which forces your GreedyTsp() algorithm into an extremely bas solution: path cost

Worst Case for Greedy Algorithm:

1. Come up with an 8 node graph which forces your GreedyTsp() algorithm into an extremely bas solution:

path cost at least 1,000,000 times the optimal solution

When creating the edge cost matrix by hand that forces GreedyTsp() to a very bad or worst case result, you may ignore the 1 to 1000 constraint on the edge costs. Otherwise it is impossible to get a bad or worst case that is over 1,000,000 times the optimal solution.

2. make sure it is the worst (or one of the worst) possible solution.

3. Hard code the ECM matrix into a variation of your testing framework and screencap the resulting optimal and heuristic solutions

4. Make sure the output shows the cost matrix itself, along with the path & total cost of each heuristic's solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!