P' To Node V: CT2-Answer Key Set-A-Batch-2
P' To Node V: CT2-Answer Key Set-A-Batch-2
P' To Node V: CT2-Answer Key Set-A-Batch-2
1. a. Find the shorted path using A* algorithm from Node ‘P’ to node ‘V’. The heuristic
values are given near the nodes and the individual path cost is given on the edge. (13)
‘A’ is the root node. ‘F’ is the goal node. Explain the searching process using IDS. (12)
Depth Nodes
0 A
1 BCD
2 EFGHIJ
3 KLMNPQ
2. a. The figure below is the game tree of a two-player game; the first player is the maximizer and
the second player is the minimizer. Use the tree to answer the following questions: [10]
- Is the final value of beta at the root node (after all children have been visited) +1? (T/F)
True. The root node is a maximizing node, and the value of beta never changes at a
maximizing node.
- What is the final value of beta at the node labeled P (after all of P’s children have been
visited)?
Since we are at a minimizing node and alpha is negative infinity, beta will take on the
smallest value returned by any of P’s children. In this case, P’s children would return 8, 9, and
4, so the final value of beta at P will be 4.
Suppose we are in the middle of running the algorithm. The algorithm has just reached the
node labeled Q. The value of alpha is 5 and the value of beta is +∞.
Create the initial list of cities by shuffling the input list (ie: make the order of
visit random).
At every iteration, two cities are swapped in the list. The cost value is the
distance traveled by the salesman for the whole tour.
If the new distance, computed after the change, is shorter than the current
distance, it is kept.
If the new distance is longer than the current one, it is kept with a certain
probability.
We update the temperature at every iteration by slowly cooling down.
Semantic Nets
Example: Following are some statements which we need to represent in the form of
nodes and arcs.
Statements:
Jerry is a cat.
Jerry is a mammal
Jerry is owned by Priya.
Jerry is brown colored.
All Mammals are animal
Frames
P <=> (Q ^ ~R).
W => P.
R <=> S.
S => P.
P => (~(Q V W) V S)
d.The law says that "it is a crime for an American to sell weapons to hostile nations. The country
"Nano", an enemy of America has some missiles, and all of its missiles were sold by colonel west,
who is an American". Use resolution principle to prove that west is a criminal.
Ans:
4. a. Consider the following Acyclic graph that portrays different events leading to a college
admission
Case 1: Consider the exam is very tough, the student does not have high IQ and scores less in
entrance exam. What is the probability that the student will get college admission if the student
manages to pass 12th exam? (7.5)
Input : Exam is tough , Student has low IQ, Entrances exams marks are less, 12th marks is low
Output: Gets admission in college
From the above word problem statement, the Joint Probability Distribution can be written as
below,
P[C=1, M=1, I=0, T=1, E=0]
From the above Conditional Probability tables, the values for the given conditions are fed to
the formula and is calculated as below.
P[C=1, M=1, I=0, T=1, E=0]
= P(C=1 | M=1) . P(M=1 | I=0, T=1) . P(I=0) . P(T=1) . P(E=0 | I=0)
= 0.1 * 0.1 * 0.8 * 0.3 * 0.75
= 0.0018
Case 2: What is the chance that the student do not get college admission despite having good IQ
capacity and scoring high marks in entrance exams? Also, the school exams were very easy.
Input : IQ = High , Entrance exam = High marks, Toughness of exam = Easy
Output : Do not get college admission
Thus
P[C=0, M=0, I=1, T=0, E=1]= P( C=0 | M=0) . P(M=0 | I=1, T=0) . P(I =1) . P(T =0) . P(E=1
| I=1)
= 0.6 * 0.5 * 0.2 * 0.7 * 0.6
= 0.0252
b. Using Baye's theorem solve the following problem. In a factory which manufactures bolts,
machines A, B and C manufacture respectively 25%, 35% and 40% of the bolts of their outputs
5%, 4% and 2% are respectively defective bolts. A bolts is drawn at random from the product
and is found to be defective. What is the probability that it is manufactured by the machine B?
c. For each of the following arguments, explain which rules of inference are used for each step. The
universe is the set of people.
i. "Every student in this class owns a personal computer. Everyone who owns a personal
computer can use the Internet. Therefore, John, a student in this class, can use the Internet."
C(John) I(John)
i. "Everyone in this class owns a personal computer. Someone in this class has never used the
Internet. Therefore, someone who owns a personal computer has never used the Internet."
Let
o C(x) be "x is a student in this class, "
o P(x) be "x owns a personal computer, " and
o I(x) be "x has used the Internet."
The premises are
1. x (C(x) P(x)) and
2. x (C(x) I(x)).
Using existential instantiation and the second premise
o C(d) I(d) for some person d. Hence by
simplification C(d).
For that person d, by universal instantiation and the first premise
o C(d) P(d).
o From this and the previous conclusion, by modus ponens P(d).
Also from C(d) I(d) by simplification I(d).
Hence by conjunction P(d) I(d).
Hence by existential generalization x (C(x) I(x)).