UCS701 (3)
UCS701 (3)
Note: Attempt all questions with proper justification. Assume missing data, if, any, suitab y.
c) Given the regular expression r = 1*( I 0)*1*. Convert the given r into NFA using
Thompson's construction.
b) Design a CFG for the language L over (0, 1) to generate all strings having alternate
sequence of 0 and 1.
Q4 a) Consider the CFLs Li=(anb" I n>1) and Li =(aPbq I p,q>1), then intersection of Li
and L2 is a CFL or not. Justify your answer.
2+4
b) Given the context-free grammar
S -) XY
X -) alblX A
Y -, alAY
A -, a
Apply CYK algorithm to determine whether the string w=babaa belongs to the
language generated by the above given grammar.
[P.T.0.]
a) Prove that L=ta"b"c" I n>0) is not context-free language using Pumping Lemma. 3+4
Q5
b) Design a Mealy machine that recognises the double occurrence of symbol 'a ' in
the input string w e(a,b }*. Show the output sequence for the string w= aahahha.
[Hint: input: aba then ouput: 000, input: aaab then output: 0110 ]
b) Write down the logic for design of a Turing machine over 10, 1} for the language
L---{w I w contains equal number of 0's and l's in any order, and Iwi>=2}. Design
the Turing machine for L.