A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

3-SAT and NP-Completeness via CNF

College Depth 93 in the knowledge graph ☐ I know this ☆ Set as goal
5topics build on this
598prerequisites beneath it
See this on the map →
Boolean Satisfiability (SAT)NP-Completeness+1 more→→Clique Problem and Its VariantsVertex Cover and Set Cover Problems
sat cnf np-complete

Core Idea

3-SAT restricts SAT to formulas in CNF where each clause has exactly three literals. Despite this restriction, 3-SAT remains NP-complete, making it a canonical problem for showing other problems are NP-hard via reduction. The Cook-Levin theorem proves that every NP problem reduces to 3-SAT in polynomial time.

Explainer

You already know that SAT — the problem of deciding whether a propositional formula has a satisfying assignment — is NP-complete by the Cook-Levin theorem. 3-SAT restricts SAT to a specific syntactic form: the formula must be in conjunctive normal form (CNF), and every clause must contain exactly three literals. A concrete example is (x₁ ∨ ¬x₂ ∨ x₃) ∧ (¬x₁ ∨ x₂ ∨ x₄) ∧ (x₂ ∨ ¬x₃ ∨ ¬x₄). You need to find an assignment to the variables that makes at least one literal true in every clause simultaneously.

At first glance, restricting each clause to exactly three literals seems like it should make the problem easier — fewer choices per clause. But it doesn't. To prove 3-SAT is NP-complete you need two things: membership in NP (obvious — given an assignment, check each clause in linear time) and a reduction from the general SAT problem. The key step is converting an arbitrary CNF formula into one where every clause has exactly three literals, without changing satisfiability. Clauses with more than three literals can be split using fresh auxiliary variables: a clause (a ∨ b ∨ c ∨ d) becomes (a ∨ b ∨ y) ∧ (¬y ∨ c ∨ d), where y is new. Clauses with fewer than three literals can be padded: (a ∨ b) becomes (a ∨ b ∨ b). This conversion is polynomial, and the resulting formula is satisfiable if and only if the original was.

What makes 3-SAT valuable is not the problem itself but its role as a reduction source. Many NP-hardness proofs use 3-SAT rather than general SAT because its regular structure — exactly three literals, clean variable/clause interface — maps more directly onto the combinatorial structures of other problems. The clause structure provides a natural "gadget": each clause is a small constraint that must be satisfied, and the interaction between clauses through shared variables creates the global difficulty. When you reduce 3-SAT to a graph problem, you typically build one gadget per clause and connect gadgets by shared variable nodes.

The fact that 3-SAT is hard despite its extreme syntactic restriction is a deeper insight than it first appears. It says that the difficulty of SAT is not a matter of messy, arbitrary formula structure — it survives even after imposing a very clean, regular form. This robustness is one reason the NP-completeness of 3-SAT is so useful: the regular structure makes reductions *from* 3-SAT easier to design and verify, while the hardness result means any problem that 3-SAT reduces to is at least as hard. The chain from Cook-Levin → SAT → 3-SAT → thousands of other NP-complete problems is the historical spine of computational complexity theory.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial → Permutations → Combinations → Counting Principles: Addition and Multiplication Rules → Introduction to Graph Theory → Propositional Logic Foundations → Logical Equivalences → Boolean Algebra → Introduction to Propositional Logic → Introduction to Predicate Logic (First-Order Logic) → First-Order Logic Syntax → ZFC Axioms Overview → Axiom Schema of Separation → Axiom Schema of Replacement → Von Neumann Ordinals → Hereditarily Finite Sets → Recursive Definitions on Finite Sets → Well-Founded Relations and Transfinite Recursion → The Axiom of Choice and Equivalent Formulations → Axiom of Choice → Well-Ordering Theorem → Infinite Cardinal Numbers → Cantor's Theorem → Uncountability and the Diagonal Argument → The Cantor Set: An Uncountable Nowhere Dense Example → Uncountable Sets and Cantor Diagonalization → The Halting Problem → Computability Reductions → Polynomial-Time Reductions → Lower Bounds Techniques in Computational Complexity → NP-Completeness → The Cook-Levin Theorem → 3-SAT and NP-Completeness via CNF

Longest path: 94 steps · 598 total prerequisite topics

Prerequisites (3)

Leads To (2)