Paper 1 Flashcards
[PPQ] What is representational abstraction?
Removing unnecessary details until the problem is represented in a way that is possible to solve
[PPQ] What is abstraction by generalisation?
Grouping by common characteristics
For which type of graph would the bottom half of the matrix also need to be used?
Directed graph
What is a Turing machine?
A machine that reads a tape one square at a time. The tape encodes a problem that must be solved
Describe the basic operation of a Turing machine
The tape is divided into a number of cells, and is used as memory
Each cell contains a symbol (blank is denoted by a square)
Acceptable symbols are known as the alphabet
The read-write head can read the cell, write to it, or erase it
The machine enters the halting state when the entire input has been processed
How do you draw a Turing machine diagram?
Like an FSM but A,B,C on the arrows
A = current state
B = write
C = direction
So 0,1,R means if 0 is read, write 1 and move to the right
This can also be written as a table (current state, read symbol, write symbol, move, next state)
What is a transition function?
Another way of expressing state transitions
δ(current state, input symbol) = (next state, output symbol, movement)
What is a universal Turing machine?
A machine that reads the description M of a Turing machine and executes the same instructions that Turing machine would. M is written at the beginning of the tape, followed by D. Anything a Turing machine can compute, a real computer can compute, so it provides a definition of what is computable
What is decomposition?
Breaking a problem into a number of sub-problems
What is automation?
Models are put into action to solve problems
What is composition?
Combining procedures into compound procedures
Syntax for creating a new class in Python
class Tile: def \_\_init\_\_(self, status, position): ## insert code here. This is called whenever a new Tile is created
def statusSwitch(self, newStatus): ## insert code here
Tile(0, 0) ## Creates a new file
Advantage of using constants
Makes program clearer and easier to understand
What is the definition of “algorithm”?
A sequence of steps that can be followed to
complete a task and that always terminates.
What is a tractable problem?
A problem solvable by a polynomial-time algorithm. Untractable problems can be solved, but take an unreasonable amount of time. Problems cannot change from being tractable to untractable