KEY
CSE 4081
Intro Formal Lang. and Automata Th.
Spring 2014
Quiz 2 Pts 40 Time 60 min
[Students ignore these key words: Foundations, Problem solving, Design, Modeling.]
(1) Draw a DFA for the language, sigma={0,1}, L={(01)*, 001, 0101}
One possible DFA may like this:
[10]
(2) Write a regular expression for the following languages, over sigma={a,b}.
2a. Seventh symbol from right must be a.
(a+b)*a(a+b)… seven times
2b. Every second character is b.
I presumed non-zero even length string: ((a+b)b)*((a+b)b)
Only odd length string: (a+b)(b(a+b))*
If you allow both even and odd length string: (a+b)(b(a+b))*(b+e)
The above will allow single-char string. I would argue that if you want odd length string
included you have to allow that. However, if you want to disallow that follow slide 28 of
“Properties of Regular Language,” on how to create a DFA for intersection of two RL’s. That
should guide creation of a corresponding RL.
2c. Exactly one ab.
(b*a*)ab(b*a*) IS THIS CORRECT?
[3+3+4]
(3) Convert the following DFA to find the regular expression for its language.
0
q1
0
1
1
One possible answer is
0*10* + 0*(10*10*1)*0*
q2
[10]
(4) Use pumping lemma to prove that the following language is not a regular language.
n+m n+k
Sigma={0,1}, L={0
1
[10]
| n,m,k>=0}
NAME:
Last four digit of Id.
*
© Copyright 2026 Paperzz