Search Algorithms Flashcards

(11 cards)

1
Q

What does Exhaustive Search do?

A

Systematically tries all possible candidates for an assignment, pruning branches based on conflicts

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

What are the pros and cons of the Exhaustive Search algorithm?

A

Easy to implement and guarantees a solution, but can be extremely slow

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

What does Branch and Bound do?

A

Systematically tries all possible candidates for an assignment, pruning branches based on conflicts AND if that branch won’t lead to a better solution

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

What are the improvements of Branch and Bound over Exhaustive Search?

A

More efficient, explores many possibilities while avoiding ones that are clearly unhelpful

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

Given an nxn array of integers, how can you find the widest possible bounds?

A

Min = Sum of minimum integer in each row
Max = Sum of maximum integer in each row

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

Given an nxn array of integers, how can you find a tighter bound than the widest?

A

Min = Sum of minimum integer in each row
Max = Sum of pos or neg diagonal

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

In a Branch and Bound algorithm implementation, what should you do with bound periodically?

A

Update it if a higher (or lower) bound is found during processing

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

What does Best First Branch and Bound do?

A

The same as Branch and Bound, except it favors the best possible assignment option first

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

In the case of find a worker assignment with the best happiness

What is the bookkeeping for Exhaustive Search?

A

int a[n]
int H[n][n]
Total: O(n) O(n^2)

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

In the case of find a worker assignment with the best happiness

What is the bookkeeping for Branch and Bound?

A

int a[n]
int H[n][n]
int max[n]
Preprocessing to build max: n^2
Increase/decrease sum, Update bound: 1
Total: Exhaustive + O(n) O(n^2) O(1)

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

In the case of find a worker assignment with the best happiness

What is the bookkeeping for Best First Branch and Bound?

A

int a[n]
int H[n][n]
int max[n]
int O[n][n]
Preprocessing to build O: n^2 * n
Total: Branch and Bound + O(n^2) O(n^3)

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