Complexity Theory: Problems on NP, NP-Completeness, and Circuit Complexity, Assignments of Computer Science

Several problems related to complexity theory, including np minimization problems, np-completeness, and circuit complexity. The problems cover topics such as the relationship between np and conp, the factoring problem, and the unsatisfiability of 2-cnf formulas. The document also includes proofs for various claims related to these topics.

Typology: Assignments

Pre 2010

Uploaded on 08/05/2009

koofers-user-isv
koofers-user-isv 🇺🇸

9 documents

1 / 19

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 6520: Computational Complexity
Problem Set 1 Solutions
Problem 1
Give a Karp reduction from CLIQUE to SAT.
Solution: Let Gbe a given graph, with V(G)=[n], and let k[n] be a
given integer. Define f(G, k) as the following Boolean formula:
1. For each i[k] and j[n], introduce a variable Xi,j. The intention is
that Xi,j is set to 1 if and only if the i-th vertex of the alleged k-clique
is vertex jof G.
2. Define
f(G, k)def
= Φ1Φ2Φ3Φ4,
where
Φ1
def
=Vi[k]Wj[n]Xi,j(for every i[k], the i-th vertex
of the clique is some vertex of the graph);
Φ2
def
=Vi[k]Vu,v[n],u<v Xi,u Xi,v (for every i[k], the
i-th vertex of the k-clique can be at most one vertex of the graph);
Φ3
def
=Vv[n]Vi,j[k],i<j Xi,v Xj,v (for each i6=j, no ver-
tex can be both the i-th vertex and the j-th vertex of the k-
clique);
Φ4
def
=Vi,j[k],i<j W{u,v}∈E(G)(Xi,u Xj,v )(there is an edge
between every pair of vertices in the k-clique).
It is clear that Ghas a k-clique if and only if Φ1,Φ2,Φ3,Φ4are all
satisfiable, and thus f(G, k) is satisfiable. The size of f(G, k) and the time
for computing f(G, k) is O(k2n2).
Problem 2
Let Quadratic be the problem of deciding whether a given system of
quadratic multivariate polynomial equations with integer coefficients has
a solution modulo 2. Prove that Quadratic is NP-Complete.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13

Partial preview of the text

Download Complexity Theory: Problems on NP, NP-Completeness, and Circuit Complexity and more Assignments Computer Science in PDF only on Docsity!

CS 6520: Computational Complexity

Problem Set 1 Solutions

Problem 1

Give a Karp reduction from CLIQUE to SAT.

Solution: Let G be a given graph, with V (G) = [n], and let k ∈ [n] be a given integer. Define f (G, k) as the following Boolean formula:

  1. For each i ∈ [k] and j ∈ [n], introduce a variable Xi,j. The intention is that Xi,j is set to 1 if and only if the i-th vertex of the alleged k-clique is vertex j of G.
  2. Define

f (G, k) def = Φ 1 ∧ Φ 2 ∧ Φ 3 ∧ Φ 4 ,

where

  • Φ 1 def =

i∈[k]

j∈[n] Xi,j

(for every i ∈ [k], the i-th vertex of the clique is some vertex of the graph);

  • Φ 2 def =

i∈[k]

u,v∈[n],u<v

Xi,u ∧ Xi,v

(for every i ∈ [k], the i-th vertex of the k-clique can be at most one vertex of the graph);

  • Φ 3 def =

v∈[n]

i,j∈[k],i<j

Xi,v ∧ Xj,v

(for each i 6 = j, no ver- tex can be both the i-th vertex and the j-th vertex of the k- clique);

  • Φ 4 def =

i,j∈[k],i<j

{u,v}∈E(G) (Xi,u^ ∧^ Xj,v)

(there is an edge between every pair of vertices in the k-clique).

It is clear that G has a k-clique if and only if Φ 1 , Φ 2 , Φ 3 , Φ 4 are all satisfiable, and thus f (G, k) is satisfiable. The size of f (G, k) and the time for computing f (G, k) is O(k^2 n^2 ). 

