7. Algorithms Flashcards
A(n) ____ is a sequence of steps that solves a problem, generating correct output for any valid input values.
algorithm
A(n) ____ problem specifies an input, a question about the input that can be answered using a computer, and the desired output.
computational
An efficient algorithm is one whose runtime increases no more than ____ with respect to the input size.
polynomially
____ problems are a set of problems for which no known efficient algorithm exists.
NP-complete
One of the three characteristics of an NP-complete problem is that no ____ algorithm has been found to solve an NP-complete problem.
efficient
One of the three characteristics of an NP-complete problem is that no one has proven that an efficient algorithm to solve an NP-complete problem is ____.
impossible
One of the three characteristics of an NP-complete problem is that if an efficient algorithm exists for one NP-complete problem, then ____ NP-complete problems can be solved efficiently.
all
____ is the amount of resources used by an algorithm.
Computational complexity
An algorithm’s computational complexity includes ____ and ____.
runtime, memory usage
An algorithm’s ____ is the scenario where the algorithm does the minimum possible number of operations. An algorithm’s ____ is the scenario where the algorithm does the maximum possible number of operations.
best case, worst case
Complexity analysis always treats the input data size as a(n) ____.
variable
An algorithm’s ____ complexity is a function, S(N), that represents the number of fixed-size memory units used by the algorithm for an input of size N.
space
An algorithm’s ____ space complexity is the space complexity not including the input data.
auxiliary
____ is a search algorithm that starts from the beginning of a list, and checks each element until the search key is found or the end of the list is reached.
Linear search
An algorithm’s ____ is the time the algorithm takes to execute.
runtime