Cook-Levin Theorem: \(\probSAT\) and \(\probThreeSAT\) are NP-complete.
Theorem: \(\probIndSet\) and \(\probClique\) are NP-complete.
Proof:
\(\probSubsetSum = \setbuild{\encoding{C, t}}{ C \text{ is a multiset of integers, and } (\exists S \subseteq C) \; t = \sum_{y \in S} y}\)
\(\probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probThreeSAT \le^\P \probSubsetSum\).
Proof:
Given a 3-CNF formula \(\phi\), we must output \((C, t)\) such that: \[ \phi \text{ is satisfiable } \iff (\exists S \subseteq C) \; t = \sum_{y \in S} y \]
Suppose \(\phi\) has \(m\) variables \(x_1,\dots,x_m\) and \(l\) clauses \(c_1,\dots,c_l\).
Let \(C = \{y_1,z_1,y_2,z_2,\dots,y_m,z_m,g_1,h_1,g_2,h_2,\dots,g_l,h_l\}\) be a multiset of \(2m + 2l\) integers, and integer \(t\) defined as follows.
For example, if \(\phi = (x_1 \vee \overline{x_2} \vee x_3) \wedge (\overline{x_1} \vee x_2 \vee x_3) \wedge (x_1 \vee \overline{x_3} \vee x_4)\), here are the integers in base 10:
\[ \begin{array}{c|cccc|cccc} & x_1 & x_2 & x_3 & x_4 & c_1 & c_2 & c_3 \\ \hline y_1 & 1, & 0 & 0 & 0, & 1 & 0 & 1 \\ z_1 & 1, & 0 & 0 & 0, & 0 & 1 & 0 \\ y_2 & & 1 & 0 & 0, & 0 & 1 & 0 \\ z_2 & & 1 & 0 & 0, & 1 & 0 & 0 \\ y_3 & & & 1 & 0, & 1 & 1 & 0 \\ z_3 & & & 1 & 0, & 0 & 0 & 1 \\ y_4 & & & & 1 & 0 & 0 & 1 \\ z_4 & & & & 1 & 0 & 0 & 0 \\ \hline g_1 & & & & & 1 & 0 & 0 \\ h_1 & & & & & 1 & 0 & 0 \\ g_2 & & & & & & 1 & 0 \\ h_2 & & & & & & 1 & 0 \\ g_3 & & & & & & & 1 \\ h_3 & & & & & & & 1 \\ \hline \hline t & 1 & 1 & 1 & 1 & 3 & 3 & 3 \end{array} \]
\(\probSubsetSum = \setbuild{\encoding{C, t}}{ C \text{ is a multiset of integers, and } (\exists S \subseteq C) \; t = \sum_{y \in S} y}\)
\(\probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probThreeSAT \le^\P \probSubsetSum\).
Proof: (\(m=\) number of variables, \(l=\) number of clauses)
\(\phi = (x_1 \vee \overline{x_2} \vee x_3) \wedge (\overline{x_1} \vee x_2 \vee x_3) \wedge (x_1 \vee \overline{x_3} \vee x_4)\)
\[ \begin{array}{c|cccc|cccc} & x_1 & x_2 & x_3 & x_4 & c_1 & c_2 & c_3 \\ \hline y_1 & 1 & 0 & 0 & 0 & 1 & 0 & 1 \\ z_1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ y_2 & & 1 & 0 & 0 & 0 & 1 & 0 \\ z_2 & & 1 & 0 & 0 & 1 & 0 & 0 \\ y_3 & & & 1 & 0 & 1 & 1 & 0 \\ z_3 & & & 1 & 0 & 0 & 0 & 1 \\ y_4 & & & & 1 & 0 & 0 & 1 \\ z_4 & & & & 1 & 0 & 0 & 0 \\ \hline g_1 & & & & & 1 & 0 & 0 \\ h_1 & & & & & 1 & 0 & 0 \\ g_2 & & & & & & 1 & 0 \\ h_2 & & & & & & 1 & 0 \\ g_3 & & & & & & & 1 \\ h_3 & & & & & & & 1 \\ \hline \hline t & 1 & 1 & 1 & 1 & 3 & 3 & 3 \end{array} \]
\(\probSubsetSum = \setbuild{\encoding{C, t}}{ C \text{ is a multiset of integers, and } (\exists S \subseteq C) \; t = \sum_{y \in S} y}\)
\(\probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probThreeSAT \le^\P \probSubsetSum\).
Proof: \((\implies)\): Suppose \(\phi\) is satisfied by \(x=x_1,\dots,x_m\).
\(\phi = (x_1 \vee \overline{x_2} \vee x_3) \wedge (\overline{x_1} \vee x_2 \vee x_3) \wedge (x_1 \vee \overline{x_3} \vee x_4)\)
\[ \begin{array}{c|cccc|cccc} & x_1 & x_2 & x_3 & x_4 & c_1 & c_2 & c_3 \\ \hline y_1 & 1 & 0 & 0 & 0 & 1 & 0 & 1 \\ z_1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ y_2 & & 1 & 0 & 0 & 0 & 1 & 0 \\ z_2 & & 1 & 0 & 0 & 1 & 0 & 0 \\ y_3 & & & 1 & 0 & 1 & 1 & 0 \\ z_3 & & & 1 & 0 & 0 & 0 & 1 \\ y_4 & & & & 1 & 0 & 0 & 1 \\ z_4 & & & & 1 & 0 & 0 & 0 \\ \hline g_1 & & & & & 1 & 0 & 0 \\ h_1 & & & & & 1 & 0 & 0 \\ g_2 & & & & & & 1 & 0 \\ h_2 & & & & & & 1 & 0 \\ g_3 & & & & & & & 1 \\ h_3 & & & & & & & 1 \\ \hline \hline t & 1 & 1 & 1 & 1 & 3 & 3 & 3 \end{array} \]
\(\probSubsetSum = \setbuild{\encoding{C, t}}{ C \text{ is a multiset of integers, and } (\exists S \subseteq C) \; t = \sum_{y \in S} y}\)
\(\probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probThreeSAT \le^\P \probSubsetSum\).
Proof: \((\impliedby)\): Suppose \((\exists S \subseteq C)\ t=\sum_{y \in S} y\).
\(\phi = (x_1 \vee \overline{x_2} \vee x_3) \wedge (\overline{x_1} \vee x_2 \vee x_3) \wedge (x_1 \vee \overline{x_3} \vee x_4)\)
\[ \begin{array}{c|cccc|cccc} & x_1 & x_2 & x_3 & x_4 & c_1 & c_2 & c_3 \\ \hline y_1 & 1 & 0 & 0 & 0 & 1 & 0 & 1 \\ z_1 & 1 & 0 & 0 & 0 & 0 & 1 & 0 \\ y_2 & & 1 & 0 & 0 & 0 & 1 & 0 \\ z_2 & & 1 & 0 & 0 & 1 & 0 & 0 \\ y_3 & & & 1 & 0 & 1 & 1 & 0 \\ z_3 & & & 1 & 0 & 0 & 0 & 1 \\ y_4 & & & & 1 & 0 & 0 & 1 \\ z_4 & & & & 1 & 0 & 0 & 0 \\ \hline g_1 & & & & & 1 & 0 & 0 \\ h_1 & & & & & 1 & 0 & 0 \\ g_2 & & & & & & 1 & 0 \\ h_2 & & & & & & 1 & 0 \\ g_3 & & & & & & & 1 \\ h_3 & & & & & & & 1 \\ \hline \hline t & 1 & 1 & 1 & 1 & 3 & 3 & 3 \end{array} \]
\(\probSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable Boolean formula}} \quad \probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probSAT \le^\P \probThreeSAT\).
Proof:
\(\probSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable Boolean formula}} \quad \probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probSAT \le^\P \probThreeSAT\).
Proof:
\(\probSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable Boolean formula}} \quad \probThreeSAT = \setbuild{\encoding{\phi}}{\phi \text{ is a satisfiable 3-CNF formula}}\)
Theorem: \(\probSAT \le^\P \probThreeSAT\).
Proof: