Conjunctive Normal Form & Horn Clauses
York University CSE 3401 Vida Movahedi
York University‐ CSE 3401‐ V. Movahedi
1
Conjunctive Normal Form & Horn Clauses York University CSE 3401 - - PowerPoint PPT Presentation
Conjunctive Normal Form & Horn Clauses York University CSE 3401 Vida Movahedi 1 York University CSE 3401 V. Movahedi Overview Overview Definition of literals, clauses, and CNF , , Conversion to CNF Propositional logic
York University‐ CSE 3401‐ V. Movahedi
1
York University‐ CSE 3401‐ V. Movahedi
2
r q p ∨ ¬ ∨
York University‐ CSE 3401‐ V. Movahedi
3
York University‐ CSE 3401‐ V. Movahedi
4
York University‐ CSE 3401‐ V. Movahedi
5
– Use
U D M ’
– Use De Morgan’s
York University‐ CSE 3401‐ V. Movahedi
6
York University‐ CSE 3401‐ V. Movahedi
7
2 1 2 1 n m
n m
2 1 2 1
m n
2 1 2 1
n
2 1 m
2 1
York University‐ CSE 3401‐ V. Movahedi
8
York University‐ CSE 3401‐ V. Movahedi
9
York University‐ CSE 3401‐ V. Movahedi
10
York University‐ CSE 3401‐ V. Movahedi
11
n
2 1
n
2 1
2 1 n
n
2 1
n
2 1
York University‐ CSE 3401‐ V. Movahedi
12
n
2 1
2 1 n
York University‐ CSE 3401‐ V. Movahedi
13
York University‐ CSE 3401‐ V. Movahedi
14
Note
) ( ) ( ) ( ) ( x p x x p x ∀ ≡ ∃
Note
) ( ) ( ) ( ) ( x p x x p x ¬ ∀ ≡ ∃ ¬
York University‐ CSE 3401‐ V. Movahedi
15
5. Skolem constants 6 Skolem functions ) , 1 ( ) 1 ( )) , ( ) ( ) (( eve g motherof g female eve X motherof X female X ∧ ⇒ ∧ ∃ 6. Skolem functions
)) ( 2 , ( ) ( ) ( ) , ( ) ( ) )( ( X g X motherof X human X Y X motherof X human Y X ∨ ¬ ∀ ⇒ ∨ ¬ ∃ ∀
)) ( , ( ) ( ) ( g f
York University‐ CSE 3401‐ V. Movahedi
16
))) , ( ) , ( ) ( ) ( )( )( ( ) ( )( ( Y X likes Z Y contains Z spice Y food Z Y X martian X ∧ ∧ ∧ ∃ ∃ → ∀ ⇒ )))) ( , ( )) ( ), ( ( )) ( ( )) ( ( ( ) ( )( ( ))) , ( ) , ( ) ( ) ( ( ) ( )( )( )( ( ))) , ( ) , ( ) ( ) ( )( )( ( ) ( )( ( X f X likes X s X f contains X s spice X f food X martian X Y X likes Z Y contains Z spice Y food X martian Z Y X Y X likes Z Y contains Z spice Y food Z Y X martian X ∧ ∧ ∧ ∨ ¬ ∀ ⇒ ∧ ∧ ∧ ∨ ¬ ∃ ∃ ∀ ⇒ ∧ ∧ ∧ ∃ ∃ ∨ ¬ ∀ ⇒ ))) ( ( ) ( ( )))) ( , ( ) ( ( ))) ( ), ( ( ) ( ( ))) ( ( ) ( ( ))) ( ( ) ( )(( ( )))) ( , ( )) ( ), ( ( )) ( ( )) ( ( ( ) ( )( ( X f food X martian X f X likes X martian X s X f contains X martian X s spice X martian X f food X martian X f f p f f ∧ ∨ ¬ ⇒ ∨ ¬ ∧ ∨ ¬ ∧ ∨ ¬ ∧ ∨ ¬ ∀ ⇒ ))) ( ( ) ( ( ))) ( ), ( ( ) ( ( ))) ( ( ) ( ( ))) ( ( ) ( ( X f X likes X martian X s X f contains X martian X s spice X martian X f food X martian ∨ ∧ ∨ ¬ ∧ ∨ ¬ ∧ ∨ ¬ ⇒
York University‐ CSE 3401‐ V. Movahedi
17
))) ( , ( ) ( ( X f X likes X martian ∨ ¬