Docstoc

Chapter 5

Document Sample
Chapter 5 Powered By Docstoc
					                       Propositional logic –We can represent real-
                         world facts as logical propositions, written
 Predicate logic         as well-formed formulaes(wffs)




                          Limitations of Propositional
Some Simple Facts in                 Logic
 Propositional Logic   • Socrates is a man.
                        SOCRATESMAN
                       • Plato is a man.
                        PLATOMAN
                       • Better representations :
                        MAN(SOCRATES)
                        MAN(PLATO)
                       • All men are mortal.
                       MORTALMAN
                       • Better representation :




                                                                        1
     A Predicate Logic Example
                                                  A Predicate Logic Example
 •   Marcus was a man.
 •   Marcus was a Pompeian.
 •   All Pompeian were Romans.
 •   Caesar was a ruler.
 •   All Romans were either loyal to Caesar or
      hated him.
 •   Everyone is loyal to someone.
 •   People only try to assassinate rulers they
 •         are not loyal to.
 •   Marcus tried to assassinate Caesar.




An Attempt to Prove                               Three Ways of Representing
                                                      Class Membership




                                                                               2
Example-----
•   John likes all kinds of food
•   Apples are food
•   Chicken is food
•   Anything anyone eats isn’t killed by is food
•   Bill eats peanuts and is still alive.
•   Sue eats everything Bill eats
Prove John likes peanuts




      Prove that John likes peanut
                                                                     Overriding Defaults
                                                   Suppose we add:




                                                   But now we have a problem with 5:



                                                   So we need to change it to :




                                                                                           3
1. Marcus was a man.                                            A Set of Facts about Marcus
2. Marcus was a Pompeian.

3. Marcus was born in 40 A.D.

4. All men are mortal.

5. All Pompeians died when the volcano erupted in 79 A.D.

6. No mortal lives longer than 150 years.

7. It is now 1991.

8. Alive means not dead.

9. If someone dies, then he is dead at all later times.




                                                            Another Way of Proving That Marcus Is Dead
     One Way of Proving That Marcus Is Dead




                                                                                                         4
              Conversion to Clause Form         Algorithm : Convert to Clause Form
Problem :



Solution :

     Flatten
     Separate out Quantifiers
Conjunctive Normal Form :



Clause Form :

     Conjunctive Normal Form
     No instances of




   Examples of Conversion to Clause Form       Examples of Conversion to Clause Form
                                           4 Move quantifiers.
Example :

                                           5 Eliminate existential quantifiers.

1 Eliminate                                  will be converted to

                                             while

2 Reduce scope of                            will be converted to


                                           6 Drop the prefix.
3 Standardize Variables.
                                           7 Convert to a conjunction of disjuncts.




                                                                                       5
   Examples of Conversion to Clause Form
The Formula
                                           • Acknowledgment
                                                      Rich & Knight Textbook “Artifical
                                             Intelligence”
becomes




and then becomes




                                                                                          6

				
DOCUMENT INFO
Shared By:
Stats:
views:2
posted:5/17/2013
language:
pages:6