You are on page 1of 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 :


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

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) P Q ~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) P Q R ~Q P&Q P&QR P&QRV~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

Hence the above one is satisfiable.

Ans.4. (e) P Q 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).

7. for all x, Eats(Mary, x) -> Eats(Ana, x)

Therefore, ~Eats (Mary, x) V Eats (Ana, x)


From 7 & 1, it is concluded that Ana eats all kinds of foods (since she eats all food which Mary eats
who in turn likes and eats all kinds of foods). Therefore, from 2&3&5 Ana eats pizza,Apple & Chicken.

From 1 it is concluded that Mary likes all kinds of food. From 4 it is deducted that anything which is
eaten is food. As from 5 John eats chicken therefore chicken is a kind a food. Therefore, from 1,5 &6
Mary likes chicken.

You might also like