Knowledge Representation - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Knowledge Representation

Description:

Double-Negation Elimination: From a doubly negated sentence, you can infer a positive sentence ... 3. Eliminate double negations. 4. Push disjunctions into ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 15
Provided by: lila7
Category:

less

Transcript and Presenter's Notes

Title: Knowledge Representation


1
Knowledge Representation
Lila Rao Graham
2
Definitions
  • Knowledge Base
  • A set of representations of facts about the
    world.
  • Each representation is a sentence.
  • Knowledge Representation
  • Expressing knowledge in a form that can be
    manipulated by a computer.
  • Inference Mechanism
  • Generates new sentences that are necessarily true
    given that the old sentences are true.

3
  • Two aspects of the Knowledge Representation
    language
  • 1. Formal system of defining the world
  • Syntax
  • What constitutes a sentence
  • Semantics
  • Meaning. Connects sentences to facts.
  • KB entails a (KB a) means when all
  • sentences in KB are true, a is true.
  • 2. A proof theory
  • Rules for determining all entailments.
  • (KB -- a)

4
KR Languages
  • Logic
  • Propositional Logic
  • First Order Logic
  • Production rules
  • Structured Objects
  • Semantic Nets
  • Frames

5
Propositional Logic Syntax
  • A BNF (Backnus-Naur Form) grammar of sentences in
    propositional logic.
  • Sentence ? Atomic Sentence ? Complex Sentence
  • AtomicSentence ? True ? False
  • ? P ? Q ? R ?
  • ComplexSentence ? (Sentence)
  • ?Sentence Connective Sentence
  • ? ?Sentence
  • Connective ? ? ? ? ? ? ? ?

6
Propositional Logic Semantics
Truth table for the five logical connectives
7
Propositional Logic Rules of Inference
  • Modus Ponens/Implication-Elimination
  • From an implication and the premise of the
    implication, you can infer the conclusion
  • ? ? ?, ?
  • ?
  • And-Elimination
  • From a conjunction you can infer any of the
    conjuncts.
  • ?1 ? ?2 ? ... ? ?n
  • ?I
  • And-Introduction
  • From a list you can infer their conjunction.
  • ?1, ?2 , ... , ?n
  • ?1 ? ?2 ? ... ? ?n

8
Propositional Logic Rules of Inference
  • Or-Introduction
  • From a sentence, you can infer its disjunction
    with anything else at all.
  • ?i
  • ?1 ? ?2 ? ... ? ?n
  • Double-Negation Elimination
  • From a doubly negated sentence, you can infer a
    positive sentence
  • ???
  • ?
  • Unit Resolution
  • From a disjunction, if one of the disjuncts is
    false, then you can infer the other one is true.
  • ? ? ?, ? ?
  • ?
  • Resolution
  • This is the most difficult. Because ? cannot be
    both true and false, one of the other disjuncts
    must be true in one of the premises. Or
    equivalently, implication is transitive.
  • ? ? ?, ? ? ? ? ? ? ? ? ?, ? ? ?
  • ? ? ? ?? ? ?

9
Propositional Logic Inference
  • Resolution refutation theorem prover
  • Inference mechanism for propositional logic
  • Refutation
  • Recall that S ? is defined as
  • Whenever all sentences in S are true, than ? is
    true as well.
  • This is equivalent to saying that
  • It impossible for S to be true and ? to be
    false.
  • Or
  • It is impossible for S and ?? to be true at the
    same time.
  • In a refutation theorem prover, in order to prove
    ? from S, add ?? to S and try to derive a
    contradiction.

10
  • Algorithm to prove S ??
  • 1. Rewrite S in clausal form.
  • 2. Rewrite ?? in clausal form.
  • 3. Using the various inference rules, derive the
    empty clause from the results of 1. and 2.

11
Clausal Form or CNF
  • Conjunctive Normal Form (CNF).
  • Representing a sentence as a conjunction of
    disjunctions.
  • To do this
  • 1. Eliminate Implications
  • Remember a ? b ? ?a ? b
  • 2. Push negation inwards
  • ?(a ? b) ? ?a ? ? b
  • ?(a ? b) ? ?a ? ? b
  • (De Morgans Laws)
  • 3. Eliminate double negations
  • 4. Push disjunctions into conjunctions
  • a ? (b ? c) ? (a ? b) ? (a ? c)

12
Example Converting to CNF
  • Converting the following sentence to CNF
  • (a ? ? b) ? (c ? d)
  • Steps
  • 1. Remove Implication
  • ?(a ? ? b) ? (c ? d)
  • 2. Push Negations Inwards
  • ?a ? ? ? b ? (c ? d)
  • 3. Eliminate Double Negations
  • ?a ? b ? (c ? d)
  • 4. Push Disjunctions into Conjunctions
  • (?a ? b ? c) ? (?a ? b ? d)
  • CNF
  • Represented in KB as the 2 clauses
  • ?a ? b ? c and ?a ? b ? d

13
Example Resolution
  • Prove that r follows from
  • (p ? q) ? (r ? s) - (1)
  • p ? ? s - (2)
  • p ? q - (3)
  • Solution
  • 1. Clause (1) in CNF
  • ? (p ? q) ? (r ? s)
  • ?? ? p ? ? q ? r ? s - (1)
  • Clause (2)
  • ? p ? ? s - (2)
  • Clause (3)
  • p - (3)
  • q - (4)

14
Example (cont)
  • 2. Clause of r is ? r - (5)
  • 3. Using inference rules
  • ?p ? ? q ? s - (6)
  • from unit resolution rule of (1) and (5)
  • ? q ? s - (7)
  • from unit resolution of (3) and (6)
  • s - (8)
  • from (4) and (7)
  • ? p - (9)
  • from (2) and (8)
  • - (10)
  • from (3) and (9)
  • Therefore r follows from the original clauses
Write a Comment
User Comments (0)
About PowerShow.com