18CS71-Artificial Intelligence Question Bank

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

18CS71-Artificial intelligence Question Bank

1. What is artificial intelligence? List the task domains of artificial intelligence.

2. Explain the depth first search algorithm with an example

Answer:

3. Explain the means end Analysis with an example

4.The water jug problem states :You are provided with two jugs, first one with 4- gallons of

capacity And second one with 3 gallons of capacity. Neither have any measuring markers

on it. How can we get exactly two gallons of water in a 4 gallon jug?

i) Write down the production rules for the above problem

ii) Write any one solution for the above problem

Answer:

Solution:
 
First we will decide state space for this problem.
State Space - set of ordered pair of integer (x, y) where:-
x = (0, 1, 2, 3, 4) number of gallons of water in 4 Gallon jug
y = (0, 1, 2, 3) number of jug of water in 3 Gallon jug
 
According to final condition given in the problem,
Start state = (0, 0)
End state = (2, n)
 
Now we should form a set of production rules which will be used to go from one state
to another.
 
There are 12 production rules:
start state end state remark
1. (x,y) -> (4,y) (if x<4.) Fill 4 gallon jug
2. (x,y) -> (x,3) (if y<3) Fill 3 gallon jug
3. (x,y) -> (x-d,y) (x>0), pour some water out of 4 gallon jug
4. (x,y) -> (x,y-d) (y>0), pour some water out of 3 gallon jug
5. (x,y) -> (0,y) (if x>0). Empty 4 gallon jug
6. (x,y) -> (x,0) (if y>0). Empty 3 gallon jug
7. (x,y) -> (4,y-(4-x)) (x+y >= 4 && y>0.) pour water from 3 gallon jug to
4 gallon jug until 4 gallon jug is full
8. (x,y) -> (x-(3-y),3) (x+y >= 3 && x>0) Pour water from 4 gallon jug to
3 gallon jug until 3 gallon jug is full
9. (x,y) -> (x+y,0) (x+y <= 4 && y>0) pour all the water from 3 gallon
jug to 4 gallon jug
10. (x,y) -> (0,x+y) (x+y <= 3 && x>0) pour all the water from 4 gallon
jug to 3 gallon jug
11. (0,2) -> (2,0) pour 2 gallon water from 3 gallon jug to 4gallon
jug
12. (2,y) -> (0,y) Empty 2 gallons from 4 gallon jug on ground
 
Now find one possible solution for above problem, i.e., apply above production rules to
reach end state from start state
 
One possible rule is:
Start state: (0, 0)
End state: (2, n)
 
Water in 4 gallon jug water in 3 gallon jug rule applied
0 0
0 3 2
3 0 9
3 3 2
4 2 7
0 2 5 or 12
2 0 9 or 11

5. Explain production systems with components and characteristics. List the requirements of

good control strategies

Answer:
Characteristics of Production System

Data Structure: After defining the problem, it will be required to be


represented in a suitable data structure. The data structures best suited for
traditional AI problems are graphs and trees

Control Strategies: These are also called search strategies. Control strategies
are adopted for applying the rules and searching the problem solution in
search space. The control strategy is responsible for obtaining the solution of
the problem. Hence, if the wrong control strategy is applied, it may be possible
that a solution is never obtained, even if it exists.
Requirement of good control strategies:

6. List and explain the problem characteristics which must be analysed before deciding on

a proper heuristic search.


7.Write an algorithm for :

i)Steepest ascent hill climbing with an example

Answer:

It is a variant of generate nd test.

Algorithm:

Example:

Sorting in ascending order

ii)Best-first search with an example

8. Explain control satisfaction and solve the below crypt arithmetic problems:

i) CROSS + ROADS =DANGER


ii) DONALD + GERALD = ROBERT

9. Explain steepest Hill Climbing technique with an algorithm. Comment on its drawbacks

and how to overcome these drawbacks

11. Explain simulated annealing

12. Explain problem reduction with respect to AND-OR graphs

13. Write AO* algorithm

You might also like