Week 2 (Chapter 2) - Solving Problems & Searching Flashcards

1
Q

How to evaluate a search strategy?

A

Evaluate along the following dimensions:

  • Completeness
  • Time complexity
  • Space complexity
  • Optimality
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In what way do we measure the time and space complexity of a strategy?

A

Time and space complexity are measured in terms of:
b - Maximum branching factor
d - Depth of least cost solution
m - Maximum depth of state space.

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

Properties of Breadth-first search?

A

Complete - Yes (if maximum branching factor is finite)

Time - O(b^d) - i.e. exponential in d

Space - O(b^d) - keeps every node in memory

Optimal - Yes (if cost = 1 per step); HOWEVER, in general = not optimal

b - Maximum branching factor
d - Depth of least cost solution
m - Maximum depth of state space.

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

What is the biggest problem for Breadth-first search?

A

Space complexity

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

Properties of uniform-cost search?

A

Complete - Yes, if step cost >= e

Time - # of nodes with g <= cost of optimal solution

Space - # of nodes with g <= cost of optimal solution

Optimal - Yes

e - epsilon (A REALLY SMALL FUCKING NUMBER)
g - cost of path

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

Properties of depth-first search?

A

Complete - No, fails in infinite-depth spaces, spaces with loops. If it is modified to avoid repeated states along path, can complete in finite spaces

Time - O(b^m), if m is lager than d, then time will be terrible, but dense, faster than bfs

Space - O(bm) i.e. linear

Optimal - No

b - Maximum branching factor
d - Depth of least cost solution
m - Maximum depth of state space.

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

How to modify depth-first search so it’s complete?

A

Modify to avoid repeated states along path

-> completes in finite spaces

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

What is iterative deepening search?

A
function Iterative-Deepening-Search( problem) returns a solution sequence
\_\_inputs: problem, a problem

__for depth ← 0 to ∞ do
____result ← Depth-Limited-Search( problem, depth)
____if result ̸= cutoff then return result
__end

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

Properties of iterative deepening search?

A

Complete - Yes

Time - O(b^d)

Space - O(bd) - Linear

Optimal - Yes, if step cost = 1

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

Can iterative deepening be used to explore uniform cost tree?

A

Yes if modified

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

What is bidirectional search?

A

Search simultaneously forwards from the start point, and backwards from the goal, and stop when the two searches meet in the middle.

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

What is the problem(s) with bidirectional search?

A
  • generate predecessors
  • many goal states
  • efficient check for node already visited by other half of the search
  • what kind of search
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Properties of bidirectional search

A

Complete - Yes

Time - O(b^(d/2))

Space - O(b^(d/2))

Optimal - Yes if done with correct strategy - e.g. breadth first

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