Professional Documents
Culture Documents
Cia2 Ai QB Answerkey
Cia2 Ai QB Answerkey
Cia2 Ai QB Answerkey
COURSE OUTCOMES
CO1 Recognize the various types and working units of an expert systems
CO2 Interpret the logic behind the building of knowledge base and knowledge representation.
CO3 Apply suitable learning methodology while designing systems based on their
applications.
CO4 Demonstrate ideas behind different algorithms and their use.
CO5 Apply different logical formalisms and decision taking in planning problems.
Level of
MA Toughness
PART A (2 Marks) – 20 Questions BT CO RK Easy/
S Medium /
Tough
1. State CSP R CO4 2 Easy
A problem is solved when each variable has a value that satisfies all the
constraints on the variable. A problem described this way is called a
constraint satisfaction problem, or CSP.
(or)
A constraint satisfaction problem consists of three components, X,D, and
C:
X is a set of variables, {X1, . . . ,Xn}.
D is a set of domains, {D1, . . . ,Dn}, one for each variable.
C is a set of constraints that specify allowable combinations of values.
2. List out precedence constraints for the problem of scheduling the U CO4 2 Medium
assembly of a car
Whenever a task T1 must occur before task T2 and task T1 takes duration
d1 to complete, we add an arithmetic constraint of the form
T1 + d1 ≤ T2 .
AxleF+ 10 ≤ WheelRF; AxleF+ 10 ≤ WheelLF;
AxleB+ 10 ≤ WheelRB; AxleB+10 ≤ WheelLB.
(or)
WheelRF+ 1 ≤ NutsRF; (or) NutsRF+ 2 ≤ CapRF;
WheelLF+ 1 ≤ NutsLF; NutsLF+2 ≤ CapLF;
WheelRB+ 1 ≤ NutsRB; NutsRB+ 2 ≤ CapRB;
WheelLB+ 1 ≤ NutsLB; NutsLB+ 2 ≤ CapLB.
3. Illustrate Constraint Optimization Problem with University Class U CO4 2 Medium
Scheduling.
For example, in a university class-scheduling problem,there are absolute
constraints that no professor can teach two classes at the same time.
But we also may allow preference constraints: Prof. R might prefer
teaching in the morning,whereas Prof. N prefers teaching in the
afternoon. A schedule that has Prof. R teaching at 2 p.m. would still be
an allowable solution (unless Prof. R happens to be the department
chair)but would not be an optimal one.
4. Formulate initial state, Successor function, goal test for CSP CO4 2 Medium
AP
Ans:
5. Illustrate the topological sort of the variables in a constraint R CO4 2 Easy
satisfaction problem
Ans:
To solve a tree-structured CSP, first pick any variable to be the root of
the tree, and choose an ordering of the variables such that each variable
appears after its parent in the tree.Such an ordering is called a
topological sort.
8. Given a game tree, the optimal strategy can be determined from AP CO4 2 Tough
theminimaxvalue of n, formulate MINIMAX- VALUE (n).
Ans:
11. Interpret the different ways in which consistency can be U CO4 2 Easy
enforced in constraint propagation.
Ans:
The key idea is local consistency. It can be enforced as the following
types
● Node consistency
● Arc consistency
● Path consistency
● K- consistency
Ans:
13. Justify that conflict set back jumping exploits backtracking A CO4 2 Tough
introducing a more intelligent approach.
Ans:
● A more intelligent approach to backtracking is to backtrack
to a variable that might fix the problem—a variable that was
responsible for making one of the possible values impossible.
● To do this, we will keep track of a set of assignments that are
in conflict with some value. The set is called the conflict set.
● The backjumpingmethod backtracks to the most recent
assignment inthe conflict set.
● This method is easily implemented by a modification to
BACKTRACK such that itaccumulates the conflict set while
checking for a legal value to assign.
If no legal value isfound, the algorithm should return the most
recent element of the conflict set along with thefailure indicator.
14. Consider the problem of search in a three player game. There are AP CO4 2 Easy
3 players X,Y,Z.X is player 1,Y is player 2,Z is player 3. Player 1
moves first (at the root), followed by Player 2 and 3.Complete
the following search tree by filling in backed up values.
Ans:
15. Define the concept of knowledge based agents and outline the U CO2 2 Easy
knowledge based agent program.
Ans:
A knowledge-based agent is composed of a knowledge base and an
inference mechanism. It operates by storing sentences about the world in
its knowledge base, using the inference mechanism to infer new
sentences, and using these sentences to decide what action to take.
16. Consider a vocabulary with only four propositions, A, B, C, and AP CO2 2 Tough
D. How many models are there for the following sentences?
a. B ∨ C.
b.(A ⇒ B) ∧ A ∧¬B ∧ C ∧ D.
Ans:
These can be computed by counting the rows in a truth table that come
out true, but each has some simple property that allows a short-cut:
a. Sentence is false only if B and C are false, which occurs in 4 cases for
A and D, leaving 12.
b. The last four conjuncts specify a model in which the first conjunct is
false, so 0.
17. Decide whether each of the following sentences is valid, A CO2 2 Tough
unsatisfiable, or neither. Verify your decisions using truth tables or
the equivalence rules.
a. (Smoke ⇒ Fire) ⇒ (¬Smoke ⇒¬Fire)
b. (Smoke ⇒ Fire) ⇒ ((Smoke ∧ Heat) ⇒ Fire)
Ans:
a.Neither.
b.Valid.
18. Enumerate the inference rules used in propositional logic. R CO2 2 Easy
Ans:
● Modus ponens
● Modus Tollens
● Hypothetical syllogisms
● Disjunctive syllogisms
● Biconditional elimination
● And Elimination
19. Convert the following sentences into FOL. AP CO2 2 Medium
a. Every gardener likes the sun.
b. All purple mushrooms are poisonous.
c. Bill has at least one sister.
d. Deb is not tall.
Ans:
a)
b)
c) ∃x SisterOf(x,Bill)
d)¬tall(Deb)
20. Is the sentence ∃x,y x=y valid? Explain. A CO2 2 Tough
Ans:
The sentence ∃ x, y x=y is valid. A sentence is valid if it is true in every
model. An existentially quantified sentence is true in a model if it holds
under any extended interpretation in which its variables are assigned to
domain elements. According to the standard semantics of FOL , every
model contains at least one domain element, hence, for any model, there
is an extended interpretation in which x and y are assigned to the first
domain element. In such an interpretation, x=y is true.
Level of
PART B – 6 Questions
Toughness
MAR
BT CO Easy/
Questions can be either one division with 16 Marks or (10+6) Marks or KS
Medium /
(8+8) Marks or (12 +4) Marks
Tough
1 a) Suppose that we are looking at a map of Australia showing AP CO4 10 Medium
each of its states and territories. We are given the task of
coloring each region red, green, or blue in such a way that
no neighbouring regions have the same color. Formulate
and this as a CSP.
Ans:
ii.Consider the problem of search in a three player game.
There are 3 players X, Y, Z.X is player 1,Y is player 2,Z is
player 3. Player 1 moves first (at the root), followed by
Player 2 and 3.Complete the following search tree by
filling in backed up values.
Ans:
5(i) Discuss in detail the Wumpus world and model it using AP CO2 10 Tough
propositional logic. Suppose the agent has progressed to
the point shown in Figure shown below.
Ans:
a. O(E, S) ∨ O(E,L).
b. O(J,A) ∧ ∃ p p 6= A ∧ O(J, p).
c. ∀ p O(p, S) ⇒ O(p,D).
d. ¬∃ p C(J, p) ∧ O(p,L).
e. ∃ p O(p,L) ∧ ∀ q C(q, p) ⇒ O(q,D).
f. ∀ p O(p, S) ⇒ ∃ q O(q,L) ∧ C(p, q).
6(i) Elaborate on the syntax and semantics of first order logic with AP CO2 12 Medium
suitable examples.
Convert the following predicate logic to natural language sentences
and explain the syntax and semantics of the sentences:
a) ∃ x ( Student(x) ∧ ∀ y ( Student(y) ∧ ¬(x = y) ⇒ Loves(y,x) ))
b) ∀ x ( Student(x)⇒∃ y ( Student(y) ∧ ¬ (x = y) ∧ Loves(x,y) ))
c) ∀ x ( Student(x) ∧ Takes(x, Analysis) ⇒ Takes(x, Geometry) )
d) ¬ ∃ x ( Student(x) ∧ Failed(x, Chemistry) ) ∧ ∃ x ( Student(x)
∧ Failed(x, History) )
Ans:
Ans:
(i) ∃ c Country(c) ∧ Border (c, Iraq) ∧ Border (c,Pakistan).
(1) Correct.
(ii) ∃ c Country(c) ⇒ [Border (c, Iraq) ∧ Border (c,Pakistan)].
(3) Incorrect. Use of implication in existential.
(iii) [∃ c Country(c)] ⇒ [Border (c, Iraq) ∧ Border (c,Pakistan)].
(2) Syntactically invalid. Variable c used outside the scope of its
quantifier.
(iv) ∃ c Border (Country(c), Iraq ∧ Pakistan).
(2) Syntactically invalid. Cannot use conjunction inside a term.