Announcements. Office Hours Swap: OH schedule has been updated to reflect this.

Size: px
Start display at page:

Download "Announcements. Office Hours Swap: OH schedule has been updated to reflect this."

Transcription

1 SA Solving

2 Announements Offie Hours Swap: Zavain has offie hours from 4-6PM toay in builing 460, room 040A. Rose has offie hours tonight from 7-9PM in Gates B26B. Keith has offie hours hursay from 2-4PM in Gates 178. OH sheule has been upate to reflet this.

3 A Note on the Chekpoints...

4 his Doesn't Work! heorem: If R is transitive, then R -1 is transitive. Proof: Consier any a, b, an suh that arb an br. Sine R is transitive, we have ar. Sine arb an br, we have br -1 a an R -1 b. Sine we have ar, we have R -1 a. hus R -1 b, br -1 a, an R -1 a. his proves a. b.. (arb br R -1 b br -1 a R -1 a) You nee to show a. b.. (ar -1 b br -1 ar -1 )

5 his Doesn't Work! heorem: If R is transitive, then R -1 is transitive. Proof: Consier any a, b, an suh that arb an br. Sine R is transitive, we have ar. Sine arb an br, we have br -1 a an R -1 b. Sine we have ar, we have R -1 a. hus R -1 b, br -1 a, an R -1 a. his proves a. b.. (arb br R -1 b br -1 a R -1 a) You nee to show a. b.. (ar -1 b br -1 ar -1 )

6 his Doesn't Work! heorem: If R is transitive, then R -1 is transitive. Proof: Consier any a, b, an suh that arb an br. Sine R is transitive, we have ar. Sine arb an br, we have br -1 a an R -1 b. Sine we have ar, we have R -1 a. hus R -1 b, br -1 a, an R -1 a. his proves a. b.. (arb br R -1 b br -1 a R -1 a) You nee to show a. b.. (ar -1 b br -1 ar -1 )

7 A Corret Proof heorem: If R is transitive, then R -1 is transitive. Proof: Consier any a, b, an suh that ar -1 b an br -1. We will prove ar -1. Sine ar -1 b an br -1, we have that bra an Rb. Sine Rb an bra, by transitivity we know Ra. Sine Ra, we have ar -1, as require.

8 he akeaway Point Don't get trippe up by efinitions! If you want to iretly prove that P Q, assume that P is true an prove that Q is true as well.

9 An now... SA!

10 Is his Formula Ever rue? p p

11 Is his Formula Ever rue? p p

12 Is his Formula Ever rue? (r s t) (s t r) (t r s) t s

13 Is his Formula Ever rue? (x 0 (x 1 x 0 )) (x 2 x 1 x 0 ) (x 1 x 1 )

14 Satisfiability A propositional logi formula φ is alle satisfiable if there is some assignment to its variables that makes it evaluate to true. An assignment of true an false to the variables of φ that makes it evaluate to true is alle a satisfying assignment. Similar terms: φ is tautologial if it is always true. φ is satisfiable if it an be mae true. φ is unsatisfiable if it is always false.

15 SA he boolean satisfiability problem (SA) is the following: Given a propositional logi formula φ, is φ satisfiable? Note: Goal is just to get a yes/no answer, not to atually fin a satisfying assignment. hough usually we an obtain an assignment easily when given a SA solver. Extremely important problem both in theory an in pratie.

16 Appliations of SA

17

18

19

20

21 Solving SA: ake One

22 A Simple Algorithm Given a formula φ, we an just buil a truth table for φ an hek all of the rows. If any of them evaluate to true, then φ is satisfiable. If none of them evaluate to true, then φ is unsatisfiable. So what might this look like?

23 he ruth able Algorithm p p p F

24 he ruth able Algorithm p p p F F

25 he ruth able Algorithm p p p F F F

26 he ruth able Algorithm p p p F F F

27 he ruth able Algorithm p p p F F F

28 he ruth able Algorithm p q (p q) q F F F F F F F F F

29 he ruth able Algorithm p q (p q) q F F F F F F F F F

30 q (r q) r p q F p F F F F F F F F F F F r F F F F F F F F F F F F F F F F F F F F F F F F

31 q (r q) r p q F p F F F F F F F F F F F r F F F F F F F F F F F F F F F F F F F F F F F F

32 A Large Problem ruth tables an get very big very quikly! With n variables, there will be 2 n rows. Many real-wor SA instanes have hunres of thousans of variables; this is ompletely infeasible!

33 Clause-Base Algorithms

34 Simplifying Our Formulas Arbitrary formulas in propositional logi an be omplex. Lots of ifferent onnetives. Arbitrary nesting of formulas. Can be iffiult to see how they all interrelate. Goal: Convert formulas into a simpler format.

35 Literals an Clauses A literal in propositional logi is a variable or its negation: x y But not x y. A lause is a many-way OR (isjuntion) of literals. x y z x But not x ( y z)

36 Conjuntive Normal Form A propositional logi formula φ is in onjuntive normal form (CNF) if it is the many-way AND (onjuntion) of lauses. (x y z) ( x y) (x y z w) x z But not (x (y z)) (x y) Only legal operators are,,. No nesting allowe.

37 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

