On P vs. NP
Density
aThe density of language L ⊆ Σ∗ is defined as densL(n) = |{x ∈ L : | x | ≤ n}|.
• If L = {0, 1}∗, then densL(n) = 2n+1 − 1.
• So the density function grows at most exponentially.
• For a unary language L ⊆ {0}∗,
densL(n) ≤ n + 1.
– Because L ⊆ {², 0, 00, . . . ,
z }| {n
00 · · · 0, . . .}.
Sparsity
• Sparse languages are languages with polynomially bounded density functions.
• Dense languages are languages with superpolynomial density functions.
Self-Reducibility for sat
• An algorithm exhibits self-reducibility if it finds a certificate by exploiting algorithms for the decision version of the same problem.
• Let φ be a boolean expression in n variables x1, x2, . . . , xn.
• t ∈ {0, 1}j is a partial truth assignment for x1, x2, . . . , xj.
• φ[ t ] denotes the expression after substituting the truth values of t for x1, x2, . . . , x| t | in φ.
An Algorithm for sat with Self-Reduction
We call the algorithm below with empty t.
1: if | t | = n then
2: return φ[ t ];
3: else
4: return φ[ t0 ] ∨ φ[ t1 ];
5: end if
The above algorithm runs in exponential time, by visiting all the partial assignments (or nodes on a depth-n binary tree).
NP-Completeness and Density
aTheorem 81 If a unary language U ⊆ {0}∗ is NP-complete, then P = NP.
• Suppose there is a reduction R from sat to U .
• We shall use R to guide us in finding the truth
assignment that satisfies a given boolean expression φ with n variables if it is satisfiable.
• Specifically, we use R to prune the exponential-time exhaustive search on p. 676.
• The trick is to keep the already discovered results φ[ t ] in a table H.
1: if | t | = n then
2: return φ[ t ];
3: else
4: if (R(φ[ t ]), v) is in table H then
5: return v;
6: else
7: if φ[ t0 ] = “satisfiable” or φ[ t1 ] = “satisfiable” then
8: Insert (R(φ[ t ]), “satisfiable”) into H;
9: return “satisfiable”;
10: else
11: Insert (R(φ[ t ]), “unsatisfiable”) into H;
12: return “unsatisfiable”;
13: end if
14: end if
15: end if
The Proof (continued)
• Since R is a reduction, R(φ[ t ]) = R(φ[ t0 ]) implies that φ[ t ] and φ[ t0 ] must be both satisfiable or unsatisfiable.
• R(φ[ t ]) has polynomial length ≤ p(n) because R runs in log space.
• As R maps to unary numbers, there are only polynomially many p(n) values of R(φ[ t ]).
• How many nodes of the complete binary tree (of invocations/truth assignments) need to be visited?
• If that number is a polynomial, the overall algorithm
The Proof (continued)
• A search of the table takes time O(p(n)) in the random access memory model.
• The running time is O(M p(n)), where M is the total number of invocations of the algorithm.
• The invocations of the algorithm form a binary tree of depth at most n.
The Proof (continued)
• There is a set T = {t1, t2, . . .} of invocations (partial truth assignments, i.e.) such that:
1. |T | ≥ (M − 1)/(2n).
2. All invocations in T are recursive (nonleaves).
3. None of the elements of T is a prefix of another.
VWVWHS'HOHWH OHDYHV0−
QRQOHDYHVUHPDLQLQJ
QGVWHS6HOHFWDQ\
ERWWRPXQGHOHWHG LQYRFDWLRQWDQGDGG LWWR7
UGVWHS'HOHWHDOOWV DWPRVWQDQFHVWRUV SUHIL[HVIURP
IXUWKHUFRQVLGHUDWLRQ
An Example
r
a c
d e f
g h i j
l k
1
2 3
4 5
The Proof (continued)
• All invocations t ∈ T have different R(φ[ t ]) values.
– None of s, t ∈ T is a prefix of another.
– The invocation of one started after the invocation of the other had terminated.
– If they had the same value, the one that was invoked second would have looked it up, and therefore would not be recursive, a contradiction.
• The existence of T implies that there are at least (M − 1)/(2n) different R(φ[ t ]) values in the table.
The Proof (concluded)
• We already know that there are at most p(n) such values.
• Hence (M − 1)/(2n) ≤ p(n).
• Thus M ≤ 2np(n) + 1.
• The running time is therefore O(M p(n)) = O(np2(n)).
• We comment that this theorem holds for any sparse language, not just unary ones.a
aMahaney (1980).
coNP-Completeness and Density
Theorem 82 (Fortung (1979)) If a unary language U ⊆ {0}∗ is coNP-complete, then P = NP.
• Suppose there is a reduction R from sat complement to U .
• The rest of the proof is basically identical except that, now, we want to make sure a formula is unsatisfiable.
Exponential Circuit Complexity
• Almost all boolean functions require 22nn gates to compute (generalized Theorem 15 on p. 171).
• Progress of using circuit complexity to prove exponential lower bounds for NP-complete problems has been slow.
– As of January 2006, the best lower bound is 5n − o(n).a
aIwama and Morizumi (2002).
Exponential Circuit Complexity for NP-Complete Problems
• We shall prove exponential lower bounds for NP-complete problems using monotone circuits.
– Monotone circuits are circuits without ¬ gates.
• Note that this does not settle the P vs. NP problem or any of the conjectures on p. 543.
The Power of Monotone Circuits
• Monotone circuits can only compute monotone boolean functions.
• They are powerful enough to solve a P-complete problem, monotone circuit value (p. 265).
• There are NP-complete problems that are not monotone;
they cannot be computed by monotone circuits at all.
• There are NP-complete problems that are monotone;
they can be computed by monotone circuits.
– hamiltonian path and clique.
clique
n,k• cliquen,k is the boolean function deciding whether a graph G = (V, E) with n nodes has a clique of size k.
• The input gates are the ¡n
2
¢ entries of the adjacency matrix of G.
– Gate gij is set to true if the associated undirected edge { i, j } exists.
• cliquen,k is a monotone function.
• Thus it can be computed by a monotone circuit.
• This does not rule out that nonmonotone circuits for cliquen,k may use fewer gates.
Crude Circuits
• One possible circuit for cliquen,k does the following.
1. For each S ⊆ V with |S| = k, there is a subcircuit with O(k2) ∧-gates testing whether S forms a clique.
2. We then take an or of the outcomes of all the ¡n
k
¢ subsets S1, S2, . . . , S(nk).
• This is a monotone circuit with O(k2¡n
k
¢) gates, which is exponentially large unless k or n − k is a constant.
• A crude circuit CC(X1, X2, . . . , Xm) tests if any of Xi ⊆ V forms a clique.
– The above-mentioned circuit is CC(S , S , . . . , S(
Sunflowers
• Fix p ∈ Z+ and ` ∈ Z+.
• A sunflower is a family of p sets {P1, P2, . . . , Pp}, called petals, each of cardinality at most `.
• All pairs of sets in the family must have the same intersection (called the core of the sunflower).
FRUH
A Sample Sunflower
{{1, 2, 3, 5}, {1, 2, 6, 9}, {0, 1, 2, 11}, {1, 2, 12, 13}, {1, 2, 8, 10}, {1, 2, 4, 7}}
Æ¿³È
É¿³Ì
Ë¿³Äà ǿ³Ê
ÿ³ÄÄ ÄÅ¿³ÄÆ
The Erd˝os-Rado Lemma
Lemma 83 Let Z be a family of more than M = (p − 1)``!
nonempty sets, each of cardinality ` or less. Then Z must contain a sunflower (of size p).
• Induction on `.
• For ` = 1, p different singletons form a sunflower (with an empty core).
• Suppose ` > 1.
• Consider a maximal subset D ⊆ Z of disjoint sets.
– Every set in Z − D intersects some set in D.
The Proof of the Erd˝os-Rado Lemma (continued)
• Suppose D contains at least p sets.
– D constitutes a sunflower with an empty core.
• Suppose D contains fewer than p sets.
– Let C be the union of all sets in D.
– | C | ≤ (p − 1)` and C intersects every set in Z.
– There is a d ∈ C that intersects more than
M
(p−1)` = (p − 1)`−1(` − 1)! sets in Z.
– Consider Z0 = {Z − {d} : Z ∈ Z, d ∈ Z}.
– Z0 has more than M0 = (p − 1)`−1(` − 1)! sets.
The Proof of the Erd˝os-Rado Lemma (concluded)
• (continued)
– M0 is just M with ` replaced with ` − 1.
– Z0 contains a sunflower by induction, say {P1, P2, . . . , Pp}.
– Now,
{P1 ∪ {d}, P2 ∪ {d}, . . . , Pp ∪ {d}}
is a sunflower in Z.
Comments on the Erd˝os-Rado Lemma
• A family of more than M sets must contain a sunflower.
• Plucking a sunflower entails replacing the sets in the sunflower by its core.
• By repeatedly finding a sunflower and plucking it, we can reduce a family with more than M sets to a family with at most M sets.
• If Z is a family of sets, the above result is denoted by pluck(Z).
• Note: pluck(Z) is not unique.
An Example of Plucking
• Recall the sunflower on p. 693:
Z = {{1, 2, 3, 5}, {1, 2, 6, 9}, {0, 1, 2, 11}, {1, 2, 12, 13}, {1, 2, 8, 10}, {1, 2, 4, 7}}
• Then
pluck(Z) = {{1, 2}}.
Razborov’s Theorem
Theorem 84 (Razborov (1985)) There is a constant c such that for large enough n, all monotone circuits for cliquen,k with k = n1/4 have size at least ncn1/8.
• We shall approximate any monotone circuit for cliquen,k by a restricted kind of crude circuit.
• The approximation will proceed in steps: one step for each gate of the monotone circuit.
• Each step introduces few errors (false positives and false negatives).
• But the resulting crude circuit has exponentially many
Alexander Razborov (1963–)
The Proof
• Fix k = n1/4.
• Fix ` = n1/8.
• Note that
2 µ`
2
¶
≤ k.
• p will be fixed later to be n1/8 log n.
• Fix M = (p − 1)``!.
– Recall the Erd˝os-Rado lemma (p. 694).
The Proof (continued)
• Each crude circuit used in the approximation process is of the form CC(X1, X2, . . . , Xm), where:
– Xi ⊆ V . – |Xi| ≤ `.
– m ≤ M .
• It answers true if any Xi is a clique.
• We shall show how to approximate any circuit for cliquen,k by such a crude circuit, inductively.
• The induction basis is straightforward:
– Input gate gij is the crude circuit CC({i, j}).
The Proof (continued)
• Any monotone circuit can be considered the or or and of two subcircuits.
• We shall show how to build approximators of the overall circuit from the approximators of the two subcircuits.
– We are given two crude circuits CC(X ) and CC(Y).
– X and Y are two families of at most M sets of nodes, each set containing at most ` nodes.
– We construct the approximate or and the approximate and of these subcircuits.
– Then show both approximations introduce few errors.
The Proof: Positive Examples
• Error analysis will be applied to only positive examples and negative examples.
• A positive example is a graph that has ¡k
2
¢ edges connecting k nodes in all possible ways.
• There are ¡n
k
¢ such graphs.
• They all should elicit a true output from cliquen,k.
The Proof: Negative Examples
• Color the nodes with k − 1 different colors and join by an edge any two nodes that are colored differently.
• There are (k − 1)n such graphs.
• They all should elicit a false output from cliquen,k. – Each set of k nodes must have 2 identically colored
nodes; hence there is no edge between them.
Positive and Negative Examples with k = 5
$SRVLWLYHH[DPSOH $QHJDWLYHH[DPSOH
The Proof: or
• CC(X ∪ Y) is equivalent to the or of CC(X ) and CC(Y).
• Violations occur when |X ∪ Y| > M .
• Such violations can be eliminated by using CC(pluck(X ∪ Y))
as the approximate or of CC(X ) and CC(Y).
– Note that if CC(Z) is true, then CC(pluck(Z)) must be true (recall p. 692).
• We now count the number of errors this approximate or makes on the positive and negative examples.
The Proof: or (concluded)
• CC(pluck(X ∪ Y)) introduces a false positive if a
negative example makes both CC(X ) and CC(Y) return false but makes CC(pluck(X ∪ Y)) return true.
• CC(pluck(X ∪ Y)) introduces a false negative if a positive example makes either CC(X ) or CC(Y) return true but makes CC(pluck(X ∪ Y)) return false.
• How many false positives and false negatives are introduced by CC(pluck(X ∪ Y))?
The Number of False Positives
Lemma 85 CC(pluck(X ∪ Y)) introduces at most
M
p−1 2−p(k − 1)n false positives.
• A plucking replaces the sunflower {Z1, Z2, . . . , Zp} with its core Z.
• A false positive is necessarily a coloring such that:
– There is a pair of identically colored nodes in each petal Zi (and so both crude circuits return false).
– But the core contains distinctly colored nodes.
∗ This implies at least one node from each same-color pair was plucked away.
Proof of Lemma 85 (continued)
Proof of Lemma 85 (continued)
• Color nodes V at random with k − 1 colors and let R(X) denote the event that there are repeated colors in set X.
• Now prob[R(Z1) ∧ · · · ∧ R(Zp) ∧ ¬R(Z)] is at most prob[R(Z1) ∧ · · · ∧ R(Zp)|¬R(Z)]
=
Yp i=1
prob[R(Zi)|¬R(Z)] ≤ Yp i=1
prob[R(Zi)]. (12)
– First equality holds because R(Zi) are independent given ¬R(Z) as Z contains their only common nodes.
– Last inequality holds as the likelihood of repetitions
Proof of Lemma 85 (continued)
• Consider two nodes in Zi.
• The probability that they have identical color is k−11 .
• Now prob[ R(Zi) ] ≤ (|Zi|2 )
k−1 ≤ (2`)
k−1 ≤ 12.
• So the probabilitya that a random coloring is a new false positive is at most 2−p by inequality (12).
• As there are (k − 1)n different colorings, each plucking introduces at most 2−p(k − 1)n false positives.
aProportion, i.e.
Proof of Lemma 85 (concluded)
• Recall that | X ∪ Y | ≤ 2M .
• Each plucking reduces the number of sets by p − 1.
• Hence at most p−1M pluckings occur in pluck(X ∪ Y).
• At most
M
p − 1 2−p(k − 1)n false positives are introduced.
The Number of False Negatives
Lemma 86 CC(pluck(X ∪ Y)) introduces no false negatives.
• Each plucking replaces a set in a crude circuit by a subset.
• This makes the test less stringent.
– For each Y ∈ X ∪ Y, there must exist at least one X ∈ pluck(X ∪ Y) such that X ⊆ Y .
– So if Y is a clique, then this X is also a clique.
• So plucking can only increase the number of accepted graphs.
The Number of False Negatives (concluded)
Y
X
The Proof: and
• The approximate and of crude circuits CC(X ) and CC(Y) is
CC(pluck({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y, |Xi ∪ Yj| ≤ `})).
– Note that if CC(Z) is true, then CC(pluck(Z)) must be true.
• We now count the number of errors this approximate and makes on the positive and negative examples.
The Proof: and (concluded)
• The approximate and introduces a false positive if a negative example makes either CC(X ) or CC(Y) return false but makes the approximate and return true.
• The approximate and introduces a false negative if a positive example makes both CC(X ) and CC(Y) return true but makes the approximate and return false.
• How many false positives and false negatives are introduced by the approximate and?
The Number of False Positives
Lemma 87 The approximate and introduces at most M22−p(k − 1)n false positives.
• CC({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y}) introduces no false positives.
– If Xi ∪ Yj is a clique, both Xi and Yj must be
cliques, making both CC(X ) and CC(Y) return true.
• CC({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y, |Xi ∪ Yj| ≤ `}) introduces no false positives as we are testing fewer sets for cliques.
Proof of Lemma 87 (concluded)
• | {Xi ∪ Yj : Xi ∈ X , Yj ∈ Y, |Xi ∪ Yj| ≤ `} | ≤ M2.
• Each plucking reduces the number of sets by p − 1.
• So pluck({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y, |Xi ∪ Yj| ≤ `}) involves ≤ M2/(p − 1) pluckings.
• Each plucking introduces at most 2−p(k − 1)n false positives by the proof of Lemma 85 (p. 709).
• The desired upper bound is
[ M2/(p − 1) ] 2−p(k − 1)n ≤ M22−p(k − 1)n.
The Number of False Negatives
Lemma 88 The approximate and introduces at most M2¡n−`−1
k−`−1
¢ false negatives.
• We follow the same three-step proof as before.
• CC({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y}) introduces no false negatives.
– Suppose both CC(X ) and CC(Y) accept a positive example with a clique of size k.
– This clique must contain an Xi ∈ X and a Yj ∈ Y.
∗ This is why both CC(X ) and CC(Y) return true.
– As the clique contains Xi ∪ Yj, the new circuit returns true.
Proof of Lemma 88 (continued)
Yj Xi
Clique of size k
Proof of Lemma 88 (concluded)
• CC({Xi ∪ Yj : Xi ∈ X , Yj ∈ Y, |Xi ∪ Yj| ≤ `}) introduces
≤ M2¡n−`−1
k−`−1
¢ false negatives.
– Deletion of set Z = Xi ∪ Yj larger than ` introduces false negatives only if the clique contains Z.
– There are ¡n−|Z|
k−|Z|
¢ such cliques.
∗ It is the number of positive examples whose clique contains Z.
– ¡n−|Z|
k−|Z|
¢ ≤ ¡n−`−1
k−`−1
¢ as |Z| > `.
– There are at most M2 such Zs.
• Plucking introduces no false negatives.
Two Summarizing Lemmas
From Lemmas 85 (p. 709) and 87 (p. 718), we have:
Lemma 89 Each approximation step introduces at most M22−p(k − 1)n false positives.
From Lemmas 86 (p. 714) and 88 (p. 720), we have:
Lemma 90 Each approximation step introduces at most M2¡n−`−1
k−`−1
¢ false negatives.
The Proof (continued)
• The above two lemmas show that each approximation step introduce “few” false positives and false negatives.
• We next show that the resulting crude circuit has “a lot” of false positives or false negatives.
The Final Crude Circuit
Lemma 91 Every final crude circuit is:
1. Identically false—thus wrong on all positive examples.
2. Or outputs true on at least half of the negative examples.
• Suppose it is not identically false.
• By construction, it accepts at least those graphs that have a clique on some set X of nodes, with | X | ≤ `, which at n1/8 is less than k = n1/4.
• The proof of Lemma 85 (p. 709ff) shows that at least half of the colorings assign different colors to nodes in X.
• So half of the negative examples have a clique in X and
The Proof (continued)
• Recall the constants on p. 701: k = n1/4, ` = n1/8, p = n1/8 log n, M = (p − 1)``! < n(1/3)n1/8 for large n.
• Suppose the final crude circuit is identically false.
– By Lemma 90 (p. 723), each approximation step introduces at most M2¡n−`−1
k−`−1
¢ false negatives.
– There are ¡n
k
¢ positive examples.
– The original crude circuit for cliquen,k has at least
¡n
k
¢ M2¡n−`−1
k−`−1
¢ ≥ 1 M2
µn − ` k
¶`
≥ n(1/12)n1/8 gates for large n.
The Proof (concluded)
• Suppose the final crude circuit is not identically false.
– Lemma 91 (p. 725) says that there are at least (k − 1)n/2 false positives.
– By Lemma 89 (p. 723), each approximation step introduces at most M22−p(k − 1)n false positives.
– The original crude circuit for cliquen,k has at least (k − 1)n/2
M22−p(k − 1)n = 2p−1
M2 ≥ n(1/3)n1/8 gates.
P 6= NP Proved?
• Razborov’s theorem says that there is a monotone language in NP that has no polynomial monotone circuits.
• If we can prove that all monotone languages in P have polynomial monotone circuits, then P 6= NP.
• But Razborov proved in 1985 that some monotone languages in P have no polynomial monotone circuits!