DPLL Satisfiability Search
Follow unit implications and backtracking decisions to find a satisfying assignment or prove that none exists.
By Riano · Published · Updated · Report a correction
DPLL Satisfiability Search
Finding a satisfying assignment
The Davis-Putnam-Logemann-Loveland (DPLL) algorithm is a complete, backtracking-based search algorithm for deciding the satisfiability of propositional logic formulae in Conjunctive Normal Form (CNF).
DPLL explores the search space of truth assignments. It makes decisions (branching on a variable) and deduces necessary consequences using unit propagation. If a conflict occurs, it backtracks and tries the alternative.
Worked example: Propagating to SAT
Consider the formula: p,q,r;-p,q;-q,r;-r,p. Let's trace DPLL.
- Start with empty assignment. No unit clauses exist. Branch on
p = true. - Under
p = true, the clause-p,qbecomes the unit clauseq. Unit propagation forcesq = true. - Now
q = true. The clause-q,rbecomes the unit clauser. Unit propagation forcesr = true. - Now
r = true. The remaining clause-r,pevaluates to true becausep = true. - All clauses are satisfied. The formula is SAT.
Witness = { p: true, q: true, r: true }The algorithm deterministically finds the satisfying assignment by first branching on p and then using unit propagation to force the remaining variables, avoiding a full search of the 23 = 8 possible assignments.
Experiment with the native controls
Open the interactive DPLL Satisfiability Search module.
- Examine the default Formula which contains clauses separated by semicolons.
- Click Step to reveal one recursive call after source-order unit propagation. Observe how DPLL selects the first unassigned variable and branches on it (trying
truefirst). - Notice when a branch leads to a conflict (a clause evaluates to false), the algorithm backtracks to try the alternative assignment (
false). - If a unit clause is formed, observe how unit propagation immediately forces the assignment of the remaining literal without branching.
- Click Finish to immediately find the terminal SAT/UNSAT state and the witness assignment.
Assumptions, boundaries and costs
This visualization uses a simplified, deterministic version of DPLL for educational clarity.
- Variable Selection: The algorithm branches on variables in alphabetical order (
p,q,r) rather than using advanced heuristics like VSIDS or MOM. - Pure Literals: Pure-literal elimination is omitted to focus on branching and unit propagation.
- Bounded Size: The input is restricted to 3 variables and 6 clauses to keep the trace visually manageable and avoid exponential explosion in the browser.
References
The DPLL algorithm forms the basis of modern SAT solvers.
- MIT 16.412J Cognitive Robotics (Spring 2016): Slides 11, 18-21 on propagation and backtrack search.
Experience it interactively
Adjust parameters, observe in real time, and build deep intuition with Riano’s interactive DPLL Satisfiability Search module.
Try DPLL Satisfiability Search on Riano →