Theory of Computation Flashcards
Computational Thinking (definition)
Stating a problem in a way that can be solved using algorithms, and then constructing an algorithm to solve the problem in the most effective way
Other name for computing
Automation of abstractions
Representational abstraction (definition)
Removing excess details to represent a problem by only its key features
Data abstraction (definition + example)
Hiding details about how data is being stored
e.g. programmers can use data structures without knowing how they are implemented
Abstraction by generalisation (definition)
Grouping similarities in a problem to categorise it by a type, to then use a common solution
Layers of abstraction (explanation + example)
Highest levels are closest to the user e.g. interface
Lowest levels are closest to reality e.g. interacting with machine components
Procedural abstraction (definition + example)
Abstracting the values used in a computation (set of operations) to create a procedure e.g. using a subroutine without understanding the internal process of it
Functional abstraction (definition)
Abstracting the computation method (operations) so that only the inputs and outputs are considered, creating a function
Problem reduction/abstraction (definition)
Removing details from a problem until it can be represented in a way that is possible to solve, because it has been reduced to one that has already been solved
Why is procedural abstraction needed? (explanation + examples)
Allows non-experts to hide information that is too complex or irrelevant for the systems purpose
e.g. 1: High level languages abstract machine code, making them easier to learn
e.g. 2: TCP/IP separates application, transport, internet and link so that each layer acts independently from the others
Advantage and disadvantage of abstraction
+ allows models and predictions to be made
- too much abstraction will make a model untrue of real life
The simplest abstraction of a computer
program
\/
Input > process > output
\/
storage
Algorithm (definition)
Set of step-by-step instructions to solve a problem
Why is abstraction needed? (explanation + example)
Removing unnecessary details and highlighting the most important ones improves clarity and makes the representation more useful for a function
e.g. flowchart is an abstraction of code
Graph data structure (explanation)
Abstraction to the point where only the necessary data elements and relationships between them are shown (the nodes and connections)