A polynomial-time WordRAM reduction from 3-SAT to CLIQUE
ProvedCliqueNP.threeSat_ram_clique_reductionThere is a restricted-model WordRAM algorithm computing a string function in polynomially many steps such that for every bit string ,
Here is the language of encodings of satisfiable CNF formulas whose clauses have at most literals, and CLIQUE is the language of encodings of finite simple undirected graphs together with a threshold such that the graph has a clique of at least vertices.
The intended construction is Karp's: for a formula with clauses , create one vertex per literal occurrence, join two occurrences by an edge iff they lie in different clauses and are not complementary, and set the threshold to . A clique of size picks one consistent literal per clause, i.e. a satisfying assignment, and conversely. Strings that do not encode a 3-CNF formula must be mapped to a fixed non-member of CLIQUE (e.g. the empty graph with threshold ). This is the NP-hardness half of CLIQUE's NP-completeness, in the same format as KSat.sat_ram_threeCNF_normalizer.
import Definitions.Def_WordRAM_Complexity_BitIO import Definitions.Def_KSat_Languages import Definitions.Def_Clique_Language set_option autoImplicit false
theorem CliqueNP.threeSat_ram_clique_reduction :
∃ (A : WordRAM.Complexity.Algorithm .restricted)
(f : List Bool → List Bool),
WordRAM.Complexity.RAMPolyTimeComputable A f ∧
∀ x, KSat.KSAT 3 x ↔ CliqueNP.CLIQUE (f x) := by sorry