1/16
Flashcards for CSP Course Algorithms Unit Vocabulary
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
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 at the middle of a sorted set of numbers and removes half of the data; this process repeats until the desired value is found or all elements have been eliminated.
Reasonable Time
Algorithms with a polynomial efficiency or lower (constant, linear, square, cube, etc.) are said to run in a reasonable amount of time.
Unreasonable Time
Algorithms with exponential or factorial efficiencies are examples of algorithms that run in an unreasonable amount of time.
Heuristic
Provides a 'good enough' solution to a problem when an actual solution is impractical or impossible (because it takes too long)
Decision Problem
A problem with a yes/no answer (e.g., is there a path from A to B?)
Optimization Problem
A problem with the goal of finding the 'best' solution among many (e.g., what is the shortest path from A to B?)
Undecidable Problem
A problem for which no algorithm can be constructed that is always capable of providing a correct yes-or-no answer
Syntax Error
Error in the code's structure or grammar that prevents it from being parsed or compiled
Logic Error
Error in the reasoning or implementation of the code that causes it to produce incorrect results, even though it runs without crashing.
Runtime Error
Error that occurs during the execution of a program, often due to unexpected input or conditions, causing the program to crash or behave unpredictably.