IAI Unit3
IAI Unit3
UNIT-3
Logic and Knowledge Representation First-Order Logic: Representation, Syntax and
Semantics of First-Order Logic, Using First-Order Logic, Knowledge Engineering in
First-Order Logic.
1
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
First-Order Logic
n the topic of Propositional logic, we have seen that how to represent statements
using propositional logic. But unfortunately, in propositional logic, we can only
represent the facts, which are either true or false. PL is not sufficient to
represent the complex sentences or natural language statements. The
propositional logic has very limited expressive power. Consider the following
sentence, which we cannot represent using PL logic.
First-Order logic:
● First-order logic (like natural language) does not only assume that the
world contains facts like propositional logic but also assumes the
following things in the world:
2
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
c. Function: Father of, best friend, third inning of, end of, ......
a. Syntax
b. Semantics
Variables x, y, z, a, b,....
Connectives ∧, ∨, ¬, ⇒, ⇔
Equality ==
Quantifier ∀, ∃
3
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Atomic sentences:
● Atomic sentences are the most basic sentences of first-order logic. These
sentences are formed from a predicate symbol followed by a parenthesis
with a sequence of terms.
Complex Sentences:
Consider the statement: "x is an integer.", it consists of two parts, the first part x
is the subject of the statement and second part "is an integer," is known as a
predicate.
4
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● These are the symbols that permit to determine or identify the range and
scope of the variable in the logical expression. There are two types of
quantifier:
Universal Quantifier:
● For all x
● For each x
● For every x.
Example:
5
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
It will be read as: There are all x where x is a man who drink coffee.
Existential Quantifier:
Existential quantifiers are the type of quantifiers, which express that the
statement within its scope is true for at least one instance of something.
6
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:
It will be read as: There are some x where x is a boy who is intelligent.
Points to remember:
Properties of Quantifiers:
7
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
And since there are all birds who fly so it will be represented as follows.
∀x bird(x) →fly(x).
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:
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:
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:
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:
8
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
9
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
The first step of the process is to identify the task, and for the digital circuit,
there are various reasoning tasks.
At the first level or highest level, we will examine the functionality of the
circuit:
● What will be the output of gate A2, if all the inputs are high?
At the second level, we will examine the circuit structure details such as:
In the second step, we will assemble the relevant knowledge which is required
for digital circuits. So for digital circuits, we have the following required
knowledge:
10
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● Signal flows through wires to the input terminal of the gate, and each gate
produces the corresponding output which flows further.
● In this logic circuit, there are four types of gates used: AND, OR, XOR,
and NOT.
● All these gates have one output terminal and two input terminals (except
NOT gate, it has one input terminal).
3. Decide on vocabulary:
The next step of the process is to select functions, predicate, and constants to
represent the circuits, terminals, signals, and gates. Firstly we will distinguish
the gates from each other and from other objects. Each gate is represented as an
object which is named by a constant, such as, Gate(X1). The functionality of
each gate is determined by its type, which is taken as constants such as AND,
OR, XOR, or NOT. Circuits will be identified by a predicate: Circuit (C1).
For gate input, we will use the function In(1, X1) for denoting the first input
terminal of the gate, and for output terminal we will use Out (1, X1).
The function Arity(c, i, j) is used to denote that circuit c has i input, j output.
We use a unary predicate On (t), which is true if the signal at a terminal is on.
To encode the general knowledge about the logic circuit, we need some
following rules:
● If two terminals are connected then they have the same input signal, it can
be represented as:
11
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
1. ∀ t1, t2 Terminal (t1) ∧ Terminal (t2) ∧ Connect (t1, t2) → Signal (t1)
= Signal (2).
● Signal at every terminal will have either value 0 or 1, it will be
represented as:
1. ∀ t Terminal (t) →Signal (t) = 1 ∨Signal (t) = 0.
● Connect predicates are commutative:
1. ∀ t1, t2 Connect(t1, t2) → Connect (t2, t1).
● Representation of types of gates:
1. ∀ g Gate(g) ∧ r = Type(g) → r = OR ∨r = AND ∨r = XOR ∨r =
NOT.
● Output of AND gate will be zero if and only if any of its input is zero.
1. ∀ g Gate(g) ∧ Type(g) = AND →Signal (Out(1, g))= 0 ⇔ ∃n Signal
(In(n, g))= 0.
● Output of OR gate is 1 if and only if any of its input is 1:
1. ∀ g Gate(g) ∧ Type(g) = OR → Signal (Out(1, g))= 1 ⇔ ∃n Signal
(In(n, g))= 1
● Output of XOR gate is 1 if and only if its inputs are different:
1. ∀ g Gate(g) ∧ Type(g) = XOR → Signal (Out(1, g)) = 1 ⇔ Signal
(In(1, g)) ≠ Signal (In(2, g)).
● Output of NOT gate is invert of its input:
1. ∀ g Gate(g) ∧ Type(g) = NOT → Signal (In(1, g)) ≠ Signal (Out(1,
g)).
● All the gates in the above circuit have two inputs and one output (except
NOT gate).
1. ∀ g Gate(g) ∧ Type(g) = NOT → Arity(g, 1, 1)
12
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Now we encode problem of circuit C1, firstly we categorize the circuit and its
gate components. This step is easy if ontology about the problem is already
thought. This step involves the writing simple atomics sentences of instances of
concepts, which is known as ontology.
For the given circuit C1, we can encode the problem instance in atomic
sentences as below:
Since in the circuit there are two XOR, two AND, and one OR gate so atomic
sentences for these gates will be:
In this step, we will find all the possible set of values of all the terminal for the
adder circuit. The first query will be:
What should be the combination of input which would generate the first output
of circuit C1, as 0 and a second output to be 1?
13
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Now we will debug the knowledge base, and this is the last step of the complete
process. In this step, we will try to debug the issues of knowledge base.
14
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Substitution:
Equality:
First-Order logic does not only use predicate and terms for making atomic
sentences but also uses another way, which is equality in FOL. For this, we can
use equality symbols which specify that the two terms refer to the same object.
As in the above example, the object referred by the Brother (John) is similar to
the object referred by Smith. The equality symbol can also be used with
negation to represent that two terms are not the same objects.
● Universal Generalization
● Universal Instantiation
● Existential Instantiation
● Existential introduction
15
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
1. Universal Generalization:
● This rule can be used if we want to show that every element has a similar
property.
Example: Let's represent, P(c): "A byte contains 8 bits", so for ∀ x P(x) "All
bytes contain 8 bits.", it will also be true.
2. Universal Instantiation:
● The UI rule state that we can infer any sentence P(c) by substituting a
ground term c (a constant within domain x) from ∀ x P(x) for any object
in the universe of discourse.
16
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:1.
Example: 2.
"All kings who are greedy are Evil." So let our knowledge base contains this
detail as in the form of FOL:
So from this information, we can infer any of the following statements using
Universal Instantiation:
3. Existential Instantiation:
● This rule states that one can infer P(c) from the formula given in the form
of ∃x P(x) for a new constant symbol c.
● The restriction with this rule is that c used in the rule must be a new term
for which P(c ) is true.
17
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:
4. Existential introduction
● This rule states that if there is some element c in the universe of discourse
which has a property P, then we can infer that there exists something in
the universe which has the property P.
For the inference process in FOL, we have a single inference rule which is
called Generalized Modus Ponens. It is lifted version of Modus ponens.
18
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
According to Modus Ponens, for atomic sentences pi, pi', q. Where there is a
substitution θ such that SUBST (θ, pi',) = SUBST(θ, pi), it can be represented
as:
Example:
We will use this rule for Kings are evil, so we will find some x such that x is
king, and x is greedy so we can infer that x is evil.
What is Unification?
● It takes two literals as input and makes them identical using substitution.
● Let Ψ1 and Ψ2 be two atomic sentences and 𝜎 be a unifier such that, Ψ1𝜎 =
Ψ2𝜎, then it can be expressed as UNIFY(Ψ1, Ψ2).
● Example: Find the MGU for Unify{King(x), King(John)}
● The UNIFY algorithm is used for unification, which takes two atomic
sentences and returns a unifier for those sentences (If any exist).
19
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
E.g. Let's say there are two different expressions, P(x, y), and P(a, f(z)).
In this example, we need to make both above statements identical to each other.
For this, we will perform the substitution.
● Substitute x with a, and y with f(z) in the first expression, and it will be
represented as a/x and f(z)/y.
● With both the substitutions, the first expression will be identical to the
second expression and the substitution set will be: [a/x, f(z)/y].
● Unification will fail if there are two similar variables present in the same
expression.
20
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Unification Algorithm:
Algorithm: Unify(Ψ1, Ψ2)
c) Else if Ψ2 is a variable,
Step.2: If the initial Predicate symbol in Ψ1 and Ψ2 are not same, then return
FAILURE.
a) Call Unify function with the ith element of Ψ1 and ith element of Ψ2,
and put the result into S.
21
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
b. If one expression is a variable vi, and the other is a term ti which does not
contain variable vi, then:
For each pair of the following atomic sentences find the most general unifier (If
exist).
SUBST θ= {f(a) / X}
22
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
SUBST θ={b/Z}
SUBST θ= {X/Z}
23
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
SUBST θ= {11/y}
Unifier: {11/y}.
5. Find the MGU of Q(a, g(x, a), f(y)), Q(a, g(f(b), a), x)}
SUBST θ= {f(b)/x}
SUBST θ= {b/y}
S1 => {Q(a, g(f(b), a), f(b)); Q(a, g(f(b), a), f(b))}, Successfully Unified.
SUBST θ= {John/x}
24
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Unifier: {John/x}.
Resolution in FOL
Resolution
Resolution is used, if there are various statements are given, and we need to
prove a conclusion of those statements. Unification is a key concept in proofs
by resolutions. Resolution is a single inference rule which can efficiently
operate on the conjunctive normal form or clausal form.
The resolution rule for first-order logic is simply a lifted version of the
propositional rule. Resolution can resolve two clauses if they contain
complementary literals, which are assumed to be standardized apart so that they
share no variables.
25
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
This rule is also called the binary resolution rule because it only resolves exactly
two literals.
Example:
Where two complimentary literals are: Loves (f(x), x) and ¬ Loves (a, b)
These literals can be unified with unifier θ= [a/f(x), and b/x] , and it will
generate a resolvent clause:
To better understand all the above steps, we will take an example in which we
will apply resolution.
Example:
26
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
In the first step we will convert all the given statements into its first order logic.
In First order logic resolution, it is required to convert the FOL into CNF as
CNF form makes easier for resolution proofs.
a. ∀x ¬ food(x) V likes(John, x)
b. food(Apple) Λ food(vegetables)
e. ∀x ¬ eats(Anil, x) V eats(Harry, x)
27
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
g. ∀x ¬ alive(x) V ¬ killed(x)
h. likes(John, Peanuts).
a. ∀x ¬ food(x) V likes(John, x)
b. food(Apple) Λ food(vegetables)
e. ∀x ¬ eats(Anil, x) V eats(Harry, x)
f. ∀x ¬killed(x) ] V alive(x)
g. ∀x ¬ alive(x) V ¬ killed(x)
h. likes(John, Peanuts).
a. ∀x ¬ food(x) V likes(John, x)
b. food(Apple) Λ food(vegetables)
f. ∀g ¬killed(g) ] V alive(g)
g. ∀k ¬ alive(k) V ¬ killed(k)
h. likes(John, Peanuts).
28
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
a. ¬ food(x) V likes(John, x)
b. food(Apple)
c. food(vegetables)
f. alive(Anil)
g. ¬ eats(Anil, w) V eats(Harry, w)
h. killed(g) V alive(g)
i. ¬ alive(k) V ¬ killed(k)
j. likes(John, Peanuts).
Now in this step, we will solve the problem by resolution tree using substitution.
For the above problem, it will be given as follows:
29
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● In the third step of the resolution graph, ¬ eats(y, Peanuts) and eats (Anil,
Peanuts) get resolved by substitution {Anil/y}, and we are left with
Killed(Anil) .
30
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● In the fourth step of the resolution graph, Killed(Anil) and ¬ killed(k) get
resolve by substitution {Anil/k}, and we are left with ¬ alive(Anil) .
● In the last step of the resolution graph ¬ alive(Anil) and alive(Anil) get
resolved.
Inference engine:
a. Forward chaining
b. Backward chaining
Horn clause and definite clause are the forms of sentences, which enables
knowledge base to use a more restricted and efficient inference algorithm.
Logical inference algorithms use forward and backward chaining approaches,
which require KB in the form of the first-order definite clause.Definite clause:
A clause which is a disjunction of literals with exactly one positive literal is
known as a definite clause or strict horn clause.
31
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Horn clause: A clause which is a disjunction of literals with at most one positive
literal is known as horn clause. Hence all the definite clauses are horn clauses.
It is equivalent to p ∧ q → k.
A. Forward Chaining
The Forward-chaining algorithm starts from known facts, triggers all rules
whose premises are satisfied, and add their conclusion to the known facts. This
process repeats until the problem is solved.
Properties of Forward-Chaining:
Consider the following famous example which we will use in both approaches:
32
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:
"As per the law, it is a crime for an American to sell weapons to hostile nations.
Country A, an enemy of America, has some missiles, and all the missiles were
sold to it by Robert, who is an American citizen."
To solve the above problem, first, we will convert all the above facts into first-
order definite clauses, and then we will use a forward-chaining algorithm to
reach the goal.
33
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● Robert is American
American(Robert) ....................... (8)
In the first step we will start with the known facts and will choose the sentences
which do not have implications, such as: American(Robert), Enemy(A,
America), Owns(A, T1), and Missile(T1). All these facts will be represented as
below.
Step-2:
At the second step, we will see those facts which infer from available facts and
with satisfied premises.
Rule-(1) does not satisfy premises, so it will not be added in the first iteration.
Rule-(4) satisfy with the substitution {p/T1}, so Sells (Robert, T1, A) is added,
which infers from the conjunction of Rule (2) and (3).
34
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Step-3:
B. Backward Chaining:
Backward-chaining is also known as a backward deduction or backward
reasoning method when using an inference engine. A backward chaining
algorithm is a form of reasoning, which starts with the goal and works
backward, chaining through rules to find known facts that support the goal.
35
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:
In backward-chaining, we will use the same above example, and will rewrite all
the rules.
● Missile(T1)
36
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Backward-Chaining proof:
Step-1:
At the first step, we will take the goal fact. And from the goal fact, we will infer
other facts, and at last, we will prove those facts true. So our goal fact is "Robert
is Criminal," so following is the predicate of it.
Step-2:
At the second step, we will infer other facts form goal fact which satisfies the
rules. So as we can see in Rule-1, the goal predicate Criminal (Robert) is
present with substitution {Robert/P}. So we will add all the conjunctive facts
below the first level and will replace p with Robert.
37
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Step-3:t At step-3, we will extract further fact Missile(q) which infer from
Weapon(q), as it satisfies Rule-(5). Weapon (q) is also true with the substitution
of a constant T1 at q.
38
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Step-4:
At step-4, we can infer facts Missile(T1) and Owns(A, T1) form Sells(Robert,
T1, r) which satisfies the Rule- 4, with the substitution of A in place of r. So
these two statements are proved here.
Step-5:
At step-5, we can infer the fact Enemy(A, America) from Hostile(A) which
satisfies Rule- 6. And hence all the statements are proved true using backward
chaining.
39
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● Forward chaining as the name suggests, start from the known facts and
move forward by applying inference rules to extract more data, and it
continues until it reaches to the goal, whereas backward chaining starts
from the goal, move backward by using inference rules to determine the
facts that satisfy the goal.
40
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● Forward chaining can be used for tasks such as planning, design process
monitoring, diagnosis, and classification, whereas backward chaining can
be used for classification and diagnosis tasks.
● Forward chaining is slow as it checks for all the rules, whereas backward
chaining is fast as it checks few required rules only.
41
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
5. Forward chaining tests for all the Backward chaining only tests for
available rules few required rules.
42
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
43
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
44
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
45
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
46
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
47
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Events
how situation calculus represents actions and their effects.
• Situation calculus-it was designed to describe a world in which actions are
discrete, instantaneous, and happen one at a time.
• Event calculus-based on points of time rather than on situations.
• Event calculus reifies fluents and events.
• The fluent
At(Shankar,Berkeley): is an object that refers to the fact of Shankar being in
Berkeley, but does not by itself say anything about whether it is true.
• To assert that a fluent is actually true at some point in time we use the
predicate T, as in • T(At(Shankar,Berkeley),t).
• Events are described as instances of event categories
• The event E1 of Shankar flying from San Francisco to Washington, D.C. is
describedasE1EFlyingsɅFlyer(E1,Shankar)AOrigin
(E1,SF)ADestination(E1,DC).
The complete set of predicates for one version of the event calculus is T(f,t)
Fluent f is true at time t
Happens (e, i)
Event e happens over the time interval i
Initiates (e, f,t)
Event e causes fluent f to start to hold at time t
Terminates (e, f,t)
Event e causes fluent ƒ to cease to hold at time t
Clipped (f, i)
Fluent ƒ ceases to be true at some point during time inter
Restored (f, i) Fluent ƒ becomes true sometime during time interval i
Processes
• Any process e that happens over an interval also happens over any subinterval
• Categories of events with this property are called process categories or liquid
event categories.
(eЄProcesses)ɅHappens(e,(t1,t4))^(t1<t2<t3<t4) Happens(e,(t2,t3))
Mental Events and Mental Objects
Knowledge about one's own knowledge and reasoning processes is useful for
controlling the inference
•The agent should know what are in its knowledge base and what are not
• What we need is a model of the mental objects that are in someone's head (or
48
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Reasoning:
The reasoning is the mental process of deriving logical conclusion and making
predictions from available knowledge, facts, and beliefs. Or we can say,
"Reasoning is a way to infer facts from existing data." It is a general process of
thinking rationally, to find valid conclusions.
In artificial intelligence, the reasoning is essential so that the machine can also
think rationally as a human brain, and can perform like a human.
Types of Reasoning
In artificial intelligence, reasoning can be divided into the following categories:
● Deductive reasoning
● Inductive reasoning
● Abductive reasoning
● Monotonic Reasoning
49
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
1. Deductive reasoning:
In deductive reasoning, the truth of the premises guarantees the truth of the
conclusion.
Deductive reasoning mostly starts from the general premises to the specific
conclusion, which can be explained as below example.
Example:
2. Inductive Reasoning:
50
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
Example:
Premise: All of the pigeons we have seen in the zoo are white.
3. Abductive reasoning:
Example:
Conclusion It is raining.
51
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.
Example:
The above two statements are examples of common sense reasoning which a
human mind can easily understand and assume.
5. Monotonic Reasoning:
In monotonic reasoning, once the conclusion is taken, then it will remain the
same even if we add some other information to existing information in our
knowledge base. In monotonic reasoning, adding knowledge does not decrease
the set of prepositions that can be derived.
To solve monotonic problems, we can derive the valid conclusion from the
available facts only, and it will not be affected by new facts.
Monotonic reasoning is not useful for the real-time systems, as in real time,
facts get changed, so we cannot use monotonic reasoning.
Example:
52
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
● If we deduce some facts from available facts, then it will remain valid for
always.
● Since we can only derive conclusions from the old proofs, so new
knowledge from the real world cannot be added.
6. Non-monotonic Reasoning
"Human perceptions for various things in daily life, "is a general example of
non-monotonic reasoning.
Example: Let suppose the knowledge base contains the following knowledge:
● Pitty is a bird
So from the above sentences, we can conclude that Pitty can fly.
53
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh
lOMoAR cPSD| 14288805
54
www.android.previousquestionpapers.com | www.previousquestionpapers.com | https://telegram.me/jntuh