CS255
Chris Pollett
Apr 25, 2022
Lemma. If `L_1`, `L_2` are languages such that `L_1 le_P L_2` and `L_2` is in `P`, then `L_1` is in `P`.
Proof. Let `A(y)` decide `L_2` in time `O(p(|y|))`. Let `f(x)` be a `O(q(|x|))`-time reduction from `L_1` to `L_2`. Here `p` and `q` are polynomials. Then `B(x)` which first computes `f(x)` then runs `A(f(x))`, runs in `O(p(q(|x|))`-time and decides `L_1`. So `B` runs in polynomial time.
Which of the following statements is true?
Theorem. If any `NP`-complete language is in `P`, then `P=NP`.
Proof. This follows from the lemma on the last slide.
Let CIRCUIT-SAT be the language:
`{langle C rangle | C` is an AND, OR, NOT circuit computing a
0-1 function which on some truth assignment to its
input variables outputs 1`}`
Theorem. CIRCUIT-SAT is in NP.
Proof. Consider the following algorithm `A(langle C rangle, langle a rangle)`. First, `A` checks if `langle C rangle` is in the format of a circuit and `langle a rangle` is in the format for an assignment; if not, it rejects `A`. Otherwise, it then labels each of the inputs to `langle C rangle` with their value according to their values in `langle a rangle`. Then it loops over the combinational elements in `langle C rangle`, until there is no change doing the following:
By the `i`th iteration the nodes of depth `i` will have values. Each iteration involves less than quadratic work. So in `O((|langle C rangle|)^3)` this algorithm labels the root of the circuit with its output value on this assignment. Finally, CIRCUIT-SAT is the language `{langle C rangle in {0,1}^star : exists langle a rangle, |langle a rangle| le |langle C rangle| mbox( and ) A(langle C rangle, langle a rangle) = 1}`.