2 Marks
2 Marks
com
5. What is a CFG ?
Fifth Semester
(Regulations 2017)
PART B — (5 × 13 = 65 marks)
11. (a) Design an ε – NFA (Nondeterministic finite automaton) to recognize the
language L, containing only binary strings of non-zero length whose bits
sum to a multiple of 3. Convert ε – NFA into an equivalent minimized
deterministic finite automaton. Illustrate the computation of your model
on any sample input.
Or
*X10319* Reg. No. :
3. Write the regular expression for all strings that contain no more than one
occurrence of aa.
4. Write a regular expression for even number of a’s and even number of b’s of a
string w = {a, b}*.
5. Write a Context Free Grammar for the language consisting of equal number of
a’s and b’s.
7. What are the two normal forms of CFG ? Write their productions format.
10. Define the classes P and NP problem. Give example problems for both.
11. a) Prove that for every L recognized by an NFA, there exists an equivalent DFA
accepting the same language L.
(OR)
b) Prove that for every L recognized by an ∈-NFA, there exists an equivalent DFA
accepting the same language L.
*X20402* Reg. No. :
6. Design a DFA to accept the language. L = {w/w is of even length and begins with 01}.