
U.C. Berkeley — CS172: Automata, Computability and Complexity Practice Midterm II
Professor Luca Trevisan November 4, 2009
Practice Midterm II
1. Define the language
L:= { hMi: for all strings x,M(x) halts within |x|2steps }.
Show that Lis not recognizable but Lis recognizable.
2. Define the language
L:= { hx, yi:K(x)> K(y)}.
Show that Lis not recognizable.
3. Prove that the class of NP -complete languages is not closed under union and intersection.
That is
•Show that there are languages A,Bwhich are NP complete but such at A∪Bis not
N P -complete.
•Show that there are languages A,Bwhich are NP -complete but such that A∩Bis not
N P -complete.
[Hint: recall that ∅and Σ∗cannot be NP-complete]
4. Define the problem
CLI QU E 1
2:= { hG, ki:Gis an undirected graph with a clique of size at least |V|/2 }.
Show that this problem is NP-complete.
1