Problem 2

Let Quadratic be the problem of deciding whether a given system of quadratic multivariate polynomial equations with integer coefficients has a solution modulo 2. Prove that Quadratic is NP-Complete.

Proof: Clearly Quadratic ∈ NP. We show that Quadratic is NP-Hard by reduction from Circuit-SAT. Let C(x 1 ,... , xn) be a given Boolean circuit with n inputs and let m be the total number of nodes in C (i.e. the total number of all input nodes and gates). Topologically sort the nodes of C. WLOG assume that the n input nodes appear as the first n nodes in the topological order. Thus the last m − n nodes are all the gates in C, and the m-th (i.e. the last) node is the output gate. For each i ∈ [m], associate a variable zi to the i-th node. We arithmetize the circuit C, and define f (C) as the following system of m − n + 1 quadratic equations, where for each k ∈ {n + 1,... , m}:

  • if the k-th node is a NOT gate and its input comes from node i, where i < k, introduce the equation

zk = 1 − zi;

  • if the k-th node is an AND gate and its input comes from node i and node j, where i, j < k, introduce the equation

zk = zizj ;

  • if the k-th node is an AND gate and its input comes from node i and node j, where i, j < k, introduce the equation

zk = 1 − (1 − zi)(1 − zj ).

Finally introduce the equation zm = 1. The way to understand the reduction is that for each k ∈ [m], the variable zk simulates the k-th node of the circuit C, and first m−n equations of f (C) defined above simulate the circuit C. In particular, zm simulates the output of C. The last equation zm = 1 enforces the satisfiability of C.

Clearly f (C) can be computed in polynomial time. Suppose that C(a 1 ,... , an) = 1 for some assignment (a 1 ,... , an) ∈ { 0 , 1 }n^ to (x 1 ,... , xn). It is not difficult to see from the construction of the equations that assigning zi ← ai for each i ∈ [n] induces an assignment that satisfies all the equations in f (C). Conversely, suppose that there is an assignment to (z 1 ,... , zm) that sat- isfies all the equations in f (C) modulo 2. Then there is an assignment (a 1 ,... , am) ∈ { 0 , 1 }m^ to (z 1 ,... , zm) that satisfies all the equations in f (C).

Finding the minimum value m of Obj(x, ·): Since Obj(x, y) can be computed in time O(|x|c) for some constant c, the length of Obj(x, y) is at most O(|x|c); that is, the value of Obj(x, y) is at most 2O(|x| c)

. Therefore, by O(|x|c) queries of the form “Is there a y such that Obj(x, y) < v?” to an NP-oracle, one can use binary search to find the minumum value of Obj(x, ·).

Finding a y such that Obj(x, y) = m: Recall that if P = NP, then all NP search problems can be solved in polynomial time. Since Obj is polynomial-time computable, the language

{(x, v) : ∃y s.t. Obj(x, y) = v}

is in NP. Therefore, if P = NP, then given x and the minimum value m of Obj(x, ·) computed in the first phase, one can find in polynomial time a y such that Obj(x, y) = m. 

Problem 4

Prove that for each i ∈ N, Σi-SAT is ΣPi - Complete.

Proof: Clearly Σi-SAT ∈ ΣPi. We show that Σi-SAT is ΣPi - Hard. Let L ∈ ΣPi. By definition, there is a deterministic polynomial-time Turing machine M such that for every string x,

x ∈ L ⇐⇒ ∃y 1 ∀y 2 · · · Qi yi M (x, y 1 ,... , yi) = 1, (1)

where each yi is bounded by a fixed polynomial in length, and Qi = ∃ if i is odd, and Qi = ∀ if i is even. It follows, as in the proof of the Cook-Levin Theorem, that for each x, one can construct, in poly(|x|) time, a Boolean formula ϕM,x such that M (x, y 1 ,... , yi) = 1 if and only if there is a string z such that ϕM,x(y 1 ,... , yi, z) = 1. First consider the case where i is odd. By the foregoing discussion,

x ∈ L ⇐⇒ ∃y 1 ∀y 2 · · · ∃yi∃z ϕM,x(y 1 ,... , yi, z) = 1.

Note that on the RHS the number of alternations is still i. Hence

∃y 1 ∀y 2 · · · ∃yi∃z ϕM,x(y 1 ,... , yi, z)

is a Σi-SAT instance, and the mapping

f (x) = ∃y 1 ∀y 2 · · · ∃yi∃z ϕM,x(y 1 ,... , yi, z)

is a polynomial-time reduction from L to Σi-SAT. Now consider the case where i is even (so that Qi = ∀). We consdier L, and restate (1) as follows: There is a deterministic polynomial-time Turing machine M such that for every string x,

x ∈ L ⇐⇒ ∀y 1 ∃y 2 · · · ∃yi M (x, y 1 ,... , yi) = 1.

As before, we can construct, in poly(|x|) time, a Boolean formula ϕM ,x

such that M (x, y 1 ,... , yi) = 1 if and only if there is a string z such that ϕM ,x(y 1 ,... , yi, z) = 1. Therefore,

x ∈ L ⇐⇒ ∀y 1 ∃y 2 · · · ∃yi∃z ϕM ,x(y 1 ,... , yi, z) = 1.

The number of alternations is i. Hence

∀y 1 ∃y 2 · · · ∃yi∃z ϕM ,x(y 1 ,... , yi, z)

is a Πi-SAT instance, and the mapping

f (x) = ∀y 1 ∃y 2 · · · ∃yi∃z ϕM ,x(y 1 ,... , yi, z)

is a polynomial-time reduction from L to Πi-SAT, which is also a polynomial- time reduction from L to Σi-SAT. 

Problem 5

Consider the Factoring problem: Given a natural number N , express N as a product of its prime factors. To date no polynomial-time algorithm for Factoring is known, and the conjectured hardness of Factoring has been the basis of several public-key cryptosystems.

  1. Prove that if P = NP ∩ coNP, then Factoring can be solved by a polynomial-time algorithm. You may find the following facts useful: - The Fundamental Theorem of Arithmetics: Every integer greater than one can be decomposed into a product of prime factors, and moreover such a decomposition is unique up to the order of the prime factors. - There is a polynomial-time algorithm for deciding whether a given integer is a prime.

polynomial in n, which is the number of bits representing N. This is so because primality can be tested in polynomial time, and the number of iteration in the main loop in Phase (c) is at most n. 

Proof of Claim 2: Note that the complete factorization (pe 11 ,... , pe kk ) of N serves both as a certificate of membership for (N, x) if (N, x) ∈ LFac, and as a certificate of non-membership for (N, x) if (N, x) 6 ∈ LFac. To verify the membership or non-membership of a pair (N, x), using (pe 11 ,... , pe kk ), simply:

(a) Verify that p 1 ,... , pk are all primes. (b) Verify that N =

∏k i=1 p

ei i. (c) Verify that x appears as a prefix of pi for at least one i.

The correctness of the verification procedure follows from the unique factorization of integers, and its efficiency follows from that of the primality test. Therefore, LFac ∈ NP ∩ coNP. 

  1. Prove that unless NP = coNP, Factoring is not NP-Hard under Cook reduction. Conclude that unless NP = PH, Factoring is not NP-Hard under Cook reduction. Proof: If Factoring were NP-Hard under Cook reduction, then the language LFac defined above would also be NP-Hard under Cook reduction, as Factoring Cook-reduces to LFac and reductions are transitive.

Claim 3 If a language in NP ∩ coNP is NP-Hard under Cook re- duction, then NP = coNP.

Since LFac ∈ NP ∩ coNP, it follows that if Factoring were NP- Hard, then NP = coNP. The latter implies that NP = PH.

