Decision Procedures for Satisfiability and Validity in Propositional Logic

Size: px
Start display at page:

Download "Decision Procedures for Satisfiability and Validity in Propositional Logic"

Transcription

1 Decision Procedures for Satisfiability and Validity in Propositional Logic Meghdad Ghari Institute for Research in Fundamental Sciences (IPM) School of Mathematics-Isfahan Branch Logic Group Logic Short Course I, Computational Propositional Logic November 24, 2016 Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

2 Outline 1 Conjunctive Normal Form 2 Disjunctive Normal Form 3 Horn formulas 4 A linear SAT solver 5 Binary Decision Diagrams Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

3 Logical reasoning Is the following argument logically valid? A 1 A 2. A n B Artificial Language = Various Semantics Various Proof systems Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

4 Language Formulas of propositional logic are defined by the following grammar: Formula ::= Atomic Formula TRUE FALSE ( Formula) (Formula Formula) (Formula Formula) (Formula Formula). In Backus Naur form (BNF): φ ::= p ( φ) (φ φ) (φ φ) (φ φ), p Atom Atom denotes a non-empty (finite or infinite) set of atomic propositions (or propositional variables). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

5 Language Formulas of propositional logic are defined by the following grammar: Formula ::= Atomic Formula TRUE FALSE ( Formula) (Formula Formula) (Formula Formula) (Formula Formula). In Backus Naur form (BNF): φ ::= p ( φ) (φ φ) (φ φ) (φ φ), p Atom Atom denotes a non-empty (finite or infinite) set of atomic propositions (or propositional variables). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

6 Semantics Valuations: v : Atom {T, F} Valuations can be extended to the set of all formulas as follows: φ φ T F F T T F φ ψ φ ψ T T T T F F F T F F F F φ ψ φ ψ T T T T F T F T T F F F φ ψ φ ψ T T T T F F F T T F F T Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

7 Principle of compositionality The meaning of a complex expression is determined by the meanings of its constituent expressions and the rules used to combine them. v( ) = T v( ) = F v( φ) = 1 v(φ) v(φ ψ) = min(v(φ), v(ψ)) v(φ ψ) = max(v(φ), v(ψ)) v(φ ψ) = min(1, 1 v(φ) + v(ψ)) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

8 Semantic consequence Definition If for all valuations in which all φ 1, φ 2,..., φ n evaluate to T, ψ evaluates to T as well, we say that φ 1, φ 2,..., φ n = ψ holds and call = the semantic entailment relation. Example p q, p = q Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

9 Syntactic consequence Definition If ψ is provable (in a proof system) from premises φ 1, φ 2,..., φ n, we say that the sequent φ 1, φ 2,..., φ n ψ is valid. Example p q, p q Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

10 Logical consequence Two approaches to logical consequence: Semantic: φ 1, φ 2,..., φ n = ψ. Syntactic: φ 1, φ 2,..., φ n ψ. Theorem (Soundness) A 1 A 2. A n B φ 1, φ 2,..., φ n ψ φ 1, φ 2,..., φ n = ψ Theorem (Completeness) φ 1, φ 2,..., φ n = ψ φ 1, φ 2,..., φ n ψ Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

11 Logic in Computer Science Two approaches: Semantic: M. Huth and M. Ryan, Logic in Computer Science modelling and reasoning about systems, Cambridge University Press, 2004 Syntactic: M. Fitting, First-Order Logic and Automated Theorem Proving, Springer, J. H. Gallier, Logic for Computer Science Foundations of Automatic Theorem Proving, John Wiley, Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

12 Satisfiability, validity, equivalence Definition (Satisfiable) Given a formula φ in propositional logic, we say that φ is satisfiable (has a model) if it has a valuation in which it evaluates to true. Definition (Valid) Given a formula φ in propositional logic, we say that φ is valid if under every valuation it evaluates to true. In that case we write = φ. Definition (Equivalence) Let φ and ψ be formulas of propositional logic. We say that φ and ψ are semantically equivalent iff φ = ψ and φ = ψ hold. In that case we write φ ψ. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

13 Decision procedures Definition A decision problem is a question in some formal system with a yes-or-no answer, depending on the values of some input parameters. Definition A decision procedure is an algorithm that, given a decision problem, terminates with a correct yes/no answer. Definition A computer program that searches for a model for a propositional formula is called a SAT Solver. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

14 Some applications of SAT solvers Test for the functional equivalence of two circuits. Identifying defects of integrated circuits. Model checking of hardware and software systems. Planning in artificial intelligence. Joao Marques-Silva, Practical Applications of Boolean Satisfiability, In Workshop on Discrete Event Systems (WODES), IEEE Press, Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

15 Boolean functions Definition A boolean variable x is a variable ranging over the values 0 and 1. A boolean function f of n arguments is a function from {0, 1} n to {0, 1}. Example 0 def def = 1 and 1 = 0; x y def = 1 if x = y = 1; otherwise x y def = 0; x + y def = 0 if x = y = 0; otherwise x + y def = 1. Various representations of boolean functions: Truth tables Propositional formulas. Binary decision diagrams. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

