The Magic Number Problem for Subregular Language Families

Size: px
Start display at page:

Download "The Magic Number Problem for Subregular Language Families"

Transcription

1 The Mgic Number Problem for Subregulr Lnguge Fmilies Mrkus Holzer Sebstin Jkobi Mrtin Kutrib Institut für Informtik, Universität Giessen, Arndtstr. 2, Giessen, Germny emil: We investigte the mgic number problem, tht is, the question whether there exists miniml n-stte nondeterministic finite utomton (NFA) whose equivlent miniml deterministic finite utomton (DFA) hs α sttes, for ll n nd α stisfying n α 2 n. A number α not stisfying this condition is clled mgic number (for n). It ws shown in [11] tht no mgic numbers exist for generl regulr lnguges, while in [5] trivil nd non-trivil mgic numbers for unry regulr lnguges were identified. We obtin similr results for utomt ccepting subregulr lnguges like, for exmple, combintionl lnguges, str-free, prefix-, suffix-, nd infix-closed lnguges, nd prefix-, suffix-, nd infix-free lnguges, showing tht there re only trivil mgic numbers, when they exist. For finite lnguges we obtin some prtil results showing tht certin numbers re non-mgic. 1 Introduction Nondeterministic finite utomt (NFAs) re probbly best known for being equivlent to right-liner context-free grmmrs nd, thus, for cpturing the lowest level of the Chomsky-hierrchy, the fmily of regulr lnguges. It is well known tht NFAs cn offer exponentil sving in spce compred with deterministic finite utomt (DFAs), tht is, given some n-stte NFA one cn lwys construct lnguge equivlent DFA with t most 2 n sttes [23]. This so-clled powerset construction turned out to be optiml, in generl. Tht is, the bound on the number of sttes is tight in the sense tht for n rbitrry n there is lwys some n-stte NFA which cnnot be simulted by ny DFA with less thn 2 n sttes [17, 21, 22]. On the other hnd, there re cses where nondeterminism does not help for the succinct representtion of lnguge compred to DFAs. These two milestones from the erly dys of utomt theory form prt of n extensive list of eqully striking problems of NFA relted problems, nd re bsis of descriptionl complexity. Moreover, they initited the study of the power of resources nd fetures given to finite utomt. For recent surveys on descriptionl complexity issues of regulr lnguges we refer to, for exmple, [6, 7, 8]. Nerly decde go very fundmentl question on the well known subset construction ws rised in [9]: Does there lwys exists miniml n-stte NFA whose equivlent miniml DFA hs α sttes, for ll n nd α with n α 2 n? A number α not stisfying this condition is clled mgic number for n. The nswer to this simple question turned out not to be so esy. For NFAs over two-letter lphbet it ws shown tht α = 2 n 2 k or 2 n 2 k 1, for 0 k n/2 2 [9], nd α = 2 n k, for 5 k 2n 2 nd some coprimlity condition for k [10], re non-mgic. In [12] it ws proven tht the integer α is non-mgic, if n α 1+n(n+1)/2. This result ws improved by showing tht α is non-mgic for n α 2 3 n in [13]. Further non-mgic numbers for two-letter input lphbet were identified in [4] nd [19]. It turned out tht the problem becomes esier if one llows more input letters. In fct, for exponentilly growing lphbets there re no mgic numbers t ll [12]. This result ws improved to less growing lphbets in [4], to constnt lphbets of size four in [11], nd very recently to three-letter I. McQuilln nd G. Pighizzini (Eds.): 12th Interntionl Workshop on Descriptionl Complexity of Forml Systems (DCFS 2010) EPTCS 31, 2010, pp , doi: /eptcs c M. Holzer, S. Jkobi, M. Kutrib

