Artificial Intelligence: First Order Logic (FOL) and Resolution

Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

ARTIFICIAL INTELLIGENCE

CSE 3201

First Order Logic (FOL) and Resolution


Inference Rules
• In AI, we need intelligent systems which can create new logic from old
logic or by evidence.
• Inference is deriving conclusion from evidences.
• An inference procedure generates new sentences on the basis of
inference rules.
• So, these rules are templates to construct valid arguments.
• An inference rule is sound if every sentence X it produces when
operating on a KB logically follows from the KB (Knowledge Base)
– i.e., inference rule creates no contradictions
• Inference rules are applied to derive proofs in AI.
Sound Rules of Inference
• Here are some examples of sound rules of inference
• Each can be shown to be sound using a truth table

RULE PREMISE CONCLUSION

Modus Ponens A, A  B B
And Introduction A, B AB
And Elimination AB A
Double Negation A A
Resolution A  B, B  C AC
Modus Ponens
Modus Tollens
Hypothetical Syllogism
Disjunctive Syllogism
Addition
(Disjunction Introduction)
Simplification
(Conjunction Elimination)

 ∧ elimination is a valid rule of inference which makes the inference that,


if the conjunction A and B is true, then A is true, and B is true.
Conjunction
(And Introduction)
Resolution
Resolution
■ Resolution is a valid inference rule producing a new clause implied by
two clauses containing complementary literals.
■ Amazingly, this is the only inference rule you need to build a sound and
complete theorem prover.
– Based on proof by contradiction and usually called resolution refutation.
■ To use resolution, put knowledge base into conjunctive normal form
(CNF), where each sentence written as a disjunction of (one or more)
literals.
The Resolution Principle
A Common Error
Refutation Resolution
■ The previous example was easy because it had very few clauses
■ When we have a lot of clauses, we want to focus our search on the thing we
would like to prove.
■ We can do this as follows:
– Add the negation of the thing we want to prove to the fact base
– Show that the fact base is now inconsistent
– Conclude the thing we want to prove
Clause Form
• A clause is a disjunction (“or”) of literals
- A literal is an atomic symbol or its negation, i.e., P or P
A First Example
Example of Resolution
The resolution is a simple
iterative process:
– At each step,
• Two clauses (parent
clauses) are compared
(resolved), yielding a new
clause that has been
produced from them.
FOL Resolution Proof – Another Example
Example
■ All Romans who know Marcus either hate Caesar or think that anyone
who hates anyone is crazy.
Step 1: Eliminate Implication
Step 2: Reduce The Scope of 
Step 3: Standardize Variables Apart
Step 4: Move Quantifiers
Step 5: Eliminate Existential Quantifiers
Step 6: Drop The Prefix (Quantifiers)
Step 7: Convert to CNF/Create A
Conjunction Of Disjunction
Step 8: Create Separate Clauses
Step 9: Standardize Apart
Conjunctive Normal Form(CNF)
■ A literal is a variable or a negated variable.
■ A clause is either a single literal or the disjunction of two or more literals.
P, P  P, and P  Q  R  S are clauses.
(R  S ) and P  Q are not clauses.

■ A wff (Well Formed Formulas) is in conjunctive normal form iff it is either a


single clause or the conjunction of two or more clauses.
(P  Q  R  S)  (P  R) is in cnf
(P  Q  R  S)  (P  R) is not in cnf
Conversion to Conjunctive Normal Form
Horn Clause
■ A Horn sentence or Horn clause:
- A horn clause is a disjunction with at most one positive literal.
Horn Clause
■ Every Horn clause can be rewritten as an implication with a conjunction
of literals in the premises and at most a single positive literal as a
conclusion.

■ 1 positive literal: definite clause.

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