Docsity

Complexity Theory: Sparse Languages and P vs. NP - Prof. Jonathan Katz, Study notes of Computer Science

Toggle sidebar
bg1
Notes on Complexity Theory: Fall 2005 Last updated: December, 2005
Lecture 6
Jonathan Katz
1 Sparse Languages and Pvs. N P
In this lecture, we will explore various consequences that follow if N P -complete languages are
reducible to sparse languages (with different results for Karp reductions and (Cook-)Turing reduc-
tions). First, let us define what it means for a language to be sparse.
Definition 1 A language Lis sparse if there exists a polynomial psuch that |L∩ {0,1}n| ≤ p(n).
In other words, Lcontains only polynomially-many strings of any given length. ♦
It is not hard to see that any sparse language is in P/poly (use a lookup table). In fact:
Theorem 1 An N P-complete language Lis Turing-reducible to a sparse language iff NP ⊂
P/poly.
The proof is quite straightforward (one direction is trivial), and would make a good homework/exam
question. (Hint: Use the formulation of P/poly in terms of p olynomial-length advice strings. . . )
We will see later the Karp-Lipton theorem which gives evidence that N P 6⊂ P/poly (in which case,
by the above, N P-complete languages are not Turing-reducible to sparse languages).
We can show a stronger result for the case of Karp reductions:
Theorem 2 (Mahaney’s theorem) An N P-complete language Lis Karp-reducible to a sparse
language iff P=N P .
Proof One direction is easy: if P=N P then any L∈ N P is trivially Karp-reducible to the
sparse language {1}. (Why?)
The other direction is more difficult. Note first that if some N P -complete language Lis Karp-
reducible to a sparse language, then every language in N P is Karp-reducible to a sparse language.
Consider the N P -complete language LSAT defined as follows: (φ, x)∈LSAT if φis a boolean for-
mula in nvariables, x∈ {0,1}n, and there is a satisfying assignment for φwhich is lexicographically
at most x. (Note that (φ, 1n)∈LSAT iff φ∈SAT , so LSAT is easily seen to be N P -complete.)
Let LSAT be Karp-reducible to the sparse set Svia the poly-time computable function f.
We now show a polynomial-time algorithm for SAT which implies that P=N P. Given an
input φwith nvariables, the algorithm will apply fto various instances (φ, x) of LSAT ; since f
is poly-time computable, this implies a polynomial upper bound p(n) on the length of the output
of f. Let q(n)def
=|S∩ {0,1}≤p(n)|and note that qis polynomial by sparseness of f.
We will view our algorithm as running a breadth-first search on a tree in which a node labeled
vhas children labeled v0 and v1; the root is labeled with the empty string. A node labeled v
is viewed as corresponding to φwith the first |v|variables set to v. When we say that φhas a
satisfying assignment lexicographically at most vfor |v|< n, what we really mean is that φhas a
satisfying assignment lexicographically at most v1n−|v|(alternately, there is a satisfying assignment
of φin which the values of the first |v|variables are lexicographically at most v). We also use
f(v) as shorthand for f((φ, v1n−|v|)) (so that if f(v)∈Sthen φhas a satisfying assignment
lexicographically at most v). The algorithm proceeds as follows:
6-1
pf3
pf4
pf5

Partial preview of the text

Download Complexity Theory: Sparse Languages and P vs. NP - Prof. Jonathan Katz and more Study notes Computer Science in PDF only on Docsity!

Notes on Complexity Theory: Fall 2005 Last updated: December, 2005

Lecture 6

Jonathan Katz

1 Sparse Languages and P vs. N P

In this lecture, we will explore various consequences that follow if N P-complete languages are reducible to sparse languages (with different results for Karp reductions and (Cook-)Turing reduc- tions). First, let us define what it means for a language to be sparse.

Definition 1 A language L is sparse if there exists a polynomial p such that |L ∩ { 0 , 1 }n| ≤ p(n). In other words, L contains only polynomially-many strings of any given length. ♦

