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
Q

Subset

A

Set A is a subset of Set B if it only contains items from Set B

26
Q

Proper subset

A

Set A is a proper subset of set B if it only contains items
from set B, but not all of them

27
Q

Countable sets

A

Sets that have the same cardinality as some subset of natural numbers

28
Q

Union

A

The union of two sets is the set of all elements that are in either set or in both

29
Q

Intersection

A

The intersection of two sets is the set of elements that are presented in both sets

30
Q

Difference

A

The difference of two sets is the set of elements that are in the first set but not in the second

31
Q

Regular expressions

A

Shorthand ways of describing sets

32
Q

*

A

0 or more repetitions

33
Q

+

A

1 or more repetitions

34
Q

?

A

Previous character is optional

36
Q

()

A

Used to group regular expressions

37
Q

Context free languages

A

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

38
Q

Context-free grammar

A

Production rules that describe which strings are and are not possible

39
Q

Backus-Naur form

A

A context-free language where the left hand side is defined by the right hand side

40
Q

Non-terminals

A

Text placed inside <>

41
Q

Terminals

A
  • Text without any brackets
  • Cannot be broken down any further
42
Q

Recursion in Backus-Naur form

A

A non-terminal can be defined in terms of itself, allowing for recursion to occur

43
Q

Syntax diagrams

A
  • 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
Q

Big O notation

A

Defines the time complexity of an algorithm

45
Q

Constant time

A
  • O(C)
  • Time is independent of input
46
Q

Logarithmic time

A
  • O(log2(n))
  • Halves the number
    of items each
    iteration
47
Q

Linear time

A
  • O(n)
  • In a worst case
    scenario must go
    through each item
    once
48
Q

Polynomial

A
  • O(n^2)
  • A loop inside a loop
49
Q

Exponential

A
  • O(n^3)
  • Intractable
50
Q

Factorial

A
  • O(n!)
  • Intractable
51
Q

Intractable problems

A

They are theoretically solvable but cannot be solved within a useful amount of time

52
Q

Tractable problems

A

A problem can be solved within a useful period of time

53
Q

Turing machines

A

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
Q

Alphabet

A
  • The set of symbols used
  • It must be finite with a Turing machine
55
Q

Transition functions

A
  • 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
Q

Universal Turing Machines

A
  • 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
Q

Importance of Turing machines

A
  • 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