Theory of Computation Flashcards

1
Q

Problem solving

A

The process of finding a solution to a difficult or complex issue

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

Algorithms

A
  • A sequence of steps that can be followed to complete a task
  • They always terminate rather than going on forever in a loop
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Assignment

A

The process of giving a value to a variable or constant

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

Sequence

A

Instruction that are executed sequentially

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

Selection

A

The process of choosing an action to take based on the result of a comparison of values

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

Iteration

A

The process of repeating an operation

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

Abstraction

A

The name given to omitting unnecessary details from a problem, simplifying the solution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
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
9
Q

Abstraction by generalisation

A

A grouping by common characteristics to arrive at a hierarchical relationship of the
“is a kind of” type

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

Information hiding

A

The process of hiding all details of an object that do not contribute to its essential characteristics

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

Procedural abstraction

A
  • Breaking down a complex model into a series of reusable procedures
  • The actual values used are abstracted away to achieve a computational method
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Functional abstraction

A

Abstracting the result of procedural abstraction, disregarding the particular method to leave just a function

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

Data abstraction

A

Specifies details of how data is actually represented, allowing for new kinds of data structures to be created

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

Problem abstraction

A

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
15
Q

Decomposition

A

A problem is divided into a series of smaller sub-problems that can be solved individually or further divided

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

Composition

A

Used to combine procedures to form a larger system

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

Automation

A

The process of putting abstractions of real world phenomena into action to solve
problems

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

Set

A

An abstract data type that contains unordered, unique values (that can be other sets)

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

Set comprehension

A

An alternative way of creating a set that selects the kind of values it wants from a larger set, instead of specifying each item individually

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

Empty sets

A

Sets that contain 0 elements. A = {}

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

Finite sets

A

A set with a limited number of elements

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

Infinite sets

A

A set with an unlimited number of elements

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

Countably infinite sets

A

An infinite set where you can list the elements in a sequence

24
Q

Uncountably infinite sets

A

An infinite set where the elements cannot be listed in a sequence

25
Subset
Set A is a subset of Set B if it only contains items from Set B
26
Proper subset
Set A is a proper subset of set B if it only contains items from set B, but not all of them
27
Countable sets
Sets that have the same cardinality as some subset of natural numbers
28
Union
The union of two sets is the set of all elements that are in either set or in both
29
Intersection
The intersection of two sets is the set of elements that are presented in both sets
30
Difference
The difference of two sets is the set of elements that are in the first set but not in the second
31
Regular expressions
Shorthand ways of describing sets
32
*
0 or more repetitions
33
+
1 or more repetitions
34
?
Previous character is optional
35
|
Or
36
()
Used to group regular expressions
37
Context free languages
Sets of strings and symbols that follow the rules of a context-free grammar
38
Context-free grammar
Production rules that describe which strings are and are not possible
39
Backus-Naur form
A context-free language where the left hand side is defined by the right hand side
40
Non-terminals
Text placed inside <>
41
Terminals
- Text without any brackets - Cannot be broken down any further
42
Recursion in Backus-Naur form
A non-terminal can be defined in terms of itself, allowing for recursion to occur
43
Syntax diagrams
- A visual representation of a regular language - Non-terminals are represented by rectangles - Terminals are represented by ellipses - The shapes are joined by arrows which indicate how strings can be formed from the definitions
44
Big O notation
Defines the time complexity of an algorithm
45
Constant time
- O(C) - Time is independent of input
46
Logarithmic time
- O(log2(n)) - Halves the number of items each iteration
47
Linear time
- O(n) - In a worst case scenario must go through each item once
48
Polynomial
- O(n^2) - A loop inside a loop
49
Exponential
- O(n^3) - Intractable
50
Factorial
- O(n!) - Intractable
51
Intractable problems
They are theoretically solvable but cannot be solved within a useful amount of time
52
Tractable problems
A problem can be solved within a useful period of time
53
Turing machines
Formal models of computation that consist of: - a FSM - a read/write head - an infinitely long tape consisting of cells that can be blank or contain a symbol They must have a single start state and a number of halting states
54
Alphabet
- The set of symbols used - It must be finite with a Turing machine
55
Transition functions
- Used to define the rules followed by Turing machines - Have an equivalence with transition rules in a state transition diagram - Written in the form: δ(current state, read) = (new state, write, move)
56
Universal Turing Machines
- Can represent any finite state machine - Read a description of a finite state machine from the same tape as the input data - They read their instructions in sequence before executing operations
57
Importance of Turing machines
- Turing machines provide a definition of what is computable - Turing machines can be used to prove that there are problems which cannot be solved by computers