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.
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.
 Spring '10
 Sabnis
 Degree of a polynomial, polynomial time

Click to edit the document details