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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly