11. Resolution

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 18

RESOLUTION

Conjunctive normal form (CNF) for first-order logic


• As in the propositional case, first-order resolution requires that
sentences be in conjunctive normal form (CNF) — that is, a conjunction
of clauses, where each clause is a disjunction of literals.
• Literals can contain variables, which are assumed to be universally
quantified.
For example, the sentence
Conjunctive normal form (CNF) for first-order logic
• Every sentence of first-order logic can be converted into an inferentially
equivalent CNF sentence.

• In particular, the CNF sentence will be unsatisfiable just when the original
sentence is unsatisfiable, so we have a basis for doing proofs by
contradiction on the CNF sentences.
Conjunctive normal form (CNF) for first-order logic
• Converting to CNF
1. Eliminate all (↔, ) connectives
(P ↔ Q)  ((P  Q) ^ (Q  P))
2. Eliminate all  connectives
(P  Q)  (P  Q)
3. Reduce the scope of each negation symbol to a single predicate
P  P
(P  Q)  P  Q
(P  Q)  P  Q
(x)P  (x)P
(x)P  (x)P
4. Standardize variables: rename all variables so that each quantifier has its own
unique variable name
Conjunctive normal form (CNF) for first-order logic
5. Eliminate existential quantification by introducing Skolem constants/functions
(x)P(x)  P(c)
c is a Skolem constant (a brand-new constant symbol that is not used in any other sentence)
(x)(y)P(x,y) becomes (x)P(x, F(x))
• since  is within the scope of a universally quantified variable, use a Skolem function F to
construct a new value that depends on the universally quantified variable
• F must be a brand-new function name not occurring in any other sentence in the KB.

E.g., (x)(y)loves(x,y) becomes (x)loves(x,F(x))


In this case, F(x) specifies the person that x loves

E.g., x1 x2 x3 y P(… y …) becomes


x1 x2 x3 P(… FF(x1,x2,x3) …) (FF is a new name)
Conjunctive normal form (CNF) for first-order logic

6. Remove universal quantifiersEx: (x)P(x)  P(x)

7. Put into conjunctive normal form (conjunction of disjunctions) using


distributive and associative laws
(P  Q)  R  (P  R)  (Q  R)
(P  Q)  R  (P  Q  R)
Conjunctive normal form (CNF) for first-order logic

• The principal difference arises from the need to eliminate existential


quantifiers.

• We illustrate the procedure by translating the sentence

“Everyone who loves all animals is loved by someone,”

∀ x [∀ y Animal (y) ⇒ Loves(x, y)] ⇒ [∃ y Loves(y, x)] .


Conjunctive normal form (CNF) for first-order logic
Conjunctive normal form (CNF) for first-order logic
Conjunctive normal form (CNF) for first-order logic
Conjunctive normal form (CNF) for first-order logic

The sentence is now in CNF and consists of two clauses (F(x) and G(z).
The resolution inference rule
• The resolution rule for first-order clauses is simply a lifted version of the
propositional resolution rule.

• Two clauses, which are assumed to be standardized apart so that they share
no variables, can be resolved if they contain complementary literals.

• Propositional literals are complementary if one is the negation of the


other;

• first-order literals are complementary if one unifies with the negation of


the other.
The resolution inference rule
• Thus, we have

This rule is called the binary resolution rule because it resolves exactly two
literals.
Example
• Everyone who loves all animals is loved by someone.
• Anyone who kills an animal is loved by no one.
• Jack loves all animals.
• Either Jack or Curiosity killed the cat, who is named Tuna.
• Did Curiosity kill the cat?

1. Express First Order Logic


2. Convert into CNF
3. Proof by resolution
Example
Example
Example
• The resolution proof that Curiosity killed the cat is given in Figure.

• In English, the proof could be paraphrased as follows:


Suppose Curiosity did not kill Tuna. We know that either Jack or
Curiosity did; thus Jack must have. Now, Tuna is a cat and cats are
animals, so Tuna is an animal. Because anyone who kills an animal is
loved by no one, we know that no one loves Jack. On the other hand,
Jack loves all animals, so someone loves him; so we have a
contradiction.
Therefore, Curiosity killed the cat.
Example

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy