ANSWER:
GIVEN THAT:
Two well-known NP-complete problems are 3-SAT and TSP:
1) 3-SAT ≤p TSP.
TRUE:
There exists a reduction from any NP-complete problem to any other such problem.
2)If P is not equal to NP, then 3-SAT ≤p 2-SAT.
FALSE:
If , there is no polynomial-time algorithm for 3-SAT. However, 2-SAT is known to be in P; if the reduction existed,it would imply a polynomial-time algorithm for 3-SAT.
3)If P is not equal to NP, then no NP-complete problem can be solved in polynomial time.
TRUE:
A polynomial-time algorithm for one NP-complete problem yields polynomial-time algorithms for all others. Hence, either all these problems are in P, or none are. implies the latter.
3. (3 pts) Two well-known NP-complete problems are 3-SAT and TSP, the traveling salesman problem. The...
The Traveling Salesman problem (TSP) is famous. Given a list of cities and the distances in between them, the task is to find the shortest possible tour that starts at a city, visits each city exactly once and returns to a starting city. A particular tour can be described as list of all cities [c1,c2, c3, ,cn] ordered by the position in which they are visited with the assumption that you return from the last city to the start. This...
Claim: It is known that any NP-complete problem will require exponential time (that is, a polynomial time algorithm for it is known to be impossible). TRUE or FALSE?
algorithm TRUE OR FALSE TRUE OR FALSE Optimal substructure applies to alloptimization problems. TRUE OR FALSE For the same problem, there might be different greedy algorithms each optimizes a different measure on its way to a solutions. TRUE OR FALSE Computing the nth Fibonacci number using dynamic programming with bottom-upiterations takes O(n) while it takes O(n2) to compute it using the top-down approach. TRUE OR FALSE Every computational problem on input size n can be...
Consider a special version of the 3SAT problem, where every clause has exactly 3 literals, and each variable appears at most 3 times. Show that this version of 3SAT can be solved in polynomial time, by giving a polynomial time algorithm that finds a satisfying assignment. HINT: Consider the bipartite graph with clauses on the left, and variables on the right. Connect a clause to a variable if the variable appears in the clause. Argue that this graph has a...
Question 4 (4 marks). a. Consider the decision problems PROBLEMA and PROBLEMB. PROBLEMA is known to be NP- Complete Your friend has found a polynomial time reduction from PROBLEMB to PROBLEMA. Another friend of yours has found an algorithm to solve any instance of PROBLEMB in polynomial time Have your friends proved that P=NP? Explain your answer. [2 marks b. Consider the following algorithm, which computes the value of the nth triangle number. function TRIANGLENUMBER(n) result 0 for i in...
2. Describe why finding a polynomial-time algorithm for a NP-complete problem would answer the question if P = NP. What would the answer be? (7-10 sentences minimum)
DNF-SAT is the satisfiability problem for Boolean formulae in disjunctive normal form (DNF). A formula in DNF is a disjunction of anticlauses A1 ∨ A2 ∨ · · · ∨ Ak , where each Ai for 1 ≤ i ≤ k is a conjunction l1 ∧ l2 ∧···∧ lji of literals. 1. What is wrong with the following argument? CNF-SAT is polynomial-time reducible to DNF-SAT, since ∧ and ∨ each distribute over the other. For example, (x1∨x2)∧(x1∨x3) can be rewritten...
Question 7 2 pts The complexity class NP-complete contains decision problems in both and Question 8 2 pts The best known solution to an NP-compete problem takes number of operations. Question 9 2 pts Is there a way to partition S = {4, 2, 6, 3, 8,5} into two sets with equal sum? Question 10 2 pts How many subsets of S = {4, 2, 6, 3,8} to 12? Question 11 2 pts The longest common sub-sequence between LIGHTSABER and...
Note: For the following problems, you can assume that INDEPENDENT SET, VERTEX COVER, 3-SAT, HAMILTONIAN PATH, and GRAPH COLORING are NP-complete. You, of course, may look up the defini- tions of the above problems online. 5. The LONGEST PATH problem asks, given an undirected graph G (V, E), and a positive integer k , does G contain a simple path (a path visiting no vertex more than once) with k or more edges? Prove that LONGEST PATH is NP-complete. Note:...
Show that the following problem is NP-Complete (Hint: reduce from 3-SAT or Vertex Cover). Given an undirected graph G with positive integer distances on the edges, and two integers f and d, is there a way to select f vertices on G on which to locate firehouses, so that no vertex of G is at distance more than d from a firehouse?