2 M. Holzer, S. Jkobi, M. Kutrib 111 lphbets [15]. Mgic numbers for unry NFAs were recently studied in [5] by revising the Chrobk norml-form for NFAs. In the sme pper lso brief historicl summry of the mgic number problem cn be found. Further results on the mgic number problem (in prticulr in reltion to the opertion problem on regulr lnguges) cn be found, for exmple, in [13, 14]. To our knowledge the mgic number problem ws not systemticlly studied for subregulr lnguges fmilies (except for unry lnguges). Severl of these subfmilies re well motivted by their representtions s finite utomt or regulr expressions: finite lnguges (re ccepted by cyclic finite utomt), combintionl lnguges (re ccepted by utomt modeling combintionl circuits), str-free lnguges or regulr non-counting lnguges (which cn be described by regulr-like expression using only union, conctention, nd complement), prefix-closed lnguges (re ccepted by utomt where ll sttes re ccepting), suffix-closed (or multiple-entry or fully-initil) lnguges (re ccepted by utomt where the computtion cn strt in ny stte), infix-closed lnguges (re ccepted by utomt where ll sttes re both initil nd ccepting), suffix-free lnguges (re ccepted by nonreturning utomt, tht is, utomt where the initil stte does not hve ny in-trnsition), prefix-free lnguges (re ccepted by non-exiting utomt, tht is, utomt where ll out-trnsitions of every ccepting stte go to rejecting sink stte), nd infix-free lnguges (re ccepted by non-returning nd non-exiting utomt, where these conditions re necessry, but not sufficient). The hierrchy of these nd some further subregulr lnguge fmilies is well known. We study ll fmilies mentioned with respect to the mgic number problem, nd show except for finite lnguges, where only some prtil results will be presented tht there re only trivil mgic numbers, whenever they exist. 2 Definitions Let Σ denote the set of ll words over the finite lphbet Σ. For n 0 we write Σ n for the set of ll words of length n. The empty word is denoted by λ nd Σ + = Σ \{λ}. A lnguge L over Σ is subset of Σ. For the length of word w we write w. Set inclusion is denoted by nd strict set inclusion by. We write 2 S for the power set nd S for the crdinlity of set S. A nondeterministic finite utomton (NFA) is quintuple A=(Q,Σ,δ,q 0,F), where Q is the finite set of sttes, Σ is the finite set of input symbols, q 0 Q is the initil stte, F Q is the set of ccepting sttes, nd δ : Q Σ 2 Q is the trnsition function. As usul the trnsition function is extended to δ : Q Σ 2 Q reflecting sequences of inputs: δ(q,λ)={q} nd δ(q,w) = q δ(q,) δ(q,w), for q Q, Σ, nd w Σ. A word w Σ is ccepted by A if δ(q 0,w) F /0. The lnguge ccepted by A is L(A)={w Σ w is ccepted by A}. A finite utomton is deterministic (DFA) if nd only if δ(q, ) = 1, for ll q Q nd Σ. In this cse we simply write δ(q,) = p for δ(q,) ={p} ssuming tht the trnsition function is mpping δ : Q Σ Q. So, ny DFA is complete, tht is, the trnsition function is totl, wheres for NFAs it is possible tht δ mps to the empty set. Note tht sink stte is counted for DFAs, since they re lwys complete, wheres it is not counted for NFAs, since their trnsition function my mp to the empty set. In the sequel we refer to the DFA obtined from n NFA A=(Q,Σ,δ,q 0,F) by the powerset construction s A = (2 Q,Σ,δ,{q 0 },F ), where δ (P,) = p P δ(p,), for P Q nd Σ, nd F ={P Q P F /0}. As lredy mentioned in the introduction, in [11] it ws shown tht for ll integers n nd α such tht n α 2 n, there exists n n-stte nondeterministic finite utomton A n,α whose equivlent miniml deterministic finite utomton hs exctly α sttes. Since some of our constructions rely on this proof

3 112 Mgic Numbers for Subregulr Lnguge Fmilies nd for the ske of completeness nd redbility we briefly recll the sketch of the construction. In the following we cll the NFA A n,α the Jirásek-Jirásková-Szbri utomton, or for short the JJS-utomton. Theorem 1 ([11]) For ll integers n nd α such tht n α 2 n, there exists n n-stte nondeterministic finite utomton A n,α whose equivlent miniml deterministic finite utomton hs exctly α sttes. In the construction for some fixed integer n the cses α = n nd α = 2 n re treted seprtely by pproprite witness lnguges. For the remining cses it is first shown tht every α stisfying n<α < 2 n cn be written s specific sum of powers of two. In prticulr, for ll integers n nd α such tht n<α < 2 n, there exist integers k nd m with 1 k n 1 nd 1 m<2 k, such tht nd α = n (k+1)+2 k + m m = (2 k 1 1)+(2 k 2 1)+ +(2 k l 1 1)+ { (2 k l 1) 2 (2 k l 1) where 1 l k 1 nd k k 1 > k 2 > >k l 1. Then NFAs re constructed such tht the powerset construction yields DFAs whose number of sttes is exctly one of these powers of two, which finlly hve to be combined ppropritely to led to single n-stte NFA A n,α whose equivlent miniml DFA hs exctly α sttes. Automton A n,α is depicted in Figure 1, where the following d-trnsitions re not shown: {0,2,3,4,...,k k i + 1} if 1 i l 1 {0,1,...,k k i + 1} if i=l nd m is of the first form δ(i,d)= {0,2,3,4,...,k k i + 1} if i=l nd m is of the second form {0,1,...,k k i + 1} if i=l+1 nd m is of the second form /0 otherwise.,c,c,c,c,c k 1 k b b n 1... b k+ 1 Figure 1: Jirásek-Jirásková-Szbri s (JJS) nondeterministic finite utomton A n,α with n sttes (d-trnsitions re not shown) ccepting lnguge for which the equivlent miniml DFA needs exctly α = n (k+1)+m sttes. 3 Results We systemticlly investigte the mgic number problem for the forementioned subregulr lnguge fmilies. For the remining theorems of this pper, when speking of n n-stte NFA we lwys men

4 M. Holzer, S. Jkobi, M. Kutrib 113 miniml NFA. Given subregulr lnguge fmily, if f(n) is the number of sttes tht is sufficient nd necessry in the worst cse for DFA to ccept the lnguge of n n-stte NFA belonging to the fmily, then number α with f(n) < α 2 n is clled trivil mgic number. Similrly, if g(n) is the number of sttes tht is necessry for ny DFA simulting n rbitrry n-stte NFA, then ll numbers α with α < g(n) is lso clled trivil mgic number. For exmple, for infix-free lnguges g(n) is shown to be n+1 in Theorem 5, while f(n) is known to be 2 n [1]. Due to spce constrints most proofs re omitted. An observtion from [1] shows tht the mgic number problem for elementry nd combintionl lnguges is trivil. 3.1 Str-Free Lnguges nd Power Seprting Lnguges A lnguge L Σ is str-free (or regulr non-counting) if nd only if it cn be obtined from the elementry lnguges {}, for Σ, by pplying the Boolen opertions union, complementtion, nd conctention finitely often. These lnguges re exhustively studied, for exmple, in [20]. Since regulr lnguges re closed under Boolen opertions nd conctention, every str-free lnguge is regulr. On the other hnd, not every regulr lnguge is str free. Here we use n lterntive chrcteriztion of str-free lnguges by so clled permuttion-free utomt [20]: A regulr lnguge L Σ is str-free if nd only if the miniml DFA ccepting L is permuttion-free, tht is, there is no word w Σ tht induces non-trivil permuttion of ny subset of the set of sttes. Here trivil permuttion is simply the identity permuttion. Observe tht word uw induces non-trivil permuttion {q 1,q 2,...,q n } Q in DFA with stte set Q nd trnsition function δ if nd only if wu induces non-trivil permuttion {δ(q 1,u),δ(q 2,u),...,δ(q n,u)} in the sme utomton. Further, if one finds non-trivil permuttion consisting of multiple disjoint cycles, it suffices to consider single cycle. Before we show tht no mgic numbers exist for str-free lnguges we prove useful lemm on permuttions in (miniml) DFAs obtined by the powerset construction. Lemm 2 Let A be nondeterministic finite utomton with stte set Q over lphbet Σ, nd ssume tht A is the equivlent miniml deterministic finite utomton, which is non-permuttion-free. If the word w in Σ induces non-trivil permuttion on the stte set {P 0,P 1,...,P n 1 } 2 Q of A, tht is, δ (P i,w)=p i+1, for 0 i<n 1, nd δ (P n 1,w)=P 0, then there re no two sttes P i nd P j with i j such tht P i P j. Proof : Assume to the contrry tht P 0 P i (possibly fter cyclic shift), for some 0<i n 1. Then one cn show by induction tht δ (P 0,v) δ (P i,v), for every word v Σ. In prticulr, this lso holds true for the word w tht induces the non-trivil permuttion on the stte set {P 0,P 1,...,P n 1 }. But then P ki mod n = δ (P 0,w ki ) δ (P i,w ki ) = P (k+1)i mod n, for k 0, nd one finds the chin of inclusions P 0 P i P 2i mod n P 3i mod n P ni mod n = P 0, which implies P 0 = P i, contrdiction. Now we re prepred for the min theorem, which utilizes Lemm 2. Theorem 3 For ll integers n nd α such tht n α 2 n, there exists n n-stte nondeterministic finite utomton ccepting str-free lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. The previous theorem generlizes to ll lnguge fmilies tht re superset of the fmily of str-free lnguges such s, for exmple, the fmily of power seprting lnguges introduced in [25].

5 114 Mgic Numbers for Subregulr Lnguge Fmilies 3.2 Strs nd Comet Lnguges A lnguge L Σ is str lnguge if nd only if L = H, for some regulr lnguge H Σ, nd L Σ is comet lnguge if nd only if it cn be represented s conctention G H of regulr str lnguge G Σ nd regulr lnguge H Σ, such tht G {λ} nd G /0. Str lnguges nd comet lnguges were introduced in [2] nd [3]. Next, lnguge L Σ is two-sided comet lnguge if nd only if L=EG H, for regulr str lnguge G Σ nd regulr lnguges E,H Σ, such tht G {λ} nd G /0. So, (two-sided) comet lnguges re lwys infinite. Clerly, every str lnguge not equl to {λ} is lso comet lnguge nd every comet is two-sided comet lnguge, but the converse is not true in generl. Theorem 4 For ll integers n nd α such tht n α 2 n, there exists n n-stte nondeterministic finite utomton ccepting str lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. The sttement remins vlid for (two-sided) comet lnguges. 3.3 Subword Specific Lnguges In this section we consider lnguges for which for every word in the lnguge either ll or none of its prefixes, suffixes or infixes belong to the sme lnguge. Agin, there re only trivil mgic numbers. We strt with subword-free lnguges. A lnguge L Σ is prefix-free if nd only if y L implies yz / L, for ll z Σ +, infix-free if nd only if y L implies xyz / L, for ll xz Σ +, nd suffix-free if nd only if y L implies xy / L, for ll x Σ +. Theorem 5 Let A be miniml n-stte NFA ccepting non-empty prefix-, suffix- or infix-free lnguge. Then ny equivlent miniml DFA ccepting lnguge L(A) needs t lest n + 1 sttes. In the following we show tht no non-trivil mgic numbers exist for subword-free lnguges. The upper bound for the deterministic blow-up in prefix- nd suffix-free lnguges is 2 n nd for infixfree lnguges it is 2 n 2 + 2, so ll numbers bove re trivilly mgic. Theorem 6 For ll integers n nd α such tht n < α 2 n 1 + 1, there exists n n-stte nondeterministic finite utomton ccepting prefix-free lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. The sttement remins true for NFAs ccepting suffix-free lnguges. For infix-free regulr lnguges the sitution is slightly different compred to bove. Theorem 7 For ll integers n nd α such tht n < α 2 n 2 + 2, there exists n n-stte nondeterministic finite utomton ccepting n infix-free lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. Next, we consider prefix-, infix-, nd suffix-closed lnguges. A lnguge L Σ is prefix-closed if nd only if xy L implies x L, for x Σ, infix-closed if nd only if xyz L implies y L, for x,z Σ, nd suffix-closed if nd only if yz Limplies z L, for z Σ. We use the following results from [16]. Theorem 8 (1) A nonempty regulr lnguge is prefix-closed if nd only if it is ccepted by some nondeterministic finite utomton with ll sttes ccepting. (2) A nonempty regulr lnguge is infix-closed if nd only if it is ccepted by some nondeterministic finite utomton with multiple initil sttes with ll sttes both initil nd ccepting.

6 M. Holzer, S. Jkobi, M. Kutrib 115 Prefix-closed lnguges rech the upper bound of 2 n sttes, nd for infix-closed lnguges it is 2 n Up to these bounds the only mgic number for both lnguge fmilies is n (except for n=1). The upper bound for suffix-closed lnguges is 2 n 1 + 1, nd up to this, no mgic numbers exist. Theorem 9 For ll integers n nd α such tht n < α 2 n 1 + 1, there exists n n-stte nondeterministic finite utomton ccepting n infix-closed lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. The cse α = n cn only be reched for n = 1. Proof : For the second sttement, note tht ech DFA ccepting lnguge L Σ needs non-ccepting stte, which the miniml NFA cnnot hve, due to Theorem 8. So, Σ is the only infix-closed lnguge, for which the size of the miniml DFA equls the size of n equivlent miniml NFA. Both hve single stte. The cse α = 2 n is discussed in [1]. For the remining, ssume n<α 2 n 1. In this cse, the JJS-utomton A n,α = (Q,Σ,δ,n 1,{k}) hs non-empty initil til of sttes, tht is, the initil stte is equl to stte n 1. From A n,α we construct n utomton A 1 =(Q,Σ {#,$},δ 1,Q,Q) with ll sttes initil nd ccepting nd trnsition function δ 1 (k,#)={k}, δ 1 (q,$)={q 1} if k+2 q n 1, δ 1 (k+1,$) = {1} nd δ 1 (q,) = δ(q,) for 0 q k nd Σ. This NFA with multiple initil sttes cn be converted into n equivlent NFA A 2 with initil stte n 1 nd the trnsition function δ 2 (n 1,)= q Q δ 1 (q,) nd δ 2 (q,)=δ 1 (q,) for ll Σ {#,$} nd q Q\{n 1}. With S 1 ={($ i,$ n (k+1) i c k 1 ) 0 i n (k+1)}, S 2 ={($ n (k+1) c i,c k 1 i ) 1 i k 1} nd S 3 ={($ n (k+1) d,c k )}, one cn esily check, tht S=S 1 S 2 S 3 is fooling set for L(A 2 ): Different pirs from S 1 result in word beginning with more thn n (k+ 1) $-symbols, pirs from S 2 result in too mny c-symbols, c k from S 3 cnnot be combined with ny other word nd mixing pirs from S 1 nd S 2 either results in word contining the infix $c i $ or, if ($ n (k+1),c k 1 ) is chosen from S 1, in $ n (k+1) c i+k 1, which ends with too mny c-symbols. In the corresponding powerset utomton A 2, by reding prefixes of $n (k+1), one reches n (k+1) sttes {n 1}, {n 2,...,k+ 1,1},..., {k+1,1}. After reding $ n (k+1), A 2 is in stte {1} nd from there, ccording to the JJS-construction, 2 k +m sttes from 2 {0,1,...,k} re rechble. So we hve exctly α sttes. To see tht no further sttes cn be reched, note tht the trnsition function differs from the one of the JJS-utomton only in sttes k+1,...,n 1 nd stte k. The #-trnsition in stte k gives no new rechble sttes nd reding $ lwys leds to either stte{n i,...,k+1,1}, for some 1 i n k+1, or to stte {1} or the empty set. So, the only interesting trnsitions re those of the initil stte {n 1} on the input symbols, b, c nd d. Reding or b leds to {0,...,k}, reding c to {1,...,k} nd on input d, A 2 enters the stte δ(q,d) for the lrgest q Q for which this trnsition is defined. All these sttes were lredy counted. To prove tht ny two distinct sttes M,N Q\{n 1} re pirwise inequivlent, without loss of generlity, pick n element q M\ N. If q k, the word c k q # distinguishes M nd N. Otherwise, if q k+1, one cn drive it to stte 1 by reding $-symbols, nd then c k 1 distinguishes the two sttes. Finlly, stte {n 1} is inequivlent with ny stte N Q\{n 1} by the input word $ n (k+1) c k 1. The fmily of infix-closed lnguges is subset of the fmily of suffix-closed lnguges, so the previous theorem generlizes to the ltter lnguge fmily, except for n which is not mgic for n 1 nymore: Corollry 10 For ll integers n nd α such tht n α 2 n 1 + 1, there exists n n-stte nondeterministic finite utomton ccepting suffix-closed lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes.

7 116 Mgic Numbers for Subregulr Lnguge Fmilies Since the upper bound for the deterministic blow-up of prefix-closed lnguges is greter thn tht of infix-closed lnguges, we need to tret them seprtely here. Theorem 11 For ll integers n nd α such tht n<α 2 n, there exists n n-stte nondeterministic finite utomton ccepting prefix-closed lnguge whose equivlent miniml deterministic finite utomton hs exctly α sttes. The cse α = n cn only be reched for n= Finite Lnguges For finite lnguges the mgic number problem turns out to be more chllenging which seems to coincide with the fct, tht the upper bounds for the deterministic blow-up of finite lnguges differ much from these of infinite lnguge fmilies. In [24] it ws shown tht for ech n-stte NFA over n lphbet of size k, there is n equivlent DFA with t most O(k n/(log(k)+1) ) sttes. This mtches n erlier result of O(2 n/2 ) for finite lnguges over binry lphbets [18]. In this section we give some prtil results for finite lnguges over binry lphbet, tht is, we show tht roughly qudrtic intervl beginning t n + 1 contins only non-mgic numbers nd tht numbers of some exponentil form 2 (n 1)/2 + 2 i re non-mgic, too. Note tht for finite lnguges, n is trivil mgic number, since ny DFA needs non-ccepting sink stte which is not necessry for n NFA. Theorem 12 For ll integers n nd α such tht n + 1 α ( n 2 )2 + n if n is even, nd n+1 α ( n 1 2 )2 + n+1 if n is odd, there exists n n-stte nondeterministic finite utomton ccepting finite lnguge over binry lphbet whose equivlent miniml deterministic finite utomton hs exctly α sttes. Proof : The cse α = n+1 cn be seen with the witness lnguge {} n. So, ssume n+1<α. Then there exist integers k nd m such tht k=mx{x 0 α > 1+ x i=0 n 2i} nd m=α 1 k i=0 n 2i. Let A=({1,...,n},{},δ,1,{n}) be n NFA with δ(q,)={q+1,2q+1,2q+2,...,n}, 1 q k, δ(k+1,)={(k+1)+1,n (m 1),n (m 1)+1,...,n}, δ(q,)={q+1}, for k+1<q<n, nd δ(q,b)={q+1}, for q<n. The trnsitions on b ensure the minimlity of A nd the inequivlence of sttes in the corresponding powerset utomton A. To count ll rechble sttes of A, we prtition the set {} s follows: k {} = {b i }{} {b k+1 }{} {b}. i=0 With words from {b}, the singletons {1},...,{n} nd /0 re rechble which gives n+1 sttes. Next, let w=b i w nd w {} j for some integers 0 i k 1 nd j k. Then δ ({1},w)=δ ({i+1},w ) = δ ({i+2,2(i+1)+1,2(i+1)+2,...,n},w ) ={i+ j+2,2(i+1)+ j+1,2(i+1)+ j+2,...,n}. (1) Since we lredy counted the singleton sets nd the empty set, we hve to count sets of the form (1) hving t lest two elements. We conclude tht the set{i+ j+2,2(i+1)+ j+1,2(i+1)+ j+2,...,n}

8 M. Holzer, S. Jkobi, M. Kutrib 117 hs crdinlity t lest 2 if nd only if we hve {2(i+1)+ j+ 1,2(i+1)+ j+ 2,...,n} /0, which in turn holds if nd only if 0 j n 2(i+1) 1. So, there re n 2(i+1) sttes rechble for fixed i k 1, which gives k i=1 n 2i sttes tht re rechble by reding words from {bi }{} j with 0 i k 1. Now let w=b k w for some w {} j. Then δ ({1},w)=δ ({k+1},w ) = δ ({k+2,n (m 1),n (m 1)+1,...,n},w ) ={k+ j+2,n (m 1)+ j,n (m 1)+ j+1,...,n}. (2) These sets contin t lest two elements if nd only if 0 j m 1. Therefore, exctly m sets of the form (2) re rechble in A. Summing up, we get m+n+1+ k i=1 n 2i=α 1 k i=0 n 2i+1+ k i=0 n 2i=α sttes. To see tht we hve not multiply counted ny stte, note tht there is no rechble set of sttes tht stisfies (1) nd (2): Assume for some integers i, j, j,k with i<k tht {i+ j+2,2(i+1)+ j+1,...,n}={k+ j + 2,n (m 1)+ j,...,n}. Then of course i+ j=k+ j, nd by definition of k nd m we hve 1 m n 2(k+1) 1. Finlly, we derive n (m 1)+ j n n+2(k+1)+1+ j = k+k+ j + 4 which is contrdiction to the ssumption. > i+k+ j + 4=i+i+ j+4> 2(i+1)+ j+1 For our lst theorem we use the following results presented in [18]: For n integer n let k = n 2 nd A n = ({1,...,n},{},δ,1,{n}) be n NFA with trnsitions δ(q,) = {q+1,k+1} if q < k, δ(q,)={q+1} if k q < n, nd δ(q,b) = {q+1} if q < n nd q k. Then in [18] it is shown tht A n is miniml nd tht the miniml equivlent DFA hs exctly 2 (n/2)+1 1 sttes if n is even, nd 3 2 (n+1)/2 1 1 sttes if n is odd. This miniml DFA spns binry tree on inputs nd b s depicted in Figure 2. Theorem 13 For ll integers n nd α such tht α = 3 2 (n/2) 1 + β if n is even nd α = 2 (n+1)/2 + β if n is odd, with β = 2 i 1 for some integer 1 i n 1 2, there exists n n-stte nondeterministic finite utomton ccepting finite lnguge over binry lphbet whose equivlent miniml deterministic finite utomton hs exctly α sttes. Proof : Let n,α nd β be s required nd x=n+1 log(β+1). We construct miniml utomton B n,β dpting A n 1 = ({1,...,n 1},{},δ 1,1,{n 1}) from bove by tking new initil stte 0 nd setting the trnsition function δ to δ(0,b)={1}, δ(0,)={1,x}, nd δ(q,c)=δ 1 (q,c), for 1 q n 1 nd letter c {}. Let A n 1 nd B n,β be the powerset utomt of A n 1 nd B n,β. Then, by reding words bw for w {}, ll sttes of A n 1 re rechble in B n,β. Together with the initil stte {0}, these

9 118 Mgic Numbers for Subregulr Lnguge Fmilies 1 1 b b b b b 4 b / Figure 2: The NFA A n from [18] nd its powerset utomton tht builds binry tree. In the DFA on the right the trnsitions of sttes {3} nd {3, 4} re the sme s for {3, 5} nd {3, 4, 5}, respectively. re 2 (n 1)/2+1 sttes if n is odd, nd 3 2 n/2 1 sttes if n is even. For considering words of the form w=w, for w {}, let k= n 1 2. Then k+1 x n nd we rech the sttes δ ({0},w) = δ ({1,x},w) = δ ({1},w) δ ({x},w). These sttes differ from the ones in A n 1 s long s δ ({x},w) /0, nd this holds if nd only if w n x. There re 2 n x+1 1=β such words, so there re β dditionl sttes. References [1] H. Bordihn, M. Holzer & M. Kutrib (2009): Determiniztion of Finite Automt Accepting Subregulr Lnguges. Theoret. Comput. Sci. 410, pp [2] J. A. Brzozowski (1967): Roots of Str Events. J. ACM 14, pp [3] J. A. Brzozowski & R. Cohen (1967): On decompositions of regulr events. In: Symposium on Switching nd Automt Theory (SWAT 1967), IEEE Computer Society Press, pp [4] V. Geffert (2005): (Non)determinism nd the size of one-wy finite utomt. In: Descriptionl Complexity of Forml Systems (DCFS 2005), Universit degli Studi di Milno, pp [5] V. Geffert (2007): Mgic numbers in the stte hierrchy of finite utomt. Inform. Comput. 205, pp [6] M. Holzer & M. Kutrib (2009): Descriptionl nd Computtionl Complexity of Finite Automt. In: Lnguge nd Automt Theory nd Applictions (LATA 2009), number 5457 in LNCS, Springer, pp [7] M. Holzer & M. Kutrib (2009): Nondeterministic Finite Automt Recent Results on the Descriptionl nd Computtionl Complexity. Internt. J. Found. Comput. Sci. 20, pp [8] M. Holzer & M. Kutrib (2010): Descriptionl Complexity An Introductory Survey. In: Scientific Applictions of Lnguge Methods, Imperil College Press. To pper.

10 M. Holzer, S. Jkobi, M. Kutrib 119 [9] K. Iwm, Y. Kmbyshi & K. Tkki (2000): Tight bounds on the number of sttes of DFAs tht re equivlent to n-stte NFAs. Theoret. Comput. Sci. 237, pp [10] K. Iwm, A. Mtsuur & M. Pterson (2003): A fmily of NFAs which need 2 n α deterministic sttes. Theoret. Comput. Sci. 301, pp [11] Jozef Jirásek, Glin Jirásková & Alexnder Szbri (2007): Deterministic Blow-Ups of Miniml Nondeterministic Finite Automt over Fixed Alphbet. In: Developments in Lnguge Theory (DLT 2007), number 4588 in LNCS, Springer, pp [12] G. Jirásková (2001): Note on miniml finite utomt. In: Mthemticl Foundtions of Computer Science (MFCS 2001, number 2136 in LNCS, Springer, pp [13] G. Jirásková (2008): On the Stte Complexity of Complements, Strs, nd Reversl of Regulr Lnguges. In: Developments in Lnguge Theory (DLT 2008), number 5257 in LNCS, Springer, pp [14] G. Jirásková (2009): Conctention of Regulr Lnguges nd Descriptionl Complexity. In: Computer Science Symposium in Russi, number 5675 in LNCS, Springer, pp [15] G. Jirásková (2009): Mgic Numbers nd Ternry Alphbet. In: Developments in Lnguge Theory (DLT 2009), number 5583 in LNCS, Springer, pp [16] Jui-Yi Ko, Nrd Rmpersd & Jeffrey Shllit (2009): On NFAs where ll sttes re finl, initil, or both. Theoret. Comput. Sci. 410, pp [17] O. B. Lupnov (1963): A Comprison of two types of Finite Sources. Problemy Kybernetiki 9, pp , (in Russin). Germn trnsltion (1966): Über den Vergleich zweier Typen endlicher Quellen. Probleme der Kybernetik 6, pp [18] R. Mndl (1973): Precise bounds ssocited with the subset construction on vrious clsses of nondeterministic finite utomt. In: Conference on Informtion nd System Sciences, pp [19] A. Mtsuur & Y. Sito (2008): Equivlent Trnsformtion of Miniml Finite Automt over Two-Letter Alphbet. IPSJ SIG Notes AL-117, pp (in Jpnese). [20] R. McNughton & S. Ppert (1971): Counter-free utomt. Number 65 in Reserch monogrphs. MIT Press. [21] A. R. Meyer & M. J. Fischer (1971): Economy of Description by Automt, Grmmrs, nd Forml Systems. In: Switching nd Automt Theory (SWAT 1971), IEEE Computer Society Press, pp [22] F. R. Moore (1971): On the Bounds for Stte-Set Size in the Proofs of Equivlence Between Deterministic, Nondeterministic, nd Two-Wy Finite Automt. IEEE Trns. Comput. 20, pp [23] M. O. Rbin & D. Scott (1959): Finite Automt nd Their Decision Problems. IBM J. Res. Dev. 3, pp [24] K. Slom & S. Yu (1997): NFA to DFA trnsformtion for finite lnguge over rbitrry lphbets. J. Autom., Lng. Comb. 2, pp [25] Huei-Jn Shyr & Gbriel Thierrin (1974): Power-Seprting Regulr Lnguges. Mth. Systems Theory 8, pp

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

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

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

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

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

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

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51

Non Deterministic Automata. Linz: Nondeterministic Finite Accepters, page 51 Non Deterministic Automt Linz: Nondeterministic Finite Accepters, pge 51 1 Nondeterministic Finite Accepter (NFA) Alphbet ={} q 1 q2 q 0 q 3 2 Nondeterministic Finite Accepter (NFA) Alphbet ={} Two choices

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

Nondeterministic Biautomata and Their Descriptional Complexity

Nondeterministic Biautomata and Their Descriptional Complexity Nondeterministic Biutomt nd Their Descriptionl Complexity Mrkus Holzer nd Sestin Jkoi Institut für Informtik Justus-Lieig-Universität Arndtstr. 2, 35392 Gießen, Germny 23. Theorietg Automten und Formle

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

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

Operations on Unambiguous Finite Automata

Operations on Unambiguous Finite Automata Opertions on Unmbiguous Finite Automt Jozef Jirásek, Jr., Glin Jirásková, 2,, nd Jurj Šebej Mthemticl Institute, Slovk Acdemy of Sciences Grešákov 6, 4 Košice, Slovki jirsekjozef@gmil.com, jirskov@sske.sk

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

Relating logic to formal languages

Relating logic to formal languages Relting logic to forml lnguges Kml Lody The Institute of Mthemticl Sciences, Chenni October 2018 Reding 1. Howrd Strubing: Forml lnguges, finite utomt nd circuit complexity, birkhäuser. 2. Wolfgng Thoms:

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

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model?

11.1 Finite Automata. CS125 Lecture 11 Fall Motivation: TMs without a tape: maybe we can at least fully understand such a simple model? CS125 Lecture 11 Fll 2016 11.1 Finite Automt Motivtion: TMs without tpe: mybe we cn t lest fully understnd such simple model? Algorithms (e.g. string mtching) Computing with very limited memory Forml verifiction

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

Automata and Languages

Automata and Languages Automt nd Lnguges Prof. Mohmed Hmd Softwre Engineering Lb. The University of Aizu Jpn Grmmr Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Regulr Lnguges Context Free Lnguges Context Sensitive

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

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA

Nondeterminism. Nondeterministic Finite Automata. Example: Moves on a Chessboard. Nondeterminism (2) Example: Chessboard (2) Formal NFA Nondeterminism Nondeterministic Finite Automt Nondeterminism Subset Construction A nondeterministic finite utomton hs the bility to be in severl sttes t once. Trnsitions from stte on n input symbol cn

More information

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's

C. C^mpenu, K. Slom, S. Yu upper boun of mn. So our result is tight only for incomplete DF's. For restricte vlues of m n n we present exmples of DF's Journl of utomt, Lnguges n Combintorics u (v) w, x{y c OttovonGuerickeUniversitt Mgeburg Tight lower boun for the stte complexity of shue of regulr lnguges Cezr C^mpenu, Ki Slom Computing n Informtion

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

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

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 Tble of Contents: Week 1: Preliminries (set lgebr, reltions, functions) (red Chpters 1-4) Weeks

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

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

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

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

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

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

I F I G R e s e a r c h R e p o r t. Minimization, Characterizations, and Nondeterminism for Biautomata. IFIG Research Report 1301 April 2013

I F I G R e s e a r c h R e p o r t. Minimization, Characterizations, and Nondeterminism for Biautomata. IFIG Research Report 1301 April 2013 I F I G R e s e r c h R e p o r t Institut für Informtik Minimiztion, Chrcteriztions, nd Nondeterminism for Biutomt Mrkus Holzer Sestin Jkoi IFIG Reserch Report 1301 April 2013 Institut für Informtik JLU

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

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

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

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

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

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

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

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

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

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

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

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

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

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

Regular Languages and Applications

Regular Languages and Applications Regulr Lnguges nd Applictions Yo-Su Hn Deprtment of Computer Science Yonsei University 1-1 SNU 4/14 Regulr Lnguges An old nd well-known topic in CS Kleene Theorem in 1959 FA (finite-stte utomton) constructions:

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

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

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

The Regulated and Riemann Integrals

The Regulated and Riemann Integrals Chpter 1 The Regulted nd Riemnn Integrls 1.1 Introduction We will consider severl different pproches to defining the definite integrl f(x) dx of function f(x). These definitions will ll ssign the sme vlue

More information

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1

Non Deterministic Automata. Formal Languages and Automata - Yonsei CS 1 Non Deterministic Automt Forml Lnguges nd Automt - Yonsei CS 1 Nondeterministic Finite Accepter (NFA) We llow set of possible moves insted of A unique move. Alphbet = {} Two choices q 1 q2 Forml Lnguges

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

Non-Deterministic Finite Automata

Non-Deterministic Finite Automata Non-Deterministic Finite Automt http://users.comlb.ox.c.uk/luke. ong/teching/moc/nf2up.pdf 1 Nondeterministic Finite Automton (NFA) Alphbet ={} q1 q2 2 Alphbet ={} Two choices q1 q2 3 Alphbet ={} Two choices

More information

1 Structural induction, finite automata, regular expressions

1 Structural induction, finite automata, regular expressions Discrete Structures Prelim 2 smple uestions s CS2800 Questions selected for spring 2017 1 Structurl induction, finite utomt, regulr expressions 1. We define set S of functions from Z to Z inductively s

More information

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford

Probabilistic Model Checking Michaelmas Term Dr. Dave Parker. Department of Computer Science University of Oxford Probbilistic Model Checking Michelms Term 2011 Dr. Dve Prker Deprtment of Computer Science University of Oxford Long-run properties Lst lecture: regulr sfety properties e.g. messge filure never occurs

More information

Myhill-Nerode Theorem

Myhill-Nerode Theorem Overview Myhill-Nerode Theorem Correspondence etween DA s nd MN reltions Cnonicl DA for L Computing cnonicl DFA Myhill-Nerode Theorem Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute

More information

Theoretical foundations of Gaussian quadrature

Theoretical foundations of Gaussian quadrature Theoreticl foundtions of Gussin qudrture 1 Inner product vector spce Definition 1. A vector spce (or liner spce) is set V = {u, v, w,...} in which the following two opertions re defined: (A) Addition of

More information

1 Structural induction

1 Structural induction Discrete Structures Prelim 2 smple questions Solutions CS2800 Questions selected for Spring 2018 1 Structurl induction 1. We define set S of functions from Z to Z inductively s follows: Rule 1. For ny

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

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

CSCI FOUNDATIONS OF COMPUTER SCIENCE

CSCI FOUNDATIONS OF COMPUTER SCIENCE 1 CSCI- 2200 FOUNDATIONS OF COMPUTER SCIENCE Spring 2015 My 7, 2015 2 Announcements Homework 9 is due now. Some finl exm review problems will be posted on the web site tody. These re prcqce problems not

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

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

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir

For convenience, we rewrite m2 s m2 = m m m ; where m is repeted m times. Since xyz = m m m nd jxyj»m, we hve tht the string y is substring of the fir CSCI 2400 Models of Computtion, Section 3 Solutions to Homework 4 Problem 1. ll the solutions below refer to the Pumping Lemm of Theorem 4.8, pge 119. () L = f n b l k : k n + lg Let's ssume for contrdiction

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

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

CDM Automata on Infinite Words

CDM Automata on Infinite Words CDM Automt on Infinite Words 1 Infinite Words Klus Sutner Crnegie Mellon Universlity 60-omeg 2017/12/15 23:19 Deterministic Lnguges Muller nd Rin Automt Towrds Infinity 3 Infinite Words 4 As mtter of principle,

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

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

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

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

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

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

Math 4310 Solutions to homework 1 Due 9/1/16

Math 4310 Solutions to homework 1 Due 9/1/16 Mth 4310 Solutions to homework 1 Due 9/1/16 1. Use the Eucliden lgorithm to find the following gretest common divisors. () gcd(252, 180) = 36 (b) gcd(513, 187) = 1 (c) gcd(7684, 4148) = 68 252 = 180 1

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

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

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

Kleene Theorems for Free Choice Nets Labelled with Distributed Alphabets

Kleene Theorems for Free Choice Nets Labelled with Distributed Alphabets Kleene Theorems for Free Choice Nets Lbelled with Distributed Alphbets Rmchndr Phwde Indin Institute of Technology Dhrwd, Dhrwd 580011, Indi Emil: prb@iitdh.c.in Abstrct. We provided [15] expressions for

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

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

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

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa CS:4330 Theory of Computtion Spring 208 Regulr Lnguges Equivlences between Finite utomt nd REs Hniel Brbos Redings for this lecture Chpter of [Sipser 996], 3rd edition. Section.3. Finite utomt nd regulr

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

State Complexity of Union and Intersection of Binary Suffix-Free Languages

State Complexity of Union and Intersection of Binary Suffix-Free Languages Stte Complexity of Union nd Intersetion of Binry Suffix-Free Lnguges Glin Jirásková nd Pvol Olejár Slovk Ademy of Sienes nd Šfárik University, Košie 0000 1111 0000 1111 Glin Jirásková nd Pvol Olejár Binry

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

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

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

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar) Lecture 3 (5.3.2018) (trnslted nd slightly dpted from lecture notes by Mrtin Klzr) Riemnn integrl Now we define precisely the concept of the re, in prticulr, the re of figure U(, b, f) under the grph of

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

Quotient Complexity of Ideal Languages

Quotient Complexity of Ideal Languages Quotient Complexity of Idel Lnguges Jnusz Brzozowski,1 Glin Jirásková Biyu Li Dvid R. Cheriton School of Computer Science, University of Wterloo, Wterloo, ON, Cnd N2L 3G1 Mthemticl Institute, Slovk Acdemy

More information

Zero-Sum Magic Graphs and Their Null Sets

Zero-Sum Magic Graphs and Their Null Sets Zero-Sum Mgic Grphs nd Their Null Sets Ebrhim Slehi Deprtment of Mthemticl Sciences University of Nevd Ls Vegs Ls Vegs, NV 89154-4020. ebrhim.slehi@unlv.edu Abstrct For ny h N, grph G = (V, E) is sid to

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

Synchronizing Automata with Random Inputs

Synchronizing Automata with Random Inputs Synchronizing Automt with Rndom Inputs Vldimir Gusev Url Federl University, Ekterinurg, Russi 9 August, 14 Vldimir Gusev (UrFU) Synchronizing Automt with Rndom Input 9 August, 14 1 / 13 Introduction Synchronizing

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

7.2 The Definite Integral

7.2 The Definite Integral 7.2 The Definite Integrl the definite integrl In the previous section, it ws found tht if function f is continuous nd nonnegtive, then the re under the grph of f on [, b] is given by F (b) F (), where

More information

Finite Automata Part Three

Finite Automata Part Three Finite Automt Prt Three Hello Hello Wonderful Wonderful Condensed Condensed Slide Slide Reders! Reders! The The first first hlf hlf of of this this lecture lecture consists consists lmost lmost exclusively

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

Good-for-Games Automata versus Deterministic Automata.

Good-for-Games Automata versus Deterministic Automata. Good-for-Gmes Automt versus Deterministic Automt. Denis Kuperberg 1,2 Mich l Skrzypczk 1 1 University of Wrsw 2 IRIT/ONERA (Toulouse) Séminire MoVe 12/02/2015 LIF, Luminy Introduction Deterministic utomt

More information