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

BHARAT INSTITUTE OF ENGINEERING AND TECHNOLOGY

Ibrahimpatnam - 501 510, Hyderabad, Telangana State

DEPARTMENT OF ELECTRONICS AND COMMUNICATION


ENGINEERING
Presentation
On

Unit – II - Problem Solving by Search –II and


Propositional Logic
by

CH. KRANTHI REKHA,


Assistant Professor,
ECE Dept, BIET
10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 1
Problem Solving by Search –II
• Adversarial Search: Games, Optimal Decisions in Games,
Alpha–Beta Pruning, Imperfect Real-Time Decisions.

• Constraint Satisfaction Problems: Defining Constraint


Satisfaction Problems, Constraint Propagation, Backtracking
Search for CSPs, Local Search for CSPs, The Structure of
Problems.

• Propositional Logic: Knowledge-Based Agents, The Wumpus


World, Logic, Propositional Logic, Propositional Theorem
Proving: Inference and proofs, Proof by resolution, Horn clauses
and definite clauses, Forward and backward chaining, Effective
Propositional Model Checking, Agents Based on Propositional
Logic.

Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 2


10/7/2020
Propositional logic
• Propositional logic is a simple language consisting of
proposition symbols and logical connectives. It can
handle propositions that are known true, known
false, or completely unknown.
• Syntax
• The syntax defines the allowable sentences.
• Atomic sentences: consist of a single proposition
symbol, each such symbol stands for a proposition
that can be true or false. (e.g. W1,3 stand for the
proposition that the wumpus is in [1, 3].)
• Complex sentences: constructed from simpler
sentences, using parentheses and logical connectives.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 3


10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 4
Semantics
• The semantics defines the rules for
determining the truth of a sentence with
respect to a particular model.
• The semantics for propositional logic
must specify how to compute the truth
value of any sentence, given a model.
• For atomic sentences: The truth value of
every other proposition symbol must be
specified directly in the model.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 5


For complex sentences:

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 6


A simple inference procedure
• To decide whether KB ⊨ α for some
sentence α:
• Algorithm 1: Model-checking approach
• Enumerate the models (assignments of
true or false to every relevant
proposition symbol), check that α is true
in every model in which KB is true.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 7


10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 8
Propositional theorem
proving
• We can determine entailment by model checking (enumerating models,
introduced above) or theorem proving.
• Theorem proving: Applying rules of inference directly to the sentences
in our knowledge base to construct a proof of the desired sentence
without consulting models.
• Inference rules are patterns of sound inference that can be used to find
proofs. The resolution rule yields a complete inference algorithm for
knowledge bases that are expressed in conjunctive normal form.
Forward chaining and backward chaining are very natural reasoning
algorithms for knowledge bases in Horn form.
• Logical equivalence:
• Two sentences α and β are logically equivalent if they are true in the
same set of models. (write as α ≡ β).
• Also: α ≡ β if and only if α ⊨ β and β ⊨ α.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 9


10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 10
• Validity: A sentence is valid if it is true in all models.
• Valid sentences are also known as tautologies—they are
necessarily true. Every valid sentence is logically equivalent to
True.
• The deduction theorem: For any sentence αand β, α ⊨ β if and
only if the sentence (α ⇒ β) is valid.
• Satisfiability: A sentence is satisfiable if it is true in, or satisfied
by, some model. Satisfiability can be checked by enumerating
the possible models until one is found that satisfies the sentence.
• The SAT problem: The problem of determining the satisfiability
of sentences in propositional logic.
• Validity and satisfiability are connected:
• α is valid iff ¬α is unsatisfiable;
• α is satisfiable iff ¬α is not valid;
• α ⊨ β if and only if the sentence (α∧¬β) is unsatisfiable.
• Proving β from α by checking the unsatisfiability of (α∧¬β)
corresponds to proof by refutation / proof by contradiction.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 11


Inference and proofs
• Inferences rules (such as Modus Ponens
and And-Elimination) can be applied to
derived to a proof.
• ·Modus Ponens:

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 12


• Whenever any sentences of the form α⇒β and α are given, then
the sentence β can be inferred.

• ·And-Elimination:

• From a conjunction, any of the conjuncts can be inferred.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 13


• All of logical equivalence (in Figure 7.11) can
be used as inference rules.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 14


Proof by resolution
• Resolution: An inference rule that yields
a complete inference algorithm when
coupled with any complete search
algorithm.
• Clause: A disjunction of literals. (e.g.
A∨B). A single literal can be viewed as a
unit clause (a disjunction of one literal ).

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 15


• Unit resolution inference rule: Takes a
clause and a literal and produces a new
clause.

• where each l is a literal, li and m are


complementary literals (one is the
negation of the other).

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 16


• Full resolution rule: Takes 2 clauses and
produces a new clause.

• where li and mj are complementary


literals.

10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 17


10/7/2020 Ch. Kranthi Rekha, Asst. Prof, BIET, ECE 18

You might also like