HW4 solutions

# HW4 solutions - Homework#4(Solutions 1 In the Half-Cover...

This preview shows pages 1–2. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Homework #4 (Solutions) 1. In the Half-Cover 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 Half-Cover is NP-complete, and that we find an O ( n 4 ) algorithm for Half-Cover. Does this imply that there is a polynomial algorithm for 3-SAT? Does this imply that there is an O ( n 4 ) algorithm for 3-SAT? Explain your reasoning. Solution Suppose we prove that Half-Cover is NP-complete, and that we find an O ( n 4 ) algorithm for Half-Cover. Does this imply that there is a polynomial algorithm for 3-SAT? Does this imply that there is an O ( n 4 ) algorithm for 3-SAT? Explain your reasoning. All NP-complete problems are polynomial-time reducible to each other by definition. Thus a polynomial algorithm for Half-Cover would imply a polynomial algorithm for 3-SAT. While we know there is some poly-time 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 3-SAT. (b) Prove that Half-Cover is NP-complete. 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 Half-Cover is in NP. We will now reduce Set-Cover to Half-Cover. Given a Set-Cover 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 Half-Cover has a solution, it covers exactly the elements 1 , 2 ,...,n , which gives us our solution to Set-Cover....
View Full Document

{[ snackBarMessage ]}

### Page1 / 3

HW4 solutions - Homework#4(Solutions 1 In the Half-Cover...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online