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

Assignment 1 Toc

Uploaded by

Fact Guru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Assignment 1 Toc

Uploaded by

Fact Guru
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

ASSIGNMENT 1:

SUBJECT: THEORY OF COMPUTATIONS


SUBJECT CODE : PCC CS502
5 marks questions
1. Show that L = {0n 1n | n≥ 1} is not regular.
2. The set L = { ai bj ck / where i, j, k are integers and i, j, k 1}. Is L regular? Justify your
answer.
3. Prove the following identity:
r (s + t) = rs + rt

4. Construct a regular grammar G generating the regular set represented by


P = a* b (a + b)*.

5. Using this lemma prove that L ={an bn | n≥1} is not regular.

6. Design a finite automata for the RE:


R = (ab + c*)*b

10 marks questions
1. a) Find the regular expression corresponding to the following figure :

b) Let G = { VN, VT S, P } be a phase-structure grammar, where VN =


{ S , B},VT = { a, b}, P = { S aBa, B  aBa, B  b }. Find L(G).
c) Find a grammar generating L={an bn cj | n≥1, j≥0}.

2. a) Write the grammar for the languageL={0 i1j 2k | i=j or j=k}


b) Design a finite automata
for the RE a* + (ab + a)*
c) Prove that (1+00*1) + (1+00*1) (0+10*1)*(0+10*1) = 0*1(0+10*1)*.

3. a) Construct a regular grammar G generating the regular set by r = 01(0+1)*.


b) What do the following regular expressions represent?
i. (0+1)1 ii. (a+b).(b+c) iii. (0+1)* iv. (0+1)+

4. Find the regular expression for the following Language and draw transition diagram
for DFAthat accept the language.
i. Set of all strings over {a, b} with three consecutive b’s.
ii. Set of all strings over {0, 1} with even length.
iii. Set of all strings over {0, 1} begin with 00 and end with 11.
iv. Set of strings over {0, 1} begin and end with 00 or 11.
v. Set of all strings with an even number of a’s followed by an
odd number ofb’s.
vi. Set of all strings over {0, 1} has no pair of consecutive zeros.
vii. Set of all strings over {0, 1} has at least two zeros.
viii. Set of all strings over {0, 1} has at least one pair of consecutive zeros.
ix. Set of all strings over {0, 1} contain 1100 or 1010 as substring

b) Prove that P+PQ*Q=a*bQ* where P=b+aa*b and Q is any regular expression.

c) Prove ᴧ +1*(011)*(1*(011)*)*=(1+011)*.

5. a) Show that the language L = {anbk cn+k | n ≥0, k ≥ 1} is not regular.


b) What is meant by pumping lemma?

6. a) Prove that ( a * ab + ba )* a* = ( a + ab + ba )*
b) Show that L = {wp / p is prime }is not regular.
6.

7. The regular expression for the language recognized by the finite state automaton of
thefollowing figure is

8. Let ∑={0,1}, L=∑* and R={0n 1nsuch that n>0}.Are the languages L and R regular?
9. Let L ∑* where ∑={a,b}. Now check whether
(a) L={x x has an equal number of a’s and b’s} is regular
(b) L={an bn│n≥1} is regular
(c) L={x│x has more a’s than b’s} is regular
(d) L={am bn │m≥,n≥1} is regular

10. Given that A is regular and (A 𝖴 B) is regular, does it follow that B is necessarily
regular?Justify your answer.

11. The regular expression for the language recognized by the finite state
automaton of thefollowing figure is

12. Let ∑={0,1}, L=∑* and R={0n 1nsuch that n>0}.Are the languages L and R regular?

13. Let L ∑* where ∑={a,b}. Now check whether


(e) L={x x has an equal number of a’s and b’s} is regular
(f) L={an bn│n≥1} is regular
(g) L={x│x has more a’s than b’s} is regular
(h) L={am bn │m≥,n≥1} is regular

14. Given that A is regular and (A 𝖴 B) is regular, does it follow that B is necessarily
regular?Justify your answer.

You might also like