Download presentation
Presentation is loading. Please wait.
Published byShinta Kurniawan Modified over 5 years ago
1
Davis-Putnam Methods Computational Logic Lecture 5
Michael Genesereth Autumn 2011
2
Level Saturation
3
Level Saturation Method
function lsm () ; is a linked list of clauses {var results ; while ({} ) {results lss(,results) concat(,results) function lss (, ) {var results []; for (var ) {for ( ) {results concat(results,resolvents(,))}}; return results}
4
Example for DP Multiple proofs. Resolutions between parents and children.
5
Davis Putnam Procedure
function dp () {for in vocabulary() do {var ’{}; for 1 in for 2 in such that 1 2 do {var ’ 1 {} 2 {}; if not tautology(’) then ’’{’}}; { | or } ’}; return {if {} then unsatisfiable else satisfiable}} function tautology() { and }
6
Example Without DP {p, q, r} {q, r} {p} {p, q, r} {q, r} {p}
{p, q, r} {q, r} {q} {p, q, r} {q, r} {q} {p, q, r} {p, r} {r} {p, q, r} {p, r} {r} {p, q, r} {p, r} {p, q, r} {p, r} {} {p, q} {p, q} Cost = {p, q} 378 resolutions {p, q}
7
Example With DP {p, q, r} {q, r} {p, q, r} {q, r} {p, q, r} {q, r}
{p, q, r} {r} {p, q, r} {r} {p, q, r} {} Cost = = 21 resolutions
8
Motivation for DPLL DP can cause a quadratic expansion every time it is applied. This can easily exhaust space on large problems. DPLL attacks this problem by sequentially solving smaller problems. Basic idea: Choose a literal. Assume true, simplify clause set, and try to show satisfiable. Repeat for the negation of the literal. Good because we do not cross multiply the clause set.
9
Davis Putnam Logemann Loveland
function dpll () {var ; if = {} then return yes; if {} then return no; choose vocabulary()); if dpll(simplify(, )) return yes else return dpll(simplify(,))} function simplify (, ) {var ’; for do {if then skip else if negation() then ’ ’ { {negation()}} else ’ ’ {}}}
10
Simplification Example
Clauses: {p,q} {p,r} {r,s} Literal: p Simplification: {r}
11
Comparisons Problem Tautology DP DPLL Prime 30.00 0.00 0.00
Prime16 > 1 hour * 9.15 Prime17 > 1 hour * Mkadder32 >> 1 hour Mkadder42 >> 1 hour Mkadder52 >> 1 hour Mkadder53 >> 1 hour Mkadder63 >> 1 hour * Mkadder73 >> 1 hour *
12
Coin Logic Syntax: The logical constants: quarters, nickels, dimes
Negation: coin upside down Disjunction: stack of coins Conjunction: set of stacks Almost exactly clausal form. Propositional Resolution: Add two stacks, deleting at most one pair of complementary coins.
13
Example Quarter means it is Monday. Nickel means Mary loves Pat.
Dime means Mary loves Quincy. [Nickel,Dime]: If Mary loves Pat, Mary loves Quincy. [Quarter,Nickel,Dime]: Monday Mary loves P or Q. [Nickel, Dime]:Mary loves only one of the two. [Quarter,Dime]: If Monday, Mary loves Quincy. [Quarter,-Nickel]: If Monday, Mary does not love Pat.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.