0% found this document useful (0 votes)
39 views19 pages

Toc Mod 2

Uploaded by

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

Toc Mod 2

Uploaded by

shahalameenu2003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 19
moo-e FORMAL Fount “| ee ee he theory of Poamot langucige axpplicobitity ettenstuely fn dine Frets a onomsky goue & mosis riodlal OF Grou) ' P a fo. lage winitle is efrécttve for a of — Giammoay- 4 A qrammoad G can be Peimally wate a iB meee CNT, 50) Whine’ 3 xriot Vo 9s eek of vortabler OL NOn- ferrojrat Synbols - 3 — £7 of f6 asek Of lewminal symbols es fa speci Vositibte catloo! dre sare % Sen XP Ps procuct? aul fox JevrmminalseNe ternonaly ; A product? arte has the Fown M>B , Whee “9 Oe Stings on No L sna syle) OF oe: Basic FO Vay romadt Cri, Ae ise, ages ae A Owe, : | SpA eB axe NON- otra! ad ae (ab cm tewnfacd symbols s fetho stat Sqyrabo) Sen Paoduck®s prs AB, pra /B2b. 2 Grammnes Qa: EISASs {a,b Ls bes OAb, an aakb, A > 96 B,n~e 7 Of — Deaivam Foon ao Grammar. Shing may be Cartived Ran other sHirgs ay the poclucks 7 gyammmar 1A gre owl y dashed PHY fa Ga. Tht Leia , eee Tee SAE Lae US con stoton he goann mas | Ga C§siAR, ao Sy Essen ons aay Asef) Bo toe y Sorta OF ane stings trat con bx doalvedl ose “ SSOhb using produc” $2 OAb aM =>aahbb using Arccluct” a Asano SoacAbbb usthy produc? ah soflle “ > Ada bbb using Pasoluck? ASE > va the set OF all chings hat cou bee oneal Qacmnrces f5 sate fo ke dhe lanquoge ge } faow drat gacrmenes aba sulosel. Poa nod by. LG) ef wre 2% Saw? te LCG J= LG) the gaammer Gy fs equivalent 10 tho geammax Ga 5 ae thee UO gaammas. ee D as Scanned wth Camscanner 05 ie Luna} Te fo be eel A>a,” . | gm bs * pew S Produca AB & he con . aoplace ee % BeyBb «| row the only eceopted Hing Ls if, 1 (oe) = fabs ’ ey suppose Wwe Ihave. tho Palwowing gqoeenaos = 1 S)A/B3 T=fa,b? pejssaB, ArAA lon > belo? The langucge gnedated by this qoamames ; Lia) =f ab, o&b ab? A%tRr..-- 2 = Lam brpeemed eg 021} —Conmaer ck? OF. A geanomay gent Png a. teungeiage. . met consfolra Beme, languages & convalt IC fabo.e: gaommey Ge. whic. prootuce? frose larg Ysuppos. ,) CO) =fAMb?:MS6 anreltiiy = we Wave fo Pind out he Grarimer GQ Wwhith | Produces 2 Ch) 2 sine @LCO=faPb”rmso enogy © Scanned wth Camscanner . the sting set f bab, bb @ab, Ohh =o es O38 ;AeA BA 2 8 of (ek Lead= 24; ob, bb, ices jthe staat Sgro vol has to fake , ne- oF tay fe pareve! by ony the product: tae Teg) Babe Bs be eS Bos beGccaptedl #52 BSbB-> bb (acapted) 55> assapsab (cctapted ). ®¥SS assaas >Aadds act b Cactoptes { Fs2 O53 aps a bbsa bb, (actepted) TRY) we cou prove single ontey 0 Lod actepted bythe language re UctO cot. Horne the qoaromar ‘ Y Oe mrp fo 32 8 £5305), sbi bw Scanned wth CamScanner CHOMSKY CLASSIFICATION OF LANGUAGE ‘Scanned with ComScanner Chomsky Classification of Grammars According to Noam Chomosky, there are four types of grammars - Type 0, Type 1, Type 2, and Type 3. The following table shows how they differ from each other Grammar Grammar Accepted Language Accepted Automaton ‘Type Type 0 Unrestricted Recursively enumerable Turing Machine grammar language Type 1 Context-sensitive Context-sensitive language _Linear-bounded grammar automaton Type 2 Context-free Context-free language Pushdown automaton grammar Type 3 Regular grammar Regular language Finite state automaton Scanned wth CamScanner Take a look at the following illustration. It shows the scope of each type of grammar — a — Recursively Enumerable | cme tne \ | er | | , | N | Context - Free | | \ Scanned wth CamScanner Type - 3 Grammar Type-3 grammars generate regular languages. Type-3 grammars must have a single non-terminal on the left-hand side and a right-hand side consisting of a single terminal or single terminal followed by a single non-terminal. The productions must be in the form X > aorX > aY where X, Y © N (Non terminal) and a T (Terminal) The rule S$ > € is allowed if S$ does not appear on the right side of any rule. Example XD_E X>a|aY Y>b Type - 2 Grammar Type-2 grammars generate context-free languages. The productions must be in the form AYy where A € N (Non terminal) and y € (T u N)* (String of terminals and non-terminals). These languages generated by these grammars are be recognized by a non-deterministic pushdown automaton Scanned wth CamScanner Example S>Xa X>a X > aX X > abc XDe_E Type - 1 Grammar Type-1 grammars generate context-sensitive languages. The productions must be in the form aAB>D>ayB where A € N (Non-terminal) and a, B, y © (T U N)* (Strings of terminals and non-terminals) The strings a and B may be empty, but y must be non-empty. The rule S > € is allowed if S does not appear on the right side of any rule. The language generated by these grammars are recognized by a linear bounded automaton. Example AB > AbBc A> bcA B>b Type - 0 Grammar Type-O grammars generate recursively enumerable languages. The productions have no restrictions. They are any phase structure grammar including all formal grammars. They generate the languages that are recognized by a Turing machine. The productions can be in the form of a > B where ais a string of terminals and non terminals with at least one non terminal and acannot be null. Bis a string of terminals and non-terminals. Example S > ACaB Bc > acB CB > DB aD > Db © Hanguage @ theis Rotation ecu Pee Po, Leb, Leek e% La clonetad Loge. eer, Aahinfe? te Poltons thak Hekate ey Lesi ets —panpeety 29 Pisce AAS ECS), ek Q 59. ¥.3_952 ‘Scanned with ComScanner “_conkett fice GFlamme G wlth Peoduck” of: RAR < _. the form. yA Ah ae aes ‘equdvalent bo contantt” Free. cu. which lag no pacoluct? of the Reino sme. (6 cteosn’t Appeas ON dhe AE Stole OF product) SoG & tontertk sensPife. This Paoven UOR of conterck Foe language subst OP contort sensftfve langucrge —Papperty 2 x Rocurshe % Kosussfie enuumercble set Foy da ffaing socussfue ee we nocd Hw cdobio? i OF a procaclut ep algorithm. _paocacluse : A procodltan For aoa oO pProbuum 2 @ Frat Sequiance. oF thst? which can be mochantteully « Cossfed out cy type OF iP - “Algoat finn : Av Alasnitono fs a parocectuse that pernrincctes Aris & Pirate no. of steps Pov any Yp- Ast x & secustve FF no have a Ugaritiony fo detenmint whats a Elman er aaa Cie eee cis Sse Gris ‘Scanned with ComScanner

You might also like