Proof of Claim 3: Let L ∈ NP ∩ coNP and suppose that L is NP-Hard under Cook reduction. We show that this implies that NP ⊆ NP ∩ coNP, and thus NP ⊆ coNP. The latter holds if and only if NP = coNP. Let L˜ ∈ NP. By assumption L˜ Cook-reduces to L. That is, there is an algorithm AO l that decides L˜ in polynomial time given access to an

oracle OL for the membership of L. We show that L˜ ∈ NP ∩ coNP. To do so, we show how to certify the membership and non-membership with respect to L˜. Consider any string x and the execution of AO L (x). Let q 1 ,... , qm be the queries made by A to OL and let a 1 ,... , am be the corresponding answers, i.e. ai = OL(qi) for each i. Since L ∈ NP∩coNP, each mem- ber of L has a certificate of membership and each non-member of L has a certificate of non-membership with respect to L. Let π 1 ,... , πm be the corresponding certificates of q 1 ,... , qm respectively with respect to L. It follows that with respect to L˜, {(q 1 , a 1 , π 1 ),... , (qm, am, πm)} serves both as a certificate of membership if x ∈ L˜, and as a certificate of non-membership if x 6 ∈ L˜. To verify the membership or non-membership of x with respect to L˜ using {(q 1 , a 1 , π 1 ),... , (qm, am, πm)}, simply:

(a) Run A on x. (b) When A makes the i-th query, verify that it is qi, and verify that ai is the correct answer using πi. If so, give ai to A; else reject. (c) Run A until it halts, and finally verify based on A’s output.

The verification procedure is clearly correct, and is efficient as A is. 

Problem 6

A language L is self-reducible if there is a polynomial-time oracle machine M such that (a) M L^ decides L, and (b) on every input x, M only makes queries of length strictly smaller than |x|. For instance, as shown in class, SAT and TQBF are self-reducible. Prove that every self-reducible language is in PSPACE.

Proof: Suppose that L is self-reducible, and let M be a polynomial-time oracle machine M that decides L given access to an L-oracle for strings shorter than the input. Consider the following algorithm M ′:

On input x:

  • Simulate M (x).
  • When M makes an oracle query q, recursively compute and answer with M ′(q).

Claim 4 A 2-CNF formula Φ is unsatisfiable if and only if for there is some variable x such that x ¬x and ¬x x.

From Claim 4, it follows that 2 - UNSAT ∈ NL, as the condition x x and x x can be tested in nondeterministic log space.^2 Since NL = coNL, it follows that 2 - SAT ∈ NL.

Proof of Claim 4: (⇐): Suppose there is a variable x for which x ¬x and ¬x x. Suppose that Φ were satisfied by an assignment A. WLOG suppose that A(x) = 1 (and thus A(¬x) = 0). Since there is a path x ¬x, A(x) = 1 and A(¬x) = 0, there is an edge (u, v) on this path such that A(u) = 1 and A(v) = 0. However, by the construction of GΦ, since (u, v) ∈ E(GΦ), the clause (¬u, v) is in Φ. But this clause is unsatisfied by the assignment A, a contradiction. In the case where A(x) = 0, we can reach a similar contradiction by considering a path ¬x x. (⇒): Suppose that for each variable x, x 6 ¬x or ¬x 6 x. We construct an assignment A that satisfies Φ, as follows. Repeat the following steps until all vertices have an assignment:

(a) Pick a vertex (i.e. literal) u such that (i) A(u) has not been defined, and (ii) u 6 ¬u.^3 Let A(u) = 1 and A(¬u) = 0. (b) For each vertex (i.e. literal) v such that u v, let A(v) = 1 and A(¬v) = 0. Thus by the symmetry of GΦ, every vertex reachable from u is assigned 1, and every vertex from which ¬u can be reached is assigned 0.

