TOC Question apaper
TOC Question apaper
4. Write a regular expression that recognizes the set of all strings (0+1)* that do not contain the
substrings 00 and 11 over the alphabet = {0,1}.
PART – B
11. (a) Construct NFA accepting the set of strings = {0,1} such that two 0’s are separated by a string
whose length is 4i, for some i>=0. (13)
OR
(b) Prove that for every L recognized by an NFA, there exists an equivalent DFA accepting the same
language L. (13)
12. (a) Prove that regular expressions are closed under union, Concatenation, Kleen Closure,
Complement. (13)
OR
(b)Prove that any language accepted by a DFA can be represented by a regular expression and also
construct a finite automata for the regular expression 10+(0+11)0*1. (13)
13. (a) Let G = (V,E,R,S) be the CFG, where V = {A, B,S}, E = {a,b}, S is the start variable and R consists of
the rules.
S-> aB|bA
A->a|aS|BAA
B->b|bS|ABB
(i) Prove that ababba € L(G) (7)
(ii) Prove that L(G) is the set of all non-empty strings w over the alphabet {a,b} such that the number a’s
in w is equal to the number of b’s in w. (6)
OR
(b) (i) Design a PDA that will accepts strings (a+b)* in which the number of a’s is greater than the
number of b’s given the alphabet = {a,b}. (7)
S-> ASB|€
A-> aAS|a
B->SbS|A|bb
A1 - > A3A2|A2A3
A2->A3A3|A2A3|a
A3->A2A2|b
(ii) Design a Turing Machine that takes a binary number as input and increments the number by 1. (6)
15. (a) (i) Prove that Post Correspondence Problem is undecidable. (7)
OR
PART – C
16. (a) Consider the NFA N = (Q,,, q, F), where Q = {1,2,3}, = {a,b}, q=1, F = {2}, and is given by the
following table.
Convert the NFA (N) into DFA (M) that accepts the same language. (15)
(b) (i) Write the regular expression for the set of all strings of 0’s and 1’s not containing 101 as substring.
(5)