Greedy Algorithms Flashcards
Np-complete
Problems without a fast algorithmic solution
Approximation algorithms
Find approximate solutions to np-complete problems quickly
Judged by their speed and accuracy to the optimal solution
Greedy strategy
At each step you pick the locally optimal solution.
These algorithms are simple to write but normally get pretty close.
Set union
Combine all elements of two sets
Set intersection
Take the common elements of two sets
Set difference
Take the non-shared elements of two sets
6 signs a problem might be np-complete
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?