16 Boolean functions Definition A boolean variable x is a variable ranging over the values 0 and 1. A boolean function f of n arguments is a function from {0, 1} n to {0, 1}. Example 0 def def = 1 and 1 = 0; x y def = 1 if x = y = 1; otherwise x y def = 0; x + y def = 0 if x = y = 0; otherwise x + y def = 1. Various representations of boolean functions: Truth tables Propositional formulas. Binary decision diagrams. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

17 Truth tables Truth tables are very space-inefficient. Once you have computed a truth table, it is easy to see whether the boolean function represented is satisfiable or valid. Once you have computed a truth table, comparing whether two ordered truth tables represent the same boolean function also seems easy. Checking satisfiability of a function with n atoms requires of the order of 2 n operations if the function is represented as a truth table. We conclude that checking satisfiability, validity and equivalence is highly inefficient with the truth-table representation. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

18 Propositional formulas Propositional formulas often provide a compact and efficient presentation of boolean functions. Deciding whether two arbitrary propositional formulas f and g denote the same boolean function is suspected to be exponentially expensive. Deciding whether an arbitrary propositional formula is satisfiable is a famous problem in computer science: No efficient algorithms for SAT are known, and it is strongly suspected that there aren t any. P? = NP NP? = co-np Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

19 Theorem Let φ be a formula of propositional logic. Then φ is satisfiable iff φ is not valid. Theorem Given formulas φ 1, φ 2,..., φ n and ψ of propositional logic, φ 1, φ 2,..., φ n = ψ iff = φ 1 (φ 2... (φ n ψ)) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

20 Theorem Let φ be a formula of propositional logic. Then φ is satisfiable iff φ is not valid. Theorem Given formulas φ 1, φ 2,..., φ n and ψ of propositional logic, φ 1, φ 2,..., φ n = ψ iff = φ 1 (φ 2... (φ n ψ)) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

21 Conjunctive Normal Form (CNF) L ::= p p, p Atom Literal D ::= L L D Clause C ::= D D C Conjunctive normal form Example ( q p r) ( p r) q. ( q p r q) ( p p). (p r) ( p r). (q p r) ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

22 Conjunctive Normal Form (CNF) L ::= p p, p Atom Literal D ::= L L D Clause C ::= D D C Conjunctive normal form Example ( q p r) ( p r) q. ( q p r q) ( p p). (p r) ( p r). (q p r) ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

23 Conjunctive Normal Form (CNF) L ::= p p, p Atom Literal D ::= L L D Clause C ::= D D C Conjunctive normal form Example ( q p r) ( p r) q. ( q p r q) ( p p). (p r) ( p r). (q p r) ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

24 Conjunctive Normal Form (CNF) L ::= p p, p Atom Literal D ::= L L D Clause C ::= D D C Conjunctive normal form Example ( q p r) ( p r) q. ( q p r q) ( p p). (p r) ( p r). (q p r) ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

25 Conjunctive Normal Form (CNF) L ::= p p, p Atom Literal D ::= L L D Clause C ::= D D C Conjunctive normal form Example ( q p r) ( p r) q. ( q p r q) ( p p). (p r) ( p r). (q p r) ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

26 CNF and validity Theorem A disjunction of literals L 1 L 2... L m is valid iff there are 1 i, j m such that L i is L j. Example ( q p r q) ( p p) is valid, since both q p r q and p p are valid. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

27 CNF and validity Theorem A disjunction of literals L 1 L 2... L m is valid iff there are 1 i, j m such that L i is L j. Example ( q p r q) ( p p) is valid, since both q p r q and p p are valid. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

28 Converting formulas to CNF I Converting using truth tables p q? T T T T F F F T T F F F φ = ( p q) ( p q). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

29 Converting formulas to CNF II Converting φ to CNF, using algorithm CNF(NNF(IMPL FREE(φ))). Step 1. φ ψ φ ψ Step 2. De Morgan rules: Step 3. Distributivity rules: (φ ψ) φ ψ (φ ψ) φ ψ φ (ψ σ) (φ ψ) (φ σ) φ (ψ σ) (φ ψ) (φ σ) Exercise Compute CNF(NNF(IMPL FREE((p q) p))). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

30 Algorithm IMPL-FREE function IMPL FREE (φ): /* precondition: φ an arbitrary formula */ /* postcondition: IMPL FREE (φ) computes an implication-free equivalent for φ */ begin function case φ is a literal: return φ φ is φ 1 : return IMPL FREE(φ 1 ) φ is φ 1 φ 2 : return IMPL FREE (φ 1 ) IMPL FREE (φ 2 ) φ is φ 1 φ 2 : return IMPL FREE (φ 1 ) IMPL FREE (φ 2 ) φ is φ 1 φ 2 : return IMPL FREE (φ 1 ) IMPL FREE (φ 2 ) end case end function Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

