1 The Traveling Salesman Problem Tsp Is A Famous Problem For Which There Is No Known 2835379

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

Connect with a professional writer in 5 simple steps

Please provide as many details about your writing struggle as possible

Academic level of your paper

Type of Paper

When is it due?

How many pages is this assigment?

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 = n x n matrix of distances between cities

min = (infinity)

for all possible tours, do:

find the length of the tour

if length

min = length

store tour

a) What is the worst-case (big-O) complexity of this algorithm in terms of n (number of

cities)? You may assume that matrix lookup is O(1), and that the body of the ifstatement

is also O(1). You need not count the if-statement or the for-loop conditional

(i.e., testing to see when the for-loop is done), or any of the initializations at the start of

the algorithm. Clearly show the justification for your answer.

b) Given your complexity analysis, assume that the time required for the algorithm to run

when n = 10 is 1 second. Calculate the time required for n = 20 and show your work.

2. Suppose an algorithm solves a problem of size x in at most the number of steps listed in each

question below. Calculate the asymptotic time complexity (big-T or big-theta) for each example

below. Show your work, including values for c and x0along the way.

a) T(x) = 1

b) T(x) = 5x – 2

c) T(x) =3x^3 + 2 + x^2

d) T(x) = log (x * 2x!)

Document Preview:

ECS 32B: Fall 2018 Homework Assignment 1 Due Date: No later than Saturday, October 13, 9:00pm 0. Make sure to clearly identify your name, student number, and your discussion section on the work you submit. Submit only one pdf file via Canvas…do not submit a separate file for each problem. 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 = n x n matrix of distances between cities min = (infinity) for all possible tours, do: find the length of the tour if length

Attachments:

ECS-32B-homew….pdf