It is clear that by the hypothesis, the procedure terminates and assigns a value to each literal. We first show that the assignment A is well defined, that is, for each literal, A(x) cannot be both 0 and 1. It suffices to show that if u 6 ¬u, then for every v ∈ V (GΦ), u 6 v or u 6 ¬v. Suppose that both u v and u ¬v. The by the symmetry of GΦ, that u ¬v implies that (^2) Also note that this condition can be tested in linear time (and space) as the strongly connected components of GΦ can be computed in linear time (and space), thus 2 - SAT can be decided in linear time (and space). (^3) By the hypothesis, such a vertex (i.e. literal) exists as long as there is an unassigned vertex (i.e. literal).

v ¬u. Together with u v, this implies that u ¬u, contradicting the hypothesis. We now show that the above assignment A satisfies every clause of Φ, that is, no edge of GΦ goes from 1 to 0 under assignment A. To show this, it suffices to show that at the beginning of each iteration of the assignment procedure, each vertex reachable from the chosen vertex u either has not been assigned, or has been assigned 1. Suppose that u v and A(v) = 0 were already assigned in an earlier iteration. By the construction of the procedure, all vertices from which v can be reached, in particular u, would also have been assigned 0 in the earlier iteration, a contradiction. Hence assignment A satisfies Φ. 

We now show that 2 - SAT is NL-Hard by a reduction from STCONN (recall that NL = coNL). Let 〈G, s, t〉 be given, where G is a directed graph, and s, t ∈ V (G).

(a) For each edge (u, v) ∈ E(G), introduce a clause (¬u ∨ v). (b) Introduce clauses (s) and (¬t).

Let Φ be the resulting 2-CNF formula. Clearly Φ can be constructed in log space. We claim that Φ is satisfiable if and only if s 6 t in G. (⇒): Suppose that s t in G, and consider any assignment to the variables of Φ. In order to satisfies the clauses (s) and (¬t), variables s and t must be assigned 1 and 0 respectively. Let s → v 1 → · · · → vk → t be a path from s to t. Then in order to satisfy the clauses (¬s ∨ v 1 ), (¬v 1 ∨ v 2 ),... , (¬vk− 1 ∨ vk), variables v 1 ,... , vk must be assigned 1. But then the clause (¬vk ∨ t) would not be satisfied. (⇐): Suppose that s 6 t in G. Define S = {u ∈ V (G) : s u} and T = {v ∈ V (G) : s 6 v}. Therefore S ∩ T = ∅, s ∈ S, t ∈ T , and for every edge (u, v) ∈ E(G), exactly one of the following holds: (i) u, v ∈ S, or (ii) u, v ∈ T , or (iii) u ∈ T and v ∈ S. Let A be the assignment to the variables of Φ (i.e. the vertices of G) that assigns 1 to all vertices in S, and assigns 0 to all vertiex in T. Assignment A satisfies Φ, since A(s) = 1, A(t) = 0, and under assignment A there is no edge in G going from 1 to 0, as there is no edge from T to S. 

  1. Let Bipartite be the language consisting of bipartite graphs. Prove that Bipartite ∈ NL.

Claim 5 Vertex v ∈ V (G) lies on a cycle of odd length in G if and only if v(1)^ and v(2)^ are connected in G′.

Claim 6 Let s, t ∈ V (G). Then

  • s and t are connected by a path of even length in G if and only if G′^ ceases to be bipartite when augmented with the edge

s(1), t(1)

and

  • s and t are connected by a path of odd length in G if and only if G′^ ceases to be bipartite when augmented with a new vertex x and edges

s(1), x

and

x, t(1)

Let OUST be a membership oracle for USTCONN. By Claim 5, the following oracle machine M is a log-space reduction from Bipartite to USTCONN.

M OUST^ (G):

(a) Construct G′^ = f (G). (b) For each v ∈ V (G): i. Submit 〈G′, v(1), v(2)〉 to OUST, that is, ask OUST whether v(1)^ and v(2)^ are connected in G′. ii. If the answer is YES, then output 0 and halt. (c) If the answer from OUst is NO for each v ∈ V (G), then output 1.

