Module 3_AI
Module 3_AI
1)
(Understand/LOCQ)] (b) Consider two fuzzy subsets of the universal set X = {a, b, c, d, e},
referred to as A and B, where A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e}, B = {0.6/a, 0.9/b, 0.1/c, 0.3/d,
0.2/e} Now find the result of the following operations done on two fuzzy sets A & B: i) AUB,
ii) A∩B, iii) A ⊆ B, iv) support (A), v) core (A), vi) height (A) [(AML 2201.3) (Apply/IOCQ)]
(6+6*1) = 12
Here's a complete answer for Q19(a) and (b), tailored to your marks breakdown:
Explanation:
The Sugeno fuzzy inference model, also known as Takagi–Sugeno–Kang (TSK) model,
is a rule-based system used in fuzzy logic for decision-making. It's mainly used in control
systems and modeling where output is a crisp function rather than a fuzzy set.
Key Characteristics:
○ The final output is computed using weighted average of the outputs of each
rule, which is faster than centroid methods.
Processing Steps:
2. Rule Evaluation: Apply fuzzy logic operators (e.g., AND, OR) to evaluate rule
antecedents.
3. Inference: Compute output value for each rule using the consequent function.
4. Aggregation: Combine the output of each rule using weighted average.
Diagram: Sugeno Fuzzy Inference System
Here's the diagram as part of your answer (you can draw this in your exam or request an
image here):
^ |
| v
Rule Base: IF...THEN rules (with functions like z = ax + by + c)
Given:
● a: 1 > 0.6 ❌
● b: 0.3 ≤ 0.9 ✅
● e: 0 ≤ 0.2 ✅
🔴 A is NOT a subset of B ⇒ A ⊈ B
iv) Support(A) = Set of elements where μ_A(x) > 0
Support(A) = {a, b, c, d}
✅ Support(A) = {a, b, c, d}
v) Core(A) = Set of elements where μ_A(x) = 1
Core(A) = {a}
✅ Core(A) = {a}
vi) Height(A) = max μ_A(x)
Height(A) = max{1, 0.3, 0.2, 0.8, 0} = 1
✅ Height(A) = 1
Would you like a clean PDF or image version of this for your notes or submission?
20. (a) Write a Program in PROLOG to place a Book named ‘A First Course in ARTIFICIAL
INTELLIGENCE ‘written by Deepak Khemani , published by ‘ Mc Graw Hill Education ‘ to
place in the ‘ RACK of Artificial Intelligence ’ , ‘Hall 1’ , Among ‘Hall 1’, ‘Hall 2’ , ‘Hall 3’.
[(AML 2201.3) (Apply/IOCQ)] (b) Write a PROLOG program to find an element in Kth
positioning in a given list {14, 15, 17, and 19}. [(AML 2201.5) (Apply/IOCQ)] (3+4) + 5 = 12
Here's the full answer to Q20 (a) and (b), based on your exam marks distribution and
requirements:
Goal:
Prolog Code:
% Facts
book('A First Course in ARTIFICIAL INTELLIGENCE', 'Deepak Khemani', 'Mc Graw Hill
Education').
category('A First Course in ARTIFICIAL INTELLIGENCE', 'Artificial Intelligence').
rack('Artificial Intelligence', 'RACK of Artificial Intelligence').
hall('RACK of Artificial Intelligence', 'Hall 1').
Sample Query:
?- place_book('A First Course in ARTIFICIAL INTELLIGENCE', 'Deepak Khemani', 'Mc Graw
Hill Education', Rack, Hall).
✅ Expected Output:
Rack = 'RACK of Artificial Intelligence',
Hall = 'Hall 1'.
Prolog Code:
% Base case: If K = 1, the head is the K-th element
kth_element([H|_], 1, H).
Sample Query:
?- kth_element([14, 15, 17, 19], 3, X).
✅ Expected Output:
X = 17.
Let me know if you want a printable version or visual explanation of recursion in part (b).
21. (a) State Modus Ponens inference rule. “Modus ponens is a special case of resolution” –
justify the statement [(AML 2201.3) (Apply/IOCQ)] (b) Consider two fuzzy sets A & B defined
as follows: A = {1/a, 0.3/b, 0.2/c 0.8/d, 0/e} B = {0.6/a, 0.9/b, 0.1/c, 0.3/d, 0.2/e} Now,
compute the following: (i) A U B (ii) A ՈB (iii) support (A) [(AML 2201.3) (Apply/IOCQ)] (3+3)
+(3*2) = 12
Here's the complete and marks-appropriate answer for Q21 (a) and (b):
● And P is true
● Then Q is true
🔷 Symbolically:
P→Q
P
∴Q
Example:
To show that Modus Ponens is a special case of resolution, represent the implication P
→ Q as ¬P ∨ Q.
Then:
✅ Support(A) = {a, b, c, d}
Let me know if you’d like this formatted into a clean handwritten-style PDF for submission.
22. (a) Consider the following English sentences: A. Tom owns a kindle. B. Every kindle
owner loves books. C. No book lover preserve books. D. Either Tom or Austin preserve the
book called “MITTI KE LOG”. E. Every kindle is a book. Now, answer the following
questions: i) Encode each sentence in First Order Predicate Logic (FOPL) form using the
following predicates: owns(x, y): x owns y bookLover(x): x is a book lover burns(x, y): x
preserves y book(x): x is a book kindle(x): x is a kindle (ii) Apply resolution method on these
CNF sentences to answer the query “Did Austin preserve the book named “MITTI KE
LOG”?”
Here’s the full answer for Q22 (a) involving FOPL encoding and resolution method,
broken into parts as per your question:
● owns(x, y) – x owns y
● book(x) – x is a book
● kindle(x) – x is a kindle
FOPL:
kindle(k1)
owns(tom, k1)
FOPL:
FOPL:
FOPL:
book(mitti_ke_log)
burns(tom, mitti_ke_log) ∨ burns(austin, mitti_ke_log)
FOPL:
∀x (kindle(x) → book(x))
22(a)(ii) Resolution Method to Answer:
Query: Did Austin preserve the book "MITTI KE LOG"?
We want to prove:
burns(austin, mitti_ke_log)
1. kindle(k1)
5. book(mitti_ke_log)
Negated query:
¬burns(austin, mitti_ke_log)
burns(tom, mitti_ke_log)
From:
● Clause 1: kindle(k1)
So:
bookLover(tom)
So:
book(k1)`
● bookLover(tom)
● book(mitti_ke_log)
✅ Conclusion:
By assuming ¬burns(austin, mitti_ke_log), we derived a contradiction, so the negated
query is false.
✔️ Therefore:
Austin did preserve the book "MITTI KE LOG".
Let me know if you want this formatted as a clean exam-ready handwritten-style version or in
PDF.
(b) Determine whether each of the following sentence is satisfiable, contradictory or valid,
where P, Q & R are propositions: i) (P & Q) ∨ ¬ (P & Q) ii) (P∨Q) → (P & Q)
Here's the detailed answer to 22(b) with classification of the given logical formulas:
22(b)
We are to determine whether each of the following statements is:
i) (P ∧ Q) ∨ ¬(P ∧ Q)
A ∨ ¬A
Which is a tautology (always true).
P Q P∧ ¬(P ∧ (P ∧ Q) ∨ ¬(P ∧
Q Q) Q)
T T T F T
T F F T T
F T F T T
F F F T T
✅ Answer: Valid
ii) (P ∨ Q) → (P ∧ Q)
P Q P∨ P∧ (P ∨ Q) → (P ∧
Q Q Q)
T T T T T
T F T F F❌
F T T F F❌
F F F F T
●
Not true in all rows → Not Valid
✅ Answer: Satisfiable
✅ Final Answers:
Expression Classificatio
n
(P ∧ Q) ∨ ¬(P ∧ Valid
Q)
(P ∨ Q) → (P ∧ Satisfiable
Q)
23. (a) Consider the following facts describing block world situation. ONTABLE(A),
ONTABLE(C), ON(D, C), ON(B, A), ON(E, B), HEAVY(B), HEAVY(D), CLEAR(E),
CLEAR(D), WOODEN(B). The following statements provide general knowledge about this
block world. i) Every big, blue block is on a green block ii) Each heavy, wooden block is big.
iii) All blocks with clear tops are blue iv) All wooden blocks are blue Write a PROLOG
program to answer the query ‘Which block is on green block?’
Facts (given):
ontable(a).
ontable(c).
on(d, c).
on(b, a).
on(e, b).
heavy(b).
heavy(d).
clear(e).
clear(d).
wooden(b).
General Knowledge Statements:
blue(X) :- clear(X).
blue(X) :- wooden(X).
heavy(b).
heavy(d).
clear(e).
clear(d).
wooden(b).
% Query:
% ?- on(X, green).
✅ To run the query:
?- on(X, green).
X = b.
✔️ Explanation:
● b is heavy and wooden, so it's big
Would you like a working .pl file or sample output for GNU Prolog or SWI-Prolog?
24. (a) Bojho understands English . Bojho understands German. Bojho understands Hindi.
Bojho has friends who understands Marathi. How will Bojho communicate in Marathi? Write
a Prolog Inference Rules that will finally infer that, Bojho will be able to talk in Marathi. You
may add predicates to draw the inference. [(AML 2201.5) (Apply/IOCQ)] (b) Write the Prolog
code to write the TT of the circuit given below. [(AML 2201.5) (Apply /HOCQ)] (3+4) +5 = 12
We are told:
● We must infer how Bojho can communicate in Marathi — presumably, via help
from friends.
🔧 Prolog Representation
Facts:
understands(bojho, english).
understands(bojho, german).
understands(bojho, hindi).
friend_of(bojho, rahul).
understands(rahul, marathi).
Rule (inference):
% If X has a friend Y who understands a language L,
% then X can communicate in L via Y
can_communicate(X, L) :- friend_of(X, Y), understands(Y, L).
✅ Query:
?- can_communicate(bojho, marathi).
🟢 Expected Output:
true.
🔧 Prolog Code:
and(true, true, true).
and(true, false, false).
and(false, true, false).
and(false, false, false).
or(true, _, true).
or(_, true, true).
or(false, false, false).
not(true, false).
not(false, true).
circuit(A, B, C, Z) :-
and(A, B, AB),
not(C, NC),
or(AB, NC, Z).
% Generate all possible combinations
tt :-
member(A, [true, false]),
member(B, [true, false]),
member(C, [true, false]),
circuit(A, B, C, Z),
format('A=~w B=~w C=~w => Z=~w~n', [A, B, C, Z]),
fail.
tt. % To end the backtracking
✅ To Run:
?- tt.
This will output all 8 combinations of (A, B, C) with resulting Z from the logic circuit.
Would you like this modified for a different circuit (e.g., NAND, XOR, etc.)?
25. (a) Determine whether each of the following sentence is satisfiable, contradictory or
valid, where P, Q & R are propositions: i) (P & Q) ∨ ¬ (P & Q) ii) (P∨Q) → (P & Q) [(AML
2201.3) (Apply/IOCQ)] (b) Explain Reasoning mechanism to solve Monkey Banana Problem.
[(AML 2201.5) (Remember/LOCQ)] (c) Consider the following set of propositional sentences:
1. The-humidity-is-high ∨ the-sky-is-cloudy. 2. If the-sky-is-cloudy then it-will-rain 3. If
the-humidity-is-high then it-is-hot. 4. it-is-not-hot Now, prove by resolution theorem on
propositions that “it-will-rain”
i) (P ∧ Q) ∨ ¬(P ∧ Q)
P Q P∧ ¬(P∧Q (P∧Q) ∨
Q ) ¬(P∧Q)
T T T F T
T F F T T
F T F T T
F F F T T
✅ Answer: Valid
ii) (P ∨ Q) → (P ∧ Q)
P Q P∨ P∧ (P∨Q) →
Q Q (P∧Q)
T T T T T
T F T F F❌
F T T F F❌
F F F F T
○ Grasp banana
✅ Steps:
1. Move to the box
🛠️ AI Method Used:
● STRIPS Representation
The problem demonstrates how intelligent agents plan sequences of actions using
symbolic reasoning.
25(c) Prove “it-will-rain” using Resolution
🧩 Given Sentences:
1. humidity_high ∨ sky_cloudy
4. ¬hot
✳️ Convert to CNF:
Sentence CNF Form
No.
(1) humidity_high ∨
sky_cloudy
(4) ¬hot
🧩 Apply Resolution:
Step 1: From (3) and (4):
(¬humidity_high ∨ hot)
(¬hot)
⇒ ¬humidity_high — [resolving on `hot`]
(humidity_high ∨ sky_cloudy)
(¬humidity_high)
⇒ sky_cloudy — [resolving on `humidity_high`]
✅ Conclusion:
Using resolution, we derived:
⇒ will_rain