You are on page 1of 11

Paper / Subject Code: 31904 / Theory of Computer Science

T.E. SEM V/COMP /CHOICE BASED /NOV 2018 / 05.12.2018

Total Marks: 80
Time: 3 Hours
EXAMPAIGAD

N.B.: (1)Question No.l is compulsory. AT,.


(2) Attempt any three questions from the remaining five questions.
(3) Make suitable assumptions wherever necessary but justify your assumptions.

05
1. (a) Explain Chomsky Hierarchy.
05
(b)Differentiate between PDA and NPDA.
05
- (c)Define Regular Expression and give regular expression for
i) Set of all strings over { 0, 1}that end with 1 has no substring 00
05
(d) Explain Halting Problem.

2. (a) Design a Finite State Machine to determine whether ternary number (base 3) 10
is divisible 5.

b) Give and Explain formal definition of Pumping Lemma for Regular Language and 10
prove that following language is not regular.
L={ a"bm| m>0}

3._(a) Construct PDA accepting the language L={atb" |n>0). 10

(b) Consider the following grammar 10

S’iCtS|iCtSe Sla
C’b

For the string 'ibtaeibta find the following:


(i) Leftmost derivation

(i) Rightmost derivation


(iii) Parse tree

(iv) Check if above grammar is ambiguous.

55197 Page 1 of 2

86A0798576FOEC29F86CCD3F4386FOAF
DATE:

PAGE:
NAME: STD.: DIV.:

G
Deino ing oer to,r4
en ho n
subtn
Aegulo
chanactts Seanc pocttan
R.E ( of+1 )

WORLD STAR For Educational Use


Dec- 1&
DATE:
NAME: STD.: DIV.: PAGE:

Qala PSM to duteumne whetheL


diisible by 5 teunoa nmbs i
2

33
Stater
qoinitial state
q1-sejectd state 1- acephed
dcceplkd sBate 35
MAF:

92 200 92 ol 92b 2
92

4|1D 912
92

41
42
9242
2 O

WORLD STAR For Educational Use


Dec - 18
DATE:
NAME: PAGE:
STD.: DIV.:

ab) explain Journal datinikc e puapinglimma


not
Pumping Lama
Rmpig emmautoropeut o sgulau language
lanquael.
Fol an langua¡c L, tee xt p inpceitie
indeqs Rat i4e length c pumpiq lenna
divide d into z
Such that?
)for any pasitive integer i.ei> O
not null

L= Samm>o
Slep1 Consid aie o
m=l

lal= 1
m 2
Le ab
labl3

'La2.
Labl- 5
WORLD STAR For Educational Use
DATE:
NAME: STD.: DIV.: PAGE:

Slep2
iat q Ku constant egula Languna
z= K+k-l =2K
2 Can be wLutten a
StepBi By punging- Lemma
Stept Addling Length a lzl
2k+1 s luvw < k+2K
2k < Juvw| < 3K+|
Step S : dat take
2<luwl<4
k2
4< luVw<4
K
One vale we cannot hawe

Oue azumphian. Hhat iu income

Aence s not a sLqulaa

NORLD STAR For Educational Use


Dec-18

Q3 a Gnstret PDA acepting agg

for
aab

Zo

for
aaaa bb

FOR EDUCATIONAL USE


undaran)
9.,4,2)> a26)
¿lqia,a)’J9.j4a)
s2,4,4)
d42b,a)79,£)
Gba)’42)
Cayi2)’,2a)

FOR EDUCATIONAL USE


Gundarany
Dec- 18
Consider He ollowing granoney
8>iCS iCSeS
or he strng gbtaeibta' Find LMD 2jRM0 3) Parse ree

S’ iC+ SeS
ibtSeS
PbtaeS
ibtae ictS
’ibtaeibts
3Pbtaeb ta
RMO

’ictSeiCtQ
i CtSei bta
’taerbta
ibtaeibta
’Parse Tree leltmot
jC4ses

ietS
Sundaram) FOREDUCATIONAL USE

(ondaram)
iCISe S

Since bsth spae tree ext8

PORRDUCATIONAL USE
Sundaram)
R
a) Consruct PDA to check ohere w S Yever ge 0-f w
% C Ts a congtant

Son: Consfder foitofha Shing


WElat+b
aalbc|balal
S(90,a,zo)’lq, azo)
8 a,a,a)’( 1,aa)

S(ab,a)’(4, ba)

S(a2,bb’(a,e)
S(3,a, a ) ’(3, e)

S23,a, a)’(a, e)

bib,
bzo,bz0
o, 20az0
baba b
bib
bbl&2
Ca,a

20,20

FOR EDUCATIONAL USE


undaram
blaalclalal bl
S(o, b,zo) ’(0,b20)
S(90,a, b)’(20,ab)
S(40,a,a)’ (40, aa)
S(40,c, a)’(9, a) no operodhon
8(41,a, a)’ (qn, )
8(21,a, a)’(a,e)
Sl41,b, b) ’(9, e)
Sl1,e, 2) ’ 2,20) opeYab on

Sundaram FOR EDUCATIONAL USE

You might also like