This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Homework #4 (Solutions) 1. In the HalfCover problem, we are given m sets S 1 ,S 2 ,...,S m , each of which contains a subset of the integers 1 , 2 ,...,n . Our goal is to determine whether there exists a collection of k sets whose union has size at least n 2 . (a) Suppose we prove that HalfCover is NPcomplete, and that we find an O ( n 4 ) algorithm for HalfCover. Does this imply that there is a polynomial algorithm for 3SAT? Does this imply that there is an O ( n 4 ) algorithm for 3SAT? Explain your reasoning. Solution Suppose we prove that HalfCover is NPcomplete, and that we find an O ( n 4 ) algorithm for HalfCover. Does this imply that there is a polynomial algorithm for 3SAT? Does this imply that there is an O ( n 4 ) algorithm for 3SAT? Explain your reasoning. All NPcomplete problems are polynomialtime reducible to each other by definition. Thus a polynomial algorithm for HalfCover would imply a polynomial algorithm for 3SAT. While we know there is some polytime transformation, it does not imply that the transformation itself takes less than O ( n 4 ) time. It completely depends on the transformation, and in the absence of more information, we cannot claim there is an O ( n 4 ) algorithm for 3SAT. (b) Prove that HalfCover is NPcomplete. Solution Given a collection of sets s, one can efficiently check that the union of all sets does include half of all the elements, so HalfCover is in NP. We will now reduce SetCover to HalfCover. Given a SetCover instance with m sets S 1 ,S 2 ,...,S m and a universe of elements 1 , 2 ,...,n , double the number of elements to 1 , 2 ,..., 2 n , but do not change the sets. The elements n +1 ,..., 2 n will thus not be in any set, so if HalfCover has a solution, it covers exactly the elements 1 , 2 ,...,n , which gives us our solution to SetCover....
View
Full Document
 '06
 Shamsian
 Algorithms, Computational complexity theory, NPcomplete problems, NPcomplete, Boolean satisfiability problem, Parameterized complexity

Click to edit the document details