38 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

39 he Struture of CNF ( x y z ) ( x y z ) ( x y z ) Eah lause must have at least one true literal in it.

40 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

41 he Struture of CNF ( x y z ) ( x y z ) ( x y z ) We shoul pik at least one true literal from eah lause

42 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

43 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

44 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

45 he Struture of CNF ( x y z ) ( x y z ) ( x y z )

46 he Struture of CNF ( x y z ) ( x y z ) ( x y z ) subjet to the onstraint that we never hoose a literal an its negation

47 Getting to CNF here are exellent algorithms for solving SA formulas in CNF. How o we onvert an arbitrary propositional logi formula into a formula in CNF?

48 Negation Normal Form A formula φ in propositional logi is in negation normal form (NNF) iff he only onnetives are,, an. is only applie iretly to variables. Examples: (a ( b )) ( a) a b Non-Examples: (a b) a ( b ) a b

49 Getting to NNF NNF is a stepping stone towar CNF: Only have,, an. All negations pushe onto variables. Buil an algorithm to get from arbitrary propositional logi own to NNF. Our onversion proess will work as follows: Eliminate omplex onnetives. Simplify negations.

50 Eliminating Complex Connetives NNF only allows,,. First step: Replae other onnetives with these three. Replae φ ψ with ( φ ψ). Replae with (p p) for any variable p. Replae with (p p) for any variable p. For now, let's ignore ; etails are triky. Result: A new formula that is logially equivalent to the original an not muh bigger.

51 Eliminating Complex Connetives (p q r) (s t q) (p q r) (s t q) (p q r) ( s t q)

52 Simplifying Negations NNF only allows negations in front of variables. Now that we have just,, an, repeately apply these rules to ahieve this result: Replae φ with φ Replae (φ ψ) with φ ψ Replae (φ ψ) with φ ψ his proess eventually terminates; the height of the negations keeps ereasing.

53 Simplifying Negations (p q r) ( s t q) (p q r) ( s t q) (p q r) ( s t q) (p q r) (s t q)

54 From NNF to CNF Now that we an get to NNF, let's get own to CNF. Reall: CNF is the onjuntion of lauses: (x 1 x 2 x 3 ) (x 1 x 4 ) We'll use an inutive approah to onvert NNF into CNF.

55 From NNF to CNF Every NNF formula is either A literal, he onjuntion of two NNF formulas: φ ψ he isjuntion of two NNF formulas: φ ψ Let's work through some examples an see if we an fin a pattern.

56 Examples: NNF to CNF (x y z w) ( x y)

57 Examples: NNF to CNF x ( y z) (x y) ( x z)

58 y x (y z ) F x F F F F F F F F F F F z F F F F F F F F F (x y) ( x z) F F F F F F F F F F F F F F F F F

59 Examples: NNF to CNF (w x) ( y z) ((w x) y) ((w x) z) (w y) ( x y) ( w z) ( x z)

60 Examples: NNF to CNF (v w x) ( y z) ((v w x) y) (( v w x) z) ((v w) y) ( x y) (( v w) z) (x z) (v y) ( w y) ( x y) ( v z) ( w z) ( y z)

61 Converting NNF to CNF Apply the following reasoning inutively: If the formula is a literal, o nothing. If the formula is φ ψ: Convert φ an ψ to CNF, all it φ' an ψ'. Yiel φ' ψ' If the formula is φ ψ: Convert φ an ψ to CNF, all it φ' an ψ'. Repeately apply the istributive law x (y z) (x y) (x z) to φ' ψ' until simplifie.

62 A Problem (a b) ( ) ( e f) (g h) ((a ) (a ) (b ) (b )) (e f) (g h) ((a e) (a f) (a e) (a f) ) ((b e) (b f) (b e) (b f)) (g h) (a e g) (a f g) (a e g) (a f g) (b e g) (b f g) (b e g) (b f g) (a e h) (a f h) (a e h) (a f h) (b e h) (b f h) (b e h) (b f h)

63 A Problem (a b) ( ) ( e f) (g h) ((a ) (a ) (b ) (b )) (e f) (g h) ((a e) (a f) (a e) (a f) ) ((b e) (b f) (b e) (b f)) (g h) (a e g) (a f g) (a e g) (a f g) (b e g) (b f g) (b e g) (b f g) (a e h) (a f h) (a e h) (a f h) (b e h) (b f h) (b e h) (b f h)

64 A Problem (a b) ( ) ( e f) (g h) ((a ) (a ) (b ) (b )) (e f) (g h) ((a e) (a f) (a e) (a f) ) ((b e) (b f) (b e) (b f)) (g h) (a e g) (a f g) (a e g) (a f g) (b e g) (b f g) (b e g) (b f g) (a e h) (a f h) (a e h) (a f h) (b e h) (b f h) (b e h) (b f h)

65 A Problem (a b) ( ) ( e f) (g h) ((a ) (a ) (b ) (b )) (e f) (g h) ((a e) (a f) (a e) (a f) ) ((b e) (b f) (b e) (b f)) (g h) (a e g) (a f g) (a e g) (a f g) (b e g) (b f g) (b e g) (b f g) (a e h) (a f h) (a e h) (a f h) (b e h) (b f h) (b e h) (b f h)

