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 k-SAT Variants

Research Depth 100 in the knowledge graph ☐ I know this ☆ Set as goal
12topics build on this
502prerequisites beneath it
See this on the map →
Boolean Satisfiability, Cook-Levin, and ReductionsNP-Completeness and Cook-Levin Theorem→→PCP Theorem and Hardness of ApproximationPartition and Subset Sum Problems+1 more
np-complete clause-restrictions

Core Idea

3-SAT restricts SAT to formulas where each clause has exactly three literals; k-SAT generalizes to k literals per clause. Remarkably, 3-SAT remains NP-complete despite the restriction—restricting clause size doesn't reduce hardness beyond 3 literals. 2-SAT is solvable in polynomial time via implication graphs; k-SAT for k ≥ 3 is NP-complete. The phase transition phenomenon—random k-SAT formulas become hardest near the satisfiability threshold—is a major topic in complexity physics.

Explainer

You already know that the Boolean satisfiability problem (SAT) asks whether a propositional formula in conjunctive normal form (CNF) has a satisfying assignment, and that SAT is NP-complete — the first problem proven to be so via Cook's theorem. 3-SAT takes this general problem and adds a structural constraint: every clause must contain exactly three literals. A typical 3-SAT instance looks like `(x₁ ∨ ¬x₂ ∨ x₃) ∧ (¬x₁ ∨ x₄ ∨ x₂) ∧ ...` where each parenthesized group has exactly three terms. The surprising result is that this restricted version is *still* NP-complete — limiting clauses to three literals does not make the problem meaningfully easier.

Why does 3-SAT matter so much in complexity theory? Because it is the workhorse of NP-completeness reductions. When you want to prove a new problem is NP-complete, you typically reduce *from* 3-SAT rather than from general SAT. The fixed clause size of three makes the reduction machinery simpler and more uniform — you always know exactly what the source structure looks like. Most of the hundreds of known NP-completeness proofs go through 3-SAT as an intermediate step, making it arguably the most useful single problem in the NP-completeness toolkit.

The picture changes dramatically when you shrink the clause size to two. 2-SAT — where every clause has exactly two literals — is solvable in polynomial time. The key insight is that each 2-SAT clause `(a ∨ b)` is logically equivalent to the implications `¬a → b` and `¬b → a`. Collecting all such implications creates a directed implication graph, and the formula is satisfiable if and only if no variable and its negation belong to the same strongly connected component. This can be checked in linear time. So the jump from k = 2 to k = 3 is where the complexity-theoretic cliff occurs: 2-SAT is in P, while k-SAT for any k ≥ 3 is NP-complete.

There is also a fascinating empirical phenomenon. For random 3-SAT instances with `n` variables and `m` clauses, the ratio `m/n` controls difficulty. Below a critical threshold (approximately 4.27 for 3-SAT), almost all random instances are satisfiable and easy to solve. Above it, almost all are unsatisfiable and easy to refute. Right at the threshold — the phase transition — instances are hardest, often requiring exponential search time in practice. This mirrors phase transitions in physics (like water freezing at 0°C) and reveals deep structural properties of the problem landscape that inform both algorithm design and our understanding of computational hardness.

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 → Boolean Type and Truth Values → Comparison Operators and Boolean Tests → Logical Operators and Boolean Algebra → Boolean Algebra and Fundamental Laws → Logic Gates Fundamentals → Implementing Boolean Functions with Gates → Karnaugh Map Simplification → Combinational Circuit Design → Flip-Flops and Latches → Finite State Machines (FSMs) → Deterministic Finite Automata (DFA) → Nondeterministic Finite Automata (NFA) → Two-Way Finite Automata → NFA to DFA Conversion (Subset Construction) → DFA Properties and Minimization Algorithms → Regular Languages: Definition and Characterization → Context-Free Grammars (CFGs) → Pushdown Automata (PDA) → Equivalence of CFGs and Pushdown Automata → Closure Properties of Context-Free Languages → Limitations of Context-Free Languages → Pumping Lemma for Context-Free Languages → Turing Machines → Variants of Turing Machines and Equivalence → Nondeterministic Time Complexity and NP → The P vs. NP Problem → Complexity Class P: Polynomial Time → Complexity Class NP: Nondeterministic Polynomial Time → NP-Completeness and Cook-Levin Theorem → The Cook-Levin Theorem → Boolean Satisfiability, Cook-Levin, and Reductions → 3-SAT and k-SAT Variants

Longest path: 101 steps · 502 total prerequisite topics

Prerequisites (2)

Leads To (3)