Computational Complexity Flashcards
1
Q
What is an algorithm? (2)
A
Process for computing a function that is:
• Guaranteed to terminate
• For all finite inputs
2
Q
What is a heuristic? (2)
A
Process for computing a function that is:
• Not guaranteed to terminate
• For all finite or infinite inputs
3
Q
Why is the idea of a heuristic important?
A
- For an infinite list there is no algorithm that can, for example, sort the list
- A heuristic, however, provides a decent guess as to a solution for performing a function like finding the median