Beruflich Dokumente
Kultur Dokumente
DEPARTMENT OF CSE
ASSIGNMENT NO - 4
FORMAL LANGUAGE & AUTOMATA THEORY
Q.1. Represent the following sets by regular expression:
a. {1 2n+1 | n>0}
b. {The set of all strings over {0,1} which has at most two zeros.
c. {an | n is divisible by 2 or 3 or n=5}.
d. The set of all strings over {a,b} beginning and ending with a.
Q.2. Construct a transition system corresponding to the following regular expressions:
a. (ab + c*)*b
b. a + bb + bab*a
c. (ab + a)*(aa + b)
d. (a*b + b*a)*a
Satyabrata Roy
Q.5. Construct R.E. using Ardens theorem from the following FAs:
a.
q1
*q2
q3
a
q1
q3
B
q2
q2
* q1
q2
q3
0
q1
q3
q1
1
q2
q2
q2
*q1
*q2
q3
0
q1
q3
q3
1
q2
q2
q3
*q1
q2
q3
q4
0
q2
q4
q1
q4
1
q3
q1
q4
q4
*q1
0
q1
1
q1
q1
q2
*q3
a
q3
q2
q3
b
q2
q2
q3
b.
c.
d.
e.
f.
Satyabrata Roy
g.
q1
*q2
0
q2
q1
1
q2
q1
q0
q1
*q2
0
q1
q1
1
q1
q1
h.
Satyabrata Roy