The DPLL algorithm Combinatorial Problem Solving (CPS) Albert Oliveras Enric Rodr´ ıguez-Carbonell May 22, 2020
Overview of the session Designing an efficient SAT solver ■ DPLL: A Bit of History ■ Abstract DPLL: ■ Rules ◆ Examples ◆ Theoretical Results ◆ 2 / 11
Designing an efficient SAT solver INPUT: formula F in CNF OUTPUT: If F is SAT: YES + model ■ If F is UNSAT: NO + refutation (proof of unsatisfiability) ■ Two possible methods: resolution-based: ■ - not direct to obtain model + straightforward to give refutation DPLL-based: ■ + straightforward to obtain model - not direct to give refutation Due to their efficiency, DPLL-based solvers are the method of choice 3 / 11
Overview of the session Designing an efficient SAT solver ■ DPLL: A Bit of History ■ Abstract DPLL: ■ Rules ◆ Examples ◆ Theoretical Results ◆ 3 / 11
DPLL - A Bit of History Original DPLL was incomplete method for FOL satisfiability ■ First paper (Davis and Putnam) in 1960: memory problems ■ Second paper (Davis, Logemann and Loveland) in 1962: ■ Depth-first-search with backtracking Late 90’s and early 00’s improvements make DPLL efficient: ■ Break-through systems: GRASP, SATO, Chaff, MiniSAT ◆ DP:10 var BDD:100 var Stalmarck:1k var SATO:1k var MiniSAT:100k var 1960 1986 1996 1996 2003 DLL:10 var GRASP:1k var Chaff:10k var 1962 1996 2001 4 / 11
Overview of the session Designing an efficient SAT solver ■ DPLL: A Bit of History ■ Abstract DPLL: ■ Rules ◆ Examples ◆ Theoretical Results ◆ 4 / 11
Our Abstraction of DPLL Given F in CNF, DPLL tries to build assignment M s.t. M | = F ■ Assignments M are represented as sequences of literals (those to be true): ■ EXAMPLE: sequence pqr is M ( p ) = 1 , M ( q ) = 0 , M ( r ) = 1 (overlining bar ¯ may be used to represent negation, like ¬ ) Order in M matters ◆ No literal appears twice in M ◆ No contradictory literals in M ◆ Sequences may have decision literals, denoted l d . ■ We will introduce a transition system modelling DPLL ■ States in the transition system are pairs M | | F , ■ where M is a (partial) assignment and F is a CNF The algorithm starts with an empty assignment ■ The rules in the transition system indicate which steps ■ ⇒ M ′ | M | | F = | F ′ are allowed. 5 / 11
Abstract DPLL - Rules Extending the model: Decide l or ¯ � l occurs in F ⇒ M l d | M | | F = | F if l is undefined in M � M | = ¬ C UnitProp M | | F, C ∨ l = ⇒ M l | | F, C ∨ l if l is undefined in M 6 / 11
Abstract DPLL - Rules (2) Repairing the model: Fail � M | = ¬ C M | | F, C = ⇒ fail if M contains no decision literals Backtrack M l d N | � = ¬ C M l d N | ⇒ M ¯ | F, C = l | | F, C if N contains no decision lits 7 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = 8 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( Decide ) 8 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( Decide ) 1 d | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = 8 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( Decide ) 1 d | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( UnitProp ) 8 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( Decide ) 1 d | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = ( UnitProp ) 1 d 2 | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨ 2 ⇒ = 8 / 11
Abstract DPLL - Example 1 ∅ | | 1 ∨ 2 , 3 ∨ 4 , 5 ∨ 6 , 6 ∨ 5 ∨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