4.4 Theory of computation Flashcards

(41 cards)

1
Q

What is a finite state machine

A

model which represents states and arrows with conditions showing how to navigate the states

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

notation for finite state machines

A

arrow pointing at S0 to show start state
double circle indicates a valid stop state

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

What is a set

A

an abstract data type containing unordered unique values

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

What is notation for a set

A

F : {1,2,3,4,5}

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

How to express sets in set comprehension e.g set of all positive integers not including zero

A

e.g F = {x | x ∈ N ^ x ≥ 1}
where F is the name of the set

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

What are empty sets and how are they notated

A

they contain 0 elements notated by {} or ø

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

how to represent strings in set {01,0011,000111 … } in compact set notation

A

{0^n 1^n | n ≥ 1}

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

What is a finite set

A

they contain a finite number of items

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

What is the cardinality of a finite set

A

refers to the number of elements in the set

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

What is an infinite set

A

infinite sets contain an infinite number of items

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

What is a countably infinite set

A

the items in a countably infinite set can be counted off by the natural numbers

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

What is a non-countable set

A

contain a larger infinity of numbers that can not be paired with natural numbers - this includes the set of real numbers

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

What is the cartesian product of sets

A

set of pairs from each set such as {(a1,b1),(a2,b2)}

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

What is a subset and its notation

A

set A is a subset of set B if it only contains items from set B - A ⊆ B

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

What is a proper subset and the notation

A

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

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

What is membership of an element in a set

A

if an item is in a set then this symbol ∈ denotes it or is the item is not in the set then this symbol ∉ denotes it

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

What is the union of two sets and the symbol

A

a new set created with the elements in both sets combined - duplicate elements only appear once - symbol is ∪

18
Q

What is the intersection of two sets and the symbol

A

a new set created from the elements that appear in both sets - symbol is ∩

19
Q

What is the difference of two sets and the symbol and example:
A : {1,2,3,4,5}
B : {2,4,6,8,10}
so what is A\B

A

a new set created by items that are exclusive to one set - symbol is \ or -
example - A\B = {1,3,5}

20
Q

What is the relationship between regular expressions and FSMs

A

equivalent ways of defining regular languages

21
Q

How can algorithms be compared

A

by expressing their complexity as a function relative to the size of the problem - size of the problem is the key issue

22
Q

What are the two ways an algorithm can be complex

A

time-wise and space-wise

23
Q

What does efficiently implementing automated abstractions mean

A

designing data models and algorithms to run quickly taking up minimal resources like memory

24
Q

what is automation

A

requires putting models (abstraction of real world objects) into action to solve problems - achieved by creating algorithms, implementing algorithms in program code, implementing the models in data structures, executing the code

25
what does n! represent
the product of all positive integers less than or equal to n - number of permutations of n distinct objects
26
What is big O notation
it describes the time complexity of an algorithms - it always assumes worst case scenario
27
what is the least to most complex time complexities
constant - O(1), logarithmic - O(log2n), linear - O(n), O(nlogn), polynomial - O(n^2), O(n^3), exponential - O(2^n), factorial - O(n!)
28
what is a tractable problem
a problem that can be solved in a useful period of time - polynomial or less time solution
29
what is an intractable problem
problems that are theoretically solvable but are classified as insoluble due to limits of computations such as speed of today's technology - cannot be solved within a useful period of time
30
what is a heuristic method
for intractable solutions they are approximate solutions to a problem which are not optimal but still more useful than their intractable equivalent
31
what imposes limits to what can be computed
algorithmic complexity and hardware
32
what is the halting problem
unsolvable problem of determining whether any program will eventually stop if given a particular input
33
why is the halting problem significant
it demonstrates that there are some problems that can not be solved by a computer
34
what is a turing machine
a computer with a single fixed program expressed using a finite set of states in a state transition diagram, a finite alphabet of symbols, an infinite tape with marked off squares and a sensing read/write head that can travel along the table one square at a time
35
what is the start state and halting state
start state is the state the Turing machine starts on and halting state is the states that have no outgoing transitions
36
what is the format of a transition function
δ(current state, read) = (new state, write, move)
37
what does □ represent in a tape cell
an empty cell
38
compare finite state machines to turing machines
turing machines are more powerful than finite state machines because they can utilise a greater range of languages than finite state machines and their tape is infinitely long in one direction
39
what three values need to be specified on arrows on a turing machine
current value, new value, direction to move
40
What is a universal turing machine
they are capable of representing any finite state machine - description of finite state machine is to be read off of the same tape as the input data
41
what is the importance of turing machines
turing machines provide a general model of computation and provide a definition of what is computable