66 A Problem (a b) ( ) ( e f) (g h) ((a ) (a ) (b ) (b )) (e f) (g h) ((a e) (a f) (a e) (a f) ) ((b e) (b f) (b e) (b f)) (g h) (a e g) (a f g) (a e g) (a f g) (b e g) (b f g) (b e g) (b f g) (a e h) (a f h) (a e h) (a f h) (b e h) (b f h) (b e h) (b f h)

67 Exponential Blowup Our logi for eliminating an lea to exponential size inreases. Not a problem with the algorithm; some formulas proue exponentially large CNF formulas. We will nee to fin another approah.

68 Equivalene an Equisatisfiability Reall: wo logial formulas φ an ψ are are equivalent (enote φ ψ) if they always take on the same truth values. wo logial formulas φ an ψ are equisatisfiable (enote φ ψ) if φ is satisfiable iff ψ is satisfiable. o solve SA for a formula φ, we an instea solve SA for an equisatisfiable ψ.

69 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b )

70 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b )

71 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a b )

72 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a ) ( b ) ( )

73 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q )

74 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a )

75 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a ) ( )

76 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

77 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

78 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

79 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

80 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

81 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

82 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

83 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

84 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

85 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

86 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

87 Equisatisfiably from NNF to CNF ( a b ) ( a ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

88 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

89 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b )

90 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b )

91 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) )

92 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q ) ( b q ) ( q ) ( a q ) ( q )

93 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r)

94 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) a b

95 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a ) ( b )

96 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

97 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

98 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

99 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

100 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

101 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

102 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

103 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

104 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

105 Equisatisfiably from NNF to CNF ( ( a q ) ( b q ) ( q ) ( a q ) ( q ) ) ( a b ) ( a q r) ( b q r ) ( q r) ( a q r) ( q r) ( a r ) ( b r )

106 Equisatisfiably from NNF to CNF If the formula is a literal, o nothing. If the formula is φ ψ: Convert φ an ψ to CNF, all it φ' an ψ'. Yiel φ' ψ' If the formula is φ ψ: Convert φ an ψ to CNF, all it φ' an ψ'. Create a new variable q. A q to eah lause of φ'. A q to eah lause of ψ'. Yiel φ' ψ'. As at most n new variables to eah lause, where n is the number of lauses. Size inrease at worst quarati.

107 Where We Are Now We've foun a way to onvert arbitrary propositional logi formulas into equisatisfiable CNF formulas. he size may inrease, but at most quaratially. Now, let's atually try to solve SA!

108 A Simple Baktraking Algorithm

