0% found this document useful (0 votes)
25 views

Nov Dec 2023

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Nov Dec 2023

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Total No. of Questions : 8] SEAT No.

8
23
P-7858 [Total No. of Pages : 3

ic-
tat
[6180]-46A

5s
T.E. (Computer Engineering)

0:2
02 91
9:4
THEORY OF COMPUTATION

0
30
(2019 Pattern) (Semester - I) (310242)
1/1 13
Time : 2½ Hours] [Max. Marks : 70
0
2/2
.23 GP

Instructions to the candidates :


1) Answer Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7 or Q8.
E
80

2) Neat diagrams must be drawn wherever necessary.

8
C

23
3) Figures to the right side indicate full marks.

ic-
4) Assume suitable data, if necessary.
16

tat
8.2

5s
Q1) a) Check whether the string 10010 is a member of the language generated
.24

by following grammar by using Cocke-Younger-Kasami Algorithm- [9]


0:2
91
49

9:4
S  AB|BC
30
30

A  BA|0
01
02

B  CC|1
2/2
GP

C  AB|0
1/1
CE

b) Obtain grammar to generate the following language :


80

[8]

8
23
L = {w : na(w) mod 2=0 where w {a, b}*}
.23

ic-
i.e. Language of a and b in which number of number of a’s in the string is
16

tat
either zero or in multiple of 2 only.
8.2

5s

OR
.24

0:2
91

Q2) a) [9]
49

9:4
30

S  aB|bA
30
01

A  a|aS|bAA
02
2/2

B  b|bS|aBB
GP
1/1

Derive using Leftmost Derivation and Rightmost Derivation:


CE
80

i) bbaaba ii) aaabbb.


.23

Draw parse tree for the same.


16
8.2

P.T.O.
.24
49
b) Find context Free Grammar generating each of these languages. [8]

8
23
i) L1={ai b j ck such that i = j+k where I, j, k > = l}

ic-
ii) L2={ai b j ck such that j = i+k where I, j, k > = l}

tat
5s
Q3) a) Construct a PDA equivalent to following CFG [10]

0:2
02 91
i)

9:4
0
X0

30
1/1 13
X  0X
0
2/2
X  1XX
.23 GP

X  XX1
E
80

8
X  X1X
C

23
ic-
ii) SBD|BC
16

tat
DSC
8.2

5s
CAA
.24

0:2
91
B0
49

9:4
A1
30
30

b) Design a PDA for a language L={anb2n|n > =1} [8]


01
02

OR
2/2
GP

Q4) a) Construct a PDA accepting the language L= a n b m a n | n,m>=0 by null


1/1
CE
80

store. [6]

8
23
.23

b) Design a PDA for a language L={XcX r |X€{a,b}* and string Xr is the


ic-
16

tat
reverse of string X}. [6]
8.2

5s

c) Obtain a PDA to accept the language -


.24

0:2

 
L= w|w€  ,   a,b and n a  w   n b  w  by final state
91

*
49

[6]
9:4
30
30
01
02

Q5) a) Design a Turing machine for well formed parenthesis. [6]


2/2

b) Design a TM that accepts all strings over {1,0} with even number of 0’s
GP
1/1

and even number of 1’s. [8]


CE

c) Construct TM that recognizes language over alphabet 0,1 such that string
80

ends in 10. [4]


.23

OR
16
8.2
.24

[6180]-46A 2
49
Q6) a) Construct a TM to accept the language over {0,1} containing the substring

8
001.

23
[6]

ic-
b) Design a TM to multiply a unary number by 2. [8]

tat
c) Design Turing Machine for l’s Complement. [4]

5s
0:2
Q7) a) What is post correspondence problem? Explain PCP with following

02 91
9:4
instance of the set of the strings A and B. [8]

0
30
1/1 13
0
2/2
.23 GP
E
80

8
C

23
ic-
16

tat
8.2

5s
b) State and explain with suitable example [9]
.24

0:2
i) Decidable Problem
91
49

9:4
ii) Undecidable Problem
30

iii) Church-Turing Thesis.


30
01

OR
02
2/2

Q8) a) What is reducibility in Computability Theory ? Explain in detail, the


GP

polynomial - time reduction approach for proving that a problem is NP-


1/1

Complete.
CE

[8]
80

8
23
b) Explain with suitable example and diagrams [9]
.23

i) Halting problem of TM ic-


16

tat
ii) Multitape TM
8.2

5s

iii) Universal TM
.24

0:2
91
49

9:4
30
30


01
02
2/2
GP
1/1
CE
80
.23
16
8.2
.24

[6180]-46A 3
49

You might also like