CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM

Size: px
Start display at page:

Download "CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM"

Transcription

1 Logicl Methods in Computer Science Vol. 2 (2:6) 2006, pp Sumitted Jn. 31, 2005 Pulished Jul. 19, 2006 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM ARNAUD CARAYOL AND ANTOINE MEYER Iris Cmpus de Beulieu Rennes Cedex Frnce e-mil ddress: Arnud.Cryol@iris.fr Lif Université de Pris 7 2 plce Jussieu, cse 7014, Pris Cedex 05 Frnce e-mil ddress: Antoine.Meyer@lif.jussieu.fr Astrct. We investigte fmilies of infinite utomt for context-sensitive lnguges. An infinite utomton is n infinite leled grph with two sets of initil nd finl vertices. Its lnguge is the set of ll words lelling pth from n initil vertex to finl vertex. In 2001, Morvn nd Stirling proved tht rtionl grphs ccept the context-sensitive lnguges etween rtionl sets of initil nd finl vertices. This result ws lter extended to su-fmilies of rtionl grphs defined y more restricted clsses of trnsducers. Our contriution is to provide syntcticl nd self-contined proofs of the ove results, when erlier constructions relied on non-trivil norml form of context-sensitive grmmrs defined y Penttonen in the 1970 s. These new proof techniques enle us to summrize nd refine these results y considering severl su-fmilies defined y restrictions on the type of trnsducers, the degree of the grph or the size of the set of initil vertices. 1. Introduction One of the cornerstones of forml lnguge theory is the well-known hierrchy introduced y Chomsky in [Cho59]. It consists of the regulr, context-free, context-sensitive nd recursively enumerle lnguges. This hierrchy ws originlly defined y imposing syntcticl restrictions on the rules of grmmrs generting the lnguges. These four fmilies of lnguges s well s some of their su-fmilies hve een extensively studied. In prticulr, they were given lterntive chrcteriztions in terms of finite cceptors. They re respectively ccepted y finite utomt, pushdown utomt, linerly ounded utomt nd Turing mchines. Recently, these fmilies of lnguges hve een chrcterised y fmilies of infinite utomt. An infinite utomton is lelled countle grph together with set of initil nd set of finl vertices. The lnguge it ccepts (or simply its lnguge) is the set of ll words lelling pth from n initil vertex to finl vertex. In [CK02], summry of four fmilies of grphs corresponding to the four fmilies in the Chomsky hierrchy ws given: they re respectively the finite grphs, prefix-recognisle 2000 ACM Suject Clssifiction: F.4.1. Key words nd phrses: lnguge theory, infinite grphs, utomt, determinism. LOGICAL METHODS Ð IN COMPUTER SCIENCE DOI: /LMCS-2 (2:6) 2006 c A. Cryol nd A. Meyer CC Cretive Commons

2 2 A. CARAYOL AND A. MEYER grphs [Cu96, Cu03], rtionl grphs [Mor00] nd trnsition grphs of Turing mchines [Cu03] (for survey, see for instnce [Tho01]). This work specificlly dels with fmily of infinite utomt for context-sensitive lnguges. The first result on this topic is due to Morvn nd Stirling [MS01], who showed tht the lnguges ccepted y rtionl grphs, whose vertices re words nd whose edges re defined y rtionl trnsducers, tken etween rtionl or finite sets of vertices, re precisely the context-sensitive lnguges. This result ws lter extended y Rispl [Ris02] to the more restricted fmilies of synchronized rtionl grphs, nd even to synchronous grphs. A summry cn e found in [MR04]. All proofs provided in these works use context-sensitive grmmrs in Penttonen norml form [Pen74] to chrcterize context-sensitive lnguges, which hs two min drwcks. First, this norml form is fr from eing ovious, nd the proofs nd constructions provided in [Pen74] re known to e difficult. Second, nd more importntly, there is no grmmr-sed chrcteriztion of deterministic context-sensitive lnguges, which forids one to dpt these results to the deterministic cse. Our min contriutions re new syntcticl proof of the theorem y Stirling nd Morvn sed on the thight correspondnce etween tiling systems nd synchronized grphs nd n in depth study of the trde off etween the structure of the rtionl grphs (numer of initil vertices nd out-degree), the trnsducers defining them, nd the fmily of lnguges they ccept, s summrized in Tle 1. Ech row of the tle concerns fmily or su-fmily of rtionl grphs, nd ech column corresponds to structurl restriction of tht fmily with respect to sets of initil vertices nd degree. The first cse is tht of rtionl (infinite) sets of initil vertices, while the second cse only considers the fixed rtionl initil set {} over single letter. The two remining cses concern grphs with unique initil vertex, with respectively ritrry nd finite out-degree. A cell contining n equlity symol indictes tht the lnguges ccepted y the considered fmily of grphs (row) from the considered set of initil vertices (column) re the context-sensitive lnguges. An inclusion symol indictes tht their lnguges re strictly included in context-sensitive lnguges. A question mrk denotes conjecture. When relevnt, we give reference to the proposition, theorem or remrk which sttes ech result. Fmily of grphs Set of initil vertices Rtionl set Set {} Unique vertex Unique vertex (finite degree) Rtionl [MS01] = = = = [4.6] Synchronized [Ris02] = = = [4.1] (?) [4.10] Synchronous [Ris02] = = [3.9] [4.2] Sequentil synchronous = [3.11] (?) [5.3] Tle 1: Fmilies of rtionl grphs nd their lnguges. Finlly, we investigte the cse of deterministic lnguges. A long-stnding open prolem in lnguge theory is the equivlence etween deterministic nd non-deterministic (or even unmiguous) context-sensitive lnguges [Kur64]. Thnks to our constructions, we

3 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 3 chrcterize two syntcticl su-fmilies of rtionl grphs respectively ccepting the unmiguous nd deterministic context-sensitive lnguges. Outline. Our presenttion is structured long the following lines. The definitions of rtionl grphs nd context-sensitive lnguges re given in Section 2. The results concerning lnguges ccepted y rtionl nd synchronous rtionl grphs re given in Section 3. In Section 4, we investigte rtionl grphs under structurl constrints, nd finlly Section 5 is devoted to deterministic context-sensitive lnguges Nottions 2. Definitions Before ll, we fix nottions for words, lnguges nd utomt, s well s directed grphs nd the lnguges they ccept. For more thorough introduction to monoids nd rtionlity, the interested reder is referred to [Ber79, Sk03] Lnguges nd Automt We consider finite sets of symols, or letters, clled lphets. In the following, Σ nd Γ lwys denote finite lphets. Tuples of letters re clled words, nd sets of words lnguges. The word u corresponding to the tuple (u 1,...,u n ) is written u 1... u n. Its i-th letter is denoted y u(i) = u i. The set of ll words over Σ is written Σ. The numer of letter occurrences of u is its length, written u = n. The unique word of length 0 is written ε. The conctention of two words u = u 1...u n nd v = v 1...v m is the word uv = u 1...u n v 1...v m. This opertion extends to sets of words: for ll A,B Σ, AB stnds for the set {uv u A nd v B}. By slight use of nottion, we will usully denote y u oth the word u nd the singleton {u}. A monoid is composed of set M together with n ssocitive internl inry lw on M clled product, with neutrl element in M. The product of two elements x nd y of M is written x y. An utomton over M is tuple A = (L,Q,q 0,F,δ) where L M is finite set of lels, Q finite set of control sttes, q 0 Q is the initil stte, F Q is the set of finl sttes nd δ Q L Q is the trnsition reltion of A. A run of A is sequence of trnsitions (q 0,l 1,q 1 )... (q n 1,l n,q n ). It is ssocited to the element m = l 1... l n M. If q n elongs to F, the run is ccepting (or successful), nd m is ccepted, or recognized, y A. The set of elements ccepted y A is written L(A). A is unmiguous if there is only one ccepting run for ech element in L(A). The str of set X M is defined s X := k 0 Xk with X 0 = {ε} nd X k+1 = X X k. Similrly, we write X + := k 1 Xk. The set of rtionl susets of monoid is the smllest set contining ll finite susets nd closed under union, product nd str. The set of ll words over Σ together with the conctention opertion forms the so-clled free monoid whose neutrl element is the empty word ε. Finite utomt over the free monoid Σ re known to ccept the rtionl susets of Σ, lso clled rtionl lnguges.

