Upload
nitesh-mishr
View
226
Download
0
Embed Size (px)
Citation preview
8/8/2019 CSE 402 HW 2 SOLN
1/5
Cse402 Artificial
Intelligence
Assignment - 2
Submitted To Shruti Mam.
Submitted By Kshitij Goel.
10812548.
RB1805A03.
Ans.1. To check whether a particular argument is valid or not, we have to
construct a truth table incorporating all possible values existing and if the tautology
occurs then that argument is valid. In this example :
Let X: Paul lives in Dublin.
Let Y: Paul lives in Ireland.
X->Y says that if Paul lives in Dublin then Paul lives in Ireland which should be true
(already given)
X Y X->Y (X->Y)&Y ((X->Y)&Y)->X
T T T T T
F T T T T
F F T F T
It is clear from the above truth table that If Paul lives in Dublin, he lives in
Ireland. Paul lives in Ireland. Therefore Paul lives in Dublin.
Ans 2. Let is create a truth table comprising of all possibilities of situation :
8/8/2019 CSE 402 HW 2 SOLN
2/5
Box 1 Box 2 Box 3 Result
T F F 3
F T F 1
F F T 2
If Box 1 is true then definitely gold is not in it and in another two. Box 3 says
that gold is in Box 2 which is false. Therefore, gold has to be in Box 3.
If Box 2 is true then Box 1 says that gold is not present in it which is
absolutely false. Therefore, gold is in Box 1.
If Box 3 is true then it says that gold is in Box 2 which will be definitely
true.
Ans.3. Declarative representation It is the representation of knowledge which
exists but its use or its application is not known. When a program uses it, it will
declares the right application of the knowledge and put it into use.
Procedural representation It is one in which the control information that is
necessary to use the knowledge is considered to be embedded in the knowledge
itself and to use procedural representation we need to augment it with an
interpreter that follow the instruction given in the knowledge.
The real difference between the declarative and the procedure view of knowledge
lies in where control information resides.
Ans.4. (a) P Q ~P ~Q PVQ P&Q PVQ&~P ~Q&P&Q
PVQ&~PV~Q&P&Q
T T F F T T F F F
8/8/2019 CSE 402 HW 2 SOLN
3/5
T F F T T F F F F
F T T F T F T F F
F F T T F F F F F
Hence the above one is contradiction.
Ans.4. (b) PQ ~P ~Q P->~Q P->~Q->~p
T T F F F T
T F F T T F
F T T F T T
F F T T T T
Hence the above one is satisfiable.
Ans.4. (c) P Q ~P PVQ ~PVQ (PVQ)&(~PVQ)
(PVQ)&(~PVQ)&P
T T F T T T T
T F F T F F F
F T T T T T F
F F T F T F F
Hence the above one is satisfiable.
Ans.4. (d) PQ R ~Q P&Q P&QR P&QRV~Q
T T T F T T T
T T F F T F F
T F T T F T T
T F F T F T T
F T T F F T T
F T F F F T T
F F T T F T T
F F F T F T T
8/8/2019 CSE 402 HW 2 SOLN
4/5
Hence the above one is satisfiable.
Ans.4. (e) PQ P&Q PVQ ~(PVQ) (P&Q)~(PVQ)
T T T T F F
T F F T F T
F T F T F T
F F F F T T
Hence the above one is satisfiable.
Ans.5. Well formed formulae are given below:-
a. ~P V Q & R S U & Q
(((~P) V( Q & R)) S ) (U & Q)
b. P &~Q V P U ~ R
((P &(~Q) )V P) (U (~ R))
c. Q V P V ~R & S ~U & P R
((Q V P) V ((~R) & S)) ( ((~U )& P) R)
Ans. 6. 1. For all x, food(x) - > Likes(Mary, x)
Therefore, ~food(x) V Likes (Mary, x)
2. Food (Pizza).
3. Food (Apple)
4. for all x, for all y eats(x, y) - > food(y)
Therefore , ~eats(x, y) V food(y)
5. Eats (John, chicken)
Combining 4 & 5 we find get
6. food (Chicken).
8/8/2019 CSE 402 HW 2 SOLN
5/5