A model of computation Flashcards

1
Q

Pseudocode

A

a way of describing instructions that is independent of any programming language. It allows different programmers who may not all understand the same languages, to be able to communicate algorithms to one another.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Abstraction

A

is the process of omitting unnecessary details from a problem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Representational Abstraction

A

A representation of a problem arrived at by removing unnecessary details from the problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Abstraction by Generalisation/Categorisation

A

A grouping by common characteristics to arrive at a hierarchal relationship of the ‘is a kind of’ type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Information Hiding

A

defined as the process of hiding all details of an object that do not contribute to its essential characteristics e.g. seeing what cars can fit into a ferry, colour is irrelevant

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Procedural Abstraction

A

involves breaking down a complex model into a series of reusable procedures e.g. for example, to calculate the area of a rectangle you could Calculate Area = width * height

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Functional Abstraction

A

disregards the particular method of a procedure and results in just a function

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Data Abstraction

A

where specific details of how data is represented is abstracted away, allowing new kinds of data structures to be created from previously defined data structures - this forms the basic types of abstract data types

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Decomposition

A

breaking a problem down into a series of smaller subproblems, these can be solved individually or broken down further and solved until all parts of the original problems have been solved. – top down approach

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Composition

A

also known as bottom-up programming

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Automation

A

is the process of putting abstractions of real world phenomena (which are referred to as models) into action to solve problem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Problem Abstraction(sometimes known as reduction)

A

where details are removed from a problem until it is represented in a way that is solvable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Finite State Machines (double circle)

A

Indicates a circle is a valid stop state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Finite State Machines (circle)

A

Represents a state

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Finite State Machines (arrow)

A

indicates how to move between states, if it loops back it means the state does not change with the input

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Finite State Machines (Inputs/outputs)

A

Often labelled on the arrows, separated by a pipe, left is input and right is output

e.g.
1|a

17
Q

Regular Expressions

A

shorthand way of describing sets

18
Q

List all Metacharacters (5 need to know)

A

-* is 0 or more repetitions
+ is 1 or more repetitions
? previous character optional
() used to group regular expressions

  • | is Alternative/Or
19
Q

Context Free Languages

A

is a set of strings and symbols that follow the rules of a context-free grammar

20
Q

Context free grammars

A

describe which strings are and are not possible in a language by laying out production rules

21
Q

A production rule

A

is as simple as replacing one character for another E.G., dictionary based compression

22
Q

Backus Naur Form

A

a way of notating context free languages, it uses statements in which the left hand side is defined by the right

23
Q

non-terminal

A

Text which is placed inside of angle brackets represents a <non-terminal> , it can be broken down into further non-terminals, terminals or a combination</non-terminal>

24
Q

terminal (BNF)

A

BNF Text without brackets is called a terminal they cannot be broken down any further and must be taken as the written value

25
Q

Backus Naur Form (example)

A

<address> ::= <Number><Street>
<Number> ::= 1 | 2 | 3 | 4 | 5
- Number is a non-terminal, which is defined from 5 terminals from 1 to 5. The pipe represents the OR operator
</Number></Street></Number></address>

26
Q

Backus Naur and Recursion

A

Backus Naur can use recursion to form more complex definitions, a non terminal can be defined in terms of itself, allowing iteration

27
Q

Why can regular expressions not represent Backus Naur?

A

they cannot support recursion

28
Q

Syntax Diagrams

A

A visual representation of a regular language, they use rectangles to represent non terminals and ellipses to represent terminals

29
Q

What do Turing Machines consist of

A
  • A finite state machine
  • A set of transition rules
  • A (sensing) read/write head
  • Start state
  • (Set of) accepting/halting states
  • A tape that is infinitely long in one direction
  • Stat register/current state
  • The finite alphabet of symbols that it can use
30
Q

Turing Machines: Operation

A
  1. The tape ^ is divided into cells, each of which can be left blank or constrain a symbol.
  2. Symbols are written to and removed from cells on the tape by the Turing machine’s read/write head.
  3. The set of symbols a turing machine uses is called its alphabet and must be finite
  • A Turing Machine can be viewed as a computer which runs a single programme, as defined by a FSM
  • The FSM will have a start state and may have a number of states from which there are no transitions, referred to as halting states
31
Q

Turing Machines or FSM?

A

As a model of computation, Turing machines are more powerful than FSMs because they can utilise a greater range of languages and their tape is infinitely long in one direction

32
Q

transition functions

A

The rules a Turing machine follows can be laid out using transition functions

E.G. (Current state, read) = (New state, write, move(left or right))

33
Q

Universal Turing Machine

A

Universal Turing Machines are capable of representing any finite state machine.

34
Q

Universal Turing Machine: Operations

A

A description of the finite state machine to be used is read off of the same tape as the input data and is then used to process.
Act as interpreters because of the way they read their instructions in a sequence before executing operations on their input data

35
Q

standard description (UTM)

A

describes the standard Turing Machine

36
Q

data (UTM)

A

is the data that the operations will be executed upon by the UTM exactly as M would have intended

37
Q

why is a Universal Turing Machine Important?

A

A UTM is important because anything which a Turing Machine can compute, a real world computer can also compute, providing us with a definition of what is computable, and what cannot be solved by computers