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: CPSC 421 Fall 2009 Homework 6: Solutions 7.17 of Sipser: Suppose that P = NP , and let A ∈ P be some languge that is not ∅ or Σ * . Clearly, P = NP and A ∈ P implies that A ∈ NP . It remains to be shown that every B ∈ NP is polynomial time reducible to A . Consider arbitrary B ∈ NP , noting that B ∈ P . To test if w ∈ B , run the polynomial time algorithm N deciding B . If N answers yes, output constant w ∈ ∈ A ; otherwise, output constant w / ∈ / ∈ A . Strings w ∈ and w / ∈ necessarily exist because both A and Σ * A are nonempty. This algorithm runs in polynomial time because N runs in polynomial time, and the length of w ∈ and w / ∈ are constant. Therefore, B is polynomial time reducible to A and A is NPcomplete. 7.28 of Sipser: Given an instance S, C of the SETSPLITTING problem, and a coloring partition R ∪ B = S , check that each C i ∈ C contains at least one element from R and S in polynomial time. Therefore, SETSPLITTING is in NP....
View Full
Document
 Spring '10
 Sabnis

Click to edit the document details