0% found this document useful (0 votes)
5 views

Assignment 2

Uploaded by

Khushboo Pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Assignment 2

Uploaded by

Khushboo Pandey
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

KIET GROUP OF INSTITUTIONS, GHAZIABAD

(An ISO – 9001: 2008 Certified & ‘A’ Grade accredited Institution by NAAC)

Department of Computer Science and Information Technology


Theory of Automata and Formal Languages (KCS402)Session 2021-
Assignment-2

Submission Date:-15th June 2022

Q1.Describe the following sets by regular expressions:


a) . L1= the of all strings of 0’s and 1’s ending in 00.
b). L2= the set of all strings of 0’s and 1’s begging with 0 and ending with 1.

Q2.Prove (1 + 00*1) + (1+ 00*1)(0 + 10*1)* (0 + 10*1) = 0*1(0 + 10*1)*.

Q3. Represent the following sets by regular expressions:


a). {0,1,2}.
b). 1 2n+1│ n>0.
c). The set of all strings over {0,1} which has at most two zeros.
d.) {a2,a5,a8….}.

Q4.Find all strings of length 5 or less in the regular set represented by the following:
a). (ab + a)*(aa + b).
b). (a*b + b*a)*a.

Q5.Describe, in the English language , the sets represented by the following regular expressions:
a). a(a +b)*ab.
b). a*b +b*a.

Q6.Find the regular expression corresponding to the automaton given in following figure.

q0 q1

q3 q2

Q7.Construct a finite automaton accepting all strings over {0,1) ending in 010 or 0010.

Q8.Construct a finite automaton for the regular expression (a + b)*abb.


Q9. Prove the following identity
a) (a* ab + ba)* a*= (a + ab + ba)*
b) (a + b )* = (a* b* )*

Q10. Construct regular expression for all string containing even no of 0’s over {0, 1}.

Q11. Write the regular expression for L=(W ɛ {0, 1}* : w has no pair of consecutive 0’s.

Q12. Find a regular expression


a) The language of all strings ending with 1 and don’t contain 00.
b) The language of all strings containing both 11 and 010 as substring.
c) The set of all strings over ∑ = {0, 1} without length two.
d) The set of all strings of 0’s and 1’s such that every pair of adjacent 0’s appears before any pair of
adjacent 1’s.
e) {an bm , n ≥ 1, m ≥ 1, nm ≥ 3}
f) {a bn w : n ≥3, w ɛ {a, b}+ }
g) {an : n ≥ 0, n≠ 3}
h) {a2, a5, a8, ……}
i) {12n+1 : n ≥ 0}
Q13. Using Pumping Lemma, show that the following sets are not regular:
a) {anb2n | n>0};
b) {anb2n| 0<n<m};
c) {ap | p is a prime}
d) {aibjck | k>i+j}

Q14. Find the regular expression recognized by the following transition diagram:
a)

b)

You might also like