Unit 6: Algorithms Flashcards
problem
a general description of a task that can or cannot be solved with an algorithm
algorithm
a finite set of instructions that accomplish a task
sequencing
putting steps in an order
selection
deciding which steps to do next
iteration
doing some steps over and over
efficiency
a measure of how many steps are needed to complete an algorithm
linear search
a search algorithm which checks each element of a list, in order, until the desired value is found or all elements in the list have been checked
binary search
a search algorithm that starts in the middle of a sorted set of numbers and removes half the data; repeats until the desired value is found or all elements have been checked
reasonable time
algorithms with a polynomial efficiency or lower- constant, linear, square, cube, etc)
unreasonable time
algorithms with exponential or factorial efficiencies
heuristic
provides a “good enough” solution to problem for which actual solution is impractical or impossible
decision problem
a binary problem with a yes or no answer
optimization problem
a problem with the goal of finding the “best” solution among many
undecidable problem
a problem for which no algorithm can be constructed that is always capable of providing a correct yes or no answer
sequential computing
a model in which programs run in order, one cmd at a time