109 ( a b ) ( a ) ( a ) ( a ) ( a ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

110 ( a b ) ( a ) ( a ) ( a ) ( a ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

111 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

112 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

113 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

114 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

115 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

116 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

117 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

118 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

119 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

120 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

121 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

122 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

123 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

124 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

125 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

126 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

127 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

128 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

129 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

130 ( a b ) ( ) ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) b Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

131 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

132 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

133 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

134 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

135 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

136 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

137 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

138 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

139 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

140 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

141 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

142 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

143 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

144 ( a b ) ( ) b ( ) ( ) ( ) a ( ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

145 ( a b ) ( ) b ( ) ( ) ( ) a ( ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

146 ( a b ) ( ) b ( ) ( ) ( ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

147 ( a b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

148 ( a b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( a b ) ( a b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

149 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( b ) ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

150 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( b ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

151 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( b ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

152 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

153 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

154 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

155 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

156 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

157 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

158 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

159 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

160 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

161 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

162 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

163 ( ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

164 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( b ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

165 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( b ) ( b ) b ( b ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

166 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

167 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

168 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

169 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

170 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

171 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

172 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

173 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

174 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

175 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

176 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

177 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

178 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

179 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

180 ( b ) ( a ) b ( a ) ( a ) ( a ) a ( ) ( b ) b ( ) Formula from he Quest for Effiient Boolean Satisfiability Solvers by Shara Malik of Prineton University

181 Baktraking SA Solving If φ is an empty set of lauses, return true. All lauses are satisfie. If φ ontains ( ), return false, Some lause is unsatisfiable. Otherwise: Choose some variable x. Return whether φ x is satisfiable or φ x is satisfiable, where φ x is φ with x set to false an φ x is φ with x set to true.

182 Analyzing Baktraking he baktraking solver works reasonably well on most inputs. Low memory usage just nee to remember one potential path along the tree. For formulas with many satisfying assignments, typially fins one very quikly. But it has its weaknesses. Completely blin searhing might miss obvious hoies. In the worst-ase, must explore the entire tree, whih has 2 n leaves.

183 Aing Heuristis A heuristi is an approah to solving a problem that may or may not work orretly. Contrast with an algorithm, whih has efinitive guarantees on its behavior. he simpliity of CNF makes it possible to a heuristis to our baktraking solver. What sorts of heuristis might we a?

184 Pure Literal Elimination ( a b ) ( a ) ( a b ) ( a b ) ( b )

185 Pure Literal Elimination ( a b ) ( a ) ( a b ) ( a b ) ( b )

186 Pure Literal Elimination ( a b ) ( a ) ( a b ) ( a b ) ( b ) he he variable variable is is never never negate negate here. here. here here is is no no reason reason not not to to set set it it to to true. true.

187 Pure Literal Elimination ( a b ) ( a b ) ( b ) he he variable variable is is never never negate negate here. here. here here is is no no reason reason not not to to set set it it to to true. true.

188 Pure Literal Elimination ( a b ) ( a b ) ( b )

189 Pure Literal Elimination ( a b ) ( a b ) ( b )

190 Pure Literal Elimination ( a b ) ( a b ) ( b ) he he variable variable a is is always always negate negate here. here. here here is is no no reason reason not not to to set set it it to to false. false.

191 Pure Literal Elimination ( b ) he he variable variable a is is always always negate negate here. here. here here is is no no reason reason not not to to set set it it to to false. false.

192 Pure Literal Elimination ( b )

193 Pure Literal Elimination ( b )

194 Pure Literal Elimination ( b ) he he variable variable b is is always always negate negate here. here. here here is is no no reason reason not not to to set set it it to to false. false.

195 Pure Literal Elimination he he variable variable b is is always always negate negate here. here. here here is is no no reason reason not not to to set set it it to to false. false.

196 Pure Literal Elimination

197 Pure Literal Elimination All All lauses lauses have have been been satisfie, so so the the formula formula is is satisfiable.

198 Pure Literal Elimination A literal is alle pure if its negation appears nowhere in the formula. Setting that literal to true will satisfy some number of lauses automatially an simplify the formula. Many formulas an be satisfie by iteratively applying pure literal elimination.

199 Unit Propagation ( a b ) ( a ) ( a b ) ( a b )

200 Unit Propagation ( a b ) ( a ) ( a b ) ( a b )

201 Unit Propagation ( a b ) ( a ) ( a b ) ( a b ) is is all all by by itself. itself. has has to to be be false false for for this this formula formula to to be be true. true.

202 Unit Propagation ( a b ) ( a ) ( a b ) ( a b ) is is all all by by itself. itself. has has to to be be false false for for this this formula formula to to be be true. true.

203 Unit Propagation ( a b ) ( a ) ( a b ) ( a b )

204 Unit Propagation ( a b ) ( a ) ( a b ) ( a b )

205 Unit Propagation ( a b ) ( a ) ( a b ) ( a b ) a is is all all by by itself. itself. a has has to to be be true true for for this this formula formula to to be be true. true.

206 Unit Propagation ( b ) ( b ) ( b ) a is is all all by by itself. itself. a has has to to be be true true for for this this formula formula to to be be true. true.

207 Unit Propagation ( b ) ( b ) ( b )

208 Unit Propagation ( b ) ( b ) ( b )

209 Unit Propagation ( b ) ( b ) ( b ) b is is all all by by itself. itself. b has has to to be be true true for for this this formula formula to to be be true. true.

210 Unit Propagation ( ) b is is all all by by itself. itself. b has has to to be be true true for for this this formula formula to to be be true. true.

211 Unit Propagation ( )

212 Unit Propagation ( )

213 Unit Propagation ( ) We We are are left left with with an an empty empty lause. lause. he he formula formula is is unsatisfiable.

214 Unit Propagation A unit lause is a lause ontaining just one literal. For the formula to be true, that literal must be set to true. his might expose other unit lauses.

215 DPLL he DPLL algorithm is a moifiation of the simple baktraking searh algorithm. Name for Davis, Putnam, Logemann, an Lovelan, its inventors. Inorporates the two heuristis we just saw.

216 DPLL Simplify φ with unit propagation. Simplify φ with pure literal elimination. If φ is empty, return true. If φ ontains ( ), return false. Otherwise: Choose some variable x. Return whether φ x is satisfiable or φ x is satisfiable, where φ x is φ with x set to false an φ x is φ with x set to true.

217 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a )

218 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR

219 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR Guess a

220 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR Guess a

221 ( a b ) ( a ) ( b ) ( a ) ( b ) ( b ) ( b ) ( a b ) ( a ) SAR Guess a

222 ( b ) ( ) ( b ) ( ) ( b ) ( b ) ( b ) ( b ) ( ) SAR Guess a

223 ( b ) ( ) ( b ) ( ) ( b ) ( b ) ( b ) ( b ) ( ) SAR Guess a

224 ( b ) ( ) ( b ) ( ) ( b ) ( b ) ( b ) ( b ) ( ) SAR Guess a Propagate

225 ( b ) ( ) ( b ) ( ) ( b ) ( b ) ( b ) ( b ) ( ) SAR Guess a Propagate

226 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate

227 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate

228 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate

229 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate Propagate

230 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate Propagate

231 ( b ) ( b ) ( ) SAR Guess a Propagate Propagate

232 ( b ) ( b ) ( ) SAR Guess a Propagate Propagate

233 ( b ) ( b ) ( ) SAR Guess a Propagate Propagate

234 ( b ) ( b ) ( ) SAR Guess a Propagate Propagate FAILURE

235 ( b ) ( b ) ( ) ( b ) ( b ) ( ) SAR Guess a Propagate Propagate FAILURE

236 ( b ) ( ) ( b ) ( ) ( b ) ( b ) ( b ) ( b ) ( ) SAR Guess a Propagate Propagate FAILURE

237 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR Guess a Propagate Propagate FAILURE

238 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR Guess a Propagate Propagate FAILURE Fore: a

239 ( a b ) ( a b ) ( b ) ( b ) ( a ) ( b ) ( a b ) ( b ) ( a b ) ( a ) ( a b ) ( a b ) ( a ) SAR Guess a Propagate Propagate FAILURE Fore: a

240 ( a b ) ( b ) ( b ) ( b ) ( a b ) ( b ) ( a b ) ( a b ) SAR Guess a Propagate Propagate FAILURE Fore: a

241 ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) SAR Guess a Propagate Propagate FAILURE Fore: a

242 ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) SAR Guess a Propagate Propagate FAILURE Fore: a

243 ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b

244 ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) ( b ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b

245 ( b ) ( b ) ( b ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b

246 ( ) ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b

247 ( ) ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b

248 ( ) ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate

249 ( ) ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate

250 ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate

251 ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate

252 ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

253 ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

254 ( ) ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

255 ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

256 ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

257 ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate

258 ( ) SAR Guess a Propagate Propagate FAILURE Fore: a Propagate b Propagate Propagate FAILURE

259 DPLL is Powerful DPLL was invente 50 years ago this July, but is still the basis for most SA solvers. he two heuristis aggressively simplify many ommon ases. However, still has an exponential worst-ase runtime.

260 A Ranomize Approah

261 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b

262 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b

263 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false false false

264 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false false false

265 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false false false

266 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false true false

267 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false true false

268 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false false true false

269 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false

270 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false

271 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false

272 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false true

273 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false true

274 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true false true

275 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true true false true

276 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true true false true

277 Ranomize SA Solving ( a b ) ( a ) ( a ) ( a ) ( a ) ( b ) ( a b ) ( a b ) a b false true true true false true

278 Ranomize SA Solving We an attempt to solve SA ranomly: Make a ompletely ranom guess at a satisfying assignment. If the formula is satisfiable, output true. For eah one-variable hange possible: If that hange improves the assignment, make the hange an repeat. If stuk, make another ompletely ranom guess at a satisfying assignment. After some number of tries, output probably not. Many inustrial SA solving algorithms (suh as GSA an WalkSA) are base on this approah.

279 How har is SA? We'll see more on this later on...

280 How har is SA? We'll see more on this later on...

281 Next ime Introution to Computability heory Strings an eision problems. DFAs.

Mathematical Logic Part Three

Mathematical Logic Part Three Mathematical Logic Part hree riday our Square! oday at 4:15PM, Outside Gates Announcements Problem Set 3 due right now. Problem Set 4 goes out today. Checkpoint due Monday, October 22. Remainder due riday,

More information

McCreight s Suffix Tree Construction Algorithm. Milko Izamski B.Sc. Informatics Instructor: Barbara König

McCreight s Suffix Tree Construction Algorithm. Milko Izamski B.Sc. Informatics Instructor: Barbara König 1. Introution MCreight s Suffix Tree Constrution Algorithm Milko Izamski B.S. Informatis Instrutor: Barbara König The main goal of MCreight s algorithm is to buil a suffix tree in linear time. This is

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

CSE 5311 Notes 18: NP-Completeness

CSE 5311 Notes 18: NP-Completeness SE 53 Notes 8: NP-ompleteness (Last upate 7//3 8:3 PM) ELEMENTRY ONEPTS Satisfiability: ( p q) ( p q ) ( p q) ( p q ) Is there an assignment? (Deision Problem) Similar to ebugging a logi iruit - Is there

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

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

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

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

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

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

FORMAL METHODS LECTURE VI BINARY DECISION DIAGRAMS (BDD S)

FORMAL METHODS LECTURE VI BINARY DECISION DIAGRAMS (BDD S) Alessandro Artale (FM First Semester 2009/2010) p. 1/38 FORMAL METHODS LECTURE VI BINARY DECISION DIAGRAMS (BDD S) Alessandro Artale Faulty of Computer Siene Free University of Bolzano artale@inf.unibz.it

More information

Lecture 2 Propositional Logic & SAT

Lecture 2 Propositional Logic & SAT CS 5110/6110 Rigorous System Design Spring 2017 Jan-17 Lecture 2 Propositional Logic & SAT Zvonimir Rakamarić University of Utah Announcements Homework 1 will be posted soon Propositional logic: Chapter

More information

Formal Verification SE303 Conception des systèmes sur puces (SoC)

Formal Verification SE303 Conception des systèmes sur puces (SoC) Formal Verifiation SE33 Coneption des systèmes sur pues (SoC) Ulrih Kühne 29//27 Outline Introdution Short History of Hardware Failures Design and Verifiation Proess Funtional Verifiation Ciruit Models

More information

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Recap from Last Time NP-Hardness A language L is called NP-hard iff for every L' NP, we have L' P L. A language in L is called NP-complete iff L is NP-hard and L NP. The class NPC

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

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

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

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

SAT Solvers: Theory and Practice

SAT Solvers: Theory and Practice Summer School on Verification Technology, Systems & Applications, September 17, 2008 p. 1/98 SAT Solvers: Theory and Practice Clark Barrett barrett@cs.nyu.edu New York University Summer School on Verification

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

NP-Completeness Part II

NP-Completeness Part II NP-Completeness Part II Please evaluate this course on Axess. Your comments really do make a difference. Announcements Problem Set 8 due tomorrow at 12:50PM sharp with one late day. Problem Set 9 out,

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

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

Zero-Knowledge Protocols

Zero-Knowledge Protocols he People Zero-Knowlege Protools 2 he wars Prover (Peggy) Claim I Verifier (Vi) S Seret Deision 2 {true, false} zero-knowlege protool allows Peggy to Convine Vi that her laim is true an that she knows

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 8. Satisfiability and Model Construction Davis-Putnam-Logemann-Loveland Procedure, Phase Transitions, GSAT Joschka Boedecker and Wolfram Burgard and Bernhard Nebel

More information

Recap from Last Time

Recap from Last Time NP-Completeness Recap from Last Time Analyzing NTMs When discussing deterministic TMs, the notion of time complexity is (reasonably) straightforward. Recall: One way of thinking about nondeterminism is

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

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office?

Announcements. Friday Four Square! Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Did you lose a phone in my office? N P NP Completeness Announcements Friday Four Square! Today at 4:15PM, outside Gates. Problem Set 8 due right now. Problem Set 9 out, due next Friday at 2:15PM. Explore P, NP, and their connection. Did

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

Decision Procedures for Satisfiability and Validity in Propositional Logic

Decision Procedures for Satisfiability and Validity in Propositional Logic 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 http://math.ipm.ac.ir/isfahan/logic-group.htm

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

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

Solving SAT Modulo Theories

Solving SAT Modulo Theories Solving SAT Modulo Theories R. Nieuwenhuis, A. Oliveras, and C.Tinelli. Solving SAT and SAT Modulo Theories: from an Abstract Davis-Putnam-Logemann-Loveland Procedure to DPLL(T) Mooly Sagiv Motivation

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

Statistical physics analysis of the computational complexity of solving random satisfiability problems using backtrack algorithms

Statistical physics analysis of the computational complexity of solving random satisfiability problems using backtrack algorithms Eur. Phys. J. B, 55 53 ) THE EUROPEAN PHYSICAL JOURNAL B EDP Sienes Soietà Italiana di Fisia Springer-Verlag Statistial physis analysis of the omputational omplexity of solving random satisfiability problems

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

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

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

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (previous lecture, Part I) Chapter 7.5 (this lecture, Part II) (optional: 7.6-7.8)

More information

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson

Satisfiability and SAT Solvers. CS 270 Math Foundations of CS Jeremy Johnson Satisfiability and SAT Solvers CS 270 Math Foundations of CS Jeremy Johnson Conjunctive Normal Form Conjunctive normal form (products of sums) Conjunction of clauses (disjunction of literals) For each

More information

Modal Horn Logics Have Interpolation

Modal Horn Logics Have Interpolation Modal Horn Logis Have Interpolation Marus Kraht Department of Linguistis, UCLA PO Box 951543 405 Hilgard Avenue Los Angeles, CA 90095-1543 USA kraht@humnet.ula.de Abstrat We shall show that the polymodal

More information

The Laws of Acceleration

The Laws of Acceleration The Laws of Aeleration The Relationships between Time, Veloity, and Rate of Aeleration Copyright 2001 Joseph A. Rybzyk Abstrat Presented is a theory in fundamental theoretial physis that establishes the

More information

VLSI CAD: Lecture 4.1. Logic to Layout. Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1

VLSI CAD: Lecture 4.1. Logic to Layout. Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1 VLSI CAD: Logic to Layout Rob A. Rutenbar University of Illinois Lecture 4.1 Computational Boolean Algebra Representations: Satisfiability (SAT), Part 1 Some Terminology Satisfiability (called SAT for

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

Supplementary Materials for A universal data based method for reconstructing complex networks with binary-state dynamics

Supplementary Materials for A universal data based method for reconstructing complex networks with binary-state dynamics Supplementary Materials for A universal ata ase metho for reonstruting omplex networks with inary-state ynamis Jingwen Li, Zhesi Shen, Wen-Xu Wang, Celso Greogi, an Ying-Cheng Lai 1 Computation etails

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Question: How do we formalize the definitions and reasoning we use in our proofs? Where We're Going Propositional Logic (oday) Basic logical connectives. ruth tables. Logical

More information

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving

Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 3: Practical SAT Solving Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson SAT Solving 1 / 36 Review: Propositional

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

Satisfiability Modulo Theories

Satisfiability Modulo Theories Satisfiability Modulo Theories Summer School on Formal Methods Menlo College, 2011 Bruno Dutertre and Leonardo de Moura bruno@csl.sri.com, leonardo@microsoft.com SRI International, Microsoft Research SAT/SMT

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

CSE 20 DISCRETE MATH WINTER

CSE 20 DISCRETE MATH WINTER CSE 20 DISCRETE MATH WINTER 2016 http://cseweb.ucsd.edu/classes/wi16/cse20-ab/ Reminders Exam 1 in one week One note sheet ok Review sessions Saturday / Sunday Assigned seats: seat map on Piazza shortly

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

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

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

Determination the Invert Level of a Stilling Basin to Control Hydraulic Jump

Determination the Invert Level of a Stilling Basin to Control Hydraulic Jump Global Avane Researh Journal of Agriultural Siene Vol. (4) pp. 074-079, June, 0 Available online http://garj.org/garjas/inex.htm Copyright 0 Global Avane Researh Journals Full Length Researh Paper Determination

More information

CMSC 451: Lecture 9 Greedy Approximation: Set Cover Thursday, Sep 28, 2017

CMSC 451: Lecture 9 Greedy Approximation: Set Cover Thursday, Sep 28, 2017 CMSC 451: Leture 9 Greedy Approximation: Set Cover Thursday, Sep 28, 2017 Reading: Chapt 11 of KT and Set 54 of DPV Set Cover: An important lass of optimization problems involves overing a ertain domain,

More information

A NETWORK SIMPLEX ALGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM

A NETWORK SIMPLEX ALGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM NETWORK SIMPLEX LGORITHM FOR THE MINIMUM COST-BENEFIT NETWORK FLOW PROBLEM Cen Çalışan, Utah Valley University, 800 W. University Parway, Orem, UT 84058, 801-863-6487, en.alisan@uvu.edu BSTRCT The minimum

More information

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity

Equivalences. Proposition 2.8: The following equivalences are valid for all formulas φ, ψ, χ: (φ φ) φ. Idempotency Idempotency Commutativity Substitution Theorem Proposition 2.7: Let φ 1 and φ 2 be equivalent formulas, and ψ[φ 1 ] p be a formula in which φ 1 occurs as a subformula at position p. Then ψ[φ 1 ] p is equivalent to ψ[φ 2 ] p. 84

More information

Planning as Satisfiability

Planning as Satisfiability Planning as Satisfiability Alan Fern * Review of propositional logic (see chapter 7) Planning as propositional satisfiability Satisfiability techniques (see chapter 7) Combining satisfiability techniques

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

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT

The Wumpus Game. Stench Gold. Start. Cao Hoang Tru CSE Faculty - HCMUT The Wumpus Game Stench Stench Gold Stench Start 1 The Wumpus Game Stench in the square containing the wumpus and in the directly adjacent squares in the squares directly adjacent to a pit Glitter in the

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

1 Efficient Transformation to CNF Formulas

1 Efficient Transformation to CNF Formulas 1 Efficient Transformation to CNF Formulas We discuss an algorithm, due to Tseitin [?], which efficiently transforms an arbitrary Boolean formula φ to a CNF formula ψ such that ψ has a model if and only

More information

Chapter 7 Propositional Satisfiability Techniques

Chapter 7 Propositional Satisfiability Techniques Lecture slides for Automated Planning: Theory and Practice Chapter 7 Propositional Satisfiability Techniques Dana S. Nau University of Maryland 12:58 PM February 15, 2012 1 Motivation Propositional satisfiability:

More information

Propositional Logic: Methods of Proof. Chapter 7, Part II

Propositional Logic: Methods of Proof. Chapter 7, Part II Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world

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

Chapter 3 Deterministic planning

Chapter 3 Deterministic planning Chapter 3 Deterministic planning In this chapter we describe a number of algorithms for solving the historically most important and most basic type of planning problem. Two rather strong simplifying assumptions

More information

CSE 555 HW 5 SAMPLE SOLUTION. Question 1.

CSE 555 HW 5 SAMPLE SOLUTION. Question 1. CSE 555 HW 5 SAMPLE SOLUTION Question 1. Show that if L is PSPACE-complete, then L is NP-hard. Show that the converse is not true. If L is PSPACE-complete, then for all A PSPACE, A P L. We know SAT PSPACE

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

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

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

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Announcements Problem Session tonight from 7:00 7:50 in 380-380X. Optional, but highly recommended! Problem Set 3 Checkpoint due right now. 2 Handouts Problem Set 3 Checkpoint

More information

Expressiveness of the Interval Logics of Allen s Relations on the Class of all Linear Orders: Complete Classification

Expressiveness of the Interval Logics of Allen s Relations on the Class of all Linear Orders: Complete Classification Proeeings of the Twenty-Seon International Joint Conferene on Artifiial Intelligene Expressiveness of the Interval Logis of Allen s Relations on the Class of all Linear Orers: Complete Classifiation Dario

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

Chapter 7 Propositional Satisfiability Techniques

Chapter 7 Propositional Satisfiability Techniques Lecture slides for Automated Planning: Theory and Practice Chapter 7 Propositional Satisfiability Techniques Dana S. Nau CMSC 722, AI Planning University of Maryland, Spring 2008 1 Motivation Propositional

More information

Math 225B: Differential Geometry, Homework 6

Math 225B: Differential Geometry, Homework 6 ath 225B: Differential Geometry, Homework 6 Ian Coley February 13, 214 Problem 8.7. Let ω be a 1-form on a manifol. Suppose that ω = for every lose urve in. Show that ω is exat. We laim that this onition

More information

Topics in Model-Based Reasoning

Topics in Model-Based Reasoning Towards Integration of Proving and Solving Dipartimento di Informatica Università degli Studi di Verona Verona, Italy March, 2014 Automated reasoning Artificial Intelligence Automated Reasoning Computational

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

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

c-perfect Hashing Schemes for Binary Trees, with Applications to Parallel Memories

c-perfect Hashing Schemes for Binary Trees, with Applications to Parallel Memories -Perfet Hashing Shemes for Binary Trees, with Appliations to Parallel Memories (Extended Abstrat Gennaro Cordaso 1, Alberto Negro 1, Vittorio Sarano 1, and Arnold L.Rosenberg 2 1 Dipartimento di Informatia

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

Optimal Distributed Estimation Fusion with Transformed Data

Optimal Distributed Estimation Fusion with Transformed Data Optimal Distribute Estimation Fusion with Transforme Data Zhansheng Duan X. Rong Li Department of Eletrial Engineering University of New Orleans New Orleans LA 70148 U.S.A. Email: {zuanxli@uno.eu Abstrat

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

Lecture 9: Search 8. Victor R. Lesser. CMPSCI 683 Fall 2010

Lecture 9: Search 8. Victor R. Lesser. CMPSCI 683 Fall 2010 Lecture 9: Search 8 Victor R. Lesser CMPSCI 683 Fall 2010 ANNOUNCEMENTS REMEMBER LECTURE ON TUESDAY! EXAM ON OCTOBER 18 OPEN BOOK ALL MATERIAL COVERED IN LECTURES REQUIRED READINGS WILL MOST PROBABLY NOT

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

Solutions Manual. Selected odd-numbered problems in. Chapter 2. for. Proof: Introduction to Higher Mathematics. Seventh Edition

Solutions Manual. Selected odd-numbered problems in. Chapter 2. for. Proof: Introduction to Higher Mathematics. Seventh Edition Solutions Manual Seleted odd-numbered problems in Chapter for Proof: Introdution to Higher Mathematis Seventh Edition Warren W. Esty and Norah C. Esty 5 4 3 1 Setion.1. Sentenes with One Variable Chapter

More information

Mathematical Logic Part One

Mathematical Logic Part One Mathematical Logic Part One Announcements Problem Set 3 checkpoint due right now. Problem Set 2 due now with a late day. Solutions distributed at end of lecture. One inal Note on the Pigeonhole Principle

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

Pythagorean Triples and SAT Solving

Pythagorean Triples and SAT Solving Pythagorean Triples and SAT Solving Moti Ben-Ari Department of Science Teaching Weizmann Institute of Science http://www.weizmann.ac.il/sci-tea/benari/ c 2017-18 by Moti Ben-Ari. This work is licensed

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

Branching. Teppo Niinimäki. Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science

Branching. Teppo Niinimäki. Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science Branching Teppo Niinimäki Helsinki October 14, 2011 Seminar: Exact Exponential Algorithms UNIVERSITY OF HELSINKI Department of Computer Science 1 For a large number of important computational problems

More information

Introduction to Solving Combinatorial Problems with SAT

Introduction to Solving Combinatorial Problems with SAT Introduction to Solving Combinatorial Problems with SAT Javier Larrosa December 19, 2014 Overview of the session Review of Propositional Logic The Conjunctive Normal Form (CNF) Modeling and solving combinatorial

More information

Lightpath routing for maximum reliability in optical mesh networks

Lightpath routing for maximum reliability in optical mesh networks Vol. 7, No. 5 / May 2008 / JOURNAL OF OPTICAL NETWORKING 449 Lightpath routing for maximum reliability in optial mesh networks Shengli Yuan, 1, * Saket Varma, 2 and Jason P. Jue 2 1 Department of Computer

More information

1 Classical Propositional Logic [20 points]

1 Classical Propositional Logic [20 points] Homework 1 Solutions 15-414/614 : Bug Catching, Spring 2014 1 Classical Propositional Logic [20 points] Let x, y and z be three propositions. (a) (8 points) Show that the two propositional formulas, (x

More information

An Efficient Sequential SAT Solver With Improved Search Strategies

An Efficient Sequential SAT Solver With Improved Search Strategies An Effiient Sequential SAT Solver With Improved Searh Strategies F. Lu, M.K. Iyer, G. Parthasarathy, L.-C. Wang, and K.-T. Cheng K.C. Chen Department of ECE, Design Tehnology University of California at

More information

Logical Agents. Santa Clara University

Logical Agents. Santa Clara University Logical Agents Santa Clara University Logical Agents Humans know things Humans use knowledge to make plans Humans do not act completely reflexive, but reason AI: Simple problem-solving agents have knowledge

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

Worst-Case Upper Bound for (1, 2)-QSAT

Worst-Case Upper Bound for (1, 2)-QSAT Worst-Case Upper Bound for (1, 2)-QSAT Minghao Yin Department of Computer, Northeast Normal University, Changchun, China, 130117 ymh@nenu.edu.cn Abstract. The rigorous theoretical analysis of the algorithm

More information

NP-Completeness Part One

NP-Completeness Part One NP-Completeness Part One Recap from Last Time The Limits of Efficient Computation P NP R P and NP Refresher The class P consists of all problems decidable in polynomial time. The class NP consists of all

More information