31 Algorithm NNF function NNF (φ): /* precondition: φ is implication free */ /* postcondition: NNF (φ) computes a NNF for φ */ begin function case φ is a literal: return φ φ is φ 1 : return NNF (φ 1 ) φ is φ 1 φ 2 : return NNF (φ 1 ) NNF (φ 2 ) φ is φ 1 φ 2 : return NNF (φ 1 ) NNF (φ 2 ) φ is (φ 1 φ 2 ): return NNF ( φ 1 ) NNF ( φ 2 ) φ is (φ 1 φ 2 ): return NNF ( φ 1 ) NNF ( φ 2 ) end case end function Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

32 Algorithm DISTR function DISTR (η 1, η 2 ): /* precondition: η 1 and η 2 are in CNF */ /* postcondition: DISTR (η 1, η 2 ) computes a CNF for η 1 η 2 */ begin function case η 1 is η 11 η 12 : return DISTR (η 11, η 2 ) DISTR (η 12, η 2 ) η 2 is η 21 η 22 : return DISTR (η 1, η 21 ) DISTR (η 1, η 22 ) otherwise (= no conjunctions): return η 1 η 2 end case end function Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

33 Algorithm CNF function CNF (φ): /* precondition: φ implication free and in NNF */ /* postcondition: CNF (φ) computes an equivalent CNF for φ */ begin function case φ is a literal: return φ φ is φ 1 φ 2 : return CNF (φ 1 ) CNF (φ 2 ) φ is φ 1 φ 2 : return DISTR (CNF (φ 1 ), CNF (φ 2 )) end case end function Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

34 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. J. J. Lu, E. Rosenthal, Logic-Based Reasoning for Intelligent Systems, in Computer Science Handbook, Allen B. Tucker (Editor), Chapter 61, Chapman and Hall/CRC, Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

35 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Example: clause set S = {p q, p q, q r, q r} Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

36 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Splitting: {p q, p q, q r, q r, p} Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

37 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Propagation: {p q, p q, q r, q r, p} p {q, q r, q r} Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

38 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Propagation:{q, q r, q r} q { r} Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

39 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Propagation: { r} r {} Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

40 Davis-Putnam Procedure function DP-sat(clause set S) repeat for each unit clause L in S do /* unit propagation */ delete from S every clause containing L delete L from every clause of S if S is empty return true else if S contains the empty clause return false until no changes occur in S /* splitting */ choose a literal L in S if DP-sat(S {L}) return true else if DP-sat(S { L}) return true else return false. Model: {p, q, r} v(p) = v(q) = T, v(r) = F. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

41 Disjunctive Normal Form (DNF) L ::= p p, p Atom Literal D ::= L L D C ::= D D C Disjunctive normal form Example ( q p r) ( p r) q. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

42 Disjunctive Normal Form (DNF) L ::= p p, p Atom Literal D ::= L L D C ::= D D C Disjunctive normal form Example ( q p r) ( p r) q. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

43 DNF and satisfiability Theorem A conjunction of literals L 1 L 2... L m is satisfiable iff there are no 1 i, j m such that L i is L j. Example ( q p r) ( r r) is satisfiable, since q p r is satisfiable. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

44 DNF and satisfiability Theorem A conjunction of literals L 1 L 2... L m is satisfiable iff there are no 1 i, j m such that L i is L j. Example ( q p r) ( r r) is satisfiable, since q p r is satisfiable. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

45 Horn formulas P ::= p, A ::= P P A C ::= A P H ::= C C H p Atom Horn clause Horn formula Example (p q s ) (q r p) ( s). (q ) (p q). (p p) ( s r). ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

46 Horn formulas P ::= p, A ::= P P A C ::= A P H ::= C C H p Atom Horn clause Horn formula Example (p q s ) (q r p) ( s). (q ) (p q). (p p) ( s r). ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

47 Horn formulas P ::= p, A ::= P P A C ::= A P H ::= C C H p Atom Horn clause Horn formula Example (p q s ) (q r p) ( s). (q ) (p q). (p p) ( s r). ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

48 Horn formulas P ::= p, A ::= P P A C ::= A P H ::= C C H p Atom Horn clause Horn formula Example (p q s ) (q r p) ( s). (q ) (p q). (p p) ( s r). ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

49 Horn formulas P ::= p, A ::= P P A C ::= A P H ::= C C H p Atom Horn clause Horn formula Example (p q s ) (q r p) ( s). (q ) (p q). (p p) ( s r). ( q p). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

50 Algorithm HORN function HORN (φ): /* precondition: φ is a Horn formula */ /* postcondition: HORN (φ) decides the satisfiability for φ */ begin function mark all occurrences of in φ; while there is a conjunct P 1 P 2 P ki P of φ such that all P j are marked but P isn t do mark P end while if is marked then return unsatisfiable else return satisfiable end function φ = (p q s ) (q r p) ( s) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

