Professional Documents
Culture Documents
15cs54 Flat Unit 4 Cfgs & Cfls
15cs54 Flat Unit 4 Cfgs & Cfls
********
T bet of termfnals
P t bet of_prod
uctions
Each prod ucton #h of the form x*B hee i s a string Fo (VUT
and hen ce Can noE be e and e can not oCceT O the left hend
ocludes & alro. So, e can occus oo the right hapd d e of the producoo
S the tast tmbol.
ELamples
on 1 mnals O Vari ables (v)
Jhe ioues case n a M e s uch a expres;On, ojpera los operaOd,
tealnent etc.
Tesm?nals (T)
Jhe KeH0rd such as ?f fosch? le, do -ahfle etc,
Ditfrom O 9
such as t, - *,I, etc.,
Smbols
ne louer Cabe Letter near the be #ootog of the alphabel Auch
a a,b, C, d etc.,
Jhe lacser cate etters nea the end of the alphabel Such as
THpe 3 ramma
Regula« rammas)
THpe O Grammar
THpe Grammar
A Qroamms G:(v,T, P,S) P said to be tHpeerammay or cootea
bensitive orammasf au the prDcuc boos are of the form B.
but, there ?s a
setrictoo on leno th of . Jhe leog th ofB must be|
at leas
uch as the len th of ie, Iellxl and v4p
e vUT) ie, e Ccan not appea 60 the lef.t hcod ioht hancd
i de of
a0 prOcd uctioo. It ? a E-free orammas
THpe Gramnar
Agrammay : (V.7, P,S)s Acaid tobe type rammar or colext free
ammar f a l l tte pro duc60od are of the form A ohere E (VUT)"
and A s noo - lEYmioal. Jhe symbo &
Can appear On the rioht haod
A
ohere A e and eT
aye vari ables
A ramma h baid to be lefE Goeas tf all the product o are ofhe
form
aaB bbA|e
A aAlb
bB ale
NOTE e and St g of lEminals, Can appea on RHS of a0H pruducti o o and
A aB |b
B Ab Ja
Vesha
BI.T
STCP1 f S ( 1 a ) :; theo otrockuce the troanhetion pr Oducton
S aS
G (v,2,6S)
S E
aS (0R)
AaB G
S
ea8
65 Obtain ramma eral briog CoO'tiog o even number of a*'s
a SaA
S &e
A aS
S aa S
(O)
EXPERIMENT NO. . DATE Banga ore
NAME OF EXPERIMENT
i *********
PAGE NO. 404|
******* ****************** ********
S aS (CR) S aPA
S bS A aA
AaP bA|& A
S alb (oR)
S aS As) (A) SanBA
S bS
AOA|bA &
- B.I. T
a. 0bta:o oramma lo accept the folloco: ng language
erg)
L : lol mod 3 >o ohere e ja} "3 o..a
S a laa
S aaaS
(OR) S aAA
tart a
a AaB |e
BaS e
ab
(atb
( a t b)* ab (a+b)*
SAabA
A el aA | bA
ab
(atb) ab
S Aab
A e |aA bA
S ab A
elaA bA
Obta: o gramma t eneralë the fotloca:a languoge
L : nalo) mod a O here oe a,b3 *
Dertva tion
Let A Br and B13 are procluctiob 1o rammas 6, where , B
a n d CYe strin Of termin als and lor non- lermtnals, A and B are
more
Lf3erD or
pYDc)ucbo0 are appCed to oet the strog 1afrom A,
2
the A
Conside the grarmar sbaon beloo from oh:ch aoy art hmetc
expreioo Cao be obtained
E E+ E
E E-E
EE
E EE
E d Obtao the tino d + i d r d and shous the
Senlence
be a oramma. Jhe strin w obtaioed from t e g rammay
Let GCv,T, P, S)
Auch that S o s called Roloce OframMar G. Here, i the Atiog
ermoals.
Languag
Emincls
A @tvenb orammay Con generale a e t ef tnng consstog of o
Tammas
LCG) l s o aod we T
der the S a Ga
Consi follooingramma
C aCalb
What ththe language generated b thib èromnav ?
EXPERIMENT NO. ********* DATE
an PAGE N. 406
NAME OF EXPERIMENT,.....
******** *** "***** ****' ****
this ov amaM a
aCa
=a ba?
LCG) abaIn2}
e
9a.Obtoio a may t entrole the follosing languag
ab
L: ab: o2ia aabb
S ab aSb aoab
S baSb
B.I. T
6 Obta:o a oramma togeneya the follocaing lango
S
L laS: n>ot abb L:a n
aa bbbb
Sabb las bb
S eaSbb
&7. Let
ove .
Z: la,b} . 0btao a
rammor Gener attog et of all pel: odromes
V: Ls
T: a,b}
P: 2 S E
S alb aWa boo
S aSa bSb
S aSa l bSb
NAME OF ExPERIMENT.
****
B a8
G (v,T,P,S) cohere
T: a , b}
baba
Sithe tart obo l Obab Sab ba
bbao SS
P 2
S l aSb lb Sa SS a acabbb ababab
2hiaao
bhbaas F
A 1SB
S
S OA L: o1)° nzo3
=>01S
O1OA
O101S
O101
NOTE S EloIs
S |so1
B.I. T
Q13. Obtain a CFG generale a tring af balanced paventheses
iS
balan ced parentheseh give
Jhe oramma
oenerale a
string of
A
bb G (v,T, P. S) wheye
V s
T:C, }
S ehe tart smbo
P S & c s ) |ss
S A B S ACc
OA lO A OAI |e
B 1B|1
3 C 1C|1
B b B |E
NAME OF EXPERIMENT
pGE
No. 408
***
****
a : (v.TP,S) 2
V i s , A B3 m m3
T: 1ab gbb, ab bb,a d bbbb
Sithe start symbot ob >o
P
S AB (OR) S aSb lB
A aAb E
B b lb
L i abhs| n>3}
0: 3 4 : 5
: (v,T. P, S)
9a20abb .. .
V 2s.AS aaaab
T: a , b3
S aS,b B S OS e
B bBlb
V:
1S, So, S, B T: 2a,b, O,S Sithe start 5tmbol
P:2 S S,S2
S as,b B (oR) S S,S
Sa OSII2 t olble
B bBlb
B.I. T
19. Obta:o a rammar enerale the Lanuag L:L,Us ohere
S OSIe
S
A aAb |E B bB |b
belb
(10
Qa. Obtaio a rammar generale t t of all stvoo s t h exoctlto1 15
(u)
One a
heo- }a,b} b
S a8bS SbSoOA
B bB E
G bCE
a5. Obtaio a
ramma to generalë the Languoge L : i I nalw) = o
AaA +3
(NOTE A aAb bAa | AA|e nalu)+1 Dew)
OR)
S ABA
A a Ab bA a l AA | e halo) nblw) +
B a e la
SN
N
D ND| DN
S
+ -e
D ollat.. .. 19
P S a S a l bSb le
S 6 the htort ymbot.
Lhat ih the Language generated by this rammar ?
L we a tb"3
Q31 Obta:o
I
a
grammar
Cnd .
er
An
ale an
denti e r
arithme
coo
ticexpekion
stast i th any
usn
of the
the
qperalr
letters
E I
E E+ EE-el e*el e lele AE (E)
I
Ta l iblTcl alblc
.3
EXPERIMENT No. DATE m
or
***
PAGE NO.
4l0
NAME OF ExPERIMENT.
***
****" ********
E EE t d E E# E (oR) ed+id*id
P+d *E
d +d * fd
R:ghtmo^t Dertvattoo
In the derivaton most variable ts Teplaced cat
proces Pt a ght
eder
ee tep, then the deiva t5oo ?6 said to be ightnost.
E E+E
E E-E
E E * E E+E *E
E ElE EtEk td (oR) e r d +id x rd
E d E+fd * d
aeotial fovn of .
there t a deivatipn of the form S ohese at each slöp
follocoog grammar
03..Im
S+ aB bA
A a S | bAA la
B b S | aBB|b
S aB
Sae)
BaBB)
aa a 888 CBaBB)
aaabBB (66)
aaaaaa bbB (eb)
a aa
bba BB BaBB)
a aa bba bB CBb)
aaa bbabbS CBbS)
aaabb abbbh ( S bA
aaa bb abbba (Aa)
follas?og properbes
Jhe T00t bas the labe S
Ecomple Jhe parse treetor the ht most deivab 0n -fch the strog td+id* ?d
id E E
d
EXPERIMENT No. DATE
PAGE No. 411
NAME OF EXPERIMENT....
..
teld of a tree
t dhoun beloud
E e tE
E E*E
E+E d
- B.I. T
for thi par tial bt most de rivaion the pastia deriation tsee s
T cleQ fro the por%e tree and partial Paxe tree that a Ehe leaves io pasáe
tsee Csethe ymbolsfrom TUe) Ohere a 9 pvtial Passe tree the leave s ?1 be
from (v OTOE).
pasbe trees e i st
b applg e ther Ehe left most ole rivatio n O hE mos
derivation.
NOT e:
Obto'n the leetmost derivalioo and e t a striog Obtaio the oht mOrse
derivati 0o aod btnog . for bo I the denvati0ns
CoOstrucE the par Ae
tree I4 here are tuoo
cffereot Passe trees Ehen the rammar ambi o uo uN
Obtain the
appn eftmoAE dervab on tei ce and contruct the
pase tree. the tuoo passe t ees are
dfferen Ehe
orcumMGs Ps amb:ouoUs
Obt a 0 the
the pas6e
strog
tree.
b PPlyog ghtmost dervat on tài ce and co0struct
Îthe to parse trecs are
dftereo, Ehe
grammGT ?
APply the
ambouous
leftmost derrvoti oo and et al sbnngApel the
leftmont deiva Uo
agaio and et a dierent btrnd Jhe pahe trees obtaïned
aod do nct Cene to the o? be dffeco
Con clus 00 that the raMmas fs
aobiouous.
EXPERIMENT No. DATE
PABE No. 4
NAME OF EXPERIMENT
"9alore)
*i ***** ****
E EE
E- E
E elE
E E) |I
I id Shos that the eTammar amb: ouou
Senlence
E E E*E
E+E*E
tc +E * E fd+E * E
Pd+id *E
+ 1d * f d +d * ?d
+E E
id E E id
+
d id id
Stoce the two Paa 6e brees are differeo for the same eo lence el +id Kid
aSx
X aXla
Stiog aaaa
B.I. T
S a S S X
a a aS ax
= a aX
a aaS
aa a X aaaX
aa a a a a aa
Since there are tuso letmost denvatioos fos the same seolace aaaa, the
gv rammax ambouCds.
S aB bA
A as | bAA la
B bS aB8b
Strng aabbab
B (Sa8) S aB sa8)
aa8B CBaB8) aoBB BaBB)
aabB Ceb) aab SB (Bb)
aabbS CB+6S)
aabbAB (sbA)
aabbaB CSaBB)
aabbab (Aa)
aa bbab (B)
aabbab (B6
a b
B A
4 . Obtain he
trin aaa bb abbba by aeplyg left mose
dertvaton and the vamma shown belo).
the passe tree for
I it pOAsible to obtoo the same trog again by apply08
lertmo»t deivation but by electing diffeven P oduc i ons?
S a8 | bA
A bAA aSla
bs oBBIb
S aB s a8) S a B SaB)
aaBeB (B a8 B aa BB BaBB)
aaaBBB (BaBe) aaa BBB (aee)
aaabBB'(8b) aaabSBB (ebs
aaabbB (Bb) aaabbABB (sbA)
aaabba88 (8aBB) aaabba BB CAa)
aaa bbab B (B6) aaa bba bB CB6)
Caoa babbS (6bs) aaa bbabbS CebS
=
aaa bbabb bA CSbA) aaa bbabbbA (SbA)
aaa bbabbba CAa) aaa bbabbba CAa)
S
a 8 B a B B
b b b S b b
b A
Q5.
I the
folloing érammar ambiuouh ?
S CtS | CtSeS | a
G b
String 6 Tbt b t a e a
S CtS S - C t Se S
b t Ss b t SeS
bti
btCt SeS btiCtSeS
bt: btSeS btibt SeS
>tbti btge SS
tbtibtae S
tbtibtae a =tbtibtaea
S
S G tSe S
C S s tSs
a
Stn ce there axe two different passe tsee sfer the stingib5btaea bt
B b
Striog aab
S AB S S aaß
AoB aabb
aab
a
a C B
Stoce there Care two pase trees for the strino aab,
tbe iven gYammar Omb ououA
Name of Expeiment... Date....
P a g e No. H+|
Experiment No.... Experiment Result....... .. f.FJ
S a SbS
S bSaS
S e
Strg aababb
S a SbS
(s+aSbs) S
aa SbSbS (SaSbS)
a SbS
aa b SaSbSbS (s~bsaS)
aabaSbSbS CSe)
Cse) a Sb S E
aababSbS
aa babbS Se)
aa ba bb CSe) b S aS
S aSbS ( S aSbs)
aaSbSbS (S-aSbS)
aSb S
aab SbS (Se)
= aaba SbSbS (S->aSbs)
aS b S
aababSbS Se)
aa ba bb S CsE)
asb
aababb (se)
(oR)
String s abab
SaSbS S aSbS
A a s bSS
a b SaSbS asbS abS
abab
bSaS
E aS bS ab a SbS > c ba b
a8. Obtan the u namb:guousramma fo« the vamma shoon belaa-
be conver ted o l5
Unombiououh r a m m aY hisramma Cao
F (E) I
OL a lblc
(a+b) * (a-b)
DerivaGen for the strng
E T
NOTE
Ce aMu me + 8 are2 havin9
F*F
highe6t pro+H Comjpared tha of
CE) * F K& and aUthe operaor barelefe
(E+T) * f cLsOCi e
a
, the Yammas ' be of the
(T T) * F form:
=(F+T)* F E E*TIElTIT
(I+T) * F T+FIT- FlF
F (E) T
= (at+ T) *
(ate) * F
alblc
thefos m E T *E TIE|T
T Tt FIT-F|F
F(E)T
1 alblc
EXPERIMENT No. ATI******************************
* * * * * * * **
Gram ar
S AB |C
A a Ab | ab
B C Bd | cd
aG daDDd
D bDC bcc
f i n l ë cautomaton
Dotal Des:e
B.I. T
fnile Aulomceto
Aart
Oteetel git
doit
lebtes drei t
DiQttal, Desig
Anautomaton co be
Aeful :o dioi tal desin becaus e many Of Ehe
ve«y
Ctycuts are based oo
Conceptsfrom adtema ta theos. Eveo thouoh loical
im plementation of CCuit is o
throyeh trcnAi stovb, vesi stovS,ates, flip-flops
etcan autom aton serves a bridee betoeen E8 fmplementatb oo and
fanctionat
debcrpti of o0
Circcit)
a
I 'a'
EXPERIMENT NO. DATE
aore
NAME OF EXPERIMENT PAGE No. |416
Morkup lanÙUape6
Jh most fcimiliar markup lonouage 15 HTML CHyper Tezt Markup
codes that indical . hoco itE shocld oppea 0 the ccompula atree.
K XML
XML S6ands for Exlaos:ble Maykup Lagu a oe. XML a s slem f o
eman 5ch.
Jan016
Ob&ain a èrammos oenerol tolss and osle derivat'on for the
unsi ned toee 1965. (8 M)
G :(v,T, P,S) wbere Y: D ,S,N,I
T: 1 t , o,!,,3,4,S,6,7,S,9
S: I i the stort stale
P: L I > N ISN
N D| DN| ND
S +1-1e
D ol lal+lse|T|8|9
3
Deivabon fov the inleèer 196S
N
DN (NDN)
1N
(D1)
DN
CNDN)
Lm
9N CD9)
19 DNN
Lm (NDN)
F196N (DG)
B.I. T
196D =>196S (N-D) (D5)
Consider the eraomar
SaS|aSbS|E
a b o v e romm a Ombiguou6 ? Shao that the stsog aab has two
f. Passe rees
. L e t most deivations
i Ripht nost deivatioos
(12M)
G:ven eammar i am biououb.
Pave trees
S a S S aSbS
aaSbs (SaSbS)
aaSbS CSaSs)
ao Sb CSe)
aabS Cse)
aob aab CSE)
S aS S aSbS
a asbS (S+aSbs)
aasbS (S>aS)
Lm
a abS CS+E)
aabS (SE)
aob (S)
aab CSe)
Right mobE dervati onb
S S S=aSbS
a asbS (S-aS bs) asb CSE)
aaSb (S+E) aa Sb Sass)
aab CS+E) aab CSE
ExPERIMENT No.
DATE ** **** *****
July 15
2 ubak t 3rummar ? Cxplain the clamification os grommars o eomple
Refer Noles P-lo. 401, 4002
(TM)
Obtaio be @ramna Reseralë be fellausi og longuages
() L:lu | nata) moc a = o,ohere o e Co,b PNo. 4O4 O.No.4
L 1a|a ih a paliodrome,where o e Ca,b)} pNo. 4c6 .No.F
GH)L: |n2l SabblaSbb (6 M)
Shoo that the follousoo èramma i am bouous
S a sa | bSs SSb | SbS
(7M)
Let the sbn be ab aaab
S SSb S Sb S
SaSb CSSa) ab S
Cs-a)
SbSaSb (8 SbS) abSSb (S SSb)
absaSb ( S a ) abasb (Sa)
abaaSb (S+a aba Sab CSSa)
Lm abaaab (Sa)) abaa ab (S+a)
S S b S b
a a
a S S b
b
S a
Jhere cvC too differcnt porse trees foi lhe stioo abaaa b by appl#o
leftmosle derrvation. So theoram mar is ambiouous
ofven
B.I.T
Jan 15 the
3 . Define a Conlait-Free Gramma CFG) and also obtain the CFG' fos
folowing languag
t.
Lo o we lo,s ad na
La a " |m4n :k and m,n
lol mod 3 lo mod P. No 408, .No .0
3 1o e /af (1OM)
S aaAbb
A aAb AO ALe
() S a a Sbc laabc
aaaaa| aaa a aa s
S aa | aao| aaaa
SbS
aSbS b S
a b
S b
Jhere are too dff renE par^e dor ee ezisth -for the same Atioo
ababab0 by apPHig leftmost desvation eoce fveo o rommar is
OmbiouOuS
T
hat a n ambiuouk rommar? (1OM)
Sho &hat the folloiogpromna 1 Onbiouous,
EE+e le-el E+El El¬| (E) la
Where E t h e start ymbol. find h unambtguous orammc
Refer P. No. 411
CE) CE)
CEtE) CE 4E)
Ca+E) (E+E E)
atE*E)
Un
Ca+E+ E)
(ata 4E) E
( a t a *E)
a4+a a) Ca+a ta)
E E
Jhere are two dfferent posoe trees exists for the strog (atata Hence e
give
S
rammay 1 ambjouus.
Unambiououh prommar i
E E +T E -TT
T T&F TIF F
F CE) | I
a
5 Desne CF6. Dekio a conlxk free èramma for the lanuoge (08M)
(L db, where i=j+k,ij,k>o
Refex P No. 402
) S> aaSbc |E
C8:S 00A
AOA1 lo1
LWhat an
ambiuouh rammar? Shouo that the Ùrammar Ahown
belo ik ambi/uou on the es og "aab".
C6 M)
S A8 |aaB
A Aa|a
b
P: No. 411
Refer
S AB8 S S oas
Aab aab
aa B
aab a
b
There exisbs tuoo differeoE passe treeb for
btono aob. +Hence the oiveo Qrammar ih Ombiouous
-EE + EEY A
EE
Et-E
+-
t*-EY**
-
B.I.T
July 13
O8M)
6. Conider the follooin rommar
E E+E E-E
C E*E EE
E CE
E alblc
. Obtain the lert most devivation for the stro (atbc)
Ca+E) (E +E E )
CE)*C
Ca4EE) (OR) Ca+e E (E+E) *C
Catb4¬E) (atb+E) CE+b) *C
Catbt c) (a+b kc)
(a+b) *C
Prove that the follasing rammas ambiouou b, Usiog the strsng tbt?btaea
(o8M)
S CS :CSeS a
C b
CESeS
C t S e SS
f b t SeS (C+b)
T t b tfcESeS CS>ictSs)
b t i b E S e S (C+6) CES a b .fCE Se S
Tbti bEaeS CS-+a)
b b
ibtibtaea S+a)
for the stiag
S CES Jhere exists tuso pashe treek
btS Ccb rammar il
Un
"btibtaeo" So, the tven o
bt iceSeS (S+ictSeS)
ibtbtaea CS-+a)
Disw% the varous oPplications of conttat free roGmmar. CO4 )
A15 and 416
P.No
Refe
Dec 12 420
7. the
Define follosine texms (OSM)
Lefemost derivation P No. 410 iti. Senteobal fom P.o 4405
P.No. 411
.Rightmost derivation p.alo. 410 iv Yield of a tree
P:No. L410
Pavsing
Desi C t grammar for the Lopeuae e L: w uwibio (a,b3(0SM)
S aSalbsb|&
Desin a conteat free roammar for tbe longugg e L l ob" shere kmh,
S ,m,kof (OSM)
ab Sce |&
Shoo hou ambiu in eramm ars are veted ob an exom pie 0SM)
(o64)
.
O
S SbS
S SbS
Sba
SbSbS
SbSb a
SbSbSbS
Sbaba
SbSbSba
SbSbaba SbS baba
Sboboba
Sbababa
abababa a baa
bababa
Tm
O4 M)
opplicoton of CF6 ib exomple.
Nen one
S Ae
S aaB S
aab
AaB A
T aaB
B a B
aab
b
A b
Jhese ove too passe t ees for the troo aab. Hence, the è iveo rammar
Ombiououh.
EXPERIMENT NO.
DATE .. .
NAME or C PAGE No. | 4 2
RRIMENT.....
******************* ************
* **** **********"*
o I - E ) |E Call-bo)- (boo-aoI)
Cail-E)/E
Ta11-b0) - (b00-ao1)
Ca11- E)/ E
a11 E)lE
Ca11-bI)|E
(a11-bD)/E
(a11-bo)|(E - E)
Cal1-bo) (1-E)
J o1l-bo)| (bI -E)
B.I.T
E E E#E CE bI) |(b00 -aol)
EEE) Ce-bO)| (bo0-a01)
E E
E E-E) (I-bo)| (boo-ao1)
E CE -I) CI-b0) (b0-ao1)
E (E) EE-ol)
o11-bo)/ (b00-a01)
(e-(E aoI)
-
E E E
ECE ao1) Ca11-bo)Cbco-a01)
E(I-oo1)
I
E(T -a01)
aI bL bI aT E (bor - a01)
E (b00-aoi)
a11 bo boT a0l CEI (bo0-a01)
CE-E | (b00-a01)
b00 a01
CE-1)I (b00-a01
Shoo that the
follosin èrammar ih ambguoub O4 M)
S
Ss|Cs) le over (ooo).
SCs) S sS S
(Ss) s)s
S Um
Ccss) S
Tss)S
Cs)
Ccsss S
(oss) Cos)s
COcs)s) Cs) S
Ccoos)
Css) S S
T(C(s)s)S
S) S
Ccs) (os)s C S
Coos))S
(OOo)s CS CS
(OO O)
Jhere are
ar tuwo
pawse trees exists for he
Hen ce the tno (O)).
tve trno
givengrommaY ambi ououk.
EXPERIMENT NO.
.. DATE...
NAME OF EXPERIMENT..... PAGE No. 422
**
DecTO
10
Depoe conlext free grammar. Wsl ihe èramma for the
follocsiQ8
Languaëes :Refer P No. 402 (o4 M)
. L ** i |n S00A, AoAL OL
i L )m>o and z0f SAB, A aAb|E, Bb8[b
(oR
SasbJ8, B>b8lb
Consides Iheeramm a , cob
productions (08 M)
SPrbB Give le leftmost derivabon, e h t most derivation
A aA le and parse tree for the sting aaaboab.
B aRB |b8l8
SAbB S AbB S
aAb8 AbaB
aaAbB AbabB A B
aaaAbB Abab
aaoab8 aA bab A O
aaabaß aaAbab
aaababB a aaAbab A b
aaabab aaobab
a A
P. No. A20
Refe
B.I.T
June. 10
12 Defne CPG. Obtan CPG for the follosg logguaSe
:
(10M)
.L:2wl o ela,bf 3, in the severbal of wf
S aSa lbsb |E
. L: : hah a
substioo abf
8aB]bB]e
SbsaA A +aA |b8,
-8-8 (OR
SAabA, A
,
elaAblbAa
al
Stng of one or more o's follaoed bt
(08 M)
Refer P. No. A02
S O1 los!
Comide Ehe oromm ar S aS lasbSle
aab
I thbe above orammar ambiououb ? Shous io pavbicalar that the >trqÇ s
. RighEmos t deivations
Leftmost derivation
.
C2 M)
Rerer P. lo A16
July 09
14 Conhtruct the cfS for the follous ing LoaQ@Oe 10 M)
8elbS
Lia"" | n>o, m>o SAB, A+el aoA , Ehe
most derivabion for
.L:2d |;-i o j=k} and eneral Let
6nng o 122.
SAB S A8
01122 C8E)
423
Define Ambiguous Gromm. Prove that the fotllasin érammar is Ambjpuous.
ind an unambuouh èrammas. S as laSbS | e 1O M)
Refer P No. 411.
a a a ab 6
S
S aS |A
nambiouous ramma. A
A aAbAIE S
S b
Jan 09
15. Define conlazt-fTee rammar and con lë conlaztfree èrammar fa the
S aSc lA , A bAc[&
ti.
S+aSe |A, AbAcle
Conhider herammas E+EE | EEI -EElzt Co8 M)
aod on e
iod leftmost and ohtmost dervation for the string t-1}z
pase tree.
Refer P.do. 19
L _ o s | o e Co,*3
C S+ osi |ISIl&
A 08 |i80
B OBo |18I lollE
S CS |cSds|& L jo
S cs dslc L:2ed' t jzo
S ss ds sdlc Lcd l i , jzo