(P1) Theory Of Computation Flashcards
What is an algorithm?
A sequence of steps that can be followed to complete a task. It always terminates rather than forever going on a loop.
What is an advantage of pseudocode?
Allows different programmers who may not understand the same language to be able to communicate algorithms to each other.
What is assignment in pseudocode?
Process of giving a value to a variable or constant.
How do you write assignments in pseudocode?
Arrow pointing towards the variable or constant with the value fivwn on the other side.
What is selection?
The process of choosing an action to take based on the result of a comparison of values.
What statements are used in selection for pseudocode?
IF, ELSE, IF ELSE and END IF
What is iteration?
The process of repeating an operation.
What structures are used for iteration?
FOR and WHILE loops
What is abstraction, and why is it used?
Abstraction is the process of omitting unnecessary details from a problem. Used to simplify problems to make finding a solution easier.
What are the two distinct forms of abstraction?
Representational and categorisation
What is representational abstraction?
A representation of a problem arrived at by removing unnecessary details from the problem.
What is categorisation abstraction?
A grouping by common characteristics to arrive at a hierarchical relationship of the “is a kind of” type.
What is information hiding?
The process of hiding all details of an object that do not contribute to its essential characteristics.
What is procedural abstraction?
Process of breaking down a complex model into a series of reusable procedures.
What is functional abstraction?
Simplifying a problem by breaking it down into a series of reusable functions that disregard the particular computational method. Results in just a function.
What is data abstraction?
Specific details of how data is actually represented are abstracted away, allowing new kinds of data structures to be created from previously defined data structures.
Data abstraction foems the basis of abstraction data types.
What is another name for problem abstraction?
Reduction
What is problem abstraction?
Details are removed froma problem until it is represented in a way that is solvable.
This works because a simplified problem os often similar to a problem that has already been solved, meaning a solution to the problem can be found.
What is decomposition?
Process of dividing a problem into a series of smaller sub-problems. These smaller problems can be solved individually or further divided until all parts of the problem have been solved.
What is composition?
Process of combining procedures to form a larger system.
Composition is used in all abstraction data types where a complex abstraction data type is formed for smaller and simpler data types.
What is automation?
Process of putting abstractions of real world phenomena (models) into action to solve problems.
How is automation achieved?
Automation is achieved by creating algorithms which are later implemented in code, implementing models in data structures and finally executing the code on the data structure.
What is an accepting state?
An optional state of a FSM that indicates whether or not an input has been accepted by the FSM.
What is the Finite State Machine?
A model of computation for a machine that is always in one of a fixed number of states.
What is a Mealy Machine?
A finite state that determines its outputs from the present state and from the inputs.
What is a state transition diagram?
A visual representation of a FSM that uses circles to represent states and arrows to indicate transitions between states.
What is a state transition table?
A tabular representation of a FSM that contains the current state, inputs and their consequent successor state.
What is a set?
An abstracted data type which contains unorderes unique values. Sets can contain other sets.
What is set comprehension?
The creation os a set by mathematical defining the elements that qualify to be in the set, rather than listing out all its elements.
In set comprehension what does the ‘pipe’ (|) mean?
Such that
In set comprehension, what does the E mean?
Is a member of
In set comprehension, what type of brackers should be used?
{ }