CS2351 Artificial Intelligence Bhaskar.V Class Notes on Knowledge Representation - Logical Agents
Propositional Logic Introduction In propositional logic, we are interested in declarative sentences that can be either true or false. Example: P Δ Sugar is a hydrocarbon » Q Δ Subu has a PhD degree The symbols P, Q are called the atomic formulas or atoms. From propositions we can build compound propositions by using logical connectives.
Examples using connectives If John is at home then Mary is at home. In this, we use a connective called “if…then” In propositional logic we shall use five logical connectives (not), (and), (or), (if..then) and (if and only if)
More definitions well formed formulas(wff) 1.An atom is a formula 2.If G is a formula then ( G) is a formula 3.If G and H are formulas then (G H), (G H), (G H) and (G H) are formulas 4.All formulas are generated by applying the above rules.
Other ways of saying connectives 1. negation ( G) is called negation G 2. conjunction (G H) is called conjunction of G and H 3. disjunction (G H) is called disjunction of G and H 4. implies (G H) is called if G then H or G implies H
Interpretation of Formulas Given a propositional formula G, let A 1,A 2,… be atoms occurring in the formula G. then an interpretation of G is an assignment of truth values to A 1,A 2,… in which every A i is assigned either T or F but not both.
Contd… A formula G is said to be true under an interpretation if and only if G is evaluated to T in the interpretation; otherwise G is said to be false under the interpretation.
VALIDITY AND INCONSISTENCY IN PROPOSITIONAL LOGIC A formula is said to be valid if and only if it is true under all interpretations. A formula is said to be invalid if and only if it is not valid. A formula is said to be inconsistent or unsatisfiable if and only if it is false under all interpretations. A formula is said to be consistent(or satisfiable) if and only if it is not inconsistent.
Truth Tables PQ P (P Q) ( P Q)(P (P Q)) ( ( P Q)) false true false true
Evaluating Models (E B) A A (J M) B Sym bol TFUNKNOWN E B A J M
VALID AND SATISFIABLE STATEMENTVALIDSATISFIABLEUNKNOWN P P P P P Q (P Q) (P Q) (Q P) (Food party) (drinks party) ((food drinks) party)
Need to know Normal forms in Propositional logic Literal CNF DNF Logical consequences Applications
Wumpus World