0% found this document useful (0 votes)
11 views4 pages

SDFCQW Asz

SAFAs

Uploaded by

abhinav boge
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)
11 views4 pages

SDFCQW Asz

SAFAs

Uploaded by

abhinav boge
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/ 4

Total No. of Questions : 8] SEAT No.

8
23
PB3778 [6262]-36
[Total No. of Pages :4

ic-
T.E. (Computer Engineering)

tat
THEORY OF COMPUTATION

6s
0:4
(2019 Pattern) (Semester-I) (310242)

02 91
9:4
Time : 2½ Hours] [Max. Marks : 70

0
40
Instructions to the candidates:
8/0 13
1) Answer Q.1 or Q.2, Q.3 or Q.4, Q.5 or Q.6, Q.7 or Q.8.
0
2) Neat diagrams must be drawn wherever necessary.
5/2
.23 GP

3) Figures to the right indicates full marks.


4) Assume suitable data, if necessary.
E
81

8
C

23
ic-
Q1) a) What is context free Grammar? Define CFG. What are the capabilities of
16

tat
CFG? [8]
8.2

6s
.24

0:4
Give a context Free Grammar for the following language
91
49

9:4
L = { w  a, b * | w is a palindrome of odd length}.
30
40
01
02

b) i) What is Derivation in CFG?


5/2
GP
8/0
CE

ii) What is relation of parse tree for derivation in CFG?


81

8
23
.23

iii) What is leftmost derivation and Rightmost derivation?


ic-
16

tat
8.2

iv) Explain leftmost derivation and Rightmost derivation with parse


6s

tree. Derive the string a-b+c using leftmost derivation and Rightmost
.24

0:4
91

derivation for the CFG having production rule.


49

9:4
30
40

G = {S = S + S
01
02

S = S -S
5/2
GP
8/0

S=a|b|c
CE
81

} [10]
.23
16

OR
8.2
.24

[6262]-36 1 P.T.O.
49
Q2) a) When do we say that CFG is in Greibach Normal Form (GNF)? Explain

8
23
the steps to convert CFG to GNF for following Grammars [12]

ic-
G1 = {S  aAB | aB, A  aA | a, B  bB | b}

tat
G2 = {S  aAB | aB, A  aA | , B  bB | }

6s
0:4
G3 = {S  XB | AA

02 91
9:4
A  a | SA

0
40
Bb 8/0 13
0
Xa}
5/2
.23 GP

b) i) What is ambiguity in CFG? What is relation of parse tree for finding


E

ambiguity in CFG.
81

8
C

23
ii) What is leftmost derivation and Rightmost derivation?

ic-
16

iii) Explain leftmost derivation and Rightmost derivation and ambiguity

tat
8.2

for the CFG having production rule.

6s
.24

0:4
G = { S = aSb | SS
91
49

9:4
S = }
30
40

[6]
01
02
5/2
GP

Q3) a) What is pushdown automata? Define PDA pictorially and mathematically


8/0

with respect to input tape, stack, finite control and Instanteous


CE
81

8
description.

23
.23

Design a PDA for accepting a language {anb2n|n>=1}


ic-[8]
16

tat
b) Construct a context free grammar which accepts N (A), where [10]
8.2

6s

A = ({q0, q1}, {0, 1}, {Z0, Z}, ,q0, Z0, where  is given by
.24

0:4
91
49

qq
9:4
30
40

q q
01
02

qq
5/2
GP

qq
8/0

qq
CE
81

qq
.23
16
8.2

OR
.24

[6262]-36 2
49
Q4) a) Design a PDA for accepting a language {0n1m0n | m, n>=1}. [6]

8
23
b) Draw a PDA for the CFG given below: [6]

ic-
tat
S  aSb

6s
0:4
02 91
Sa|b|

9:4
0
40
8/0 13
And simulate PDA to recognize “aaabb”.
0
5/2
c) Design a push down automation to recognize the language generated by
.23 GP

the following [6]


E
81

8
C

23
grammar :

ic-
16

SS+S|S*S|4|2

tat
8.2

6s
.24

Show the acceptance of the input string 2 + 2*4 by this PDA.


0:4
91
49

9:4
30
40
01
02

Q5) a) Elaborate the following terms with proper examples [4]


5/2
GP
8/0

i) Universal Turing Machine (UTM)


CE
81

8
23
ii) Recursively Enumerable Languages
.23

ic-
16

tat
b) Design a TM that multiplies two unary numbers over  = {1}. Write
8.2

6s

simulation for the string 11*111. [7]


.24

0:4
91
49

c) Construct a TM for the language L = {0n1n2n} where n [6]


9:4
30
40

OR
01
02
5/2
GP

Q6) a) Construct a TM for substraction of two unary numbers f(a-b) = c where


8/0

a is always greater than b. [5]


CE
81

b) What is undecidability? How do we prove universal language is


.23

undecidable? What is the relation between undecidability and reducibility


16

theory. [12]
8.2
.24

[6262]-36 3
49
Q7) a) What do you mean by polynomial time reduction? Explain with an example

8
23
of SAT. [7]

ic-
b) Explain the following terms with respect to computations complexity

tat
with example. [10]

6s
i) Solvable Vs Unsolvable problem

0:4
02 91
ii) Decidable Vs. Undecidable problem

9:4
0
40
iii) P Vs NP problem
8/0 13
OR
0
5/2
.23 GP

Q8) a) Explain in brief the term “recursively enumerable”. [6]


E

b) Explain examples of problems in NP. [6]


81

8
C

23
c) Differentiate between P class and NP class. [5]

ic-
16

tat
8.2

6s
.24

0:4
91
49


9:4
30
40
01
02
5/2
GP
8/0
CE
81

8
23
.23

ic-
16

tat
8.2

6s
.24

0:4
91
49

9:4
30
40
01
02
5/2
GP
8/0
CE
81
.23
16
8.2
.24

[6262]-36 4
49

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy