9
LOVELY PROFESSIONAL UNIVERSITY ASSIGNMENT OF ARTIFICIAL INTELLIGENCE HOMEWORK ASSIGNMENT-4 SUBMITTED TO:- SUBMITTED BY: Ms. T.jaysree naresh Rd1802b49

ai me

Embed Size (px)

Citation preview

Page 1: ai me

LOVELY PROFESSIONAL UNIVERSITY

ASSIGNMENT

OF

ARTIFICIAL INTELLIGENCE

HOMEWORK ASSIGNMENT-4

SUBMITTED TO:- SUBMITTED BY:

Ms. T.jaysree naresh

Rd1802b49

10810690

Page 2: ai me

Part-A

Q-1 Define procedural and declarative knowledge and explain difference between these two using suitable example.

Ans. Declarative knowledge is defined as the factual information stored in memory and known to be static in nature. Other names, e.g. descriptive knowledge, propositional knowledge, etc. are also given. It is the part of knowledge which describes how things are. Things/events/processes, their attributes, and the relations between these things/events/processes and their attributes define the domain of declarative knowledge. Procedural knowledge is the knowledge of how to perform, or how to operate. Names such as know-how are also given. It is said that one becomes more skilled in problem solving when he relies more on procedural knowledge than declarative knowledge

Q-2 A problem solving search can either be forward(from a known strat to a desired goal state ) or backward( from a goal state to start state). What factor determines the choice of direction for a particular problem.?

Ans. There are different factors that determines the choice of direction for a particular

problem are :

1) Are there more possible start states or goal states? We would like to move from

the smaller set of values to the larger set of values.

2) In which direction is the branching factor greater? We would like to proceed in

the direction with the lower branching factor.

3) Will the program be asked to justify its reasoning process to a user? If so,it is

important to proceed in the direction that corresponds more closely with the way

the user will think.

4) What kind of event is going to trigger to problem solving episode? If it is the

arrival of new fact, forward reasoning makes sense. If it is a query to which a

response is desired, backward reasoning is more natural.

Page 3: ai me

Part-B

Q-3 Transform each of the following sentences into conjunctive normal form

a) (P Q) Rb) P V (~P&Q&R)c) (~P & Q) V ( P & ~Q) & S

Ans. a) (P Q) R

Eliminate- -> P Introducing- /\ P/\ Eliminate- -> R Introducing- /\ (P/\Q)/\R

b) P V (~P&Q&R)

Eliminate- V P Introducing- /\ P/\(~P&Q&R) P/\(~P&Q&R)

c) (~P & Q) V ( P & ~Q) & S

Eliminate V Introducing- /\ (~P & Q) V (P & ~Q) & S

Q-4 Determine which of the following sentences are

a) Satisfiableb) Contradictoryc) Valid

S1: (P&Q) V ~(P&Q) S4: (PVQ) & (PV~Q) V P

S2: (PVQ) (P&Q) S5: P Q ~P

Page 4: ai me

S3: (P&Q) R V ~Q S6: PV Q & ~P V ~Q & P

Ans. S1: (P&Q) V ~(P&Q)

P Q P&Q ~(P&Q) (P&Q)V~(P&Q)

T T T F T

T F F T T

F T F T T

F F F T T

S1 is valid.

S2: (PVQ) (P&Q)

P Q PVQ P&Q (PVQ) -> (P&Q)

T T T T T

T F T F F

F T T F F

F F F F T

S2 is contradictory.

S3: (P&Q) R V ~Q

P Q R P&Q (P&Q)->R ~Q (P&Q)->RV ~Q

T T T T T F T

T T F T F F F

T F T F T T T

Page 5: ai me

T F F F T T T

F T T F T F T

F T F F T F T

F F T F T T T

F F F F T T T

S3 is satisfactory.

S4: (PVQ) & (PV~Q) V P

P Q PVQ ~Q PV~Q (PVQ)&(PV~Q) (PVQ)&(PV~Q)VP

T T T F T T T

T F T T T T T

F T T F F F F

F F F T T F F

S4 is contradictory.

S5: P Q ~P

P Q P->Q ~P P->Q->~P

T T T F F

T F F F T

F T T T T

F F T T T

S5 is satisfactory.

Page 6: ai me

S6: PV Q & ~P V ~Q & P

P Q PVQ ~P PVQ&~P ~Q PVQ&~PV~Q PVQ&~PV~Q&P

T T T F F F F F

T F T F F T T T

F T T T T F T F

F F F T F T T F

S6 is satisfactory.

Q-5 Consider the following facts:

a) Most things do not fly.

b) Most birds do fly, unless they are too young or dead or alive or have a broken wing.

c) Penguins and ostriches do not fly.

d) Magical ostriches fly.

e) Tweety is a bird.

f) Chirpy is either a penguin or an ostrich.

g) Feathers is a magical ostrich.

Use one or more of the nonmonotonic reasoning systems we have discussed to answer the following questions:

Does Tweety fly? Does chirpy fly? Do feathers fly? Does Paul fly?

Ans. Look at the following diagram.

Birds

Page 7: ai me

Is a is a

Is a is a

Is a

From the above hierarchy we can say the following statements-

1. Tweety flies2. Chirpy does not fly3. Feather flies

Q-6 Construct semantic net representation for the following:

Pompeian (Marcus), Blacksmith (Marcus).

Feather

Magical ostrich

Tweety

Chirpy

Penguin and ostrich fly: no

Page 8: ai me

Mary gave the green flowered vase to her favorite cousin

Ans.