Optimization versus search. Recall the traveling salesman problem:TSPInput: A matrix of | StudySoup

Textbook Solutions for Algorithms

Chapter 8 Problem 8.1

Question

Optimization versus search. Recall the traveling salesman problem:

TSP

Input: A matrix of distances; a budget b

Output: A tour which passes through all the cities and has length \(\leq b\), if such a tour exists.

The optimization version of this problem asks directly for the shortest tour.

TSP-OPT

Input: A matrix of distances

Output: The shortest tour which passes through all the cities.

Show that if TSP can be solved in polynomial time, then so can TSP-OPT.

Solution

Step 1 of 4

Travelling salesman problem (TSP) is defined as:

Given a list of cities and the distance between each pair of cities and a budget b. We have to find the path with costs b, visits all the cities exactly once and returns to the same city where we started.

TSP-OPT is defined as:

Given a list of cities and the distance between each pair of cities. The problem is to find the shortest path which starts from a city, visits all the cities exactly once and returns to the same city where we started.

Subscribe to view the
full solution

Title Algorithms  1 
Author Sanjoy Dasgupta Algorithms, Christos H. Papadimitriou Algorithms, Umesh Vazirani Algorithms
ISBN 9780073523408

Optimization versus search. Recall the traveling salesman problem:TSPInput: A matrix of

Chapter 8 textbook questions

×

Login

Organize all study tools for free

Or continue with
×

Register

Sign up for access to all content on our site!

Or continue with

Or login if you already have an account

×

Reset password

If you have an active account we’ll send you an e-mail for password recovery

Or login if you have your password back