Graph Search Flashcards

1
Q

Encode a maze as a graph search problem. Then write route/2 (edges), start/1, finish/1 (world model), and a path finder travel/2, and a query start/0 which answers whether there exists a path from start to finish.

A

157

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

travellog/2 version of graph search to remember the route

A

158

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Explain precisely how the naive DFS fails when the graph has a loop.

A

159-161

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

travelsafe/3 for cyclic graphs

A

162

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

General pattern of graph search

A

163

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Principles for choosing state space representation when performing graph search

A

164

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Solve the missionaries and cannibals problem. The boat carries 2 people
If the Cannibals outnumber the Missionaries they will eat them
Get them all from one side of the river to the other?

A

165 statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Solve the towers of hanoi problem

A

166 statement

How well did you know this?
1
Not at all
2
3
4
5
Perfectly