It is not hard to see that any sparse language is in P/poly (use a lookup table). In fact:

Theorem 1 An N P-complete language L is Turing-reducible to a sparse language iff N P ⊂ P/poly.

The proof is quite straightforward (one direction is trivial), and would make a good homework/exam question. (Hint: Use the formulation of P/poly in terms of polynomial-length advice strings... ) We will see later the Karp-Lipton theorem which gives evidence that N P 6 ⊂ P/poly (in which case, by the above, N P-complete languages are not Turing-reducible to sparse languages). We can show a stronger result for the case of Karp reductions:

Theorem 2 (Mahaney’s theorem) An N P-complete language L is Karp-reducible to a sparse language iff P = N P.

Proof One direction is easy: if P = N P then any L ∈ N P is trivially Karp-reducible to the sparse language { 1 }. (Why?) The other direction is more difficult. Note first that if some N P-complete language L is Karp- reducible to a sparse language, then every language in N P is Karp-reducible to a sparse language. Consider the N P-complete language LSAT defined as follows: (φ, x) ∈ LSAT if φ is a boolean for- mula in n variables, x ∈ { 0 , 1 }n, and there is a satisfying assignment for φ which is lexicographically at most x. (Note that (φ, 1 n) ∈ LSAT iff φ ∈ SAT , so LSAT is easily seen to be N P-complete.) Let LSAT be Karp-reducible to the sparse set S via the poly-time computable function f. We now show a polynomial-time algorithm for SAT which implies that P = N P. Given an input φ with n variables, the algorithm will apply f to various instances (φ, x) of LSAT ; since f is poly-time computable, this implies a polynomial upper bound p(n) on the length of the output

of f. Let q(n) def = |S ∩ { 0 , 1 }≤p(n)| and note that q is polynomial by sparseness of f. We will view our algorithm as running a breadth-first search on a tree in which a node labeled v has children labeled v0 and v1; the root is labeled with the empty string. A node labeled v is viewed as corresponding to φ with the first |v| variables set to v. When we say that φ has a satisfying assignment lexicographically at most v for |v| < n, what we really mean is that φ has a satisfying assignment lexicographically at most v 1 n−|v|^ (alternately, there is a satisfying assignment of φ in which the values of the first |v| variables are lexicographically at most v). We also use f (v) as shorthand for f ((φ, v 1 n−|v|)) (so that if f (v) ∈ S then φ has a satisfying assignment lexicographically at most v). The algorithm proceeds as follows:

Let LIVE 0 := {ε} for i = 1 to n − 1: Let LIVEi consist of all children of LIVEi− 1 if |LIVEi| > q(n), prune LIVEi (see below) until it contains at most q(n) nodes Output 1 iff one of the children of LIVEn− 1 gives a satisfying assignment

Pruning of a set of nodes V is done in the following way: First compute ZV = {f (v) | v ∈ V }. Then use repeated application of the following rules:

  1. If f (v 1 ) = f (v 2 ) and v 2 is lexicographically greater than v 1 , then remove v 2 from V.
  2. If ZV contains more than q(n) distinct values, remove the lexicographically smallest member of V.

Note that once we are done pruning V we are left with a set V of at most q(n) nodes. That the algorithm runs in polynomial time is immediate, since there are n levels and at most 2 q(n) nodes are ever considered at each level. Say a node labeled v (with |v| < n) is an ancestor of a satisfying assignment w if v is a prefix of w. Correctness of the algorithm follows from the observation that, assuming φ is satisfiable, at the end of iteration i the set LIVEi contains an ancestor of the lexicographically smallest satisfying assignment of φ. We can prove this formally by induction. Clearly it is true for LIVE 0. For the inductive step, note that if it is true for LIVEi− 1 then it is true for LIVEi before we do the pruning. Now, when we do the pruning we eliminate some nodes, but we argue that the claim remains true for LIVEi even after pruning:

  1. Say v 1 , v 2 ∈ LIVEi with v 2 lexicographically larger than v 1 and f (v 1 ) = f (v 2 ). Then v 2 will be removed. This might be a problem if v 2 is an ancestor of the smallest satisfying assignment. But this cannot be the case since then f (v 2 ) ∈ S ⇒ f (v 1 ) ∈ S, and so φ has a satisfying assignment lexicographically smaller than v 1.
  2. Let V = LIVEi. If ZV contains more than q(n) values then we know that for at least one z ∈ Z we have z 6 ∈ S and so for at least one v ∈ V , φ does not have a satisfying assignment lexicographically at most v. But then φ cannot have a satisfying assignment lexicographically at most v 0 , where v 0 is the lexicographically smallest element in V. So, we do not lose anything by removing v 0.

