cse101_11_23_11

cse101_11_23_11 - variables that satisfy all the clauses If...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Horn Formulas 1. Horn formula a. Boolean formulas are a way of expressing facts and deriving logical conclusions from them. a.i. Ex: Dr Black is murdered at 8 pm. There are 3 suspects. Define Boolean variables (true/false) for each unknown. X = M is innocent Y = P is innocent Z = S is innocent W = M was asleep at 8 pm P = S was in the study at 8 pm Q = murder took place in kitchen b. Once variables are defind, we will put constaints on them reflecting what we do know. Horn formulas permit 2 types of constraints b.i. Negative clause: an OR of negative literals. Xbar v ybar v zbar (v = or) (at least one of them is guilty.) b.ii. Implications: and of positive literals => positive literal. W => x (if w is true, then x is true) (p n q) => z (n = and) 2. Horn Satisfiability a. Given: a bunch of Boolean variables a bunch of classes (of those 2 types) question: is the formula satisfiable (is there a way to assign true/false to the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: variables that satisfy all the clauses)? If so, give a satisfying assignment. b. Is this formula satisfiable? A => b C and d => a => A C => d Satisfiable: A true B true C false D false But adding the single clause a => c makes he formula unsatisfiable. c. Greedy strategy Start with all variables false Make a variable true only if forced to by some implication If all negative clasues are satisfied output assignment Else output not satifiable A => b C and d => a => a C => d A b c d False false false false True “ “ “ “ true “ “ d. Why is this correct? At the end of phase 1, if a variable is set to true, then it must be true in any satisfying assignment. Minimal # of true variables If phase 2 fails, it is because a negative clause wants us to make some variable false. But this is not possible. e....
View Full Document

{[ snackBarMessage ]}

Page1 / 2

cse101_11_23_11 - variables that satisfy all the clauses If...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online