


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Various np-complete problems, including the clique problem, vertex cover problem, 3cnf-sat problem, and the subset sum problem. It also explores the relationship between these problems and the class np, as well as reductions between them. The document concludes with a discussion on deciding dnf-satisfiability and the relationship between p and np.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Fall 2010 //Test 3 practice questions
NOTES:
You can assume the following:
i ∈ I ai^ =^ M^? The subset sum problem is N P-Complete.
The unary subset sum problem is in P.
Let P = N P. Here is a reduction from cnfsat CNFSAT to unary subset sum. Since P = N P there is a polynomial time algorithm A for cnfsat. Given a CNF Boolean formula F run the algorithm A on F. If F is satisfiable then output unary numbers a 1 , a 1 and if F is not satisfiable output two distinct unary numbers a 1 , a 2. Also, unary subset sum is in P and hence in N P, this shows that unary subset sum is N P-Complete. Let unary subsetsum be N P-Complete. Then all problems in N P are polynomial time mapping reducible to unary subset sum. Since unary subset sum is in P, all problems in N P are in P.
i ∈ I ai^ =^
i 6 ∈ I ai? Give a polynomial time reduction from the subset sum problem to the partition problem. Why is your reduction correct? We give a reduction from the subset sum to the partition problem that operates in polynomial time. Given an instance ({a 1 , a 2 ,... , an}, M ) of the subset sum problem, we construct an instance B = {b 1 , b 2 ,... , bn+2} where bi = ai for 1 ≤ i ≤ n, bn+1 =
1 ≤ i ≤ n ai^ +^ M^ and^ bn+2^ =^2 ·^
1 ≤ i ≤ n ai^ −^ M^ of the^ partition^ problem.
Reduction from cnfsat. Given a CNFSAT formula F output F ∧ (z ∨ ¯z) for some new variable z.
INPUT: A set U of n elements, a collection S 1 , S 2 ,... , Sm of subsets of U , and an integer 1 ≤ k ≤ m. PROBLEM: Is there a collection of at most k of these subsets whose union is equal to the set U? Give a polynomial time reduction from the vertex cover problem to the set cover problem. Argue why your reduction is correct. Let G(V, E) be an instance of the vertex cover problem on n vertices. We construct an instance of the set cover problem as follows:
(a) The universal set U = E i.e., the edges e ∈ E form the elements of U.
INPUT: an undirected graph G and a clique H in G PROBLEM: H is NOT a maximum-sized clique in G. Solution: We call this problem NOT-MAX-CLIQUE(G,H). First, we show that the problem is in NP (3 points). A nondeterministic verifier V will guess a set V ′^ ⊆ V of size |H| + 1, and then check whether V ′^ forms a clique in G. If yes, then it will accept as V ′^ is a clique of size greater than H. Otherwise, it will reject. Clearly, V accepts iff H is not the maximum size clique in G. To show NP-completeness, we reduce from the CLIQUE problem. Let (G(V, E), k) be an instance of the clique problem. We make a new graph G′^ on |V | + k vertices as an instance of the above problem. G′^ consists of two disjoint graphs: the first is (a copy of) the graph G itself, and the second is H, a clique on k vertices. Now, we give (G′, H) as an instance of the NOT-MAX-CLIQUE problem. Now we proceed with the proof of correctness. First, if G has a clique of size greater than k, then G′^ will have clique of size greater than H (since |H| = k) in its own copy of G. Hence, H is not a maximum size clique in G′. Now suppose than H is not a maximum size clique in G′, and that there is a larger clique H′. But then since the larger clique H′^ should completely lie inside the copy of G in G′^ since G and H are disjoint. But then we will have a clique H′^ of size greater than k = |H| in G itself. This will form a solution to the CLIQUE problem.