Let OBIP be a membership oracle for Bipartite. By Claim 6, the following oracle machine N is a log-space reduction from USTCONN to Bipartite.

N OBIP^ (G, s, t):

(a) Construct G′^ = f (G). (b) Obtain G ′ by augmenting G′^ with the edge

s(1), t(1)

Ask OBIP whether G′^ is bipartite. If the answer is NO, then output 1 and halt. (c) Obtain{ Ĝ ′^ by augmenting G′^ with a new vertex x and edges s(1), x

and

x, t(1)

Ask OBIP whether Ĝ ′^ is bipartite. If the answer is NO, then output 1 and halt.

(d) Output 0.

It remains to prove Claims 5 and 6.

Proof of Claim 5:

(⇒): Suppose that v lies on a cycle v = v 1 → v 2 → · · · → vk → v 1 in

G, where k is odd. Then by the construction of G′, the path v(1) 1 →

v 2 (2) → v 3 (1) → v(2) 4 → · · · → v k(1) → v(2) 1 exists in G′, and thus v(1)^ and v(2)^ are connected in G′.

(⇐): Suppose that there is a path from v(1)^ to v(2)^ in G′. By the

construction of G′, the path must be of the form v(1)^ = v(1) 1 → v(2) 2 → v 3 (1) → v(2) 4 → · · · → v k(1) → v 1 (2) = v(2), where k is odd, and (v = v 1 , v 2 , · · · , vk) forms a k-cycle in G. 

Proof of Claim 6:

The proofs of the two parts are similar. We give a proof of the first part.

(⇒): Let s = v 0 → v 1 → · · · → vk = t be a path of length k connecting s and t in G, where k is even. By the construction of G′, the path s(1)^ = v(1) 0 → v(2) 1 → v 2 (1) → v 3 (2) → · · · → v(1) k = t(1)^ of length k exists in G′. Thus adding the edge

s(1), t(1)

results in a cycle of length

k + 1, and causes G ′ to be non-bipartite.

(⇐): Suppose that adding the edge

s(1), t(1)

in G′^ cause G ′ to be non-bipartite. This happens if and only if the

s(1), t(1)

introduces a cycle of odd length. By the construction of G′, such a cycle must be of the form s(1)^ = v 0 (1) → v(2) 1 → v(1) 2 → v(2) 3 → · · · → v(1) k = t(1)^ → s(1),

where k is even. Thus the path s(1)^ = v(1) 0 → v(2) 1 → v(1) 2 → v(2) 3 →

· · · → v(1) k = t(1)^ exists in G′. By the construction of G′, the path s = v 0 → v 1 → · · · → vk = t of length k exists in G. 

(⇐): Suppose that for L there is a Turing machine M as described. The following nondeterministic Turing machine decides L: Simply sim- ulate M , and whenever M needs to access the certificate, nondeter- ministically guess the current bit of the certificate and give it to M. Clearly N has a branch that accepts x if and only if x ∈ L. Since the certificate is 2O(s(n))^ bits long, M needs O(s(n)) bits to simulate the position of the head to the certificate tape, and since the certificate is read-once, M just needs O(1) space to simulate the content of the certificate. 

  1. Does the above result hold if the head of the certificate tape of M is allowed to move in both directions? Justify your answer. Answer: The above is unlikely to hold, since if the certificate is not read-once, then the class of languages with O(s(n))-space verifiers is exactly NTIME(2O(s(n))). This is unlikely the class NSPACE(s(n)) which is contained in DTIME(2O(s(n))). We show this for the special case where s(n) = log n. Let C be the class of log-space verifiable languages where the certificate is not read-once. Since L ⊆ P, it follows that C ⊆ NP. We now show that NP ⊆ C. First it is not difficult to see that the Cook-Levin reduction, from any NP language to 3 - SAT, can be computed in log-space. Therefore, every language in NP is log-space reducible to 3 - SAT. We next observe 3 - SAT is log-space verifiable: For a satisfiable 3-CNF formula Φ, the certificate is just a satisfying assign- ment, and for each clause, the verifier simply reads the assignments to the variables in the clause and checks whether the clause is satisfied by the assignment. Since log space is preserved under composition, it follows that every language in NP is contained in C. 

Problem 9

Prove that P 6 = SPACE(n).

Proof: The trick is to apply padding. For each string x and natural number `, define

pad(x, `) def = x ◦ #j^ ,

