Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

rtmnuonline.

com

B.E. (Information Technology) Fourth Semester (C.B.S.)


Theory of Computation
P. Pages : 3 NRJ/KW/17/4440
Time : Three Hours *0221* Max. Marks : 80
_____________________________________________________________________
Notes : 1. All questions carry marks as indicated.
2. Solve Question 1 OR Questions No. 2.
3. Solve Question 3 OR Questions No. 4.
4. Solve Question 5 OR Questions No. 6.
5. Solve Question 7 OR Questions No. 8.
6. Solve Question 9 OR Questions No. 10.
7. Solve Question 11 OR Questions No. 12.
8. Assume suitable data whenever necessary.
9. Illustrate your answers whenever necessary with the help of neat sketches.

1. a) With suitable example, define and explain the following - 6

i) Prefix of a string

ii) Suffix of a string

iii) Proper prefixes of a string

iv) Proper suffixes of a string

v) Star closure of a language

vi) Positive closure of a language

b) Construct DFA equivalent to NDFA M whose transition diagram is given 7

a/b
a/b q1 q3

q0 a
a
a
b q2 q4

OR

2. a) Construct minimum state DFA for the following transition diagram. 7


0
0
q0 q1 q2

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

b) Construct a Moore machine equivalent to Mealy machine. 6


Present Next state
state a=0 a=1
state output state output
 q1 q3 0 q2 0
q2 q1 1 q4 0
q3 q2 1 q1 1
q4 q4 1 q 3 0

3. a) Construct the Finite Automata for the following Regular Expression. 7


*
ab  (a  b) aab  bab

b) Show that the string recognised by given 6


* * *
FA are (a  a (b  aa ) b) a (b  aa ) a .

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

5. a) Construct CFG for the following languages - 7


lin

   
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

b) Convert the following grammar into CNF 5


w.

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

b) Derive the string w=aabbbb using grammar 4


S  AB |
A  aB
B  Sb
Also draw its derivation (Parse) tree using left most and rightmost derivation approach.

c) Check whether the following grammar is ambiguous or not. 2


S  iCtSeS | iCtS | a
Cb

7. a) Construct a TM for the following - 8


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

9. a) What is a Halting problem? Explain. 6

b) What is meant by undecidability of a problem? Explain with example. 4

c) Show that union of two recursive language is recursive. 3


OR
10. a) What is the post correspondence problem? What is modified post correspondence 7
2 2
problem? Prove that PCP with two list x  (01,1,1), y  (10 ,10,1 ) has no solution.

b) Define Ackerman's function and compute 6


A (1,1), A (2,1) & A (2, 2)

11. a) What do you mean by primitive recursive function? Show that the addition of two integers 9
x & y is primitive recursive.

b) What do you mean by primitive recursive predicates? Explain. 4


OR
12. Write a short notes on - 13

i) Mod & DIV function

ii) Bounded Minimalization

iii) Unbounded Minimalization

iv)  - Recursive function.

***************

NRJ/KW/17/4440 3 P.T.O

www.rtmnuonline.com

You might also like