COMP3721 Question Bank #1
Sets, Relations, and Functions
Determine whether each of the following is true or false.
e) cfw_a, b cfw_a, b, c, cfw_a, b
f) cfw_a, b cfw_a, b, cfw_a, b
g) cfw_a, b 2cfw_a,b,cfw_a,b
h) cfw_a, b
COMP 3721: Theory of Computation
Prove that the set cfw_A | A N , A is nite is countable.
Write regular expressions representing the following languages ( = cfw_a, b):
a) All strings in with an odd number of as.
b) All s
Lecture 6: DFA = NFA = regular expressions
Let L . Then the following three statements are equivalent.
1. L is accepted by some DFA.
2. L is accepted by some NFA.
3. L can be represented by a regular expression
Proof: We will prove the following: i) 1 2,
Lecture 8: Proving that a language is not regular
Example: L = cfw_0n1n|n 0 is not a regular language.
Intuitively, this language L is not regular because any
machine that can recognize L must remember how many
0s have been seen so far (i.e. unlimited nu
Lecture 4: Finite Automata
A nite automaton is a machine (controller) with only
a nite number of states.
It is the simplest and most restricted model of computers.
Such a controller is used in many electromechanical devices, e.g., automatic door, lift, ve
Lecture 5: Nondeterministic Finite Automata
In a DFA,
each symbol read causes a transition to the next
state, which is completely determined by the current state and current symbol (i.e., there is exactly one next state).
In an NFA,
some state may hav
Lecture 7: Properties of regular languages
Theorem 1 The set of regular languages are closed
1. Concatenation (L1 and L2 regular, then so is L1L2),
2. Union (L1 and L2 regular, then so is L1L2),
3. Kleene star (L regular, then so is L),
COMP 3721 Question Bank #4
1. Aliens from another world come to Earth and tell us that the 3-SAT problem is
solvable in O (n8 ) time.
Which of the following statements follow as a consequence? (List all that are true.)
(i) All NP-complet
Lecture 2: Languages and Regular Expressions
Alphabet a nite set of symbols, .
word (or string) a nite sequence of symbols from
cfw_a, b, . . . , z man, abc, . . .
000, 010101, . . .
cfw_#, $, a, b, c
Lecture 1: Sets, Relations, and Functions (a
A set is a collection of objects.
Example: L = cfw_a, b, c, d is a set of four elements.
An element of a set can also be a set.
Ignore repetitions of elements in a set; ignore the
order of eleme
COMP3721 Question Bank #3
Let M be the Turing machine (K, , , s, cfw_h), where
K = cfw_q0 , q1 , q2 , h,
= cfw_a, , ,
s = q0 ,
and is given by the following table.
Let n 0. Describe carefully what M does when started in the con
COMP3721 Question Bank #2
Pumping Theorem for Regular Languages
Are the following languages over alphabet = cfw_a, b regular? Prove your answers.
a) cfw_ai ba2i : i 1
b) cfw_(bab) (babbab) : i 1
c) cfw_ai bj : i < j , i, j 1
d) cfw_ai bj :
Lecture 3: Countability and Uncountability
How do we measure the sizes of innite sets?
How can we compare their relative sizes?
The number of elements in a set A is called its cardinality, denoted |A|.
If A is a nite set, then |A| is a natural number.