Greedy Algorithms Flashcards

1
Q

Np-complete

A

Problems without a fast algorithmic solution

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

Approximation algorithms

A

Find approximate solutions to np-complete problems quickly
Judged by their speed and accuracy to the optimal solution

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

Greedy strategy

A

At each step you pick the locally optimal solution.
These algorithms are simple to write but normally get pretty close.

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

Set union

A

Combine all elements of two sets

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

Set intersection

A

Take the common elements of two sets

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

Set difference

A

Take the non-shared elements of two sets

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

6 signs a problem might be np-complete

A

The algorithm is fast with a few items but quickly slows down

“All combinations of x”

“Every possible version of X” and can’t be broken into smaller sub problems

Difficult to solve problems with a sequence ie a sequence of irises

Hard to solve problems with a set

Can the problem be restated as a set covering problem or the traveling sales person problem?

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