You are on page 1of 3

CSI 3104 Introduction to Formal Languages Winter

2021
Assignment 3

1. Describe in words or give a regular expression for the language accepted by the
transition graph TG (i) pictured on the last page of this assignment.

2. Let ∑ = {a, b } . Consider the language L over ∑ that contains empty string and all
words whose length is divisible by 6. Build a transition graph that accepts L.

3. Let L be any language. We define L’ = {reverse(x)|x in L}. (For example, if


L = {b, baa, aaabb, aabba}, then L’ = {b, aab, bbaaa, abbaa}.

(a) Prove that for any language L, if there is an FA that accepts L, then there is a
TG that accepts L’.
(b) Prove that for any language L, if there is a TG that accepts L, then there is a TG
that accepts L’.

4. Using the bypass algorithm in the proof of Kleene’s Theorem (Theorem 6 in the
textbook), Lemma 2, convert TG (ii) pictured on the last page of this assignment into
a regular expression.

5. Consider FA (iii) and FA (iv) on the last page of this assignment. Let L3 be the
language accepted by FA (iii), and let L4 be the language accepted by FA (iv).

(a) Using the algorithm of Kleene’s theorem, Lemma 3, Rule 2, construct an FA for
the union language L3 + L4.
(b) Give an example of a word in the language L3+L4 that is also in both languages
L3 and L4.
(c) Give a word in the language L3 + L4 that is also in L3, but not in L4.
(d) Give a word in the language L3 + L4 that is also in L4, but not in L3.

1
6. Let L4 be the language accepted by FA (iv) on the last page of this assignment.

(a) Using the algorithm of Kleene’s theorem, Lemma 3, Rule 3, construct an FA for
the product language L4L4. Hint: make two copies of the FA and give different
names to the states in each one.
(b) Describe (in English phrases) the language L4L4 (the language accepted by your
answer to part (a)).

7. Let L3 be the language accepted by FA (iii) on the last page of this assignment.

(a) Using the algorithm of Kleene’s theorem, Lemma 3, Rule 4, construct an FA for
the language L 3 *
(b) Is the language L3 the same as the language L 3 * ? If so, justify your answer with a
brief explanation. If not, give an example of a word that is in one language,
but not the other.

8. Consider NFA (v) on the last page of this assignment. Convert this NFA into an FA.

2
(i) transition graph

(ii) transition graph

(iii) finite automaton

(iv) finite automaton

(v) nondeterministic finite automaton

You might also like