
Fall 2007 CMSC 652: Midterm Sample William Gasarch
Please Due by Oct 29
COURSE WEBSITE: ”http://www.cs.umd.edu/˜gasarch/652/652.html”
READING: Read all notes that I gave out and when over in class.
1. Assume that there is a machine with the following behaviour:
INPUT: (G, k) where G is a graph and kis a number
OUTPUT: If Ghas a clique of size k, then the output IS that clique of size k.
If GDOES NOT have a clique of size kthen the output is some kvertices.
If such a machine exists that runs in poly time then what complexity classes
will collapse?
2. Let Abe a set such that SAT ≤p
TA. Show that there exists a function f≤p
TA
such that the following hold:
(a) If φis a formula on nvariables then either f(φ)∈ {0,1}nor f(φ) = NO.
(b) If φ∈SAT then f(φ) is a satisfying assignment for φ.
(c) If φ /∈SAT then f(φ) = N O.
3. Show that if A≤p
mBand B∈Πp,SPARSE
3then A∈Πp,SPARSE
3.
4. (20 points) Let fbe such that the following hold.
PROPERTIES OF f
(a) f:{0,1}∗→ {0,1}∗.
(b) fis 1-1 and onto. Hence fhas an inverse.
(c) fis length preserving. That is, for all x,|x|=|f(x)|.
(d) fis computable in polynomial time.
END OF PROPERTIES OF f
Assume P = NP. Show that f−1(the inverse of f) can be computed in poly-
nomial time. (That is, there is a poly time Turing Machine that, on input x,
outputs f−1(x).)
(RECALL: if gis 1-1 and onto then the inverse of g, denoted g−1, is the function
such that g(g−1(x)) = g−1(g(x)) = x.)
1