Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

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 lengthb, 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.

Short Answer

Expert verified

The TSP is solved in the polynomial time by the binary search, then by the binary search routine TSP-OPT is also solved in polynomial time.

Step by step solution

01

Explain Traveling Salesman Problem

Travelling salesman problem deals with the set of cities and the distance between the cities. The aim of the problem is to find the shortest route that leads to visit every city exactly once. A tour is a walk around the city that does not use any route or edge more than once and ends with the city that tour has begun.

02

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

In order to solve TSP-OPT in polynomial time, the TSP has to be called to polynomial number of calls with varying input using binary search. Consider the graph G with the cities as vertices and the routes as edges. Consider Tbe the sum of all the edge weights and minimum tour is at most T.

Start the binary search on TSP withb=T2, If found then the min tour must be between 0 and T2. If the answer is not found, then the value of the min tour must be between T and T2. Continue the binary search until the resolution of the min-edge length is reached in the graph. The complexity of the binary search must be polynomial in the input argument.

Consider L be the largest edge weight and to replace all the edge weights with L , It takes at most |E|logLbits to represent T. The former representation is still polynomial in the input size.

Therefore, only a polynomial number of calls to TSP using binary search solves the TSP-OPT in polynomial time.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Consider the CLIQUE problem restricted to graphs in which every vertex has degree at most v. Call this problem CLIQUE-3 .

(a) Prove that CLIQUE-3 is in NP .

(b) What is wrong with the following proof of NP-completeness for CLIQUE-3 ? We know that the CLIQUE problem in general graphs is NP-complete, so it is enough to present a reduction from CLIQUE-3 to CLIQUE . Given a graph G with vertices of degree 3, and a parameter g, the reduction leaves the graph and the parameter unchanged: clearly the output of the reduction is a possible input for the CLIQUE problem. Furthermore, the answer to both problems is identical. This proves the correctness of the reduction and, therefore, the NP-completeness of CLIQUE-3 .

(c) It is true that the VERTEX COVER problem remains NP-complete even when restricted to graphs in which every vertex has degree at most 3 . Call this problem VC-3 . What is wrong with the following proof of NP-completeness for CLIQUE ? We present a reduction from VC-3 to CLIQUE-3 . Given a graph G=(V,E) with node degrees bounded by 3 , and a parameter b , we create an instance of CLIQUE-3 by leaving the graph unchanged and switching the parameter to |V|-b. Now, a subset CVis a vertex cover in G if and only if the complementary set V-C is a clique in G. Therefore G has a vertex cover of sizebif and only if it has a clique of size |V|-b. This proves the correctness of the reduction and, consequently, the NP-completeness of CLIQUE-3 .

(4)Describe an O(V)algorithm for CLIQUE-3 .

Question: In an undirected graph G=(V,E), we say DVis a dominating set if every vV is either in D or adjacent to at least one member of D. In the DOMINATING SET problem, the input is a graph and a budget , and the aim is to find a dominating set in the graph of size at most , if one exists. Prove that this problem is NP-complete.

Search versus decision. Suppose you have a procedure which runs in polynomial time and tells you whether or not a graph has a Rudrata path. Show that you can use it to develop a polynomial-time algorithm for RUDRATA PATH (which returns the actual path, if it exists).

Give a simple reduction from 3D MATCHING to SAT, and another from RUDRATA CYCLE to SAT.

(Hint: In the latter case you may use variables xijwhose intuitive meaning is “vertex i is the j th vertex of the Hamilton cycle”; you then need to write clauses that express the constraints of the problem.)

Sequencing by hybridization. One experimental procedure for identifying a new DNA sequence repeatedly probes it to determine which k-mers(substrings of length ) it contains. Based on these, the full sequence must then be reconstructed.Let’s now formulate this as a combinatorial problem. For any string x (the DNA sequence), let Γ(x)denote the multiset of all of its localid="1658905204605" k-mers. In particular, localid="1658904556515" Γ(x)contains exactly |x|-k+1elements.The reconstruction problem is now easy to state: given a multiset of strings, find a string x such that Γ(x)is exactly this multiset.

(a)Show that the reconstruction problem reduces to RUDRATA PATH. (Hint: Construct a directed graph with one node for each localid="1658904858295" k-mers, and with an edge from a to b if the last k-1characters of match the first localid="1658905395287" k-1characters of b.)

(b)But in fact, there is much better news. Show that the same problem also reduces to EULER PATH. (Hint: This time, use one directed edge for each k-mer.)

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free