You are on page 1of 4
— Pdr Rabon, Spa Bes oFF 7 Assignment _t Sy - B-1b-B O.No. 4. Exphain about Om biglous grammer with example , Ans: a : CF is gid to ambi ghaus if theve exity. more thom one dlerivations tree if the given inpuk String ie.) move than one LeFtiest Derivedicn Tree Right otast Derivahion Tre, 7 = (V,TP,S) is a CPm is catch to be ambiguens if and only Po Have exits a string in T* Hat has more Han on parse tree. | | | for_example: tet us consider E> Er€lial we Con ertule Q pane tree from tic grrommer Yo bbin a string idsidaid: @ @ a ® j © @) pit i] ©@ © OD fis) a [A fA Scanned with CamScanner Pays Both Me Wrees carve levived! fram came grammer d yales but both parse Yrees are olifPent. Hence gqrometer ts ambiguous. Exany le amt” Bipos Check whether the gies mee i armnbbiguens wt not S=> Als A> a Ab lob ,> obb/e Soletion oo A String w prorated by the gi romme fe Weak, or Th pow, Jet uh alrov parse dyees for ts q string § $ { i A /\ JN, ab ra Rod i Cince two UifFerent pane trees exit for \ 1 string wW, Fhe grenmer is ambigSns , Scanned with CamScanner — O.Ne.a Construct a recursive cescont Parses for the fa Uawing grammer, Es E+T/T tT 2 T/F fa et /als schtlan = £7 Ft TIT E> Te’ T > TEE i AER : co Fath COGIh ir > afb : Scanned with CamScanner O.no-3 Consider the qvammer giren below E> erele-E/E"E Je/esel als ace | obtain feft ive Qigkh == mare cleriine = pone Qefteect _aherivabion: we Cree /\ ar BE Exe p “€ /‘\ | Ev ob XE Eb pawxere AY La ath nash Ere 1! Ri moh _crevivostion 1 E> Er€ Tes b> ee *e E E77 Gre E+E : ‘ £2 E+E'mt? A \\ E> Exb Kars E E 7 ath & ath | /\ ir —7 [a+b xoss Scanned with CamScanner

You might also like