31 1 motivation
play

31.1 Motivation 29. Basics 30. Reasoning and Resolution 31. DPLL - PowerPoint PPT Presentation

Foundations of Artificial Intelligence April 22, 2020 31. Propositional Logic: DPLL Algorithm Foundations of Artificial Intelligence 31.1 Motivation 31. Propositional Logic: DPLL Algorithm 31.2 Systematic Search: DPLL Malte Helmert and


  1. Foundations of Artificial Intelligence April 22, 2020 — 31. Propositional Logic: DPLL Algorithm Foundations of Artificial Intelligence 31.1 Motivation 31. Propositional Logic: DPLL Algorithm 31.2 Systematic Search: DPLL Malte Helmert and Thomas Keller 31.3 DPLL on Horn Formulas University of Basel April 22, 2020 31.4 Summary M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 1 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 2 / 22 31. Propositional Logic: DPLL Algorithm Motivation Propositional Logic: Overview Chapter overview: propositional logic 31.1 Motivation ◮ 29. Basics ◮ 30. Reasoning and Resolution ◮ 31. DPLL Algorithm ◮ 32. Local Search and Outlook M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 3 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 4 / 22

  2. 31. Propositional Logic: DPLL Algorithm Motivation 31. Propositional Logic: DPLL Algorithm Motivation Propositional Logic: Motivation Propositional Logic: Algorithmic Problems ◮ Propositional logic allows for the representation of knowledge main problems: and for deriving conclusions based on this knowledge. ◮ reasoning (Θ | = ϕ ?): ◮ many practical applications can be directly encoded, e.g. Does the formula ϕ logically follow from the formulas Θ? ◮ constraint satisfaction problems of all kinds ◮ equivalence ( ϕ ≡ ψ ): ◮ circuit design and verification Are the formulas ϕ and ψ logically equivalent? ◮ many problems contain logic as ingredient, e.g. ◮ satisfiability (SAT): ◮ automated planning Is formula ϕ satisfiable? If yes, find a model. ◮ general game playing German: Schlussfolgern, ¨ Aquivalenz, Erf¨ ullbarkeit ◮ description logic queries (semantic web) M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 5 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 6 / 22 31. Propositional Logic: DPLL Algorithm Motivation 31. Propositional Logic: DPLL Algorithm Motivation The Satisfiability Problem Relevance of SAT The Satisfiability Problem (SAT) given: ◮ The name “SAT” is often used for the satisfiability problem for propositional formula in conjunctive normal form (CNF) general propositional formulas (instead of restriction to CNF). usually represented as pair � V , ∆ � : ◮ General SAT can be reduced to CNF ◮ V set of propositional variables (propositions) (conversion in time O ( n )). ◮ ∆ set of clauses over V ◮ All previously mentioned problems can be reduced to SAT (clause = set of literals v or ¬ v with v ∈ V ) (conversion in time O ( n )). � SAT algorithms important and intensively studied find: ◮ satisfying interpretation (model) this and next chapter: SAT algorithms ◮ or proof that no model exists SAT is a famous NP-complete problem (Cook 1971; Levin 1973). M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 7 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 8 / 22

  3. 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL SAT vs. CSP SAT can be considered as constraint satisfaction problem: ◮ CSP variables = propositions 31.2 Systematic Search: DPLL ◮ domains = { F , T } ◮ constraints = clauses However, we often have constraints that affect > 2 variables. Due to this relationship, all ideas for CSPs are applicable to SAT: ◮ search ◮ inference ◮ variable and value orders M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 9 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 10 / 22 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL The DPLL Algorithm The DPLL Algorithm: Pseudo-Code The DPLL algorithm (Davis/Putnam/Logemann/Loveland) function DPLL(∆ , I ): corresponds to backtracking with inference for CSPs. if � ∈ ∆: [empty clause exists � unsatisfiable] ◮ recursive call DPLL(∆ , I ) return unsatisfiable else if ∆ = ∅ : for clause set ∆ and partial interpretation I [no clauses left � interpretation I satisfies formula] return I ◮ result is consistent extension of I ; else if there exists a unit clause { v } or {¬ v } in ∆: [unit propagation] unsatisfiable if no such extension exists Let v be such a variable, d the truth value that satisfies the clause. ∆ ′ := simplify(∆ , v , d ) ◮ first call DPLL(∆ , ∅ ) return DPLL(∆ ′ , I ∪ { v �→ d } ) inference in DPLL: else: [splitting rule] ◮ simplify: after assigning value d to variable v , Select some variable v which occurs in ∆. for each d ∈ { F , T } in some order: simplify all clauses that contain v ∆ ′ := simplify(∆ , v , d ) � forward checking (for constraints of potentially higher arity) I ′ := DPLL(∆ ′ , I ∪ { v �→ d } ) ◮ unit propagation: variables that occur in clauses without other if I ′ � = unsatisfiable variables (unit clauses) are assigned immediately return I ′ � minimum remaining values variable order return unsatisfiable M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 11 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 12 / 22

  4. 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL The DPLL Algorithm: simplify Example (1) ∆ = {{ X , Y , ¬ Z } , {¬ X , ¬ Y } , { Z } , { X , ¬ Y }} function simplify(∆ , v , d ) unit propagation: Z �→ T 1. Let ℓ be the literal for v that is satisfied by v �→ d . {{ X , Y } , {¬ X , ¬ Y } , { X , ¬ Y }} ∆ ′ := { C | C ∈ ∆ such that ℓ / ∈ C } splitting rule: ∆ ′′ := { C \ { ¯ 2. ℓ } | C ∈ ∆ ′ } return ∆ ′′ 2a. X �→ F 2b. X �→ T {{ Y } , {¬ Y }} {{¬ Y }} 3a. unit propagation: Y �→ T 3b. unit propagation: Y �→ F { � } {} M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 13 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 14 / 22 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL 31. Propositional Logic: DPLL Algorithm Systematic Search: DPLL Example (2) Properties of DPLL ∆ = {{ W , ¬ X , ¬ Y , ¬ Z } , { X , ¬ Z } , { Y , ¬ Z } , { Z }} ◮ DPLL is sound and complete. ◮ DPLL computes a model if a model exists. ◮ Some variables possibly remain unassigned in the solution I ; unit propagation: Z �→ T 1. their values can be chosen arbitrarily. {{ W , ¬ X , ¬ Y } , { X } , { Y }} ◮ time complexity in general exponential unit propagation: X �→ T 2. {{ W , ¬ Y } , { Y }} � important in practice: good variable order and additional inference methods (in particular clause learning) unit propagation: Y �→ T 3. {{ W }} ◮ Best known SAT algorithms are based on DPLL. unit propagation: W �→ T 4. {} M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 15 / 22 M. Helmert, T. Keller (University of Basel) Foundations of Artificial Intelligence April 22, 2020 16 / 22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend