Professional Documents
Culture Documents
Compiler Design Spring 2010 (CSE344) Practice Questions On Regular Expressions
Compiler Design Spring 2010 (CSE344) Practice Questions On Regular Expressions
2)
a. (0+1)(0+1)*
b. 1(0+1)*1
c. (0+1)*00
d.
(0+1)*1(0+1)*1(0+1)*1(0+1)*
3)
a. a*b*c*
b. (a+b+c)*a(a+b+c)*b(a+b+c)* +
(a+b+c)* b(a+b+c)*a(a+b+c)*
4)
a.
b.
c.
d.
(0+1)*110(0+1)*
(0+10)*1*
(0+1)*1(0+1)9
(0*1*00)* 0*1*
5)
a. a4 a*+ a4 a*b + a4 a*b2 + a4 a*b3 =
a4 a*(+b+b2 + b3 )
b. (aa)* (bb)* + (aa)* a (bb)* b
c. (0+1)* 00 (0+1)*
d. (1* 011*)*0+ 1*0
a. (0+1)(0+1)0(0+1)*
b. 1* + (1*01*01*01*)+
c. 1(0+1)*1 + 0(0+1)*0 +0 + 1
d. (0+1) + (0+1)(0+1) + (0+1)(0+1)(0+1)
6)
a. set of strings terminated by a or bb
b. even number of as followed by odd
number of bs