51 Algorithm HORN function HORN (φ): /* precondition: φ is a Horn formula */ /* postcondition: HORN (φ) decides the satisfiability for φ */ begin function mark all occurrences of in φ; while there is a conjunct P 1 P 2 P ki P of φ such that all P j are marked but P isn t do mark P end while if is marked then return unsatisfiable else return satisfiable end function φ = (p q s ) (q r p) ( s) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

52 Algorithm HORN function HORN (φ): /* precondition: φ is a Horn formula */ /* postcondition: HORN (φ) decides the satisfiability for φ */ begin function mark all occurrences of in φ; while there is a conjunct P 1 P 2 P ki P of φ such that all P j are marked but P isn t do mark P end while if is marked then return unsatisfiable else return satisfiable end function φ = (p q s ) (q r p) ( s) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

53 Algorithm HORN function HORN (φ): /* precondition: φ is a Horn formula */ /* postcondition: HORN (φ) decides the satisfiability for φ */ begin function mark all occurrences of in φ; while there is a conjunct P 1 P 2 P ki P of φ such that all P j are marked but P isn t do mark P end while if is marked then return unsatisfiable else return satisfiable end function φ = (p q s ) (q r p) ( s) is satisfiable. Assign T to all marked atoms and F to all unmarked atoms. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

54 A linear SAT solver φ ::= p φ φ φ, p Atom The parse tree of formula p ( q p): Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

55 Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

56 Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

57 Binary Decision Diagrams (BDD) Binary decision tree for f (x, y) = x + y (NOR): x y f (x, y) Dashed line value 0. Solid line value 1. Binary decision tree = truth table Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

58 Some examples B 0. The BDD of : B 1. The BDD of : B x. The BDD of a variable x: Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

59 C1. Removal of duplicate terminals C1. If a BDD contains more than one terminal 0-node, then we redirect all edges which point to such a 0-node to just one of them. We proceed in the same way with terminal nodes labelled with 1. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

60 C2. Removal of redundant tests C2. If both outgoing edges of a node n point to the same node m, then we eliminate that node n, sending all its incoming edges to m. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

61 C3. Removal of duplicate non-terminals C3. If two distinct nodes n and m in the BDD are the roots of structurally identical subbdds, then we eliminate one of them, say m, and redirect all its incoming edges to the other one. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

62 C3. Removal of duplicate non-terminals C3. If two distinct nodes n and m in the BDD are the roots of structurally identical subbdds, then we eliminate one of them, say m, and redirect all its incoming edges to the other one. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

63 Ordered Binary Decision Diagrams (OBDD) A BDD which does not have an ordering of variables: Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

64 Definition A BDD is said to be reduced if none of the optimisations C1 C3 can be applied (i.e. no more reductions are possible). An ordered BDD (OBDD) is a BDD which has an ordering for some list of variables. Theorem The reduced OBDD representing a given boolean function f is unique. OBDDs have a canonical form, namely their unique reduced OBDD. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

65 Definition A BDD is said to be reduced if none of the optimisations C1 C3 can be applied (i.e. no more reductions are possible). An ordered BDD (OBDD) is a BDD which has an ordering for some list of variables. Theorem The reduced OBDD representing a given boolean function f is unique. OBDDs have a canonical form, namely their unique reduced OBDD. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

66 Definition A BDD is said to be reduced if none of the optimisations C1 C3 can be applied (i.e. no more reductions are possible). An ordered BDD (OBDD) is a BDD which has an ordering for some list of variables. Theorem The reduced OBDD representing a given boolean function f is unique. OBDDs have a canonical form, namely their unique reduced OBDD. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

67 The importance of canonical form OBDDs allow compact representations of certain classes of boolean functions which only have exponential representations in other systems, such as truth tables and conjunctive normal forms. Example. Consider the even parity function f even (x 1, x 2,..., x n ) which is defined to be 1 if there is an even number of variables x i with value 1; otherwise, it is defined to be 0. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

68 Absence of redundant variables If the value of the boolean function f (x 1, x 2,..., x n ) does not depend on the value of x i, then any reduced OBDD which represents f does not contain any x i -node. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

69 Test for semantic equivalence f and g denote the same boolean functions iff the reduced OBDDs have identical structure. Example. The reduced OBDD for both boolean functions f (x, y) = x + y and g(x, y) = x ȳ. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

70 Test for validity The function f is valid iff its reduced OBDD is B 1. A BDD represents a valid function if no 0-terminal node is reachable from the root along a consistent path in a BDD which represents it. (A consistent path is one which, for every variable, has only dashed lines or only solid lines leaving nodes labelled by that variable.) Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

71 Test for satisfiability The function f is satisfiable iff its reduced OBDD is not B 0. A BDD represents a satisfiable function if a 1-terminal node is reachable from the root along a consistent path in a BDD which represents it. Example. An OBDD for boolean function f (x 1, x 2,..., x 6 ) = (x 1 + x 2 ) (x 3 + x 4 ) (x 5 + x 6 ). Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

72 Test for implication We can test whether f (x 1, x 2,..., x n ) implies g(x 1, x 2,..., x n ) (i.e. whenever f computes 1, then so does g) by computing the reduced OBDD for f ḡ. This is B 0 iff the implication holds. Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

73 Comparing efficiency of five representations of boolean functions Representation of test for boolean operations boolean functions compact SAT validity + Prop. formulas often hard hard easy easy easy Formulas in DNF sometimes easy hard hard easy hard Formulas in CNF sometimes hard easy easy hard hard Ordered truth tables never hard hard hard hard hard Reduced OBDDs often easy easy medium medium easy Meghdad Ghari (IPM) SAT Solvers Logic Short Course / 57

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)

Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30) Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Normal Forms of Propositional Logic

Normal Forms of Propositional Logic Normal Forms of Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 12, 2017 Bow-Yaw Wang (Academia Sinica) Normal Forms of Propositional Logic September

More information

A brief introduction to Logic. (slides from

A brief introduction to Logic. (slides from A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity

More information

CS156: The Calculus of Computation

CS156: The Calculus of Computation CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between

More information

Reduced Ordered Binary Decision Diagrams

Reduced Ordered Binary Decision Diagrams Reduced Ordered Binary Decision Diagrams Lecture #12 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de December 13, 2016 c JPK

More information

Comp487/587 - Boolean Formulas

Comp487/587 - Boolean Formulas Comp487/587 - Boolean Formulas 1 Logic and SAT 1.1 What is a Boolean Formula Logic is a way through which we can analyze and reason about simple or complicated events. In particular, we are interested

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 31. Propositional Logic: DPLL Algorithm Malte Helmert and Gabriele Röger University of Basel April 24, 2017 Propositional Logic: Overview Chapter overview: propositional

More information

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning

COMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal

More information

Formal Verification Methods 1: Propositional Logic

Formal Verification Methods 1: Propositional Logic Formal Verification Methods 1: Propositional Logic John Harrison Intel Corporation Course overview Propositional logic A resurgence of interest Logic and circuits Normal forms The Davis-Putnam procedure

More information

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011

Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber 15-414 Aug 31, 2011 Why study SAT solvers? Many problems reduce to SAT. Formal verification CAD, VLSI Optimization AI, planning, automated

More information

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna

The Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)

More information

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms

CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms CS 512, Spring 2017, Handout 10 Propositional Logic: Conjunctive Normal Forms, Disjunctive Normal Forms, Horn Formulas, and other special forms Assaf Kfoury 5 February 2017 Assaf Kfoury, CS 512, Spring

More information

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

LOGIC PROPOSITIONAL REASONING

LOGIC PROPOSITIONAL REASONING LOGIC PROPOSITIONAL REASONING WS 2017/2018 (342.208) Armin Biere Martina Seidl biere@jku.at martina.seidl@jku.at Institute for Formal Models and Verification Johannes Kepler Universität Linz Version 2018.1

More information

02 Propositional Logic

02 Propositional Logic SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or

More information

Propositional Logic: Models and Proofs

Propositional Logic: Models and Proofs Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505

More information

CS156: The Calculus of Computation Zohar Manna Autumn 2008

CS156: The Calculus of Computation Zohar Manna Autumn 2008 Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)

More information

Part 1: Propositional Logic

Part 1: Propositional Logic Part 1: Propositional Logic Literature (also for first-order logic) Schöning: Logik für Informatiker, Spektrum Fitting: First-Order Logic and Automated Theorem Proving, Springer 1 Last time 1.1 Syntax

More information

Propositional and Predicate Logic - II

Propositional and Predicate Logic - II Propositional and Predicate Logic - II Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - II WS 2016/2017 1 / 16 Basic syntax Language Propositional logic

More information

Propositional and Predicate Logic - V

Propositional and Predicate Logic - V Propositional and Predicate Logic - V Petr Gregor KTIML MFF UK WS 2016/2017 Petr Gregor (KTIML MFF UK) Propositional and Predicate Logic - V WS 2016/2017 1 / 21 Formal proof systems Hilbert s calculus

More information

Logic and Inferences

Logic and Inferences Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional

More information

An Introduction to SAT Solving

An Introduction to SAT Solving An Introduction to SAT Solving Applied Logic for Computer Science UWO December 3, 2017 Applied Logic for Computer Science An Introduction to SAT Solving UWO December 3, 2017 1 / 46 Plan 1 The Boolean satisfiability

More information

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel

Propositional Logic. Methods & Tools for Software Engineering (MTSE) Fall Prof. Arie Gurfinkel Propositional Logic Methods & Tools for Software Engineering (MTSE) Fall 2017 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

ECE473 Lecture 15: Propositional Logic

ECE473 Lecture 15: Propositional Logic ECE473 Lecture 15: Propositional Logic Jeffrey Mark Siskind School of Electrical and Computer Engineering Spring 2018 Siskind (Purdue ECE) ECE473 Lecture 15: Propositional Logic Spring 2018 1 / 23 What

