9618 · 9.2
Algorithms flashcards
Revision flashcards for Cambridge 9618 Algorithms (syllabus 9.2). Flip, recall, then mark a real past-paper question.
Card
What is an algorithm?
A finite, ordered set of unambiguous, step-by-step instructions designed to solve a specific problem or perform a computation.
Card
What is the 'Finiteness' property of an algorithm?
An algorithm must always terminate after a finite number of steps. It cannot go on forever.
Card
What is the 'Definiteness' property of an algorithm?
Each step of an algorithm must be precisely and unambiguously defined. There should be no uncertainty in any instruction.
Card
What is the 'Input' property of an algorithm?
An algorithm has zero or more quantities that are externally supplied. These are the initial values needed to start the process.
Card
What is the 'Output' property of an algorithm?
An algorithm must produce at least one quantity as a result. This is the solution to the problem.
Card
What is the 'Effectiveness' property of an algorithm?
Every instruction must be basic enough to be carried out, in principle, by a person using only pencil and paper. It must be feasible.
Card
What is pseudocode?
A high-level, informal description of the operating principle of a computer program or other algorithm. It uses natural language with programming-like structures but is not tied to a specific language's syntax.
Card
What is a flowchart?
A graphical representation of an algorithm, using standard symbols connected by arrows to show the sequence of operations and flow of control.
Card
What is decomposition in algorithm design?
The process of breaking down a complex problem into smaller, more manageable, and self-contained sub-problems. This simplifies the design process.
Card
Algorithm Trap: Forgetting edge cases
A common mistake is designing an algorithm that only works for typical data. Always consider edge cases like empty inputs, zero, negative numbers, or the first/last item in a list.
Card
What is the difference between an algorithm and a program?
An algorithm is the logical concept or plan. A program is the concrete implementation of that algorithm in a specific programming language.