AI UNIT - 3
AI UNIT - 3
LOGIC CONCEPTS
Introduction
➢Logic was considered to be a branch of
philosophy.
➢Logic helps in investigating and classifying the
structure of statements and arguments through
the study of formal systems of inference.
➢Logic is concerned with the principles of
drawing valid inferences from a given set of true
statements.
➢Formal logic deals with the study of inference
with purely formal content also known as
symbolic logic.
Symbolic logic is divided into two branches
1. Propositional logic
2. Predicate logic
p ∼p p ∧∼p
T F F
F T F
Contingency:
A statement that can be either true or false depending
on the truth values of its variables is called a
contingency.
T T T T T
T F F F T
F T T F F
F F T F F
Use of truth table approach in some situations
proves to be a wastage of time.
Properties of Quantifiers:
•In universal quantifier, ∀x∀y is similar to ∀y∀x.
•In Existential quantifier, ∃x∃y is similar to ∃y∃x.
•∃x∀y is not similar to ∀y∃x.
Some Examples of FOL using quantifier:
1. All birds fly.
In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented as
follows.
∀x bird(x) →fly(x).
2. Every man respects his parent.
In this question, the predicate is "respect(x, y)," where x=man, and
y= parent.
Since there is every man so will use ∀, and it will be represented as
follows:
∀x man(x) → respects (x, parent).
3. Some boys play cricket.
In this question, the predicate is "play(x, y)," where x= boys, and y=
game. Since there are some boys so we will use ∃, and it will be
represented as:
∃x boys(x) → play(x, cricket).
4. Not all students like both Mathematics and Science.
In this question, the predicate is "like(x, y),"
where x= student, and y= subject.
Since there are not all students, so we will use ∀ with
negation, so following representation for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧
like(x, Science)].
5. Only one student failed in Mathematics.
In this question, the predicate is "failed(x, y)," where x=
student, and y= subject.
Since there is only one student who failed in
Mathematics, so we will use following representation for
this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀
(y) [¬(x==y) ∧ student(y) → ¬failed (x, Mathematics)]
3.Interpretations of Formulae in FOL
•In propositional logic, an interpretation simply refers to an
assignment of truth values to atoms.
•Since variables are involved in FOL, we need to do more than a
simple assignment of values.
•An interpretation of a formula in FOL consists of a non empty
domain D and involves to each predicate atom.