4 4 A. CARAYOL AND A. MEYER Grphs A leled, directed nd simple grph is set G V Γ V where Γ is finite set of lels nd V countle set of vertices. An element (s,,t) of G is n edge of source s, trget t nd lel, nd is written s t or simply s t if G is understood. G The set of ll sources nd trgets of grph form its support V G. A sequence of edges s 1 1 t1,...,s k u k tk with i [2,k], s i = t i 1 is clled pth. It is written s 1 t k, where u = 1... k is the corresponding pth lel. A grph is deterministic if it contins no pir of edges hving the sme source nd lel. The pth lnguge of grph G etween two sets of vertices I nd F is the set L(G,I,F) := { w s w t, s I, t F }. G If two infinite utomt recognize the sme lnguge, we sy they re trce-equivlent. In this pper, we consider infinite utomt: infinite grphs together with sets of initil nd finl vertices. We will no longer distinguish the notion of grph with initil nd finl vertices from the notion of utomton. However, s we will see in Section 3, with no restriction on the set of initil vertices nd on the structure of the grph this might not provide resonle extension of finite utomt Word trnsducers Automt cn e used to ccept more thn lnguges. In prticulr, when the edges of n utomton re lelled with pirs of letters (with n pproprite product opertion), its lnguge is set of pirs of words, which cn e seen s inry reltion on words. Such utomt re clled finite utomt with output, or trnsducers, nd they recognize rtionl reltions. We will now recll their definition s well s some of their importnt properties. For detiled presenttion of trnsducers, see for instnce [Ber79, Pri00, Sk03]. Consider the monoid whose elements re the pirs of words (u,v) in Σ, nd whose composition lw is defined y (u 1,v 1 ) (u 2,v 2 ) = (u 1 u 2,v 1 v 2 ), generlly clled the product monoid nd written Σ Σ. A trnsducer T over finite lphet Σ is finite utomton over Σ Σ with lels in (Σ {ε}) (Σ {ε}). Finite trnsducers ccept the rtionl susets of Σ Σ. We do not distinguish trnsducer from the reltion it ccepts nd write (w,w ) T if (w,w ) is ccepted y T. The domin Dom(T) (resp. rnge Rn(T)) of trnsducer T is the set {w (w,w ) T } (resp. {w (w,w ) T }). We lso write T(L) the set of ll vertices v such tht (u,v) T for some u L. A trnsducer ccepting function is clled functionl. In generl, there is no ound on the size difference etween input nd output in trnsducer. Interesting suclsses re otined y enforcing some form of synchroniztion. For instnce, length-preserving rtionl reltions re recognized y trnsducers with lels in Σ Σ, clled synchronous trnsducers. Such reltions only pir words of the sme size. A more relxed form of synchroniztion ws introduced y Elgot nd Mezei [EM65]: trnsducer over Σ with initil stte q 0 is left-synchronized if for every pth x 0 /y 0 x n/y n q 0 q 1...q n 1 q n, there exists k [0,n] such tht for ll i [0,k], x i nd y i elong to Σ nd either x j = ε for ll j > k or y j = ε for ll j > k. In other terms, left-synchronized reltion is finite union of reltions of the form S F where S is synchronous reltion nd F is either equl

5 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 5 ε A A A/A B/B B AB AB B AB AB T = T = q 0 A/A q 0 ε/a ε/b q 1 B/B q 1 Figure 1: The grid nd its ssocited trnsducers. to {ε} R or R {ε} where R is rtionl lnguge. Right-synchronized trnsducers re defined similrly. In the following, unless otherwise stted, we will refer to left-synchronized trnsducers simply s synchronized trnsducers. The stndrd notion of determinism for utomt does not hve much mening in the cse of trnsducers ecuse it does not rely only on the input ut on oth the input nd the output. A more refined notion is tht of sequentility: trnsducer T with sttes Q is sequentil if for ll q,q nd q in Q, if q x/y q nd q x /y q then either x = x, y = y nd q = q, or x ε, x ε nd x x. Remrk 2.1. The stndrd determiniztion procedure pplied to synchronous trnsducer yields n equivlent unmiguous synchronous trnsducer (i.e for every pir of words (u, v) ccepted y the trnsducer there is exctly one ccepting run of the trnsducer lelled y u/v). This remins true for synchronized trnsducers. It is well-known tht there is close reltionship etween rtionl lnguges nd rtionl trnsductions. In prticulr, rtionl reltions hve rtionl domins nd rnges, nd re closed under restriction to rtionl domin or rnge. Moreover, the restriction of sequentil (resp. synchronous) trnsducer to rtionl domin is still sequentil (resp. synchronous) (see for instnce [Ber79]) Rtionl grphs The Chomsky-like hierrchy of grphs presented in [CK02] uses words to represent vertices. Ech of these grphs is thus finite union of inry reltions on words, ech reltion corresponding to given edge lel. In prticulr, the fmily of rtionl grphs owes its nme to the fct tht their sets of edges re given y rtionl reltions on words, i.e. reltions recognized y word trnsducers. Definition 2.2 ([Mor00]). A rtionl grph lelled y Σ with vertices in Γ is given y tuple of trnsducers (T ) Σ over Γ. For ll Σ, G hs n edge lelled y etween vertices u nd v Γ if nd only if (u,v) T. For w Σ + nd Σ, we write T w = T w T, nd u w v if nd only if (u,v) T w. Note tht T w T stnds for the set of ll pirs (u,v) such tht (u,x) T w nd (x,v) T for some x. Figure 1 shows n exmple of rtionl grph, the infinite grid, with the rtionl trnsducers which define its edges. By the properties of rtionl reltions, the support of rtionl grph is rtionl suset of Γ. The rtionl grphs with synchronized trnsducers

6 6 A. CARAYOL AND A. MEYER were lredy defined y Blumensth nd Grdel in [BG00] under the nme utomtic grphs nd y Rispl in [Ris02] under the nme synchronized rtionl grphs. It follows from the definitions (see Section 2.2) tht sequentil synchronous, synchronous, synchronized nd rtionl grphs form n incresing hierrchy. This hierrchy is strict (up to isomorphism): first, sequentil synchronous grphs re deterministic grphs wheres synchronous grphs cn e non-deterministic. Second, synchronous grphs hve finite degree wheres synchronized grphs cn hve n infinite degree. Finlly, to seprte synchronized grphs from rtionl grphs, we cn use the following properties on the growth rte of the out-degree in the cse of grphs of finite out-degree. Proposition 2.3. [Mor01] For ny rtionl grph G of finite out-degree nd ny vertex x, there exists c N, such tht the out-degree of vertices t distnce n of x is t most c cn. This upper ound cn e reched: consider the unleled rtionl grph G 0 = {T } where T is the trnsducer over Γ = {A,B} with one stte q 0 which is oth initil nd finl X/Y Z nd trnsition q 0 q 0 for ll X,Y nd Z Γ. It hs n out-degree of 2 2n+1 t distnce n of A. In the cse of synchronized grphs of finite out-degree, the ound on the out-degree is simply exponentil. Proposition 2.4. [Ris02] For ny synchronized grph G of finite out-degree nd vertex x, there exists c N such tht the out-degree of vertices t distnce n > 0 of x is t most c n. It follows from the ove proposition tht G 0 is rtionl ut not synchronized. Hence, the synchronized grphs form strict su-fmily of rtionl grphs Context sensitive lnguges In this work, we re concerned with the fmily of context-sensitive lnguges 1. Severl finite formlisms re known to ccept this fmily of lnguges, the most common eing linerly ounded mchines (LBM), which re Turing mchines working in liner spce. Less well-known cceptors for these lnguges re ounded tiling systems, which re not trditionlly studied s lnguge recognizers. However, one cn show tht these formlisms re equivlent, nd tht syntcticl trnsltions exist etween them. Since they re t the hert of our proof techniques, we now give detiled definition of tiling systems. For more informtion out linerly ounded mchines the reder is referred to [HU79]. Tiling systems were originlly defined to recognize or specify picture lnguges, i.e. twodimensionl words on finite lphets [GR96]. They cn e seen s normlized form of dominos systems [LS97]. Such sets of pictures re clled locl picture lnguges. However, y only looking t the words contined in the first row of ech picture of locl picture lnguge, one otins context-sensitive lnguge [LS97]. A (n,m)-picture p over n lphet Γ is two dimensionl rry of letters in Γ with n rows nd m columns. We denote y p(i,j) the letter occurring in the ith row nd jth column strting from the top-left corner, y Γ n,m the set of (n,m)-pictures nd y Γ the set of ll pictures 2. Given (n,m)-picture p over Γ nd letter # Γ, we denote y p # the (n + 2,m + 2)-picture over Γ {#} defined y: p # (i,1) = p # (i,m + 2) = # for i [1,n + 2], 1 In order to simplify our presenttion, we only consider context-sensitive lnguges tht do not contin the empty word ε (this is stndrd restriction). 2 We do not consider the empty picture.

7 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 7 # # # # # # # # # # # # Figure 2: A tiling system ccepting n n (Cf. Exmple 2.7). p # (1,j) = p # (n + 2,j) = # for j [1,m + 2], p # (i + 1,j + 1) = p(i,j) for i [1,n] nd j [1,m]. For ny n,m 2 nd ny (n,m)-picture p, T(p) is the set of (2,2)-pictures ppering in p. A (2,2)-picture is lso clled tile. A picture lnguge K Γ is locl if there exists symol # Γ nd finite set of tiles such tht K = {p Γ T(p # ) }. To ny set of pictures over Γ, we cn ssocite lnguge of words y looking t the frontiers of the pictures. The frontier of (n,m)-picture p is the word fr(p) = p(1,1)... p(1,m) corresponding to the first row of the picture. Definition 2.5. A tiling system S is tuple (Γ,Σ, #, ) where Γ is finite lphet, Σ Γ is the input lphet, # Γ is frme symol nd is finite set of tiles over Γ {#}. It recognizes the locl picture lnguge P(S) = {p Γ T(p # ) } nd the word lnguge L(S) = fr(p(s)) Σ. A tiling system S recognizes lnguge L Σ + in height f(n) for some mpping f : N N if for ll w L(S) there exists (n,m)-picture p in P(S) such tht w = fr (p) nd n f(m). We cn now precisely stte the following well-known equivlence result. Theorem 2.6. The following simultions link linerly ounded mchines nd tiling systems: (1) A linerly ounded Turing mchine T working in f(n) reversls cn e simulted y tiling system of height f(n) + 2. (2) A tiling system of height f(n) cn e simulted y linerly ounded Turing mchine working in f(n) reversls. Exmple 2.7. Figure 2 shows the set of tiles of tiling system S over Γ = {,, }, Σ = {,} nd the order symol #. The lnguge L(S) is exctly the set { n n n 1}. A context-sensitive lnguge is clled deterministic if it cn e ccepted y deterministic LBM or tiling system, where tiling system is deterministic if one cn infer from ech row in picture single possile next row.

8 8 A. CARAYOL AND A. MEYER Rtionl grphs Prop. 3.2 Prop. 3.3 Synchronous grphs Tiling systems Prop. 3.7 Sequentil synchronous grphs Prop Figure 3: Ech edge represents n effective trnsformtion preserving lnguges. 3. The lnguges of rtionl grphs In this section, we consider the lnguges ccepted y rtionl grphs nd their sufmilies from nd to rtionl set of vertices. We give simplified presenttion of the result y Morvn nd Stirling [MS01] stting tht the fmily of rtionl grphs ccepts the context-sensitive lnguges. This is done in severl steps. First, Proposition 3.2 sttes tht the rtionl grphs re trce-equivlent to the synchronous rtionl grphs. Then, Proposition 3.3 nd Proposition 3.7 estlish very tight reltionship etween synchronous grphs nd tiling systems. It follows tht the lnguges of synchronous rtionl grphs re lso the context-sensitive lnguges (Theorem 3.9). The originl result is given s Corollry Finlly, Proposition 3.11 estlishes tht even the smllest su-fmily we consider, the fmily of sequentil synchronous rtionl grphs, ccepts ll context-sensitive lnguges. The vrious trnsformtions presented in this section re summrized in Figure From rtionl grphs to synchronous grphs We present n effective construction tht trnsforms rtionl grph G with two rtionl sets I nd F of initil nd finl vertices into synchronous grph G trce-equivlent etween two rtionl sets I nd F. The construction is sed on replcing the symol ε in the trnsitions of the trnsducers defining G y fresh symol #. Let (T ) Σ e the set of trnsducers over Γ chrcterizing G nd let # e symol not in Γ. For ll, we define ā to e equl to if Γ, nd to ε if = #. We extend this to projection from (Γ #) to Γ in the stndrd wy. We define G s the rtionl grph defined y the set of trnsducers (T ) Σ where T hs the sme set of control sttes Q s T nd set of trnsitions given y { / p q p ā/ } { #/# } q T p p p Q. By definition of ech T, G is synchronous rtionl grph. Let I nd F e the two rtionl sets such tht I = {u ū I} nd F = {v v F } (the utomton ccepting I (resp. F ) is otined from the utomton ccepting I (resp. F) y dding loop leled y # on ech control stte). We clim tht G ccepts etween I nd F the sme lnguge s G etween I nd F. For exmple, Figure 4 illustrtes the previous construction pplied to the grph of Figure 1. Only one connected component of the otined grph is shown. Before we prove the correctness of this construction, we need to estlish couple of technicl lemms. Let B e the set of ll mppings from N to N. To ny mpping δ B, we ssocite mpping from (Γ {#}) to (Γ {#}) defined s follows: for ll w = # i 0 1 # i 1... n # in with 1,..., n Γ, let δw = # i 0+δ(0) 1 # i 1+δ(1)... n # in+δ(n).

9 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 9 ### ##A #A# A## #AA A#A AA# AAA ##B #B# B## #BB B#B BB# #AB A#B AB# ABB AAB T = A/A #/# q 0 A/A #/# #/A B/B #/# q 1 B/B #/# BBB T = q 0 #/B q 1 Figure 4: Synchronous grph trce-equivlent to the grid (1 connected component). Before proceeding, we stte two properties of these mppings with respect to the sets of trnsducers (T ) nd (T ). Lemm 3.1. We hve the following properties: u,v Γ, (u,v) T δ u,δ v B, (δ u u,δ v v) T, (3.1) (u,v) T, δ B, δ B, (δu,δ v) T, (3.2) nd dully (u,v) T, δ B, δ B, (δ u,δv) T. (3.3) We cn now prove the correctness of the construction: word w is ccepted y G etween I nd F if nd only if it is ccepted y G etween I nd F. Proposition 3.2. For every rtionl grph G nd rtionl sets of vertices I nd F, there is synchronous grph G nd two rtionl sets I nd F such tht L(G,I,F) = L(G,I,F ). Proof. We show y induction on n tht for ll u 0,...,u n Γ, if there is pth u 0 w(1) G u 1...u n 1 w(n) G u n, then there exist words u 0,...,u n (Γ {#}) such tht for ll i, ū i = u i, nd u 0 w(1) G u 1...u n 1 The cse where n = 0 is trivil. Suppose the property is true for ll pths of length t most n, nd consider pth u 0 w(1) G... w(n) G w(n) G u n. u n w(n+1) G u n+1.

10 10 A. CARAYOL AND A. MEYER T / /, /, /, / #/ #, # #/ #, #/ #, T / / #, #, / /,, / /, / Figure 5: Trnsducers of synchronous grph ccepting { n n n 1}. By induction hypothesis, one cn find mppings δ 0,...δ n such tht δ 0 u 0 w(1) G... w(n) G δ n u n. We now use the properties of mppings stted in Lemm 3.1. By (3.1), there exist δ n nd w(n+1) δ n+1 such tht δ n u n δ n+1 u n+1 G. Let γ n nd γ n e two elements of B such tht δ n γ n = δ n γ n. By Lemm (3.2) nd (3.3), we cn find mppings γ n+1 nd γ 0 to γ n 1 such tht: w(1) γ 0 δ 0 u 0... w(n) γ G G n δ n u n = γ nδ nu w(n+1) n γ G n+1δ n+1u n+1 which concludes the proof y induction. If we suppose tht u 0 I nd u n F, then necessrily u 0 I nd u n F. It follows tht for every pth in G etween I nd F, there is pth in G etween I nd F with the sme pth lel. Conversely, y (3.1), for ny such pth in G, ersing the occurrences of # from its vertices yields vlid pth in G etween I nd F. Hence L(G,I,F) = L(G,I,F ) Equivlence etween synchronized grphs nd tiling systems The following propositions estlish the tight reltionship etween tiling systems nd synchronous rtionl grphs. Proposition 3.3 presents n effective trnsformtion of tiling system into synchronous rtionl grph. Proposition 3.3. Given tiling system S = (Γ,Σ,#, ), there exists synchronous rtionl grph G nd two rtionl sets I nd F such tht L(G, I, F) = L(S). Proof. Consider the finite utomton A on Γ with set of sttes Q = Γ {#}, initil stte #, set of finl sttes F nd set of trnsitions δ given y: F : such tht # δ : # A, A for ll, # # (respectively). #

11 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 11 I [ # # ] [ ] [ F ] # # # # # Figure 6: The synchronous rtionl grph ssocited to the tiling system of Figure 2 whose trnsducers re presented in Figure 5. Cll M the lnguge recognized y A, M represents the set of possile lst columns of pictures of P(S). Note tht this does not imply tht ech word of M ctully is the lst column of picture in P(S), only tht it is comptile with the right order tiles of. Let us uild synchronous rtionl grph G nd two rtionl sets I nd F such tht L(G,I,F) = L(S). The trnsitions of the set of trnsducers (T e ) e Σ of G re: (#, #) c/d Td (c,d) for ll c d, d # (,) c/d Te (c,d) for ll c d,,d #, e Σ where (#, #) is the unique initil stte of ech trnsducer nd the set of finl sttes F of ech trnsducer is given y: F : (,) (Γ {#}) Γ such tht. A pir of words (s,t) is ccepted y the trnsducer T e if nd only if e is the first letter of t, nd either s nd t re two djcent columns of picture in P(S) or s # nd t is the first column of picture in P(S). As consequence, L(S) = L(G, #,M). Exmple 3.4. Figure 5 shows the trnsducers otined using the previous construction on the tiling system of Figure 2. They define rtionl grph whose pth lnguge etween # nd is { n n n 1}. Figure 6 presents the corresponding synchronous grph whose vertices re the rtionl set of words # , the set of initil vertices is # 2 nd the set of finl vertices is +. Remrk tht in this exmple, the set of vertices ccessile from the initil vertices is rtionl: this is not true in the generl cse. Remrk 3.5. The correspondence etween tiling system S nd the synchronous grph G constructed from S in Proposition 3.3 is tight: ech picture p with frontier w cn e mpped to unique ccepting pth for w in G (nd conversely).

12 12 A. CARAYOL AND A. MEYER Conversely, Proposition 3.7 sttes tht the lnguges ccepted y synchronous rtionl grphs etween rtionl sets of vertices cn e ccepted y tiling system. To mke the construction simpler, we first prove tht the sets of initil nd finl vertices cn e chosen over one-letter lphet without loss of generlity. Lemm 3.6. For every synchronous rtionl grph G with vertices in Γ nd rtionl sets I nd F, one cn find synchronous rtionl grph H nd two symols i nd f / Γ such tht L(G,I,F) = L(H,i,f ). Proof. Let G = (K ) Σ e synchronous rtionl grph with vertices in Γ. For i,f two new distinct symols, we define new synchronous rtionl grph H chrcterized y the set of trnsductions ( T = (T I K ) K (K T F ) ) Σ where T I = {(i n,u) n 0, u I, u = n} nd T F = {(v,f n ) n 0, v F, v = n}. For ll vertices u I, v F we hve u w v if nd only if i u w H f u, i.e. L(G,I,F) = L(H,i,f ). G We re now le to estlish the converse of Proposition 3.3, which sttes tht ll the lnguges ccepted y synchronous rtionl grphs etween rtionl sets of vertices cn e ccepted y tiling system. Proposition 3.7. Given synchronous rtionl grph G nd two rtionl sets I nd F, there exists tiling system S such tht L(S) = L(G, I, F). Proof. Let G = (T ) Σ e synchronous rtionl grph with vertices in Γ (with Σ Γ). By Lemm 3.6, we cn consider without loss of generlity tht I = i nd F = f for some distinct letters i nd f, nd tht neither i nor f occurs in ny vertex which is not in I or F. Furthermore y Remrk 2.1, we cn ssume tht T is non-miguous for ll Σ. We write Q the set of control sttes of T. We suppose tht ll control stte sets re disjoint, nd designte y q0 Q the unique initil stte of ech trnsducer T, nd y Q F the set of finl sttes of ll T. Let,,c,d Σ, x,x,y,y,z,z Γ, nd p,p,q,q,r,r,s,s Σ Q. We define tiling system S = (Γ,Σ, #, ), where is the set of tiles from Figure 7. By construction, P(S) is in exct ijection with the set of ccepting pths in G with respect to I nd F. Let φ e the function ssociting to picture p P(S) with columns 1 w 1,..., n w n, the pth i w 1 1 w1... n wn where w is otined y removing the control sttes from w. By construction of S, the function φ is well defined. It is esy to check tht φ is n onto function. As the trnsducers defining G re non-miguous, two distinct pictures hve distinct imges y φ nd therefore φ is n injection. Hence, the tiling system (Γ, Σ, #, ) exctly recognizes L(G, I, F). Remrk 3.8. As in Remrk 3.5, the set of pths in G from I to F nd the set of pictures P(S) ccepted y S re in ijection, nd the length of the vertices long the pth is equl to the height of the corresponding picture. Putting together Propositions 3.3 nd 3.7 nd Theorem 2.6, we otin the following result concerning the pth lnguges of synchronous rtionl grphs. Theorem 3.9 ([Ris02]). The lnguges ccepted y synchronous rtionl grphs etween rtionl sets of initil nd finl vertices re the context-sensitive lnguges. Note tht this formultion of the theorem could e mde it more precise y reclling tht initil nd finl sets of vertices only of the form x, where x is letter, re sufficient

13 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 13 # c d # # # xp c y q z r d # f s # with q 0 i/x T p, q c 0 y/z Tc r, s Q d # xp y q z r f s # # x p y q z r fs # i/x with,,c, p p y /z, r r, s,s Q c T T # xp y q z r f s # with p,q,r,s Q F Figure 7: Tiling system ccepting the lnguge of synchronous grph. to ccept ll context-sensitive lnguges, s stted in Lemm 3.6. By Proposition 3.2, this implies s corollry the originl result y Morvn nd Stirling [MS01]. Corollry The lnguges ccepted y rtionl grphs etween rtionl sets of initil nd finl vertices re the context-sensitive lnguges. If we trnsform rtionl grph into Turing mchine y pplying successively the construction of Proposition 3.2, Proposition 3.7 nd Theorem 2.6, we otin the sme Turing mchine s in [MS01] Sequentil synchronous grphs re enough Theorem 3.9 shows tht when considering rtionl sets of initil nd finl vertices, synchronous grphs re enough to ccept ll context-sensitive lnguges. Interestingly, when considering rtionl sets of initil nd finl vertices, the even more restricted clss of sequentil synchronous trnsducers re sufficient. Proposition The lnguges ccepted y sequentil synchronous rtionl grphs etween rtionl sets of initil nd finl vertices re the context-sensitive lnguges. Proof. Thnks to Proposition 3.7, it suffices to prove tht ny context sensitive lnguge L Σ is ccepted y synchronous sequentil rtionl grph. By Theorem 2.6, we know tht there exists tiling system S = (Γ,Σ, #, ) such tht L(S) = L. Let Λ = Γ {#} nd [ nd ] e two symols tht do not elong to Λ. We ssocite to ech picture p Λ with rows l 1,...,l n the word [l 1 ]...[l n ]. We re going to define set of sequentil synchronous trnsducers tht, when iterted, recognize the words corresponding to pictures in P(S). First, for ny finite set of tiles, we construct trnsducer T which checks tht word in ([Λ 3 ]) 2 represents picture with tiles in. The checking is done column y column, nd we introduce mrked letters to keep trck of the column eing checked. Let Λ e finite lphet in ijection with ut disjoint from Λ. For ll x Λ we write x Λ the mrked version of x. For every word w = u xv Λ ΛΛ, we write π(w) the word uxv Λ nd ρ(w) = u + 1 designtes the position of the mrked letter in the word.

14 14 A. CARAYOL AND A. MEYER # # # ã # # ã # # # # # # # # ã # # # # # # # # # # # # # # # # # # # # # # # # # Figure 8: Connected component of sequentil synchronous grph ccepting { n n n 1}. We consider words in [Λ ΛΛ ] 2. Let Shift e the reltion tht shifts ll mrks in word one letter to the right. More precisely, Shift stisfies Dom(Shift) = ([Λ ΛΛ + ]) 2, nd Shift([w 1 ]...[w n ]) = [w 1 ]... [w n ] with π(w i ) = π(w i) nd ρ(w i ) = ρ(w i)+1 for ll i [1,n]. The rtionl reltion Shift cn e relized y synchronous sequentil trnsducer T Sh. Consider the following rtionl lnguge: x i 1y i 1 R = [w 1x 1 ỹ 1 w 1 ]... [w nx n ỹ n w n ] n 2 nd i [2,n], x i y i. The trnsducer T otined y restricting T Sh to the domin R is oth synchronous nd sequentil. For ll w = [w 1 ]...[w n ] ([Λ ΛΛ ]) 2, if w = T N(w) then w = [w 1 ]...[w n] with π(w i ) = π(w i ) nd ρ(w i ) = N + 2 for ll i [1,n]. Let r i e the word contining the N + 1 first letters of w i, strightforwrd induction on N proves tht the picture p formed of the rows r 1,...,r n only hs tiles in. In prticulr, T N(w) elongs to ([Λ Λ]) R if nd only if π(w) represent picture p of width N + 2 such tht T(p). We now define more precisely the sequentil rtionl grph G = (T ) Σ ccepting L. For ll Σ, the trnsducer T is otined y restricting the domin of T to the set of words representing pictures whose mrked symol on the second row is, i.e. to the set [(Λ Λ) ][(Λ ãλ ][(Λ Λ) ]. T cn e chosen synchronous nd sequentil. The set of initil vertices I is [# ## ]([# ΓΓ #]) [# ## ] nd the set of finl vertices F is [# #]([#Γ #]) [# #]. Exmple Figure 8 shows prt of the result of the previous construction when pplied to the lnguge { n n n 1} s recognized y the tiling system of Figure 2. Ech vertex is represented y the corresponding picture, insted of the word coding for it. Also, only one connected component of the grph is shown. The other connected components ll hve the sme liner structure: the degree of the grph is ounded y 1. The leftmost vertex elongs to the set I, nd the rightmost to the set F, hence the word 2 2 is ccepted. Remrk In the cse of synchronized trnsducers, it hs een shown in Lemm 3.6 tht I could e tken over one letter lphet without loss of generlity. This does not seems to hold for sequentil trnsducers s the proof we present relies on the expressiveness of the initil set of vertices. In fct, s shown in Proposition 5.3, the lnguges recognized y sequentil synchronous grph from i re deterministic context-sensitive lnguges.

15 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM Rtionl grphs seen s utomt The structure of the grphs otined in the previous section (propositions 3.3 nd 3.11) is very poor. Synchronous grphs re y definition composed of possily infinite set of finite connected components. In the cse of Proposition 3.11, we otin n even more restricted fmily of grphs since oth their in-degree nd out-degree is ounded y 1. However, when considering ccepted lnguges from possily infinite rtionl set of vertices, even this extremely restricted fmily ccepts the sme lnguges s the most generl rtionl grphs, nmely ll context-sensitive lnguges. This is why, in order to compre the expressiveness of the different su-fmilies of rtionl grphs nd to otin grphs with richer structures, we need to impose structurl restrictions. We first consider grphs with single initil vertex, ut this restriction lone is not enough. In fct, oth synchronized nd rtionl grphs with rtionl set of initil vertices ccept the sme lnguges s their counterprts with single initil vertex. Lemm 4.1. For every rtionl grph (resp. synchronized grph) G nd for every pir of rtionl sets I nd F, there exists rtionl grph (resp. synchronized grph) G, vertex i nd rtionl set F such tht L(G,I,F) = L(G, {i},f ). Proof. Let G = (T ) Σ e rtionl grph with vertices in Γ nd let i e symol which does not elong to Γ nd Γ = Γ {i}. For ll Σ, let T e trnsducer recognizing the rtionl reltion T {(i,w) w T (I)}. Remrk tht if T is synchronized then T cn lso e chosen synchronized. If ε L(G,I,F) then F = F else F = F {i}. It is strightforwrd to show tht L(G,I,F) = L(G, {i},f ). It follows from Proposition 3.3 nd Lemm 4.1 tht the synchronized rtionl grphs with one initil vertex ccept the context-sensitive lnguges [Ris02]. Remrk 4.2. It is firly ovious tht this result does not hold for synchronous grphs: indeed, the restriction of synchronous rtionl grph to the vertices rechle from single vertex is finite. Hence, the lnguges of synchronous grphs from single vertex re rtionl. Similrly, s ny rtionl lnguge is ccepted y deterministic finite grph, it cn lso e ccepted y sequentil synchronous grph with single initil vertex. Note tht the construction of Lemm 4.1 relies on infinite out-degree to trnsform synchronous grph with rtionl set of initil vertices into rtionl one with single initil vertex. In order to otin more stisfctory notions of infinite utomt, we now restrict our ttention to grphs of finite out-degree with single initil vertex Rtionl grphs of finite out-degree with one initil vertex. We present syntcticl trnsformtion of synchronous rtionl grph with rtionl set of initil vertices into rtionl grph of finite out-degree with unique initil vertex ccepting the sme lnguge. The construction relies on the fct tht for synchronous grphs to recognize word of length n > 0, it is only necessry to consider vertices whose length is smller thn c n (where c is constnt depending only on the grph). We first estlish similr result for tiling systems nd conclude using the close correspondence etween synchronous grphs nd tiling systems estlished in Proposition 3.7.

16 16 A. CARAYOL AND A. MEYER Lemm 4.3. For ny tiling system S = (Γ,Σ,#, ), if p P(S) then there exists (n,m)-picture p such tht fr (p) = fr(p ) nd n Γ m. Proof. Let p e (n,m)-picture with n > Γ m, nd suppose tht p is the smllest picture in P(S) with frontier fr (p). Let l 1,...,l n e the rows of p. As n > Γ m then there exists j > i 1 such tht l i = l j. Let p e the picture with rows l 1,...,l i,l j+1,...,l n. It is esy to check tht T(p #) T(p #), we hve tht p P(S) nd s p hs smller height thn p ut the sme frontier, we otin contrdiction. We know from Remrk 3.8 tht for every synchronous rtionl grph G = (T ) Σ nd w two rtionl sets I nd F, there exists tiling system S such tht i f with i I nd G f F if nd only if there exists p K such tht fr(p) = w nd p hs height i = f. Hence, s direct consequence of Lemm 4.3, one gets: Lemm 4.4. For every synchronous rtionl grph G nd rtionl sets I nd F, there exists k 1 such tht: w w L(G,I,F), i I,f F such tht i f nd i = f k w. G We cn now construct of rtionl grph of finite out-degree ccepting from single vertex the sme lnguge s synchronous grph with rtionl set of initil vertices. Proposition 4.5. For every synchronous rtionl grph G nd rtionl sets I nd F such tht I F =, there is rtionl grph H of finite out-degree nd vertex i such tht L(G,I,F) = L(H, {i},f). Proof. According to Lemm 3.6, there exists synchronous rtionl grph R descried y set of trnsducers (T ) Σ over Γ such tht L(G,I,F) = L(R, #,F). Note tht for ll w # nd w Γ, if w w then w does not contin #. We define grph H such R tht L(G,I,F) = L(H, {i},f) for some vertex i of H. Let k e the constnt involved in Lemm 4.4, T nd T two trnsducers relizing the rtionl reltions { (# n, # kn ) n N } nd {# n, # m m [1,n]} respectively. For ll,,c Σ nd u Σ, H hs edges: w (Γ \ {#}), w (Γ \ {#}), n N, u # n u T T(# n ) (Type 1) n N, u # n u T T T (# n ) (Type 2) n N, cu # n u T T T c (# n ) (Type 3) cu w w # u T T c (w) (Type 4) T T (w) (Type 5) T T T (#) (Type 6) The grph H is clerly rtionl nd of finite out-degree. We tke i = # s initil vertex. Remrk tht in H n edge of type 2 or 3 cnnot e followed y edges of type 1, 2 or 3, nd t most one edge of type 2 or 3 nd of type 5 or 6 cn e pplied. Moreover, n edge of type 1 increses the length of the left prt of the word y one, nd n edge of type 4 decreses it y one. Also, in ny ccepting pth, the lst edge is of type 5 or 6. Figure 9 illustrtes the structure of the otined grph. It is technicl ut strightforwrd to show correspondence etween ccepting pths in H nd R, nd to conclude tht L(R, #,F) = L(H, {i},f).

17 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 17 (1) cu # n (4) cu T (# m 4n ) (2) (4) w (3) (4) (5) w f # (1) T 2 (#) (1) (1) u T T c(# m n ) (4) (4) (4) cu w u T T c(w) (Type 1) (guessing the size) Type 2 or 3 (strting computtion) (Type 4) (ctching up) Type 5 (ccepting) Figure 9: Schem of the construction in Proposition 4.5. From Proposition 3.2 nd Proposition 4.5, we deduce tht the rtionl grphs of finite out-degree with one initil vertex ccept ll context-sensitive lnguges. This result ws proved in [MS01] using the Penttonen norml form of context-sensitive grmmrs [Pen74]. Theorem 4.6. The pth lnguges of rtionl grphs of finite out-degree from unique initil vertex to rtionl set of finl vertices re the context-sensitive lnguges Synchronized grphs of finite out-degree with one initil vertex We now consider the lnguges of synchronized grphs of finite out-degree with one initil vertex. First, we chrcterize them s the lnguges recognized y tiling systems with squre pictures (i.e. for which there exists c N such tht for every word w L(S), there exists (n,m)-picture in P(S) with n cm nd with frontier w). A slight dpttion of the construction of Proposition 4.5 gives the first inclusion. Proposition 4.7. Let S = (Γ,Σ,#, ) e tiling system with squre pictures. There exists synchronized rtionl grph of finite degree ccepting L(S) from one initil vertex. Proof. Let G = (T ) Σ e the synchronized grph otined from S in Proposition 3.3. In the construction from the proof of Proposition 4.5, if we replce the trnsducer T y trnsducer S relizing the synchronized reltion {(# n,# n+c ) n N}, we otin synchronized grph H, vertex i nd set F such tht L(H,i,F) = L(S). Before proceeding with the converse, we stte result similr to Lemm 4.4 for synchronized grphs of finite out-degree tht sttes tht when recognizing word w from unique initil vertex i, the vertices involved hve length t most liner in the size of w. Lemm 4.8. For ny synchronized rtionl grph G of finite out-degree with vertices in Γ nd for every vertex i, there exists constnt k such tht for ll w in L(G, {i},f), there exists pth from i to some f F, leled y w, nd with vertices of size t most k w.

18 18 A. CARAYOL AND A. MEYER Proof. It follows from the definition of synchronized trnsducers tht for every synchronized trnsducer of finite out-degree there exists c N such tht (x,y) T implies tht x y +c (see [Sk03] for proof of this result). We tke k to e the mximum over the set of trnsducers defining G of these constnts. The result follows y strightforwrd induction on the size of w. The converse inclusion is otined y remrking tht the composition of the construction of Proposition 3.2 nd Proposition 3.7 gives tiling system with squre pictures when pplied to synchronized grph of finite out-degree. Proposition 4.9. Let G = (T ) Σ e synchronized grph of finite out-degree. For every initil vertex i nd set of finl vertices F, there exists tiling system S with squre pictures such tht L(S) = L(G, {i},f). Proof. Let G, I nd F e the synchronous grph nd the rtionl set of initil nd finl vertices otined y pplying the constructions of Proposition 3.2 to G, {i} nd F. It is esy to show tht for every word w L(G,I,F ), there exists i I nd f F such tht i w = f with i = f k w where k is the constnt of Lemm 4.8 for G. We conclude y Proposition 3.7, tht sttes the existence of tiling system S such tht L(S) = L(G,I,F ). By Remrk 3.5, S is tiling system with squre pictures. Putting together Proposition 4.9 nd Proposition 4.7 nd with the use of the simultion result from Theorem 2.6, we otin the following theorem. Theorem The lnguges ccepted y synchronized grphs of finite out-degree from unique vertex to rtionl set of vertices re the context-sensitive lnguges recognized y non-deterministic linerly ounded mchines with liner numer of hed reversls. We conjecture tht this clss is strictly contined in the context-sensitive lnguges. However, few seprtion results exist for complexity clsses defined y time nd spce restrictions (see for exmple [vm04]). In prticulr, the digonliztion techniques (see [For00]) used to prove tht the polynomil time hierrchy (with no spce restriction) is strict do not pply for lck of suitle notion of universl LBM Bounding the out-degree It is nturl to wonder if the rtionl grphs still ccept the context-sensitive lnguges when considering ounded out-degree. This is difficult question, to which we only provide here prtil nswer concerning the synchronized grphs of ounded out-degree. It follows from Lemm 4.8 tht the vertices used to ccept word w in synchronized rtionl grph hve length t most liner in the length of w nd therefore, cn e stored on the tpe of LBM. Moreover if the grph is deterministic, we cn construct deterministic LBM ccepting its lnguge. Proposition The lnguge ccepted y deterministic synchronized grph from unique initil vertex is deterministic context-sensitive. Proof. Let G = (T ) Σ e deterministic synchronized grph over Γ, i vertex nd F rtionl set of vertices. We define deterministic LBM M ccepting L(G, {i},f). When ccepting w = 1... w, M strts y writing i on its tpe. It successively pplies T 1,..., T n 1 nd T n to i. If the imge of the current tpe content y one of these trnsducers

19 CONTEXT-SENSITIVE LANGUAGES, RATIONAL GRAPHS AND DETERMINISM 19 is not defined, the mchine rejects. Otherwise, it checks whether the lst tpe content represents vertex which elongs to F. We now detil how the mchine M cn pply one of the trnsducers T of G to word x in deterministic mnner. As T hs finite imge, we cn ssume without loss of generlity tht T = (Γ,Q,i,F,δ) is in rel-time norml form: δ Q Γ Γ Q (see for instnce [Ber79] for presenttion of this result). The mchine enumertes ll pths in T of length less thn c x in the lexicogrphic order where c is the constnt ssocited to G in Lemm 4.8. For ech such pth ρ, it checks if it is n ccepting pth for input x, nd in tht cse replces x y the output of ρ. The spce used y M when strting with word w is ounded y (2c+1) w. Moreover if M ccepts w, then there exists pth from i to vertex F in G leled y w. Conversely, if w elongs to L(G, {i},f) then y Lemm 4.8, there exists pth in G from i to F with vertices of length t most c w nd y construction M ccepts w. Hence, M is deterministic linerly ounded Turing mchine ccepting L(G, {i},f). Remrk The result of Proposition 4.11 extends to ny deterministic rtionl grph stisfying the property expressed y Lemm 4.8. The previous result cn e extended to synchronized grphs of ounded out-degree thnks to uniformiztion result y Weer. First oserve tht rtionl grph is of outdegree ounded y some constnt k if nd only if it is defined y trnsducers which ssocite t most k distinct imges to ny input word. The reltions relized y these trnsducers re clled k-vlued rtionl reltions. Proposition 4.13 ([We96]). For ny k-vlued rtionl reltion R, there exist k functionl rtionl reltions F 1,...,F k such tht R = i [1,k] F i. Note tht even if R is synchronized reltion, the F i s re not necessrily synchronized. However, they still stisfy the inequlity y x + c for ll (x,y) F i. To ny synchronized grph G with n out-degree ounded y k defined y set of trnsducers (T ) Σ, we ssocite the deterministic rtionl grph H defined y (F i ) Σ,i [1,k] where for ll Σ, (F i ) i [1,k] is the set of rtionl functions ssocited to T y Proposition According to Proposition 4.11 nd to Remrk 4.12, L(H, {i},f) is deterministic context-sensitive lnguge. Let π e the lpheticl projection defined y π( i ) = for ll Σ nd i [1,k], it is strightforwrd to estlish tht π (L(H, {i},f)) = L(G, {i}, F). As deterministic context-sensitive lnguges re closed under lpheticl projections, L(G, {i}, F) is deterministic context-sensitive lnguge. Theorem The lnguge ccepted y synchronized grph of ounded out-degree from unique initil vertex is deterministic context-sensitive. The converse result is not cler, for resons similr to those presented in the previous section for synchronized grphs of finite degree. A precise chrcteriztion of the fmily of lnguges ccepted y synchronized rtionl grphs of ounded degree would e interesting. 5. Notions of determinism In this lst prt of the section on rtionl grphs, we investigte fmilies of grphs which ccept the deterministic context-sensitive lnguges. First of ll, we exmine the fmily

20 20 A. CARAYOL AND A. MEYER yielded y the previous constructions when pplied to deterministic lnguges. Then, we propose glol property over sets of trnsducers chrcterizing su-fmily of rtionl grphs whose lnguges re precisely the deterministic context-sensitive lnguges Unmiguous context-sensitive lnguges When pplying the construction of Proposition 3.3 to deterministic tiling system S, one otins synchronous rtionl grph G (which is non-deterministic in generl) nd two rtionl sets of vertices I nd F such tht L(G,I,F) = L(S), with the prticulrity tht for every word w in L, there is exctly one pth leled y w leding from some vertex in I to vertex in F: G is unmiguous with respect to I nd F. However, the converse is not grnted: given grph G nd two rtionl sets I nd F such tht G is unmiguous with respect to I nd F, we cnnot ensure tht L(G,I,F) is deterministic context-sensitive lnguge. Rther, the otined lnguges cn e ccepted y unmiguous linerly ounded mchines. This clss of lnguges is clled USPACE(n), nd it is not known whether it coincides with either the context-sensitive or deterministic context-sensitive lnguges. Theorem 5.1. Let L e lnguge, the following properties re equivlent: (1) L is n unmiguous context-sensitive lnguge. (2) There exist rtionl grph G with unmiguous trnsducers nd two rtionl sets I nd F with respect to which G is unmiguous, such tht L = L(G,I,F). This result only holds if one considers unmiguous trnsducers, i.e. trnsducers in which there is t most one ccepting pth per pir of words. The reson is tht miguity in the trnsducers would induce miguity in the mchine. However, since synchronized trnsducers cn e mde unmiguous (Cf. Remrk 2.1), we cn drop this requirement in the cse of synchronized grphs. Note tht the unmiguity of rtionl or synchronized grphs with respect to rtionl sets of vertices is undecidle. However, since ny rtionl function cn e relized y n unmiguous trnsducer [Ko69, Sk03], the lnguge of ny deterministic rtionl grph is, y to Theorem 5.1, unmiguous. Corollry 5.2. The lnguges of deterministic rtionl grphs from n initil vertex i to rtionl set F of vertices re unmiguous context-sensitive lnguges Glolly deterministic sets of trnsducers We just sw n ttempt t chrcterizing nturl fmilies of grphs whose lnguges re the deterministic context-sensitive lnguges, which ws sed on restriction of previous constructions to the deterministic cse, ut filed to meet its ojective ecuse of slight nunce etween the notions of determinism nd unmiguity for tiling systems. First, we nturlly consider the clss of sequentil synchronous utomt with n initil set of the form {}, where is letter of the vertex lphet (in other words, given initil vertex does not code for ny informtion esides its length). It is esy to check tht when pplying the construction of Proposition 3.7 to one of these utomt, we otin deterministic tiling system. Proposition 5.3. The lnguges of sequentil synchronous grphs from {} re deterministic context-sensitive lnguges.

More general families of infinite graphs

More general families of infinite graphs More generl fmilies of infinite grphs Antoine Meyer Forml Methods Updte 2006 IIT Guwhti Prefix-recognizle grphs Theorem Let G e grph, the following sttements re equivlent: G is defined y reltions of the

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

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

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

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

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

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

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University U.U.D.M. Project Report 07:4 Frey Frctions Rickrd Fernström Exmensrete i mtemtik, 5 hp Hledre: Andres Strömergsson Exmintor: Jörgen Östensson Juni 07 Deprtment of Mthemtics Uppsl University Frey Frctions

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

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

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

On Rational Graphs. Christophe Morvan. IRISA, Campus de Beaulieu, Rennes, France

On Rational Graphs. Christophe Morvan. IRISA, Campus de Beaulieu, Rennes, France On Rtionl Grphs Christophe Morvn IRISA, Cmpus de Beulieu, 35042 Rennes, Frnce christophe.morvn@iris.fr Astrct. Using rtionlity, like in lnguge theory, we define fmily of infinite grphs. This fmily is strict

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

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

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

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

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

BACHELOR THESIS Star height

BACHELOR THESIS Star height BACHELOR THESIS Tomáš Svood Str height Deprtment of Alger Supervisor of the chelor thesis: Study progrmme: Study rnch: doc. Štěpán Holu, Ph.D. Mthemtics Mthemticl Methods of Informtion Security Prgue 217

More information

More on automata. Michael George. March 24 April 7, 2014

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

How to simulate Turing machines by invertible one-dimensional cellular automata

How to simulate Turing machines by invertible one-dimensional cellular automata How to simulte Turing mchines by invertible one-dimensionl cellulr utomt Jen-Christophe Dubcq Déprtement de Mthémtiques et d Informtique, École Normle Supérieure de Lyon, 46, llée d Itlie, 69364 Lyon Cedex

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

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

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

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

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

Homework Solution - Set 5 Due: Friday 10/03/08

Homework Solution - Set 5 Due: Friday 10/03/08 CE 96 Introduction to the Theory of Computtion ll 2008 Homework olution - et 5 Due: ridy 10/0/08 1. Textook, Pge 86, Exercise 1.21. () 1 2 Add new strt stte nd finl stte. Mke originl finl stte non-finl.

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

Contextual graph grammars characterising Rational Graphs

Contextual graph grammars characterising Rational Graphs Contextul grph grmmrs chrcterising Rtionl Grphs Christophe Morvn To cite this version: Christophe Morvn. Contextul grph grmmrs chrcterising Rtionl Grphs. Henning Bordihn nd Rudolf Freund nd Mrkus Holzer

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

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

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

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

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

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 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

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

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

More information

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language.

Section: Other Models of Turing Machines. Definition: Two automata are equivalent if they accept the same language. Section: Other Models of Turing Mchines Definition: Two utomt re equivlent if they ccept the sme lnguge. Turing Mchines with Sty Option Modify δ, Theorem Clss of stndrd TM s is equivlent to clss of TM

More information

Quadratic Forms. Quadratic Forms

Quadratic Forms. Quadratic Forms Qudrtic Forms Recll the Simon & Blume excerpt from n erlier lecture which sid tht the min tsk of clculus is to pproximte nonliner functions with liner functions. It s ctully more ccurte to sy tht we pproximte

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

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

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

The Caucal Hierarchy of Infinite Graphs in Terms of Logic and Higher-order Pushdown Automata

The Caucal Hierarchy of Infinite Graphs in Terms of Logic and Higher-order Pushdown Automata The Cucl Hierrchy of Infinite Grphs in Terms of Logic nd Higher-order Pushdown Automt Arnud Cryol 1 nd Stefn Wöhrle 2 1 IRISA Rennes, Frnce rnud.cryol@iris.fr 2 Lehrstuhl für Informtik 7 RWTH Achen, Germny

More information

Three termination problems. Patrick Dehornoy. Laboratoire de Mathématiques Nicolas Oresme, Université de Caen

Three termination problems. Patrick Dehornoy. Laboratoire de Mathématiques Nicolas Oresme, Université de Caen Three termintion prolems Ptrick Dehornoy Lortoire de Mthémtiques Nicols Oresme, Université de Cen Three termintion prolems Ptrick Dehornoy Lortoire Preuves, Progrmmes, Systèmes Université Pris-Diderot

More information

A tutorial on sequential functions

A tutorial on sequential functions A tutoril on sequentil functions Jen-Éric Pin LIAFA, CNRS nd University Pris 7 30 Jnury 2006, CWI, Amsterdm Outline (1) Sequentil functions (2) A chrcteriztion of sequentil trnsducers (3) Miniml sequentil

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

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

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

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

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

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

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

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

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

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

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

CS375: Logic and Theory of Computing

CS375: Logic and Theory of Computing CS375: Logic nd Theory of Computing Fuhu (Frnk) Cheng Deprtment of Computer Science University of Kentucky 1 Tle of Contents: Week 1: Preliminries (set lger, reltions, functions) (red Chpters 1-4) Weeks

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

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

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1 Non-Deterministic Finite Automt Fll 2018 Costs Busch - RPI 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q q2 1 q 0 q 3 Fll 2018 Costs Busch - RPI 2 Nondeterministic Finite Automton (NFA) Alphbet

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

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

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