This completes the proof.

2 The Polynomial Hierarchy

The polynomial hierarchy (PH) provides a “natural” extension of the classes N P and coN P. There are multiple definitions; we will start with the one that is most natural in terms of what we have covered in class up to now. In what follows, we say that R is polynomial-time relation if membership of (x, y 1 ,... , yn) ∈ R can be decided in time polynomial in |x|. (We also implicitly assume that R is polynomially bounded; i.e., there exists a polynomial p such that (x, y 1 ,... , yn) ∈ R implies |y 1 | + · · · + |yn| ≤ p(|x|).) The fact that R is polynomially bounded just means that the language { (x, y 1 ,... , yn) | (x, y 1 ,... , yn) ∈ R

is in P.

2.1 An Alternate Definition of PH

A second way to define PH is in terms of oracle machines.

Definition 5 Define Σi inductively as follows:

  • Σ 0 def = P.
  • Σ 1 def = N P.
  • Σi+1 def = N PΣi^.

(Actually, the second condition is redundant; it is included for simplicity.) Also, Πi def = coΣi. ♦

We show that the definitions are equivalent. For this section only, let ΣTi refer to the definition in terms of oracle Turing machines, and let ΣQi refer to the definition in terms of quantifiers. We first prove by induction that ΣQi ⊆ ΣTi. Clearly, the assertion is true for i = 1 (since they are both equal to N P). Now, assume the assertion is true for i and we will prove it for i + 1. Let L ∈ ΣQi+1. Then there exists a poly-time relation R such that

x ∈ L ⇔ ∃y 1 ∀y 2 · · · Qi+1yi+1 s.t. (x, y 1 ,... , yi+1) ∈ R.

In other words, there exists a language L′^ ∈ ΠQi such that

x ∈ L ⇔ ∃y 1 s.t. (x, y 1 ) ∈ L′.

By our inductive assumption, ΣQi ⊆ ΣTi and hence ΠQi ⊆ ΠTi. Thus L′^ ∈ ΠTi , and it then follows

easily that L ∈ N P Π Ti = N PΣ Ti def = ΣTi+1. (Why does the first equality hold?) For the other direction, assume ΣTi ⊆ ΣQi and we now prove that this holds for i + 1 as well. Suppose L ∈ ΣTi+1. This means there exists a N P machine M and a language L′^ ∈ ΣTi such that L ∈ M L ′

. In particular, then, x ∈ L iff ∃y, q 1 , a 1 ,... , qn, an (here, y represents the non-deterministic choices of M , while qj , aj represent the jth^ query of M to its oracle and the answers, respectively) such that:

  • M , on input x, non-deterministic choices y, and oracle answers a 1 ,... , an, makes queries q 1 ,... , qn and accepts.
  • For all j, we have aj = 1 iff qj ∈ L′.

Now, since L′^ ∈ ΣQi (by our inductive assumption), we can re-formulate the last condition as:

  • aj = 1 ⇔ ∃yj 1 ∀yj 2 · · · Qiyji s.t. (qj , yj 1 ,... , yij ) ∈ RL′
  • aj = 0 ⇔ ∀yj 1 ∃yj 2 · · · Q′ iyji s.t. (qj , yj 1 ,... , yij ) ∈ R¯L′

for some poly-time relation RL′. Then the above leads to the following specification of L as a ΣQi+

language: x ∈ L iff ∃

y, q 1 , a 1 ,... , qn, an, {yj 1 }j∈Y

{y 1 j}j∈N , {yj 2 }j∈Y

· · · Qi+

{yij }j∈N

  • M , on input x, non-deterministic choices y, and oracle answers a 1 ,... , an, makes queries q 1 ,... , qn and accepts,
  • Let Y be the set of j’s such that aj = 1, and let N be the set of j’s such that aj = 0. Then:
    • (qj , yj 1 ,... , yij ) ∈ RL′ for all j ∈ Y ,
    • (qj , yj 1 ,... , yij ) ∈ R¯L′^ for all j ∈ N.

2.2 “Collapsing” PH

A generalization of the question N P = co? N P is the question Σi = Π? i (for any i). Since it is believed that PH has infinitely-many levels, the following theorem is taken as evidence that Σi 6 = Πi for any i (the proof is for the case of Σ 1 = N P and Π 1 = coN P but the argument extends easily for any i):

Theorem 5 If N P = coN P then PH = N P. (More generally, if Σi = Πi then PH = Σi.)

Proof Since N P ⊆ PH by definition, we need only show that PH ⊆ N P under the assumption of the theorem. We proceed by induction. Clearly, Σ 1 = N P by definition. Now, assume Σi = N P

and we prove that Σi+1 def = N PΣi^ = N PN P^ ⊆ N P. Let L ∈ N PN P^. Then there exists an N P machine M with oracle access to a language L′^ ∈ N P such that M L ′ accepts L. Let RL′^ be the poly-time relation for L′. By the assumption that N P = coN P, we have that L¯′^ (with poly-time relation RL¯′ ) is also in N P. Then x ∈ L iff there exist y, q 1 , a 1 ,... , qn, an where:

  • M , on input x, non-deterministic choices y, and oracle answers a 1 ,... , an, makes queries q 1 ,... , qn and accepts;
  • If ai = 1 then ∃yi such that (qi, yi) ∈ RL′^ ;
  • If ai = 0 then ∃yi such that (qi, yi) ∈ RL¯′.

This leads easily to the following N P formulation of L: x ∈ L iff ∃y, q 1 , a 1 , y 1 ,... , qn, an, yn such that the above hold.

3 The Karp-Lipton Theorem

The following result is one of the main sources of our belief that N P 6 ⊆ P/poly.

Theorem 6 (Karp-Lipton) If N P ⊆ P/poly then Σ 2 = Π 2 (and hence PH = Σ 2 ).

Proof We begin with a claim that can be proved easily given our earlier work on self-reducibility of SAT : if SAT ∈ P/poly then there exists a polynomial-size circuit family {Cn} such that C|φ|(φ) outputs a satisfying assignment for φ whenever φ is satisfiable. That is, if SAT can be decided by poly-size circuits, then SAT can be solved by poly-size circuits. Let |Cn| ≤ p(n) for some polynomial p. We use this claim to prove that Π 2 ⊆ Σ 2 (from which the theorem follows). Let L ∈ Π 2. By definition, this means there exists a polynomial-time relation R such that^1

x ∈ L ⇔ ∀y∃z : (x, y, z) ∈ R.

Define L′^ = {(x, y) | ∃z : (x, y, z) ∈ R}. Note that L′^ ∈ N P, and so there is a Karp reduction f from L′^ to SAT. We assume without loss of generality that |f (x, y)| = q(|x|) for some polynomial q (note that if y is too long, then (x, y) 6 ∈ L′^ and so f (x, y) can output some unsatisfiable formula of the appropriate length); note also (using the same reasoning) that f (x, y) can be computed in (^1) By convention throughout this proof (indeed, as we have been doing throughout this entire lecture), we implicitly assume that quantification is done over strings of length at most some (appropriate) fixed polynomial in |x|.