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
Unformatted text preview: CS215 REVIEW EXERCISES not graded Problem 1. (problem 7.15) Let UNARYSSUM be the subsetsum problem in which all numbers are represented in unary. That is, each number k is encoded as a string of k “1”s. (a) Show that UNARYSSUM is in P. (b) Why does the NPcompleteness proof for SUBSETSUM in the book fail to show UNARYSSUM is NP complete? Be specific as you can about what is wrong with the content of the reduction. (Don’t just say, for example, “because UNARYSSUM is in P, so if the reduction was correct, we would know that P=NP, and we don’t know that.”) Problem 2. (a) (problem 7.17) Prove, using the definitions of P, NP, and NPcomplete, that if P=NP, then each language L in P (except the languages Σ * and ∅ ) is NPcomplete. (b) Prove formally that ∅ is not NPcomplete (according to the definition of NPcomplete). Problem 3. (problem 7.24) Define D = {h p ( x 1 , x 2 , . . . , x n ) i : p is a polynomial over variables x 1 , x 2 , . . . , x n and p ( c 1 , c 2 , . . . , c n ) = 0 for some c 1 , c 2 , . . . , c n ∈ N } . That is, D contains the multivariable polynomials that have integer roots. (a) Show that D is NPhard. Hint: f ( x ) g ( x ) = 0 iff f ( x ) = 0 or g ( x ) = 0, while f ( x ) 2 + g ( x ) 2 = 0 iff f ( x ) = 0 and g ( x ) = 0....
View
Full
Document
This note was uploaded on 11/29/2010 for the course CS 172 taught by Professor Seshia during the Fall '08 term at Berkeley.
 Fall '08
 Seshia

Click to edit the document details