More information

CS720 Class Notes. Steve Revilak

CS720 Class Notes. Steve Revilak CS720 Class Notes Steve Revilak Jan 2007 May 2007 This are Stephen Revilak s course notes from CS720, Logical Foundations of Computer Science. This course was taught by Professor Peter Fejer at UMass

More information

Propositional Logic: Evaluating the Formulas

Propositional Logic: Evaluating the Formulas Institute for Formal Models and Verification Johannes Kepler University Linz VL Logik (LVA-Nr. 342208) Winter Semester 2015/2016 Propositional Logic: Evaluating the Formulas Version 2015.2 Armin Biere

More information

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010

Introduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Introduction to Artificial Intelligence Propositional Logic & SAT Solving UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Today Representation in Propositional Logic Semantics & Deduction

More information

Propositional logic. Programming and Modal Logic

Propositional logic. Programming and Modal Logic Propositional logic Programming and Modal Logic 2006-2007 4 Contents Syntax of propositional logic Semantics of propositional logic Semantic entailment Natural deduction proof system Soundness and completeness

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

Warm-Up Problem. Is the following true or false? 1/35

Warm-Up Problem. Is the following true or false? 1/35 Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca October 4, 2015 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Reasoning with Quantified Boolean Formulas

Reasoning with Quantified Boolean Formulas Reasoning with Quantified Boolean Formulas Martina Seidl Institute for Formal Models and Verification Johannes Kepler University Linz 1 What are QBF? Quantified Boolean formulas (QBF) are formulas of propositional

More information

Computation and Logic Definitions

Computation and Logic Definitions Computation and Logic Definitions True and False Also called Boolean truth values, True and False represent the two values or states an atom can assume. We can use any two distinct objects to represent

More information

Deductive Systems. Lecture - 3

Deductive Systems. Lecture - 3 Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth

More information

Natural Deduction for Propositional Logic

Natural Deduction for Propositional Logic Natural Deduction for Propositional Logic Bow-Yaw Wang Institute of Information Science Academia Sinica, Taiwan September 10, 2018 Bow-Yaw Wang (Academia Sinica) Natural Deduction for Propositional Logic

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

Propositional Logic: Part II - Syntax & Proofs 0-0

Propositional Logic: Part II - Syntax & Proofs 0-0 Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems

More information

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel

Propositional Logic. Testing, Quality Assurance, and Maintenance Winter Prof. Arie Gurfinkel Propositional Logic Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel References Chpater 1 of Logic for Computer Scientists http://www.springerlink.com/content/978-0-8176-4762-9/

More information

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley

EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams. Sanjit A. Seshia EECS, UC Berkeley EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving III & Binary Decision Diagrams Sanjit A. Seshia EECS, UC Berkeley Acknowledgments: Lintao Zhang Announcement Project proposals due

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

6. Logical Inference

6. Logical Inference Artificial Intelligence 6. Logical Inference Prof. Bojana Dalbelo Bašić Assoc. Prof. Jan Šnajder University of Zagreb Faculty of Electrical Engineering and Computing Academic Year 2016/2017 Creative Commons

More information

Propositional Reasoning

