Complexity Theory - Tutorial
Ivan Gavran
December 6th, 2016
1. TAUTOLOGY := {φ|φ is tautology}. Prove that TAUTOLOGY ∈ AP
Solution Given φ, universally generate all possible assignments of the
variables and evaluate φ at each of the assignments. If the evaluation
result is 0, then the input is rejected (otherwise, it is accepted).
2. Prove coNP ⊂ AP
Solution Take L ∈ coNP. Then L ∈ NP. This means there is a nondeterministic poly-time Turing machine N that decides L . We’ll convert
N to Ñ , an alternating-time poly-time decider for L. These two machines
are identical, except in the following three points:
• accepting state of the machine N is a rejecting state of the machine
Ñ
• rejecting state of the machine N is an accepting state of the machine
Ñ
• every state of N is a universal state of Ñ
It is clear that Ñ would accept L (N accepts if one branch ends up in
the accepting state. Ñ would notice that as rejecting state - it would
reject as soon as there is one rejecting state because all the states are
universal. N rejects if no branch end in an accepting state, i.e., all end up
in the rejecting state. But for Ñ that would mean that all the branches
are accepting, therefore, it would accept.) Also, since the computation is
exactly the same, it is also clear that it is poly-time Turing machine.
The second way of solving this problem is by recalling that TAUTOLOGY
is coNP complete problem. This means that any instance of problem in
coNP can be reduced by a polynomial deterministic Turing machine to an
instance of TAUTOLOGY. But for TAUTOLOGY we’ve already proven
that it is in AP.
j k
3. HALFCYCLE := {G = (V, E) : the longest cycle in G (directed graph) is |V2 | }.
Consider the following ”proof” for HALFCYCLE ∈ N P .
• compute m := n2 , n = |V (G)|
• nondeterministically select u1 , u2 , . . . , um ∈ V (G)
1
• if u1 , u2 , . . . , um is not a cycle, REJECT
• nondeterministically generate k, m < k ≤ n
• nondeterministically select v1 , . . . vk ∈ V (G)
• if v1 , . . . , vk form a cycle, REJECT, else ACCEPT
Can you find where is the problem with it? Furthermore, prove that
HALFCYCLE ∈ AP
Solution The problem is in the last step. Namely, after we generated
v1 , . . . vk , the whole computation would accept as soon as one branch
accepts which is as soon as one tuple doesn’t form a cycle (or there is
no cycle for that chosen k). This - however - doesn’t say anything about
the other branches. Recall that in nondeterministic Turing machine all
states are implicitly existential. A correct solution (HALFCYCLE ∈ AP )
would be
• compute m := n2 , n = |V (G)|
• existentially select u1 , u2 , . . . , um ∈ V (G)
• if u1 , u2 , . . . , um is not a cycle, REJECT
• universally generate k, m < k ≤ n
• universally select v1 , . . . vk ∈ V (G)
• if v1 , . . . , vk form a cycle, REJECT, else ACCEPT
4. For every i ≥ 1 if Σpi = Πpi , then P H = Σpi , that is, the hierarchy collapses
to the i-th level.
Solution We’d like to prove by induction that Σpi+k , Πpi+k ⊂ Σpi , ∀k ≥ 1.
The base, for k = 0 holds from the conditions.
We have to show the induction step. Assume the claim holds for k =
j−1, j ≥ 1, namely Σpi+j−1 , Πpi+j−1 ⊂ Σpi . Let L ∈ Σpi+j . By the definition,
there is a polynomial Turing machine M such that ∃u1 ∀u2 . . . Qi+j ui+j M (x, u1 , . . . , ui+j ) =
1 Define the language L0 by
(x, u1 ) ∈ L0 ⇔ ∀u2 . . . Qi+j ui+j M (x, u1 , . . . , ui+j ) = 1
This means that L0 ∈ Πpi+j−1 ⇒ L0 ∈ Σpi+j−1 . By the definition,
(x, u1 ) ∈ L0 ⇔ ∃u02 ∀u03 . . . Qi+j u0i+1 M 0 (x, u1 , . . . , u0i+j ) = 1
But then
x ∈ L ⇔ ∃u1 (x, u1 ) ∈ L0
⇔ ∃u1 ∃u2 ∀u3 . . . Qi+j M 0 (x, u1 , . . . , ui+j ) = 1
So, L ∈ Σpi+j−1 ⊂ Σpi . For L ∈ Πpi+j ⇒ L ∈ Σpi+j ⇒ L ∈ Σpi ⇒ L ∈ Πpi
2
5. If PH = PSPACE, the polynomial hierarchy collapses to finitely many
levels.
Solution We will show that if there is a complete problem for PH, then
it collapses
L ∈
[ pto finitely many levels. Take L to be PH-complete.
p
PH =
Σi . Therefore, there is an i such that L ∈ Σi . But every
i
language that is polynomial-time reducible to Σpi is also in Σpi . Therefore
PH ⊂ Σpi . Now recall that there are complete languages for PSPACE
(each language in PSPACE is - for example - polynomial time reducible
to QBF). Recall the following results: AP = PSPACE and we don’t know
whether P H = PSPACE (otherwise the polynomial hierarchy collapses to
only finitely many levels). Consider the following ”proof” of AP = P H:
We use a known result Σpi = ∪c Σi TIME(nc ). We already know P H ⊂
AP . For the other inclusion, choose any L ∈ AP . There is a poly-time
alternating algorithm for L. Suppose that this algorithm makes at most i
nondeterministic choices. Depending on the first nondeterministic
[
[ choice,
we have either L ∈ Σi P or L ∈ Πi P . Since P H =
Σj P =
Πj P , we
j
j
also have L ∈ P H
Solution The part when we say suppose that this algorithm makes at
most i choices is problematic. It might be that the number of choices
increases with the input size so that the value of i is unbounded. However,
the classes Σi P and Πi P assume that at most i choices are sufficient,
irrespective of the length of the input.
NOTE: Sources of the problems and more problems of the same kind:
• http://cse.iitkgp.ac.in/~abhij/course/theory/CC/Spring04/chap4.
pdf
3
© Copyright 2025 Paperzz