tutorial 1

stemswedishAI and Robotics

Oct 15, 2013 (3 years and 10 months ago)

105 views

G51IAI Tutorial

1.

There are five graduate CS classes and three instructors who will be
teaching these classes. An instructor can only teach one class at a time.
The classes are:


Class 1
-

Algorithms: meets from
8:00
-
9:00am


Class 2
-

Intro to AI: meets from 8:30
-
9:30am


Class 3
-

Databases: meets from 9:00
-
10:00am


Class 4
-

Operating Systems: meets from 9:00
-
10:00am


Class 5
-

Machine Learning: meets from 9:30
-
10:30am


and the instructors are:


Professor A,

who is available to teach Classes 3 and 4.


Professor B, who is available to teach Classes 2, 3, 4, and 5.


Professor C, who is available to teach Classes 1, 2, 3, 4, 5.

a)

Formulate this as a CSP problem in which there is one variable per
class. Stat
e the variables

and their domains, and the constraints.

b)

Draw the constraint graph associated with your CSP.

c)


Show the domains of the variables after running arc
-
consistency on
this

initial graph (after enforcing any unary constraints.)

d)

Give
one solution to this CSP.

[
2011/2012
]

2.

The 8
-
Queen, set up as a constraint satisfaction problem, has the
intermediate stage as in
shown in
the following figure:











Q

















Q













Q

















Q








Using an "F," mark the positions in the last four columns that will be
eliminated

as possible positions for a queen by
forward checking
.


Using an "A," mark the positions in the last four columns that are
not
already marked with an "F" and that will be
eli
minated
by
arc
consistency
. (Use this process repeatedly until no
inconsistencies remain.
Hence give a solution to this problem.

3.

Consider the map below which is not drawn to scale. The nodes
denote cities while the edges denote
the roads
between the
m, with

the latter labelled by a number to denote

distance
.


Using A* Search, work out the optimal route from city A to city G.







The straight line distances (SLD) to city G from each city are given
below:

City

SLD

City

SLD

A


30

E

10

B


20

F

10

C


20

G

0

D


20




rovide the search tree for your solution, showing the order in which
the nodes were expanded and
the
cost at each
node. Finally, state
the route you would take and the cost of that route.




[2009/2010]

















D

A

B

C

E

F

G

45

50

10

40

40

65

10

10

10

4.

Consider the following state space graph where the bi
-
directional arcs
represent all the legal successors of a node. The cost of each
successor function is given by the number on the arc. The value of a
heuristic evaluation function h, if computed at a sta
te, is shown
alongside each node. The initial and goal states are S and G
respectively.



When a node is expanded, its children are put in a QUEUE data
structure consisting of all the fringe nodes sorted by values of an
evaluation function. In case of ties of the latter, the order in the
QUEUE will be decided

by alphabetical order. A child node will not
be generated if that same node is an ancestor of the current node
in the search tree.


What would be the order of node expansion if the following search
algorithms are used? For both cases, show at each step wh
at nodes
are in the QUEUE.

(i)

Greedy Best
-
First Search


(ii)

A* Search



[2007/2008]


5.

[2010/2011 Q3]


6.

[2011/2012 Q3]




S

A

E

B

D

C

H

F

G

3

2

3

4

1

2

3

4

1

3

h=7

h=5

h=4

h=5

h=2

h=3

h=0

h=2

h=6