Académique Documents
Professionnel Documents
Culture Documents
1. Write regular expressions for the following languages. The alphabet is {0,1}*
a) A = {w|w contain atleast 2 0s}
4.
1
5. Let = {0,1,2}. Write a regular expression to accept all strings over *, such that third
symbol from right is 1 or 2 but not 0
6. Convert the regular expression 01* + (0+1)* into an -NFA
-->q0
q5
q1
q1
q2
q6
* q2
q2
q0
q3
q6
q2
q4
q5
q7
q5
q6
q2
q6
q4
q6
q7
q2
q6
9. Design a DFA for the language L = {w | w contain 2 as at any position and greater than
3 bs at any position, w {a.b}*}
10.
11.
12.
q0
q0
q1
q1
q2
q2
* q2
q2
q0
q0,q1
q0
q1
q2
q1
q2
q3
q3
* q3
q2
13.
14.
15.
16.
17.
18.
Write regular expression for the language L = {w | number of as in string is
multiple of 3 => na(w) mod 3 = 0, w{a,b}*}
19.
20.
a) DFA
b) NFA
c) -NFA