Various NPC Problems




CS255

Chris Pollett

Apr 27, 2022

Outline

Introduction

Cook's Theorem (1971)

Theorem. CIRCUIT-SAT is NP-hard. Hence, with our earlier result that CIRCUIT-SAT is in NP, we get CIRCUIT-SAT is NP-complete.

Proof. Let `L` be a language in `NP`, let `A(x,y)` verify the language in time `O(|x|^c)`. The algorithm `A` runs on some kind of computational hardware. If that hardware is in a given configuration `c_i` then its control determines in the next time step what its next configuration `c_(i+1)` will be. We assume that this mapping can be computed by some AND, OR, NOT circuit `M` implementing the computer hardware. Using this circuit `M`, we build an AND, OR, NOT circuit `langle C(y) rangle` which is split into main layers which have the properties:

  1. The output of `C` at main layer 1 codes, `c_0` , a configuration of `M` at the start of the computation of `A(x,y)`. Here the values of `x` are hard-coded based on the instance `x` which we are trying to check is in `L`. `y` is not hard-coded and boolean variables are used to represent it.
  2. For each `i`, the output of `C` at main layer `i + 1`, corresponds to the configuration obtained from main layer `i` by computing according to `M`.
  3. The output of `C` is the value extracted from the final configuration of `A` after `O(|x|^c)` steps.

Since there are polynomially many main layers each separated by polynomial-sized circuits, this whole circuit will be polynomial-size. If there is some setting of the boolean variables for `y` which makes the circuit true, then `A(x,y)` holds and `x` will be in `L` as desired.

NP-completeness Proofs

Lemma. If some `NP`-complete language reduces to a language `L`, then `L` is `NP`-hard. If `L` is further in `NP` then `L` will be NP-complete.

Proof. Just compose the reductions.

Some NP-complete Problems

Theorem. Both SAT and 3SAT are `NP`-complete.

Proof. First both languages are in `NP` by the same argument that showed CIRCUIT-SAT in `NP`. Given an instance `langle C rangle` of CIRCUIT-SAT, let gate `i` be coded as `langle i, type, j, k rangle`. Here type is AND, OR, NOT, or input, and `j, k < i` are gates which are inputs to this gate. A `0` for `j` or `k` means that argument is not used. Let `c_i`'s be new variables other than the input variables `x_j`. Recall the symbol `<=>` is true if both its boolean inputs have the same value. For each gate we create a boolean formula either of the form `c_i <=> (c_j mbox( type ) c_k)`, where type is replaced with AND or OR; or of the form `c_i <=> (mbox( type ) c_j)` in the case of NOT or an input (in the input case type is nothing). The SAT formula we output on input `langle C rangle` is the conjunction of all such defining formulas conjuncted with `c_w`, where `w` is the last gate in the formula. The idea is if `c_w` is true, then its defining equation `c_w <=>...` must be true and this propagates back to some setting of the leaves which will make the circuit true. By rewriting each `c_i <=> (c_j mbox( type ) c_k)` formulas in 3CNF we can make this whole formula into 3CNF. We can pad clauses with less than 3 literals with dummy variables to make all clauses the same size.

Reductions We Will Show

Graph of NP-reductions

CLIQUE

Theorem. CLIQUE is `NP`-complete.

Proof. First CLIQUE is in `NP` because we can just guess a set of more than `k` vertices and check for each possible edge between these vertices. Next we show how to reduce 3SAT to CLIQUE. Let
`F = C_1^^C_2... ^^ C_k`
be an instance of 3SAT. For each `C_r= (l_1^r vv l_2^r vv l_3^r )`, we put a triple of vertices into our graph `G`, `v_1^r, v_2^r, v_3^r`. We put an edge between vertices `v_i^r` and `v_j^s` if they are in different triples and their corresponding literals are not negations of each other. Let `(G, k)` be the output instance of CLIQUE. Notice if there is a satisfying assignment to `F` then if we look at the corresponding vertices `v_j^r` of at least one satisfied literal/clause, it will be a CLIQUE of size `k` in `G`. As there are no edges between vertices coming from the same clause, any CLIQUE of size `k` has to have at least one vertex `v_j^r` for each `1 le r le k`. Choosing an assignment so that the corresponding literals for each `v_j^r` evaluates to true gives a satisfying assignment. So the reduction works.

CLIQUE Example

Example Clique Reduction Graph

VERTEX-COVER

Theorem. VERTEX-COVER is `NP`-complete.

Proof. To see it is in `NP` notice if we guess a set of `k` vertices we can check if it is a vertex cover in polynomial time. To see it is `NP`-complete we reduce CLIQUE to this problem. Let `bar(G)` denote the complement of a graph `G= langle V, E rangle`, that is, the graph with the same vertices, but with edges `{i, j}` iff `{i, j}` is not an edge of `G`. Then notice `G` has a clique of size `k` iff `bar(G)` has a vertex cover of size `|V| - k`.

In-Class Exercise