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 DocumentRight 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

This note was uploaded on 01/09/2012 for the course CSE 101 taught by Professor Staff during the Spring '08 term at UCSD.

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