Search (Midterm) Flashcards

1
Q

State the main elements that characterize a search algorithm

A

Definition of a search problem

  1. State space
  2. Initial states
  3. Sets of actions
  4. Goal state
  5. path cost

or

1) State
2) Successor function
3) Goal state
4) solution
5) heuristic if there is one

Main properties of search

1) time complexity
2) space complexity
3) completeness
4) Optimality

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

Explain what the frontier is in a graph-search problem. and what it is used for.

A

Frontier is some data structure used in search which maintains paths from the start node that have been explored.

As search proceeds, the frontier expands into unexplored nodes until a goal node is encountered.

The way in which the frontier is expanded defines the search strategy.

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

Where b is the maximum branching factor and d is the maximum depth of the search, characterize the maximum size of a DFS frontier.

A

The maximum size of a DFS frontier is when it is at its worst case, the size is b*d.

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

Is the worst-case time complexity difference for DFS and BFS? Why or why not

A

Yes they are different, BFS has worst time complexity of b^m, and DFS has b*d.

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

Give the definition of an admissible heuristic

A

A search heuristic is admissible if it never overestimates the actual cost of the cheapest path from a node to a goal

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

In what sense is BFS better than DFS? In what sense is DFS better than BFS?

A

BFS is better if:

  1. When space is not a problem
  2. It is necessary to find solution with fewest arcs
  3. There are cycles
  4. We care about optimality

DFS is better if:

  1. Space is limited
  2. All solutions tend to be located deep in the tree
  3. The branching factor is very large
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

In what sense is branch and bound better than A? In what sense is A better than branch and bound?

A

Branch and bound has better space complexity: O(bm) vs. O(b^m)
Uses less memory
Time complexity is the same: O(b^m)
A: complete, optimal (if heuristic is admissible)
Branch and bound: complete (only if UB is initialized to finite value) and optimal (if heuristic is admissible)
A
expands the minimal number of nodes→ more efficient (optimal efficiency)

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

Is the sum of two admissible heuristics also admissible?

A

No, not necessarily, the sum of 2 heuristics can be larger than the cost of the actual path

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

Is the max of two admissible heuristics also admissible?

A

Yes, because if a heuristic is admissible an underestimate still remains an underestimate even if a better heuristic exists

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

Is the min of two admissible heuristics also admissible?

A

Yes, because if a heuristic is admissible an underestimate still remains an underestimate especially for the min of two heuristics.

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

Explain the distinction between optimality and optimal efficiency of search algorithm

A

An algorithm is optimally efficient if there is no algorithm that finds an optimal solution better (less number of nodes expanded for example) that it does. Algorithms is optimal if the solution found is the best one.

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

Assume you run uniformed iterative deepening to find solution no more than k steps from the start node (k>2). In worst case, how many times the nodes two steps from the start node will be generated? Why?

A

k-2 times

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

Assume uniformed iterative deepening is running. If the algorithm has reached the stage in which DFS is running with bound depth 6: must it be true that the start state is not the goal? Why? must it be true that there are no solution at level 3? Why?

A

Yes because iterative deepening runs DFS with a set bound if IDS has already reached bound depth 6 which means in the previous depth IDS was not able to find the goal node. If the start state is the solution or solution at are located at depth 3, IDS would already found it.

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