Professional Documents
Culture Documents
It 4 Sem Theory of Computation Winter 2017
It 4 Sem Theory of Computation Winter 2017
com
i) Prefix of a string
a/b
a/b q1 q3
q0 a
a
a
b q2 q4
OR
0 1
0/1 q4
1
q3
q5 0/1
0/1
NRJ/KW/17/4440 1 P.T.O
www.rtmnuonline.com
rtmnuonline.com
om
a b
e.c
a a
lin
A C
on
b a
nu
OR
rtm
4. a)
State the principle of pumping lemma. Show that a n b n | n 1 is not regular by using
ww
w.
6
pumping lemma.
b) Construct an equivalent left linear grammar for right linear grammar given as - 7
S 0A | 1B
A 0C | 1A | 0
B 1B | 1A | 1
C 0 | 0A
om
e.c
on
n n m m n 2n
i) L a b c d | n 1, m 1 ii) L 0 1 | n 1
nu
rtm
S aA | a | b | c
ww
A aB | c
B aA
C cCD
D abd
c) Eliminate -production for the following - 2
S aSB | aA | bB
A aA |
B bB |
OR
6. a) Construct a grammar in Greibach normal form equivalent to the grammar 8
G S, A,a, b, P, S . where P is
S AA | a
A SS | b
NRJ/KW/17/4440 2
www.rtmnuonline.com
rtmnuonline.com
L w C w R | w (a b)*
b) Explain concept of Universal Turing Machine. 6
OR
8. a) Explain model of linear bounded automata. 6
b) What are the various types of Turing machines? Explain each type in brief. 8
11. a) What do you mean by primitive recursive function? Show that the addition of two integers 9
x & y is primitive recursive.
***************
NRJ/KW/17/4440 3 P.T.O
www.rtmnuonline.com