Propositional Reasoning Propositional Reasoning CS 440 / ECE 448 Introduction to Artificial Intelligence Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam Johnson, Nikhil Johri Spring 2010 Intro to AI (CS

More information

Lecture Notes on SAT Solvers & DPLL

Lecture Notes on SAT Solvers & DPLL 15-414: Bug Catching: Automated Program Verification Lecture Notes on SAT Solvers & DPLL Matt Fredrikson André Platzer Carnegie Mellon University Lecture 10 1 Introduction In this lecture we will switch

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 10, 2014 These notes are a preliminary draft. Please use freely, but do not re-distribute

More information

Classical Propositional Logic

Classical Propositional Logic Classical Propositional Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ Ph: 02 6218 3717 Data61/CSIRO and ANU July 2017 1 / 71 Classical Logic and Reasoning Problems A 1 : Socrates is a

More information

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic

The Importance of Being Formal. Martin Henz. February 5, Propositional Logic The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets

More information

Inference in Propositional Logic

Inference in Propositional Logic Inference in Propositional Logic Deepak Kumar November 2017 Propositional Logic A language for symbolic reasoning Proposition a statement that is either True or False. E.g. Bryn Mawr College is located

More information

Mathematical Logic Propositional Logic - Tableaux*

Mathematical Logic Propositional Logic - Tableaux* Mathematical Logic Propositional Logic - Tableaux* Fausto Giunchiglia and Mattia Fumagalli University of Trento *Originally by Luciano Serafini and Chiara Ghidini Modified by Fausto Giunchiglia and Mattia

More information

3 Propositional Logic

3 Propositional Logic 3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists

More information

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas

Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Journal of Artificial Intelligence Research 1 (1993) 1-15 Submitted 6/91; published 9/91 Clause/Term Resolution and Learning in the Evaluation of Quantified Boolean Formulas Enrico Giunchiglia Massimo

More information

Duality in Knowledge Compilation Techniques

Duality in Knowledge Compilation Techniques Duality in Knowledge Compilation Techniques Neil V. Murray 1 and Erik Rosenthal 2 1 Department of Computer Science, State University of New York, Albany, NY 12222, USA, nvm@cs.albany.edu 2 Department of

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen 2005 References: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 7 2. S. Russell s teaching materials Introduction The representation

More information

Model Checking for Propositions CS477 Formal Software Dev Methods

Model Checking for Propositions CS477 Formal Software Dev Methods S477 Formal Software Dev Methods Elsa L Gunter 2112 S, UIU egunter@illinois.edu http://courses.engr.illinois.edu/cs477 Slides based in part on previous lectures by Mahesh Vishwanathan, and by Gul gha January

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

Advanced Topics in LP and FP

Advanced Topics in LP and FP Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection

More information

Binary Decision Diagrams

Binary Decision Diagrams Binar Decision Diagrams Ma 3, 2004 1 Overview Boolean functions Possible representations Binar decision trees Binar decision diagrams Ordered binar decision diagrams Reduced ordered binar decision diagrams

More information

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/

CSE507. Introduction. Computer-Aided Reasoning for Software. Emina Torlak courses.cs.washington.edu/courses/cse507/17wi/ Computer-Aided Reasoning for Software CSE507 courses.cs.washington.edu/courses/cse507/17wi/ Introduction Emina Torlak emina@cs.washington.edu Today What is this course about? Course logistics Review of

More information

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Logic Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World

More information

Conjunctive Normal Form and SAT

Conjunctive Normal Form and SAT Notes on Satisfiability-Based Problem Solving Conjunctive Normal Form and SAT David Mitchell mitchell@cs.sfu.ca September 19, 2013 This is a preliminary draft of these notes. Please do not distribute without

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5

Logical Inference. Artificial Intelligence. Topic 12. Reading: Russell and Norvig, Chapter 7, Section 5 rtificial Intelligence Topic 12 Logical Inference Reading: Russell and Norvig, Chapter 7, Section 5 c Cara MacNish. Includes material c S. Russell & P. Norvig 1995,2003 with permission. CITS4211 Logical

More information

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008

WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT IS AN SMT SOLVER? Jaeheon Yi - April 17, 2008 WHAT I LL TALK ABOUT Propositional Logic Terminology, Satisfiability, Decision Procedure First-Order Logic Terminology, Background Theories Satisfiability

More information

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence. Logical Agents Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

More information

A Collection of Problems in Propositional Logic

A Collection of Problems in Propositional Logic A Collection of Problems in Propositional Logic Hans Kleine Büning SS 2016 Problem 1: SAT (respectively SAT) Instance: A propositional formula α (for SAT in CNF). Question: Is α satisfiable? The problems

More information

Propositional and Predicate Logic. jean/gbooks/logic.html

Propositional and Predicate Logic.   jean/gbooks/logic.html CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/

More information

Compiling Knowledge into Decomposable Negation Normal Form

Compiling Knowledge into Decomposable Negation Normal Form Compiling Knowledge into Decomposable Negation Normal Form Adnan Darwiche Cognitive Systems Laboratory Department of Computer Science University of California Los Angeles, CA 90024 darwiche@cs. ucla. edu

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

Propositional Resolution Introduction

Propositional Resolution Introduction Propositional Resolution Introduction (Nilsson Book Handout) Professor Anita Wasilewska CSE 352 Artificial Intelligence Propositional Resolution Part 1 SYNTAX dictionary Literal any propositional VARIABLE

More information

Basing Decisions on Sentences in Decision Diagrams

Basing Decisions on Sentences in Decision Diagrams Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence Basing Decisions on Sentences in Decision Diagrams Yexiang Xue Department of Computer Science Cornell University yexiang@cs.cornell.edu

More information

Propositional Language - Semantics

Propositional Language - Semantics Propositional Language - Semantics Lila Kari University of Waterloo Propositional Language - Semantics CS245, Logic and Computation 1 / 41 Syntax and semantics Syntax Semantics analyzes Form analyzes Meaning

More information

Intelligent Agents. Pınar Yolum Utrecht University

Intelligent Agents. Pınar Yolum Utrecht University Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Logical Agents (Based mostly on the course slides from http://aima.cs.berkeley.edu/) Outline Knowledge-based agents Wumpus world Logic in

More information

Propositional and First Order Reasoning

Propositional and First Order Reasoning Propositional and First Order Reasoning Terminology Propositional variable: boolean variable (p) Literal: propositional variable or its negation p p Clause: disjunction of literals q \/ p \/ r given by

More information

Lecture 1: Logical Foundations

Lecture 1: Logical Foundations Lecture 1: Logical Foundations Zak Kincaid January 13, 2016 Logics have two components: syntax and semantics Syntax: defines the well-formed phrases of the language. given by a formal grammar. Typically

More information

22c:145 Artificial Intelligence

22c:145 Artificial Intelligence 22c:145 Artificial Intelligence Fall 2005 Propositional Logic Cesare Tinelli The University of Iowa Copyright 2001-05 Cesare Tinelli and Hantao Zhang. a a These notes are copyrighted material and may not

More information

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013

Chapter 2. Reductions and NP. 2.1 Reductions Continued The Satisfiability Problem (SAT) SAT 3SAT. CS 573: Algorithms, Fall 2013 August 29, 2013 Chapter 2 Reductions and NP CS 573: Algorithms, Fall 2013 August 29, 2013 2.1 Reductions Continued 2.1.1 The Satisfiability Problem SAT 2.1.1.1 Propositional Formulas Definition 2.1.1. Consider a set of

More information

A New 3-CNF Transformation by Parallel-Serial Graphs 1

A New 3-CNF Transformation by Parallel-Serial Graphs 1 A New 3-CNF Transformation by Parallel-Serial Graphs 1 Uwe Bubeck, Hans Kleine Büning University of Paderborn, Computer Science Institute, 33098 Paderborn, Germany Abstract For propositional formulas we

More information

Propositional Resolution

Propositional Resolution Artificial Intelligence Propositional Resolution Marco Piastra Propositional Resolution 1] Deductive systems and automation Is problem decidible? A deductive system a la Hilbert (i.e. derivation using

More information

Propositional Logic Part 1

Propositional Logic Part 1 Propositional Logic Part 1 Yingyu Liang yliang@cs.wisc.edu Computer Sciences Department University of Wisconsin, Madison [Based on slides from Louis Oliphant, Andrew Moore, Jerry Zhu] slide 1 5 is even

More information

Tutorial 1: Modern SMT Solvers and Verification

Tutorial 1: Modern SMT Solvers and Verification University of Illinois at Urbana-Champaign Tutorial 1: Modern SMT Solvers and Verification Sayan Mitra Electrical & Computer Engineering Coordinated Science Laboratory University of Illinois at Urbana

More information

CS 380: ARTIFICIAL INTELLIGENCE

CS 380: ARTIFICIAL INTELLIGENCE CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS 11/8/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logical gents: The can

More information

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World Agenda Artificial Intelligence 10. Propositional Reasoning, Part I: Principles How to Think About What is True or False 1 Introduction Álvaro Torralba Wolfgang Wahlster 2 Propositional Logic 3 Resolution

More information

First-order resolution for CTL

First-order resolution for CTL First-order resolution for Lan Zhang, Ullrich Hustadt and Clare Dixon Department of Computer Science, University of Liverpool Liverpool, L69 3BX, UK {Lan.Zhang, U.Hustadt, CLDixon}@liverpool.ac.uk Abstract

More information

Quantified Boolean Formulas: Complexity and Expressiveness

Quantified Boolean Formulas: Complexity and Expressiveness Dagstuhl SAT Interactions 2012 Quantified Boolean Formulas: Complexity and Expressiveness Uwe Bubeck University of Paderborn 20.11.2012 Outline Introduction Free Variables and Equivalence Complexity Expressiveness

More information

Symbolic Model Checking with ROBDDs

Symbolic Model Checking with ROBDDs Symbolic Model Checking with ROBDDs Lecture #13 of Advanced Model Checking Joost-Pieter Katoen Lehrstuhl 2: Software Modeling & Verification E-mail: katoen@cs.rwth-aachen.de December 14, 2016 c JPK Symbolic

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

Propositional Logic Language

Propositional Logic Language Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing

More information

Logical Agents (I) Instructor: Tsung-Che Chiang

Logical Agents (I) Instructor: Tsung-Che Chiang Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

An instance of SAT is defined as (X, S)

An instance of SAT is defined as (X, S) SAT: Propositional Satisfiability 22c:45 Artificial Intelligence Russell & Norvig, Ch. 7.6 Validity vs. Satisfiability Validity: A sentence is valid if it is true in every interpretation (every interpretation

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

Artificial Intelligence Chapter 7: Logical Agents

Artificial Intelligence Chapter 7: Logical Agents Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

Lecture 9: The Splitting Method for SAT

Lecture 9: The Splitting Method for SAT Lecture 9: The Splitting Method for SAT 1 Importance of SAT Cook-Levin Theorem: SAT is NP-complete. The reason why SAT is an important problem can be summarized as below: 1. A natural NP-Complete problem.

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Propositional Logic 1 / 33 Propositional

More information

Chapter 11: Automated Proof Systems (1)

Chapter 11: Automated Proof Systems (1) Chapter 11: Automated Proof Systems (1) SYSTEM RS OVERVIEW Hilbert style systems are easy to define and admit a simple proof of the Completeness Theorem but they are difficult to use. Automated systems

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information