0 ratings0% found this document useful (0 votes) 60 views2 pagesTCS
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
pn
se (sem) Chev. weit) Coase ) Dee. dois—
-Te
5485
QP. Code:
(3 Hours) [Total Marks : 100
N.B.: (1) Question Number 1 is compulsory.
{2) Attempt any three questions out of remaining five questions.
(3) Assumptions made should be clearly stated.
(4) Figures to the right indicate full marks.
\(5) Assume suitable data whenever required but justify the same
(a) Consider the following grammar G ~(V, T, P, 8), V={S,X},T (0, Lfvend §
productions P are
e $0] 0X1 | 0181
eX OXX1 | 1S
Sis start symbol. Show that above grammar is ambiguous ¢\°
(b) State and prove the halting problem. 5
(©) Convert following e-NFA to NFA without e 5
(d) Prove that Language L = {0°10 forn=0, 1, 2,...... } is not regular. 5
2. (a) Consider the following grammar agar, PS), V~{S, X,Y}, T {a, bland 10
productions P are
S—>XYX
XaX|6
e YY]
Convert this grammes Chomsky ‘Normal Form (CNF).
(b) Design DPDA tovcept language L={ x € (a, b}* |N\a)> Nix) }, 10
N,() > N,(x)rieans number of a's are greater than number of b's in string x.
3. {@ Design ‘foling machine to accept the language L~ set of strings with equal 10
numpef of e's and b's
(b) DeGgn the DFA to accept the language containing all the strings over 10
ES {a, b, c} that starts and ends with different symbols.
[TURN OVER
MD-Con. 11584-15.@
()
@)
®
©
@
&)
©
5485
Q.P. Code:
2
Design Moore Machine for the input from (0+ 1 +2)* which print the residue 10
modulo 5 of the input treated as ternary number.
State and prove pumping lemma for context free languages. 10
Convert the following grammar into finite automata. 5
S—aX| bY a]
X-ra8 | bY |b
Y—raX [oS
Compare recursive and recursively enumerable languages: 8
State and prove Rice's theorem 10
‘a
Write regular expression for the following languages. ae 5
@) — lenguage containing all the strings in which ev/ary pair of adjacent
a's appears before any pair of adjacent,b"*, over the alphabet
Z= {a,b}. his
Gi) language containing all the strings in which all possible combination
of a'S and b’* is present but strings does not have two consecutive
a, over the alphabet D {a, b}._
Write short note on "Universal Turing Nfachine". 3
Explain variations and equivalences ‘Turing machine. 10
MD-Con. 11584-15.