1. Engineering
  2. Computer Science
  3. 1 the traveling salesman problem tsp is a famous problem...

Question: 1 the traveling salesman problem tsp is a famous problem...

Question details

1. The Traveling Salesman problem (TSP) is a famous problem for which there is no known, tractable solution (though efficient, approximate solutions exist). Given a list of cities and the distances in between, the task is to find the shortest possible tour (a closed walk in which all edges are distinct) that visits each city exactly once Consider the following algorithm for solving the TSP: n-number of cities m= nxn matrix esdistances between cities min - (infinity) for all possible tours, do: find the length of the tour flength min min-length store tour a) What is the worst-case (big-O) complexity of this algorithm in terms of (number of statement is also O(1). You need not count the if-statement or the for-loop conditional the alesritlu n cleawiys ehe for-losp i drneorany ofrfo nfializations at the sart of b) Given your complexity analysis, assume that the time required for the algorithm to run cities)? You may assume that matrix lookup is O(1), and that the body of the if whenn-10 is 1 second. Calculate the time required for n -20 and show your work

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution