Parsing Directed Acyclic Graphs with Range Concatenation Grammars

Size: px
Start display at page:

Download "Parsing Directed Acyclic Graphs with Range Concatenation Grammars"

Transcription

1 Prsing Directed Acyclic Grphs with Rnge Conctention Grmmrs Pierre Boullier nd Benoît Sgot Alpge, INRIA Pris-Rocquencourt & Université Pris 7 Domine de Voluceu Rocquencourt, BP Le Chesny Cedex, Frnce {PierreBoullier,BenoitSgot}@inrifr Astrct Rnge Conctention Grmmrs (RCGs) re syntctic formlism which possesses mny ttrctive properties It is more powerful thn Liner Context-Free Rewriting Systems, though this power is not reched to the detriment of efficiency since its sentences cn lwys e prsed in polynomil time If the input, insted of string, is Directed Acyclic Grph (DAG), only simple RCGs cn still e prsed in polynomil time For non-liner RCGs, this polynomil prsing time cnnot e gurnteed nymore In this pper, we show how the stndrd prsing lgorithm cn e dpted for prsing DAGs with RCGs, oth in the liner (simple) nd in the non-liner cse 1 Introduction The Rnge Conctention Grmmr (RCG) formlism hs een introduced y Boullier ten yers go A complete definition cn e found in (Boullier, 2004), together with some of its forml properties nd prsing lgorithm (qulified here of stndrd) which runs in polynomil time In this pper we shll only consider the positive version of RCGs which will e revited s PRCG 1 PRCGs re very ttrctive since they re more powerful thn the Liner Context-Free Rewriting Systems (LCFRSs) y (Vijy-Shnker et l, 1987) In fct LCFRSs re equivlent to simple PRCGs which re suclss of PRCGs Mny Mildly Context- Sensitive (MCS) formlisms, including Tree Adjoining Grmmrs (TAGs) nd vrious kinds of Multi-Component TAGs, hve lredy een 1 Negtive RCGs do not dd forml power since oth versions exctly cover the clss PTIME of lnguges recognizle in deterministic polynomil time (see (Boullier, 2004) for n indirect proof nd (Bertsch nd Nederhof, 2001) for direct proof) trnslted into their simple PRCG counterprt in order to get n efficient prser for free (see for exmple (Brthélemy et l, 2001)) However, in mny Nturl Lnguge Processing pplictions, the most suitle input for prser is not sequence of words (forms, terminl symols), ut more complex representtion, usully defined s Direct Acyclic Grph (DAG), which correspond to finite regulr lnguges, for tking into ccount vrious kinds of miguities Such miguities my come, mong others, from the output of speech recognition systems, from lexicl miguities (nd in prticulr from tokeniztion miguities), or from nondeterministic spelling correction module Yet, it hs een shown y (Bertsch nd Nederhof, 2001) tht prsing of regulr lnguges (nd therefore of DAGs) using simple PRCGs is polynomil In the sme pper, it is lso proven tht prsing of finite regulr lnguges (the DAG cse) using ritrry RCGs is NP-complete This ppers ims t showing how these complexity results cn e mde concrete in prser, y extending stndrd RCG prsing lgorithm so s to hndle input DAGs We will first recll oth some sic definitions nd their nottions Afterwrds we will see, with slight modifiction of the notion of rnges, how it is possile to use the stndrd PRCG prsing lgorithm to get in polynomil time prse forest with DAG s input 2 However, the resulting prse forest is vlid only for simple PRCGs In the non-liner cse, nd consistently with the complexity results mentioned ove, we show tht the resulting prse forest needs further processing for filtering out inconsistent prses, which my need n exponentil time The proposed filtering lgorithm llows for prsing DAGs in prctice with ny PRCG, including non-liner ones 2 The notion of prse forest is reminiscent of the work of (Lng, 1994) 254 Proceedings of the 11th Interntionl Conference on Prsing Technologies (IWPT), pges , Pris, Octoer 2009 c 2009 Assocition for Computtionl Linguistics

2 2 Bsic notions nd nottions 21 Positive Rnge Conctention Grmmrs A positive rnge conctention grmmr (PRCG) G = (N, T, V, P, S) is 5-tuple in which: T nd V re disjoint lphets of terminl symols nd vrile symols respectively N is non-empty finite set of predictes of fixed rity (lso clled fn-out) We write k = rity(a) if the rity of the predicte A is k A predicte A with its rguments is noted A( α) with vector nottion such tht α = k nd α[j] is its j th rgument An rgument is string in (V T ) S is distinguished predicte clled the strt predicte (or xiom) of rity 1 P is finite set of cluses A cluse c is rewriting rule of the form A 0 ( α 0 ) A 1 ( α 1 ) A r ( α r ) where r, r 0 is its rnk, A 0 ( α 0 ) is its left-hnd side or LHS, nd A 1 ( α 1 ) A r ( α r ) its right-hnd side or RHS By definition c[i] = A i ( α i ), 0 i r where A i is predicte nd α i its rguments; we note c[i][j] its j th rgument; c[i][j] is of the form X 1 X nij (the X k s re terminl or vrile symols), while c[i][j][k], 0 k n ij is position within c[i][j] For given cluse c, nd one of its predictes c[i] surgument is defined s sustring of n rgument c[i][j] of the predicte c[i] It is denoted y pir of positions (c[i][j][k], c[i][j][k ]), with k k Let w = 1 n e n input string in T, ech occurrence of sustring l+1 u is pir of positions (w[l], w[u]) st 0 l u n clled rnge nd noted lu w or lu when w is implicit In the rnge lu, l is its lower ound while u is its upper ound If l = u, the rnge lu is n empty rnge, it spns n empty sustring If ρ 1 = l 1 u 1, nd ρ m = l m u m re rnges, the conctention of ρ 1,, ρ m noted ρ 1 ρ m is the rnge ρ = lu if nd only if we hve u i = l i+1, 1 i < m, l = l 1 nd u = u m If c = A 0 ( α 0 ) A 1 ( α 1 ) A r ( α r ) is cluse, ech of its surguments (c[i][j][k], c[i][j][k ]) my tke rnge ρ = lu s vlue: we sy tht it is instntited y ρ However, the instntition of surgument is sujected to the following constrints If the surgument is the empty string (ie, k = k ), ρ is n empty rnge If the surgument is terminl symol (ie, k + 1 = k nd X k T ), ρ is such tht l + 1 = u nd u = X k Note tht severl occurrences of the sme terminl symol my e instntited y different rnges If the surgument is vrile symol (ie, k + 1 = k nd X k V ), ny occurrence (c[i ][j ][m], c[i ][j ][m ]) of X k is instntited y ρ Thus, ech occurrence of the sme vrile symol must e instntited y the sme rnge If the surgument is the string X k+1 X k, ρ is its instntition if nd only if we hve ρ = ρ k+1 ρ k in which ρ k+1,, ρ k re respectively the instntitions of X k+1,, X k If in c we replce ech rgument y its instntition, we get n instntited cluse noted A 0 ( ρ 0 ) A 1 ( ρ 1 ) A r ( ρ r ) in which ech A i ( ρ i ) is n instntited predicte A inry reltion clled derive nd noted G,w is defined on strings of instntited predictes If Γ 1 nd Γ 2 re strings of instntited predictes, we hve Γ 1 A 0 ( ρ 0 ) Γ 2 Γ 1 A 1 ( ρ 1 ) A m ( ρ m ) Γ 2 G,w if nd only if A 0 ( ρ 0 ) A 1 ( ρ 1 ) A m ( ρ m ) is n instntited cluse The (string) lnguge of PRCG G is the set L(G) = {w S( 0 w w ) + G,w ε} In other words, n input string w T, w = n is sentence of G if nd only there exists complete derivtion which strts from S( 0n ) (the instntition of the strt predicte on the whole input text) nd leds to the empty string (of instntited predictes) The prse forest of w is the CFG whose xiom is S( 0n ) nd whose productions re the instntited cluses used in ll complete derivtions 3 We sy tht the rity of PRCG is k, nd we cll it k-prcg, if nd only if k is the mximum 3 Note tht this prse forest hs no terminl symols (its lnguge is the empty string) 255

3 rity of its predictes (k = mx A N rity(a)) We sy tht k-prcg is simple, we hve simple k-prcg, if nd only if ech of its cluse is non-comintoril: the rguments of its RHS predictes re single vriles; non-ersing: ech vrile which occur in its LHS (resp RHS) lso occurs in its RHS (resp LHS); liner: there re no vriles which occur more thn once in its LHS nd in its RHS The suclss of simple PRCGs is of importnce since it is MCS nd is the one equivlent to LCFRSs 22 Finite Automt A non-deterministic finite utomton (NFA) is the 5-tuple A = (Q, Σ, δ, q 0, F ) where Q is non empty finite set of sttes, Σ is finite set of terminl symols, δ is the ternry trnsition reltion δ = {(q i, t, q j ) q i, q j Q t Σ }, q 0 is distinguished element of Q clled the initil stte nd F is suset of Q whose elements re clled finl sttes The size of A, noted A, is its numer of sttes ( A = Q ) We define the ternry reltion δ on Q Σ Q s the smllest set st δ = {(q, ε, q) q Q} {(q 1, xt, q 3 ) (q 1, x, q 2 ) δ (q 2, t, q 3 ) δ} If (q, x, q ) δ, we sy tht x is pth etween q nd q If q = q 0 nd q F, x is complete pth The lnguge L(A) defined (generted, recognized, ccepted) y the NFA A is the set of ll its complete pths We sy tht NFA is empty if nd only if its lnguge is empty Two NFAs re equivlent if nd only if they define the sme lnguge A NFA is ε-free if nd only if its trnsition reltion does not contin trnsition of the form (q 1, ε, q 2 ) Every NFA cn e trnsformed into n equivlent ε-free NFA (this clssicl result nd those reclled elow cn e found, eg, in (Hopcroft nd Ullmn, 1979)) As usul, NFA is drwn with the following conventions: trnsition (q 1, t, q 2 ) is n rrow lelled t from stte q 1 to stte q 2 which re printed with surrounded circle Finl sttes re douly circled while the initil stte hs single unconnected, unlelled input rrow A deterministic finite utomton (DFA) is NFA in which the trnsition reltion δ is trnsition function, δ : Q Σ Q In other words, there re no ε-trnsitions nd if (q 1, t, q 2 ) δ, t ε nd (q 1, t, q 2 ) δ with q 2 q 2 Ech NFA cn e trnsformed y the suset construction into n equivlent DFA Moreover, ech DFA cn e trnsformed y minimiztion lgorithm into n equivlent DFA which is miniml (ie, there is no other equivlent DFA with fewer sttes) 23 Directed cyclic grphs Formlly, directed cyclic grph (DAG) D = (Q, Σ, δ, q 0, F ) is n NFA for which there exists strict order reltion < on Q such tht (p, t, q) δ p < q Without loss of generlity we my ssume tht < is totl order Of course, s NFAs, DAGs cn e trnsformed into equivlent deterministic or miniml DAGs 3 DAGs nd PRCGs A DAG D is recognized (ccepted) y PRCG G if nd only if L(D) L(G) A trivil wy to solve this recognition (or prsing) prolem is to extrct the complete pths of L(D) (which re in finite numer) one y one nd to prse ech such string with stndrd PRCG prser, the (complete) prse forest for D eing the union of ech individul forest 4 However since DAGs my define n exponentil numer of strings wrt its own size, 5 the previous opertion would tke n exponentil time in the size of D, nd the prse forest would lso hve n exponentil size The purpose of this pper is to show tht it is possile to directly prse DAG (without ny unfolding) y shring identicl computtions This shring my led to polynomil prse time for n exponentil numer of sentences, ut, in some cses, the prse time remins exponentil 31 DAGs nd Rnges In mny NLP pplictions the source text cnnot e considered s sequence of terminl symols, ut rther s finite set of finite strings As 4 These forests do not shre ny production (instntited cluse) since rnges in prticulr forest re ll relted to the corresponding source string w (ie, re ll of the form ij w) To e more precise the union opertion on individul forests must e completed in dding productions which connect the new (super) xiom (sy S ) with ech root nd which re, for ech w of the form S S( 0 w w) 5 For exmple the lnguge ( ) n, n > 0 which contins 2 n strings cn e defined y miniml DAG whose size is n

4 mentioned in th introduction, this non-unique string could e used to encode not-yet-solved miguities in the input DAGs re convenient wy to represent these finite sets of strings y fctorizing their common prts (thnks to the minimiztion lgorithm) In order to use DAGs s inputs for PRCG prsing we will perform two generliztions The first one follows Let w = t 1 t n e string in some lphet Σ nd let Q = {q i 0 i n} e set of n + 1 ounds with totl order reltion <, we hve q 0 < q 1 < < q n The sequence π = q 0 t 1 q 1 t 2 q 2 t n q n Q (Σ Q) n is clled ounded string which spells w A rnge is pir of ounds (q i, q j ) with q i < q j noted p i p j π nd ny triple of the form (q i 1 t i q i ) is clled trnsition All the notions round PRCGs defined in Section 21 esily generlize from strings to ounded strings It is lso the cse for the stndrd prsing lgorithm of (Boullier, 2004) Now the next step is to move from ounded strings to DAGs Let D = (Q, Σ, δ, q 0, F ) e DAG A string x Σ st we hve (q 1, x, q 2 ) δ is clled pth etween q 1 nd q 2 nd string π = qt 1 q 1 t p q p Q (Σ Q) is ounded pth nd we sy tht π spells t 1 t 2 t p A pth x from q 0 to f F is complete pth nd ounded pth of the form q 0 t 1 t n f with f F is complete ounded pth In the context of DAG D, rnge is pir of sttes (q i, q j ) with q i < q j noted q i q j D A rnge q i q j D is vlid if nd only if there exists pth from q i to q j in D Of course, ny rnge pq D defines its ssocited su-dag D pq = (Q pq, Σ pq, δ pq, p, {q}) s follows Its trnsition reltion is δ pq = {(r, t, s) (r, t, s) δ (p, x, r), (s, x, q) δ } If δ pq = (ie, there is no pth etween p nd q), D pq is the empty DAG, otherwise Q pq (resp Σ pq ) re the sttes (resp terminl symols) of the trnsitions of δ pq With this new definition of rnges, the notions of instntition nd derivtion esily generlize from ounded strings to DAGs The lnguge of PRCG G for DAG D is defined y L (G, D) = f F {x S( q 0 f D ) + G,D ε} Let x L(D), it is not very difficult to show tht if x L(G) then we hve x L (G, D) However, the converse is not true (see Exmple 1), sentence of L(D) L (G, D) my not e in L(G) To put it differently, if we use the stndrd RCG prser, with the rnges of DAG, we produce the shred prse-forest for the lnguge L (G, D) which is superset of L(D) L(G) However, if G is simple PRCG, we hve the equlity L(G) = D is DAG L (G, D) Note tht the suclss of simple PRCGs is of importnce since it is MCS nd it is the one equivlent to LCFRSs The informl reson of the equlity is the following If n instntited predicte A i ( ρ i ) succeeds in some RHS, this mens tht ech of its rnges ρ i [j] = kl D hs een recognized s eing component of A i, more precisely their exists pth from k to l in D which is component of A i The rnge kl D selects in D set δ kl D of trnsitions (the trnsitions used in the ounded pths from k to l) Becuse of the linerity of G, there is no other rnge in tht RHS which selects trnsition in δ kl D Thus the ounded pths selected y ll the rnges of tht RHS re disjoints In other words, ny occurrence of vlid instntited rnge ij D selects set of pths which is suset of L(D ij ) Now, if we consider non-liner PRCG, in some of its cluses, there is vrile, sy X, which hs severl occurrences in its RHS (if we consider top-down non-linerity) Now ssume tht for some input DAG D, n instntition of tht cluse is component of some complete derivtion Let pq D e the instntition of X in tht instntited cluse The fct tht predicte in which X occurs succeeds mens tht there exist pths from p to q in D pq The sme thing stnds for ll the other occurrences of X ut nothing force these pths to e identicl or not Exmple 1 Let us tke n exmple which will e used throughout the pper It is non-liner 1-PRCG which defines the lnguge n n c n, n 0 s the intersection of the two lnguges n c n nd n n c Ech of these lnguges is respectively defined y the predictes n c n nd n n c ; the strt predicte is n n c n 257

5 1 2 3 Figure 1: Input DAG ssocited with c n n c n (X) n c n (X) n n c (X) n c n (X) n c n (X) n c n (X) n c n (X) n c n (Xc) n c n (X) n c n (ε) ε n n c (Xc) n n c (X) n n c (X) n n (X) n n (X) n n (X) n n (ε) ε If we use this PRCG to prse the DAG of Figure 1 which defines the lnguge {, c}, we (erroneously) get the non-empty prse forest of Figure 2 though neither nor c is in n n c n 6 It is not difficult to see tht the prolem comes from the non-liner instntited vrile X 14 in the strt node, nd more precisely from the ctul (wrong) mening of the three different occurrences of X 14 in n n c n (X 14 ) n c n (X 14 ) n n c (X 14 ) The first occurrence in its RHS sys tht there exists pth in the input DAG from stte 1 to stte 4 which is n n c n The second occurrence sys tht there exists pth from stte 1 to stte 4 which is n n n c While the LHS occurrence (wrongly) sys tht there exists pth from stte 1 to stte 4 which is n n n c n However, if the two X 14 s in the RHS hd selected common pths (this is not possile here) etween 1 nd 4, vlid interprettion could hve een proposed With this exmple, we see tht the difficulty of DAG prsing only rises with non-liner PRCGs If we consider liner PRCGs, the su-clss of the PRCGs which is equivlent to LCFRSs, the 6 In this forest ovl nodes denote different instntited predictes, while its ssocited instntited cluses re presented s its dughter(s) nd re denoted y squre nodes The LHS of ech instntited cluse shows the instntition of its LHS symols The RHS is the corresponding sequence of instntited predictes The numer of dughters of ech squre node is the numer of its RHS instntited predictes c 4 stndrd lgorithm works perfectly well with input DAGs, since vlid instntition of n rgument of predicte in cluse y some rnge pq mens tht there exists (t lest) one pth etween p nd q which is recognized The pper will now concentrte on non-liner PRCGs, nd will present new vlid prsing lgorithm nd study its complexities (in spce nd time) In order to simplify the presenttion we introduce this lgorithm s post-processing pss which will work on the shred prse-forest output y the (slightly modified) stndrd lgorithm which ccepts DAGs s input 32 Prsing DAGs with non-liner PRCGs The stndrd prsing lgorithm of (Boullier, 2004) working on string w cn e sketched s follows It uses single memoized oolen function predicte(a, ρ) where A is predicte nd ρ is vector of rnges whose dimension is rity(a) The initil cll to tht function hs the form predicte (S, 0 w ) Its purpose is, for ech A 0 -cluse, to instntite ech of its symols in consistnt wy For exmple if we ssume tht the i th rgument of the LHS of the current A 0 -cluse is α ixy α i nd tht the i th component of ρ 0 is the rnge p i q i n instntition of X, n Y y the rnges p X q X, p q nd p Y q Y is such tht we hve p i p X q X = p < q = p + 1 = p Y q Y q i nd w = w w with w = p Since the PRCG is non ottom-up ersing, the instntition of ll the LHS symols implies tht ll the rguments of the RHS predictes A i re lso instntited nd gthered into the vector of rnges ρ i Now, for ech i (1 i RHS ), we cn cll predicte (A i, ρ i ) If ll these clls succeed, the instntited cluse cn e stored s component of the shred prse forest 7 In the cse of DAG D = (Q, Σ, δ, q 0, F ) s input, there re two slight modifictions, the initil cll is chnged y the conjunctive cll predicte(s, q 0 f 1 ) predicte (S, q 0 f F ) with f i F 8 nd the terminl symol cn e instntited y the rnge p q D only if (p,, q ) 7 Note tht such n instntited cluse could e unrechle from the (future) instntited strt symol which will e the xiom of the shred forest considered s CFG 8 Techniclly, ech of these clls produces forest These individul forests my shre suprts ut their roots re ll different In order to hve true forest, we introduce new root, the super-root whose dughters re the individul forests 258

6 n n c n 14 n n c n (X 14 ) n c n 14 n n c 14 n c n 14 n n c 14 n c n (X 14 ) n c n 14 n n c (X 14 ) n n 14 n c n 14 n n 14 n c n ( 13 X 33 c 34 ) n c n 33 n n ( 12 X ) n n 22 n c n 33 n n 22 n c n (ε 33 ) ε n n (ε 22 ) ε Figure 2: Prse forest for the input DAG c is trnsition in δ The vrile symol X cn e instntited y the rnge p X q X D only if p X q X D is vlid 33 Forest Filtering We ssume here tht for given PRCG G we hve uilt the prse forest of n input DAG D s explined ove nd tht ech instntited cluse of tht forest contins the rnge p X q X D of ech of its instntited symols X We hve seen in Exmple 1 tht this prse forest is vlid if G is liner ut my well e unvlid if G is non-liner In tht ltter cse, this hppens ecuse the rnge p X q X D of ech instntition of the non-liner vrile X selects the whole su-dag D px q X while ech instntition should only select sulnguge of L(D px q X ) For ech occurrence of X in the LHS or RHS of non-liner cluse, its su-lnguges could of course e different from the others In fct, we re interested in their intersections: If their intersections re non empty, this is the lnguge which will e ssocited with p X q X D, otherwise, if their intersections re empty, then the instntition of the considered cluse fils nd must thus e removed from the forest Of course, we will consider tht the lnguge ( finite numer of strings) ssocited with ech occurrence of ech instntited symol is represented y DAG The ide of the forest filtering lgorithm is to first compute the DAGs ssocited with ech rgument of ech instntited predicte during ottom-up wlk These DAGs re clled decortions This processing will perform DAG compositions (including intersections, s suggested ove), nd will erse cluses in which empty intersections occur If the DAG ssocited with the single rgument of the super-root is empty, then prsing filed Otherwise, top-down wlk is lunched (see elow), which my lso erse non-vlid instntited cluses If necessry, the lgorithm is completed y clssicl CFG lgorithm which erse non productive nd unrechle symols leving reduced grmmr/forest In order to simplify our presenttion we will ssume tht the PRCGs re non-comintoril nd ottom-up non-ersing However, we cn note tht the following lgorithm cn e generlized in order to hndle comintoril PRCGs nd in prticulr with overlpping rguments 9 Moreover, we will ssume tht the forest is non cyclic (or equivlently tht ll cycles hve previously een removed) 10 9 For exmple the non-liner comintoril cluse A(XY Z) B(XY ) B(Y Z) hs overlpping rguments 10 By clssicl lgorithm from the CFG technology 259

7 331 The Bottom-Up Wlk For this principle lgorithm, we ssume tht for ech instntited cluse in the forest, DAG will e ssocited with ech occurrence of ech instntited symol More precisely, for given instntited A 0 -cluse, the DAGs ssocited with the RHS symol occurrences re composed (see elow) to uild up DAGs which will e ssocited with ech rgument of its LHS predicte For ech LHS rgument, this composition is directed y the sequence of symols in the rgument itself The forest is wlked ottom-up strting from its leves The constrint eing tht n instntited cluse is visited if nd only if ll its RHS instntited predictes hve lredy ll een visited (computed) This constrint cn e stisfied for ny non-cyclic forest To e more precise, consider n instntition c ρ = A 0 ( ρ 0 ) A 1 ( ρ 1 ) A p ( ρ p ) of the cluse c = A 0 ( α 0 ) A 1 ( α 1 ) A m ( α m ), we perform the following sequence: 1 If the cluse is not top-down liner (ie, there exist multiple occurrences of the sme vriles in its RHS rguments), for such vrile X let the rnge p X q X e its instntition (y definition, ll occurrences re instntited y the sme rnge), we perform the intersection of the DAGs ssocited with ech instntited predicte rgument X If one intersection results in n empty DAG, the instntited cluse is removed from the forest Otherwise, we perform the following steps 2 If RHS vrile Y is liner, it occurs once in the j th rgument of predicte A i We perform rnd new copy of the DAG ssocited with the j th rgument of the instntition of A i 3 At tht moment, ll instntited vriles which occur in c ρ re ssocited with DAG For ech occurrence of terminl symol t in the LHS rguments we ssocite (new) DAG whose only trnsition is (p, t, q) where p nd q re rnd new sttes with, of course, p < q 4 Here, ll symols (terminls or vriles) re ssocited with disjoints DAGs For ech LHS rgument α 0 [i] = X1 i Xi j Xi p i, we ssocite new DAG which is the conctention of the DAGs ssocited with the symols X i 1,, Xi j, nd Xi p i 5 Here ech LHS rgument of c ρ is ssocited with non empty DAG, we then report the individul contriution of c ρ into the (lredy computed) DAGs ssocited with the rguments of its LHS A 0 ( ρ 0 ) The DAG ssocited with the i th rgument of A 0 ( ρ 0 ) is the union (or copy if it is the first time) of its previous DAG vlue with the DAG ssocited with the i th rgument of the LHS of c ρ This ottom-up wlk ends on the super-root with finl decortion sy R In fct, during this ottomup wlk, we hve computed the intersection of the lnguges defined y the input DAG nd y the PRCG (ie, we hve L(R) = L(D) L(G)) Exmple 2 c Figure 3: Input DAG ssocited with c c With the PRCG of Exmple 1 nd the input DAG of Figure 3, we get the prse forest of Figure 4 whose trnsitions re decorted y the DAGs computed y the ottom-up lgorithm 11 The crucil point to note here is the intersection which is performed etween {c, c} nd {c, } on n n c n (X 14 ) n c n 14 n n c 14 The non-empty set {c} is the finl result ssigned to the instntited strt symol Since this result is non empty, it shows tht the input DAG D is recognized y G More precisely, this shows tht the su-lnguge of D which is recognized y G is {c} However, s shown in the previous exmple, the (undecorted) prse forest is not the forest uilt for the DAG L(D) L(G) since it my contin non-vlid prts (eg, the trnsitions lelled {c} or {} in our exmple) In order to get the 11 For redility resons these DAGs re represented y their lnguges (ie, set of strings) Bottom-up trnsitions from instntited cluses to instntited predictes reflects the computtions performed y tht instntited cluse while ottom-up trnsitions from instntited predictes to instntited cluses re the union of the DAGs entering tht instntited predicte 260

8 n n c n 14 {c} n n c n (X 14 ) n c n 14 n n c 14 {c, c} {c, } n c n 14 n n c 14 {c} {} n c n (X 14 ) n c n 14 {c} n n c (X 14 ) n n 14 {c} n c n ( 12 X 24 ) n c n 24 n n c (X 13 c 34 ) n n c 13 {c} {c} {} {c} n c n 14 n c n 24 n n 14 n n c 13 {c} {c} {} {} n c n ( 23 X 33 c 34 ) n c n 33 n n ( 12 X ) n n 22 n c n (X 24 ) n c n 24 {c} n n c (X 13 ) n n 13 {} {c} n c n 24 n n 13 {} n c n ( 23 X 33 c 34 ) n c n 33 n c n 33 n c n (ε 33 ) ε n n ( 12 X ) n n 22 n n 22 n n (ε 22 ) ε Figure 4: Bottom-up decorted prse forest for the input DAG c c 261

9 right forest (ie, to get PRCG prser not recognizer which ccepts DAG s input) we need to perform nother wlk on the previous decorted forest 332 The Top-Down Wlk The ide of the top-down wlk on the prse forest decorted y the ottom-up wlk is to (re)compute ll the previous decortions strting from the ottom-up decortion ssocited with the instntited strt predicte It is to e noted tht (the lnguge defined y) ech top-down decortion is suset of its ottom-up counterprt However, when top-down decortion ecomes empty, the corresponding sutree must e ersed from the forest If the ottom-up wlk succeeds, we re sure tht the top-down wlk will not result in n empty forest Moreover, if we perform new ottom-up wlk on this reduced forest, the new ottom-up decortions will denote the sme lnguge s their top-down decortions counterprt The forest is wlked top-down strting from the super-root The constrint eing tht n instntited A( ρ)-cluse is visited if nd only if ll the occurrences of A( ρ) occurring in the RHS of instntited cluses hve ll lredy een visited This constrint cn e stisfied for ny non-cyclic forest Initilly, we ssume tht ech rgument of ech instntited predicte hs n empty decortion, except for the rgument of the super-root which is decorted y the DAG R computed y the ottomup pss Now, ssume tht top-down decortion hs een (fully) computed for ech rgument of the instntited predicte A 0 ( ρ 0 ) For ech instntited cluse of the form c ρ = A 0 ( ρ 0 ) A 1 ( ρ 1 ) A i ( ρ i ) A m ( ρ m ), we perform the following sequence: 12 1 We perform the intersection of the top-down decortion of ech rgument of A 0 ( ρ 0 ) with the decortion computed y the ottom-up pss for the sme rgument of the LHS predicte of c ρ If the result is empty, c ρ is ersed from the forest 2 For ech LHS rgument, the previous results re disptched over the symols of this 12 The decortion of ech rgument of A i( ρ i) is either initilly empty or hs lredy een prtilly computed rgument 13 Thus, ech instntited LHS symol occurrence is decorted y its own DAG If the considered cluse hs severl occurrences of the sme vrile in the LHS rguments (ie, is ottom-up non-liner), we perform the intersection of these DAGs in order to leve single decortion per instntited vrile If n intersection results in n empty DAG, the current cluse is ersed from the forest 3 The LHS instntited vrile decortions re propgted to the RHS rguments This propgtion my result in DAG conctentions when RHS rgument is mde up of severl vriles (ie, is comintoril) 4 At lst, we ssocite to ech rgument of A i ( ρ i ) new decortion which is computed s the union of its previous topdown decortion with the decortion just computed Exmple 3 When we pply the previous lgorithm to the ottom-up prse forest of Exmple 2, we get the top-down prse forest of Figure 5 In this prse forest, ersed prts re lid out in light gry The more noticle points wrt the ottom-up forest re the decortions etween n n c n (X 14 ) n c n 14 n n c 14 nd its RHS predictes n c n 14 nd n n c 14 which re chnged oth to {c} insted of {c, c} nd {c, } These two chnges induce the indicted ersings 13 Assume tht ρ 0[k] = pq D, tht the decortion DAG ssocited with the k th rgument of A 0( ρ 0) is D pq = (Q pq, Σ pq, δ pq, p, F pq ) (we hve L(D pq ) L(D pq )) nd tht α 0[k] = α 1 kxα 2 k nd tht ij D is the instntition of the symol X in c ρ Our gol is to extrct from D pq the decortion DAG D ij ssocited with tht instntited occurrence of X This computtion cn e helped if we mintin, ssocited with ech decortion DAG function, sy d, which mps ech stte of the decortion DAG to set of sttes (ounds) of the input DAG D If, s we hve ssumed, D is miniml, ech set of sttes is singleton, we cn write d(p ) = p, d(f ) = q for ll f F pq nd more generlly d(i ) Q if i Q Let I = {i i Q pq d(i ) = i} nd J = {j j Q pq d(j ) = j} The decortion DAG D ij is such tht L(D ij ) = S i I,j J {x x is pth from i to j } Of course, together with the construction of D ij, its ssocited function d must lso e uilt 262

10 n n c n 14 {c} n n c n (X 14 ) n c n 14 n n c 14 {c} {c} n c n 14 n n c 14 n c n (X 14 ) n c n 14 {c} n n c (X 14 ) n n 14 {c} n c n ( 12 X 24 ) n c n 24 n n c (X 13 c 34 ) n n c 13 {c} {c} n c n 14 n c n 24 n n 14 n n c 13 {c} {} n c n ( 23 X 33 c 34 ) n c n 33 n n ( 12 X ) n n 22 n c n (X 24 ) n c n 24 {c} n n c (X 13 ) n n 13 {} {c} n c n 24 n n 13 {} n c n ( 23 X 33 c 34 ) n c n 33 n c n 33 n c n (ε 33 ) ε n n ( 12 X ) n n 22 n n 22 n n (ε 22 ) ε Figure 5: Top-down decorted prse forest for the input DAG c c 263

11 34 Time nd Spce Complexities In this Section we study the time nd size complexities of the forest filtering lgorithm Let us consider the su-dag D pq of the miniml input DAG D nd consider ny (finite) regulr lnguge L L(D pq ), nd let D L e the miniml DAG st L(D L ) = L We show, on n exmple, tht D L my e n exponentil wrt D pq Consider, for given h > 0, the lnguge ( ) h We know tht this lnguge cn e represented y the miniml DAG with h + 1 sttes of Figure 6 Assume tht h = 2k nd consider the su-lnguge L 2k of ( ) 2k (nested wellprenthesized strings) which is defined y 1 L 2 = {, } ; 2 k > 1, L 2k = {x, x x L 2k 2 }, It is not difficult to see tht the DAG in Figure 7 defines L 2k nd is miniml, ut its size 2 k+2 2 is n exponentil in the size 2k + 1 of the miniml DAG for the lnguge ( ) 2k This results shows tht, there exist cses in which some miniml DAGs D tht define sulnguges of miniml DAGs D my hve exponentil size (ie, D = O(2 D ) In other words, when, during the ottom-up or top-down wlk, we compute union of DAGs, we my fll on these pthologic DAGs tht will induce comintoril explosion in oth time nd spce 35 Implementtion Issues Of course, mny improvements my e rought to the previous principle lgorithms in prcticl implementtions Let us cite two of them First it is possile to restrict the numer of DAG copies: DAG copy is not useful if it is the lst reference to tht DAG We shll here devel the second point on little more: if n rgument of predicte is never used in nt non-linerity, it is only wste of time to compute its decortion We sy tht A k, the k th rgument of the predicte A is nonliner predicte rgument if there exists cluse c in which A occurs in the RHS nd whose k th rgument hs t lest one common vrile nother rgument B h of some predicte B of the RHS (if B = A, then of course k nd h must e different) It is cler tht B h is then non-liner s well It is not difficult to see tht decortions needs only to e computed if they re ssocited with non-liner predicte rgument It is possile to compute those non-liner predicte rguments stticlly (when uilding the prser) when the PRCG is defined within single module However, if the PRCG is given in severl modules, this full sttic computtion is no longer possile The non-liner predicte rguments must thus e identified t prse time, when the whole grmmr is ville This rther trivil lgorithm will not e descried here, ut it should e noted tht it is worth doing since in prctice it prevents decortion computtions which cn tke n exponentil time 4 Conclusion In this pper we hve shown how PRCGs cn hndle DAGs s n input If we consider the liner PRCG, the one equivlent to LCFRS, the prsing time remins polynomil Moreover, input DAGs necessitte only rther cosmetic modifictions in the stndrd prser In the non-liner cse, the stndrd prser my produce illegl prses in its output shred prse forest It my even produce (non-empty) shred prse forest though no sentences of the input DAG re in the lnguge defined y our non-liner PRCG We hve proposed method which uses the (slightly modified) stndrd prser ut prunes, within extr psses, its output forest nd leves ll nd only vlid prses During these extr ottomup nd top-down wlks, this pruning involves the computtion of finite lnguges y mens of conctention, union nd intersection opertions The sentences of these finite lnguges re lwys sustrings of the words of the input DAG D We choose to represent these intermedite finite lnguges y DAGs insted of sets of strings ecuse the size of DAG is, t worst, of the sme order s the size of set of strings ut it could, in some cses, e exponentilly smller However, the time tken y this extr pruning pss cnnot e gurnteed to e polynomil, s expected from previously known complexity results (Bertsch nd Nederhof, 2001) We hve shown n exmple in which pruning tkes n exponentil time nd spce in the size of D The deep reson comes from the fct tht if L is finite (regulr) lnguge defined y some miniml DAG D, there re cses where su-lnguge of 264

12 0 1 2 h 1 h Figure 6: Input DAG ssocited with the lnguge ( ) h, h > k k k+2 3 Figure 7: DAG ssocited with the lnguge of nested well-prenthesized strings of length 2k L my require to e defined y DAG whose size is n exponentil in the size of D Of course this comintoril explosion is not ftlity, nd we my wonder whether, in the prticulr cse of NLP it will prcticlly occur? References Frnois Brthélemy, Pierre Boullier, Philippe Deschmp, nd Éric de l Clergerie 2001 Guided prsing of rnge conctention lnguges In Proceedings of the 39th Annul Meeting of the Assocition for Comput Linguist (ACL 01), pges 42 49, University of Toulouse, Frnce Jeffrey D Hopcroft nd John E Ullmn 1979 Introduction to Automt Theory, Lnguges, nd Computtion Addison-Wesley, Reding, Mss Bernrd Lng 1994 Recognition cn e hrder thn prsing Computtionl Intelligence, 10(4): K Vijy-Shnker, Dvid Weir, nd Arvind K Joshi 1987 Chrcterizing structurl descriptions produced y vrious grmmticl formlisms In Proceedings of the 25th Meeting of the Assocition for Comput Linguist (ACL 87), pges , Stnford University, CA Eerhrd Bertsch nd Mrk-Jn Nederhof 2001 On the complexity of some extensions of rcg prsing In Proceedings of IWPT 01, Beijing, Chin Pierre Boullier, 2004 New Developments in Prsing Technology, volume 23 of Text, Speech nd Lnguge Technology, chpter Rnge Conctention Grmmrs, pges Kluwer Acdemic Pulishers, H Bunt, J Crroll, nd G Stt edition 265

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

Harvard University Computer Science 121 Midterm October 23, 2012

Harvard University Computer Science 121 Midterm October 23, 2012 Hrvrd University Computer Science 121 Midterm Octoer 23, 2012 This is closed-ook exmintion. You my use ny result from lecture, Sipser, prolem sets, or section, s long s you quote it clerly. The lphet is

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

FABER Formal Languages, Automata and Models of Computation

FABER Formal Languages, Automata and Models of Computation DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v.

Exercises Chapter 1. Exercise 1.1. Let Σ be an alphabet. Prove wv = w + v for all strings w and v. 1 Exercises Chpter 1 Exercise 1.1. Let Σ e n lphet. Prove wv = w + v for ll strings w nd v. Prove # (wv) = # (w)+# (v) for every symol Σ nd every string w,v Σ. Exercise 1.2. Let w 1,w 2,...,w k e k strings,

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute

Anatomy of a Deterministic Finite Automaton. Deterministic Finite Automata. A machine so simple that you can understand it in less than one minute Victor Admchik Dnny Sletor Gret Theoreticl Ides In Computer Science CS 5-25 Spring 2 Lecture 2 Mr 3, 2 Crnegie Mellon University Deterministic Finite Automt Finite Automt A mchine so simple tht you cn

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30 Tlen en Automten Test 1, Mon 7 th Dec, 2015 15h45 17h30 This test consists of four exercises over 5 pges. Explin your pproch, nd write your nswer to ech exercise on seprte pge. You cn score mximum of 100

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.6.: Push Down Automt Remrk: This mteril is no longer tught nd not directly exm relevnt Anton Setzer (Bsed

More information

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Revision Sheet. (a) Give a regular expression for each of the following languages:

Revision Sheet. (a) Give a regular expression for each of the following languages: Theoreticl Computer Science (Bridging Course) Dr. G. D. Tipldi F. Bonirdi Winter Semester 2014/2015 Revision Sheet University of Freiurg Deprtment of Computer Science Question 1 (Finite Automt, 8 + 6 points)

More information

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd T. vn Lrhoven Institute for Computing nd Informtion Sciences Intelligent

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information

Regular expressions, Finite Automata, transition graphs are all the same!!

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Converting Regular Expressions to Discrete Finite Automata: A Tutorial Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert

More information

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7 CS103 Hndout 32 Fll 2016 Novemer 11, 2016 Prolem Set 7 Wht cn you do with regulr expressions? Wht re the limits of regulr lnguges? On this prolem set, you'll find out! As lwys, plese feel free to drop

More information

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA RIGHT LINEAR LANGUAGES. Right Liner Grmmr: Rules of the form: A α B, A α A,B V N, α V T + Left Liner Grmmr: Rules of the form: A Bα, A α A,B V N, α V T

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS CS 310 (sec 20) - Winter 2003 - Finl Exm (solutions) SOLUTIONS 1. (Logic) Use truth tles to prove the following logicl equivlences: () p q (p p) (q q) () p q (p q) (p q) () p q p q p p q q (q q) (p p)

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy:

Scanner. Specifying patterns. Specifying patterns. Operations on languages. A scanner must recognize the units of syntax Some parts are easy: Scnner Specifying ptterns source code tokens scnner prser IR A scnner must recognize the units of syntx Some prts re esy: errors mps chrcters into tokens the sic unit of syntx x = x + y; ecomes

More information

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh Lnguges nd Automt Finite Automt Informtics 2A: Lecture 3 John Longley School of Informtics University of Edinburgh jrl@inf.ed.c.uk 22 September 2017 1 / 30 Lnguges nd Automt 1 Lnguges nd Automt Wht is

More information

Some Theory of Computation Exercises Week 1

Some Theory of Computation Exercises Week 1 Some Theory of Computtion Exercises Week 1 Section 1 Deterministic Finite Automt Question 1.3 d d d d u q 1 q 2 q 3 q 4 q 5 d u u u u Question 1.4 Prt c - {w w hs even s nd one or two s} First we sk whether

More information

In-depth introduction to main models, concepts of theory of computation:

In-depth introduction to main models, concepts of theory of computation: CMPSCI601: Introduction Lecture 1 In-depth introduction to min models, concepts of theory of computtion: Computility: wht cn e computed in principle Logic: how cn we express our requirements Complexity:

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Thoery of Automata CS402

Thoery of Automata CS402 Thoery of Automt C402 Theory of Automt Tle of contents: Lecture N0. 1... 4 ummry... 4 Wht does utomt men?... 4 Introduction to lnguges... 4 Alphets... 4 trings... 4 Defining Lnguges... 5 Lecture N0. 2...

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes CSE 260-002: Exm 3-ANSWERS, Spring 20 ime: 50 minutes Nme: his exm hs 4 pges nd 0 prolems totling 00 points. his exm is closed ook nd closed notes.. Wrshll s lgorithm for trnsitive closure computtion is

More information

SWEN 224 Formal Foundations of Programming WITH ANSWERS

SWEN 224 Formal Foundations of Programming WITH ANSWERS T E W H A R E W Ā N A N G A O T E Ū P O K O O T E I K A A M Ā U I VUW V I C T O R I A UNIVERSITY OF WELLINGTON Time Allowed: 3 Hours EXAMINATIONS 2011 END-OF-YEAR SWEN 224 Forml Foundtions of Progrmming

More information

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010 CS 311 Homework 3 due 16:30, Thursdy, 14 th Octoer 2010 Homework must e sumitted on pper, in clss. Question 1. [15 pts.; 5 pts. ech] Drw stte digrms for NFAs recognizing the following lnguges:. L = {w

More information

A negative answer to a question of Wilke on varieties of!-languages

A negative answer to a question of Wilke on varieties of!-languages A negtive nswer to question of Wilke on vrieties of!-lnguges Jen-Eric Pin () Astrct. In recent pper, Wilke sked whether the oolen comintions of!-lnguges of the form! L, for L in given +-vriety of lnguges,

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 Automt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Problem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) Anton Setzer (Bsed on book drft by J. V. Tucker nd K. Stephenson)

More information

Parsing and Pattern Recognition

Parsing and Pattern Recognition Topics in IT Prsing nd Pttern Recognition Week Context-Free Prsing College of Informtion Science nd Engineering Ritsumeikn University this week miguity in nturl lnguge in mchine lnguges top-down, redth-first

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch.

Overview HC9. Parsing: Top-Down & LL(1) Context-Free Grammars (1) Introduction. CFGs (3) Context-Free Grammars (2) Vertalerbouw HC 9: Ch. Overview H9 Vertlerouw H 9: Prsing: op-down & LL(1) do 3 mei 2001 56 heo Ruys h. 8 - Prsing 8.1 ontext-free Grmmrs 8.2 op-down Prsing 8.3 LL(1) Grmmrs See lso [ho, Sethi & Ullmn 1986] for more thorough

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

More information

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings... Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Formal Languages and Automata Theory. D. Goswami and K. V. Krishna

Formal Languages and Automata Theory. D. Goswami and K. V. Krishna Forml Lnguges nd Automt Theory D. Goswmi nd K. V. Krishn Novemer 5, 2010 Contents 1 Mthemticl Preliminries 3 2 Forml Lnguges 4 2.1 Strings............................... 5 2.2 Lnguges.............................

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

The size of subsequence automaton

The size of subsequence automaton Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,

More information

Finite-State Automata: Recap

Finite-State Automata: Recap Finite-Stte Automt: Recp Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute of Science, Bnglore. 09 August 2016 Outline 1 Introduction 2 Forml Definitions nd Nottion 3 Closure under

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh Finite Automt Informtics 2A: Lecture 3 Mry Cryn School of Informtics University of Edinburgh mcryn@inf.ed.c.uk 21 September 2018 1 / 30 Lnguges nd Automt Wht is lnguge? Finite utomt: recp Some forml definitions

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

Lecture 3: Equivalence Relations

Lecture 3: Equivalence Relations Mthcmp Crsh Course Instructor: Pdric Brtlett Lecture 3: Equivlence Reltions Week 1 Mthcmp 2014 In our lst three tlks of this clss, we shift the focus of our tlks from proof techniques to proof concepts

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

Normal Forms for Context-free Grammars

Normal Forms for Context-free Grammars Norml Forms for Context-free Grmmrs 1 Linz 6th, Section 6.2 wo Importnt Norml Forms, pges 171--178 2 Chomsky Norml Form All productions hve form: A BC nd A vrile vrile terminl 3 Exmples: S AS S AS S S

More information