4.4 Theory of computation Flashcards
(41 cards)
What is a finite state machine
model which represents states and arrows with conditions showing how to navigate the states
notation for finite state machines
arrow pointing at S0 to show start state
double circle indicates a valid stop state
What is a set
an abstract data type containing unordered unique values
What is notation for a set
F : {1,2,3,4,5}
How to express sets in set comprehension e.g set of all positive integers not including zero
e.g F = {x | x ∈ N ^ x ≥ 1}
where F is the name of the set
What are empty sets and how are they notated
they contain 0 elements notated by {} or ø
how to represent strings in set {01,0011,000111 … } in compact set notation
{0^n 1^n | n ≥ 1}
What is a finite set
they contain a finite number of items
What is the cardinality of a finite set
refers to the number of elements in the set
What is an infinite set
infinite sets contain an infinite number of items
What is a countably infinite set
the items in a countably infinite set can be counted off by the natural numbers
What is a non-countable set
contain a larger infinity of numbers that can not be paired with natural numbers - this includes the set of real numbers
What is the cartesian product of sets
set of pairs from each set such as {(a1,b1),(a2,b2)}
What is a subset and its notation
set A is a subset of set B if it only contains items from set B - A ⊆ B
What is a proper subset and the notation
set A is a proper subset of set B if it only contains items from set B but not all of them - A ⊂ B
What is membership of an element in a set
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
What is the union of two sets and the symbol
a new set created with the elements in both sets combined - duplicate elements only appear once - symbol is ∪
What is the intersection of two sets and the symbol
a new set created from the elements that appear in both sets - symbol is ∩
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 new set created by items that are exclusive to one set - symbol is \ or -
example - A\B = {1,3,5}
What is the relationship between regular expressions and FSMs
equivalent ways of defining regular languages
How can algorithms be compared
by expressing their complexity as a function relative to the size of the problem - size of the problem is the key issue
What are the two ways an algorithm can be complex
time-wise and space-wise
What does efficiently implementing automated abstractions mean
designing data models and algorithms to run quickly taking up minimal resources like memory
what is automation
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