Abstraction and Automation Flashcards
(26 cards)
What is an algorithm?
A sequence of steps, that can be followed to complete a task, that always terminates
What are some features of a good algorithm?
- Allow for invalid inputs
- Be efficient, involving as few steps as possible
- Be understandable by others
What are the algorithmic constructs?
- Sequence
- Assignment
- Selection
- Iteration
What is a “dry-run”
Testing an algorithm using a trace table
What must we consider when evaluating different algorithms?
Efficiency, how many cases does it work, and error handling
What can make an algorithm preferable?
- More efficient
- More robust and works in more cases
- Better at handling unexpected input
What are some techniques for interpreting algorithms?
- Reading comments that explain how the code works
- Identifiers can indicate a variable’s purpose or subroutine’s function
- “Dry-run” the algorithm to see how variables change
What is computational thinking?
Approach to solving complex problems through the application of abstraction, decomposition, pattern recognition and algorithmic thinking.
What is information hiding?
The process of hiding all details of an object that do not contribute to its essential characteristics
What is abstraction?
Removal of detail to focus on what is necessary to solve the problem
What is pattern recognition?
Solving problems by recognising similarities with previously solved problems and applying a similar solution
What is algorithmic thinking?
Creating a solution to a problem using algorithmic constructs (iteration, sequence, assignment, selection)
What is representational abstraction?
A representation arrived at by removing unnecessary details. eg maps
What is abstraction by generalisation?
Grouping by common characteristics to arrive at a hierarchical relationship of the inheritance type
What is procedural abstraction?
Abstracting away the actual values used in a computation to leave a computational method (procedure)
What’s is functional abstraction?
Abstracting the actual method of computation involved so that the resulting function focuses on the inputs and outputs of the function only.
What is data abstraction?
Isolating how a compound data structure is used from how it is constructed
What is problem abstraction (reduction)?
The removal of detail from a problem until it is represented in a way that is possible to solve because the problem reduces to one that has already been solved
What are the two main approaches to abstraction?
- Representational abstraction
- Abstraction by generalisation
What are the different forms of abstraction?
- Procedural abstraction
- Functional abstraction
- Data abstraction
- Problem abstraction/reduction
What is procedural decomposition?
- Breaking down complex problems into smaller sub-problems
- Each sub-problem accomplishes a specific task that is easier to solve
- These can be further subdivided until a problem is solvable
What is composition/ compositional abstraction?
Form of abstraction which combines procedures to form compound procedures to solve a larger/more complex problem
What is decomposition?
Breaking a problem down into smaller problems, each of which is easier to solve. These are further subdivided until a problem is solvable
What is compound data?
Way of Building data abstraction by combining data objects