where the notation ◦ denotes concatenation, # is a special symbol, and j = max {` − |x|, 0 }. For a language A and a function f : N → N, define

pad(A, f (n)) def = {pad(x, f (|x|)) : x ∈ A}.

Claim 7 Let A be a language. If pad(A, nk) ∈ P for some constant k, then A ∈ P.

Proof: If pad(A, nk) can be decided in time O(nt), then A can be decided in time O((nk)t) = O(nkt). 

Assume for the sake of contradiction that P = SPACE(n). By the Space Hierarchy Theorem, there is a language B such that B ∈ SPACE(n^2 ) but B 6 ∈ SPACE(n). Since B ∈ SPACE(n^2 ), it follows that pad(B, n^2 ) ∈ SPACE(n), and thus by the hypothesis pad(B, n^2 ) ∈ P. This implies, by Claim 7, that B ∈ P, and hence again by the hypothesis, B ∈ SPACE(n), a contradiction. Therefore, P 6 = SPACE(n). 

Remark: We only know that P 6 = SPACE(n), but do not know whether either side is more powerful than the other.

Problem 10

Prove that there exist oracles A and B such that NPA^ = coNPA^ and NPB^6 = coNPB^.

Proof: It is clear that NPTQBF^ = coNPTQBF^ = PSPACE. We prove next the existence of an oracle B such that NPB^6 = coNPB^. The proof is similar to that for the oracle separation of P and NP. For an oracle A, define the language

LA def = { 1 n^ : ∀x ∈ A, |x| 6 = n}.

It is clear that for every oracle A, LA ∈ coNPA: On input 1n, an NTM simply guesses a string x ∈ { 0 , 1 }n, asks whether x ∈ A, and accepts if and only if x 6 ∈ A. Clearly, if x ∈ LA, then A contains no string of length n and thus all branches accept; if x 6 ∈ LA, then A contains some string of length n and thus at least one branch rejects. We now construct an oracle B such that LB 6 ∈ NPB^. Let M 1 , M 2 ,... be an enumerate of all NTMs, in which every NTM appears infinitely many times. Initially letting B = ∅, we construct B in stages, where in Stage i for each i ∈ N:

circuit complexity at least

2 m 4 m

nk+ 8(k + 1) log 2 n

nk

for sufficiently large n. For each m ∈ N, arrange lexicographically the truth tables of all Boolean functions on m variables, and let fn be the first function in this order that has circuit complexity greater than nk. We also view fn as a function on n variables that is completely determined by the first m variables. Thus the

language L def =

x : f|x|(x) = 1

has circuit complexity Ω(nk).

Claim 8 The language L ∈ ΣP 3.

This is because for x ∈ { 0 , 1 }n, x ∈ L if and only if

  • ∃ a (truth table for the) Boolean function fn^7 s.t. fn(x) = 1, and
  • ∀ circuit C of size at most nk, C(y) 6 = fn(y) for some y ∈ { 0 , 1 }m^ ,^8 and
  • ∀ Boolean function g on m variables s.t. g < f lexicographically,
  • ∃ a circuit C′^ s.t. C′^ is of size at most nk, and C′(y) = g(y) for every y ∈ { 0 , 1 }m.^9

The first quantifier is ∃, and the number of alternating quantifiers is 3. 

(^7) Since fn is determined by the first m variables and m = b(k + 1) log 2 nc, the truth table of fn has size 2m^ = O(nk+1). (^8) This condition can be checked in time O(n 2 k+1). (^9) This condition can be checked in time O(n 2 k+1).