Question: you are given a subroutine' that can solve one problem quickly, and you are asked to construct an algorithm that uses the subroutine to solve

you are given a subroutine' that can solve one problem quickly, and you are asked to construct an algorithm that uses the subroutine to solve a different problem. 6 pts: 2 pts description of algorithm, 2 pts analysis of recursion, 2 pts correctness) Traveling Salesman: A Hamiltonian cycle in a graph is a cycle that visits every vertex exactly once. Given a complete graph where every edge has a positive weight, the traveling salesman cycle is the Hamiltonian cycle with minimum total weight; that is, the sum of the weight of the edges is smaller than for any other Hamiltonian cycle. Suppose you have a subroutine Hamcycle(G) that returns a number that is the weight of the optimal traveling salesman cycle of a weighted graph in O(n) time where n is the number of vertices in the graph G. Describe an algorithm that actually constructs the traveling salesman cycle of a given weighted graph as quickly as possible. Describe the algorithm, explain why it is correct and give the runtime
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
