04 Theory of Computation Flashcards
Define algorithm.
A series of steps which can be followed to carry out a task and always terminates.
Define representational abstraction.
Removing unnecessary detail to produce a simpler representation of the problem e.g. the London tube map - specific details about the lines are removed
Define abstraction by generalisation.
Grouping objects in terms of shared characteristics to arrive at a hierarchical relationship of the ‘is a kind of’ type.
e.g. A Pomeranian is a breed of dogs; all dogs share the same characteristics of eyes, ears, 4 legs and a tail; cats also shared those characteristics; both dogs and cats fall under group of Carnivora which also include badgers, skunks and bears
What is procedural abstraction?
Procedural abstraction represents a computational method by abstracting away the actual values used in any particular computation with general parameters to a procedure/function
What is functional abstraction?
Where the implementation of the computational method is hidden like a black box which takes in set of inputs and produces an output
e.g. Python has built-in functions such as the math library which provides the value of pi or process to calculate the square root of a value
Outline data abstraction.
Data abstraction is a technique that allows you to separate the way that a compound data object is used, from the details of how it is constructed.
e.g. The abstract concept of a stack, and its operations, can be understood without any consideration of how it is implemented
What is problem abstraction/reduction?
Problem reduction is the process of generalising or reducing a problem to one that has already been solved
Define decomposition.
Procedural decomposition means breaking a problem into a number of sub-problems, so that each sub-problem accomplishes an identifiable task, which might itself be further subdivided.
Outline automation.
Putting models (abstraction of real world objects/phenomena) into action to solve problems. This is achieved by:
- creating algorithms
- implementing the algorithms in program code (instructions)
- implementing the models in data structures
executing the code.
Outline what FSMs are.
Finite State Machine
An abstract representation of how something changes state in response to an event or condition
Define a set.
A set is a well-defined collection of objects.
Objects of sets are members or elements
Sets can be unordered
Each member in a set can only occur once.
Set = upper case, member = lower case
What are finite and infinite sets?
Finite set consists of a distinct number of members where number is a subset of N
Infinite set contains an endless number of distinct members
Define a countably infinite set.
A set where its members can be counted using the infinite set of N
How do you find the cardinality of a set?
The cardinality of a set is the number of members of the set
The cardinality of set A would be denoted as |A|
How do you find the Cartesian product of a set?
The cardinality of sets A and B is the set of all ordered pairs (a, b) such that a ∈ A and b ∈ B and this is denoted as A X B.