Sample_Set_A
Sample_Set_A
Semester : V
1. Write your Roll No. on the top immediately on receipt of this question paper.
2. Part A is of 35 marks and all its questions are compulsory. Attempt any four questions
from Part B.
3. Assume { } as the underlying alphabet set unless mentioned otherwise.
4. Parts of a question must be answered together.
Part A
(b) Give regular expression for the language of all strings that do not contain 2
‘ab’ as substring.
(d) Build deterministic finite automata (DFA) machine that accept all strings 4
that either start with ‘ab’ or end with ‘ba’.
(e) Build a DFA machine that accepts only those strings that do not end with 4
double letters.
(f) Find a Context Free Grammar (CFG) for a language of the form 4
where x,y,z >=0 and x+y=z.
(g) Using pumping lemma for regular languages show that the language 4
L= { } is not regular.
(h) Show that if L1 and L2 are regular languages then so are L1+L2, L1L2 and 4
L1*.
Part B
(b) Build a regular expression for all strings in which b’s occur in clumps of an 3
odd number at a time such as ab, ba, abbb, bbba, abaabbb,……..
(c) Build an FA that accepts all strings that have an even length that is not 5
divisible by 6.
a b
a, b
- +
X1 X4
b a
X3
(b) Write a regular expression and construct a DFA for the language of all 5
words that have an even number of substrings ‘ab’ in them.