
Spring 2004 CMSC 858: Homework 2 William Gasarch
Due Feb 18
COURSE WEBSITE: www.cs.umd.edu/ gasarch/858/858.html
(there is a tilde before the “g” in “gasarch”)
1. (5 points) Write your name clearly. Staple the HW so its not loose pages. Where and
when will the midterm be? Where and when will the final be?
2. (20 points) Show that if A≤p
mBand B∈Pthen A∈P.
3. (25 points) Let UN I Q be the following set of Boolean formulas.
UNIQ ={φ|φhas EXACTLY one satisfying assignment }.
(a) Write UNIQ in terms of quantifiers and a poly predicate.
(b) Show that if U N I Q ∈Pthen P=N P .
4. (25 points) Assume that there exists a function fwith domain Boolean formulas and
range {0,1}∗(interpreted as assignments to the formula, so a formula on nvariables
goes to an element of {0,1}n) such that
1) If φ∈SAT then f(φ) is a satisfying assignment for φ.
2) If φ /∈SAT then f(φ) will still be an assignment, but we do not guarantee anything
about it.
Show that, under this assumption, P=NP .
5. (25 points) Let A∈NP via B∈Pand polynomial p. That is
A={x|(∃y)[|y| ≤ p(|x|)∧B(x, y)}.
Show that if P=NP then there exists a function f∈Pwith the following behaviour:
If x∈Pthen f(x) = ysuch that B(x, y) (so fproduces the witness).
If x /∈Pthen f(x) = NO (so fdeclares there is no witness).
6. (EXTRA CREDIT) Let
f(k) = k2if SAT ∈DT I M E(nk);
kif SAT /∈DT I M E(nk).
We are pondering if fcan be computed in poly time. SAY which of the following is
true and prove it:
(a) It is KNOWN that f /∈P.
(b) It is KNOWN that f∈P.
(c) The status of fin Pis not known– it is linked to the P=NP question.
1