Você está na página 1de 2

CSI 3104 Introduction to Formal Languages Winter 2012 Assignment 4

Assigned February 17, due Tuesday, March 6 at 13:00

1. Consider the two FAs below, where L1 and L2 are the languages accepted by FA1 and FA2 , respectively.

a,b
FA1 FA2 y4+

a
x1

a b b
x2+

b y3

y2 a a
y1

Using the algorithm of Kleenes theorem, Part 3, Rule 2, Proof 2, construct an NFA for the union language FA1 + FA2 .

2. We can use NFAs to prove Theorem 6, Part 3, Rule 4. Assume = {a, b}. The idea is to allow a nondeterministic jump from any + state to the states reachable from the state by a- and b-edges. (a) Provide the details for this proof by constructive algorithm. (b) Draw the NFA that results from applying this algorithm to FA1 from Question 1 above.

3. Convert the following NFA into an FA using the constructive algorithm presented in Proof 2 of Theorem 7.

a,b b a + a
+

4. Convert the following Mealy machine into a Moore machine.

a/1 b/0 q0 b/0 q2 b/1 a/1

a/0 q1

5. Let L1 be language((a + b) bb(a + b) ) and let L2 be language((ba ) ). Find a regular expression and an FA that each dene L1 L2 . 6. Let = {a, b}, and let L, L1 , and L2 be languages over . For each statement below, decide whether it is true or false. If it is true, prove it. If not, give a counterexample. (a) If L1 L2 and L1 is not regular, then L2 is also not regular. (b) If L1 L2 and L2 is not regular, then L1 is also not regular. (c) If L1 and L2 are not regular, then L1 L2 is also not regular. (d) If L is nonregular, then L is nonregular. 7. Use the pumping lemma to show that the following language is not regular: {an bn1 |n 2} = {aab, aaabb, aaaabbb, aaaaabbbb, . . .}

Você também pode gostar