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

Size: px
Start display at page:

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

Transcription

1 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 Gießen Arndtstrße Giessen, Germny Tel: Fx: mil@informtik.uni-giessen.de

2 IFIG Reserch Report IFIG Reserch Report 1301, April 2013 Minimiztion, Chrcteriztions, nd Nondeterminism for Biutomt Mrkus Holzer 1 nd Sestin Jkoi 2 Institut für Informtik, Universität Giessen Arndtstrße 2, Giessen, Germny Astrct. We show how to minimize iutomt with Brzozowski-like lgorithm y pplying reversl nd powerset construction twice. Biutomt were recently introduced in [O. Klím, L. Polák: On iutomt. RAIRO Theor. Inf. Appl., 46(4), 2012] s generliztion of ordinry finite utomt, reding the input from oth sides. The correctness of the Brzozowski-like minimiztion lgorithm needs little it more rgumenttion thn for ordinry finite utomt since for iutomton its dul or reverse utomton, uilt y reversing ll trnsitions, does not necessrily ccept the reversl of the originl lnguge. To this end we first generlize the notion of iutomt to del with nondeterminism nd moreover, to tke structurl properties of the forwrd- nd ckwrd-trnsition of the utomton into ccount. This results in vriety of iutomt models, which ccepting power is chrcterized. As yproduct we give simple structurl chrcteriztion of cyclic regulr nd commuttive regulr lnguges in terms of deterministic iutomt. Ctegories nd Suject Descriptors: F.1.1 [Computtion y Astrct Devices]: Models of Computtion Automt; F.2.2 [Anlysis of Algorithms nd Prolem Complexity]: Nonnumericl Algorithms nd Prolems Computtions on discrete structures; F.4.3 [Mthemticl Logic nd Forml Lnguges]: Forml Lnguges Clsses defined y grmmrs or utomt; Additionl Key Words nd Phrses: deterministic nd nondeterministic iutomt, cyclic lnguges, commuttive lnguges, Brzozowski s minimiztion lgorithm. 1 E-mil: holzer@informtik.uni-giessen.de 2 E-mil: jkoi@informtik.uni-giessen.de Copyright c 2013 y the uthors

3 1 Introduction Biutomt were recently introduced in [5] s generliztion of ordinry deterministic finite utomt. Simply speking, iutomton is device consisting of deterministic finite control, red-only input tpe, nd two reding heds, one reding the input from left to right, nd the other hed reding the input from right to left. Similr two-hed finite utomt models were introduced, e.g., in [3, 6, 8]. An input word is ccepted y iutomton, if there is n ccepting computtion strting the heds on the two ends of the word meeting somewhere in n ccepting stte. Although the choice of reding symol y either hed is nondeterministic, the determinism of the iutomton is enforced y two properties: (i) The heds red input symols independently, i.e., if one hed reds symol nd the other reds nother, the resulting stte does not depend on the order in which the heds red these single letters. (ii) If in stte of the finite control one hed ccepts symol, then this letter is ccepted in this stte y the other hed s well. Lter we cll the former property the -property nd the ltter one the F-property. In [5] it ws shown tht iutomt shre lot of properties with ordinry deterministic finite utomt. For instnce, there is unique (up to isomorphism) miniml deterministic iutomton for every regulr lnguge, which oeys nice description in terms of two-sided derivtives or quotients cf. Brzozowski s construction for ordinry miniml deterministic finite utomt [1]. Moreover, simple structurl chrcteriztions sed on iutomt for lnguge fmilies such s the piecewise testle or prefix-suffix testle lnguges were given in [5]. Recently in [4] lso descriptionl complexity issues for iutomt were ddressed. This is the strting point for our investigtion. We focus on the minimiztion prolem for iutomt. For ordinry deterministic finite utomt minimiztion is efficiently solvle. While the lgorithm with the est running time of O(n log n) remins difficult to understnd, the most elegnt one is tht of Brzozowski [2], which minimizes n ordinry finite utomton A, regrdless whether it is deterministic or nondeterministic, y pplying the reversl nd powerset construction twice in sequence. Thus, it computes the utomton P([P(A R )] R ), to otin n equivlent miniml deterministic finite utomton here the superscript R refers to the reversl or dul opertion on utomt nd P denotes the powerset construction. Whether this elegnt minimiztion method cn lso e pplied to iutomton A is not completely cler, since the ove mentioned two properties to enforce determinism my e lost y computing A R or P(A R ). To this end we introduce nondeterministic iutomt. It is known tht these mchines lredy ccept non-regulr lnguges nd chrcterize the fmily of liner context-free lnguges [6], ut s side result we prove tht nondeterministic iutomt with the -property ccept regulr lnguges only. In the min line of reserch we show tht Brzozowski-like minimiztion of iutomt with - nd F-property, regrdless whether they re deterministic or nondeterministic, is possile. Since in Brzozowski s minimiztion the powerset construction is used this technique is exponentil. Note tht it is esy to see tht there re more efficient minimiztion lgorithms for deterministic iutomt with oth the - nd F-property, 2

4 y simply dpting other existing minimiztion lgorithms for ordinry deterministic finite utomt. As yproduct of our investigtions, we give simple structurl chrcteriztions of cyclic regulr lnguges nd commuttive regulr lnguges in terms of deterministic iutomt with - nd F-property. The pper is orgnized s follows: In the next section we introduce the necessry nottion on iutomt. In ddition we lso define n nlogous to the F-property, clled I-property, which will tke cre on symols tht re red from n initil stte. Then in Section 3 we show some sic properties on these devices. In prticulr we show tht nondeterministic iutomt with the - property ccept regulr lnguges only. Moreover there we lso give structurl iutomt chrcteriztions of the fmilies of cyclic nd of commuttive lnguges. In Section 4 we prove the sics on dul utomt, which will then e used in the ultimte section to prove the correctness of the Brzozowski-like minimiztion for deterministic iutomt with - nd F-property. 2 Preliminries We use more generl notion of iutomt thn in [5], ut it resemles tht of nondeterministic liner utomt s defined in [6], which chrcterize the fmily of liner context-free lnguges. A nondeterministic iutomton is sixtuple A = (Q, Σ,,, I, F), where Q is finite set of sttes, Σ is n lphet, : Q Σ 2 Q is the forwrd trnsition function, : Q Σ 2 Q is the ckwrd trnsition function, I Q is the set of initil sttes, nd F Q is the set of finl or ccepting sttes. The trnsition functions nd re extended to words in the following wy, for ll words v Σ nd letters Σ: q λ = {q}, q v = p v, nd q λ = {q}, q v = p v, p (q ) p (q ) nd further, oth nd cn e extended to sets of sttes S Q, nd w Σ y S w = p S p w, nd S w = p S p w. The iutomton A ccepts w Σ, if the word w cn e written s w = u 1 u 2...u k v k...v 2 v 1, for some u i, v i Σ with 1 i k, such tht [((...((((I u 1 ) v 1 ) u 2 ) v 2 )...) u k ) v k ] F. (1) The lnguge ccepted y A is defined s L(A) = { w Σ A ccepts w }. A iutomton A is deterministic, if I = 1, nd q = q = 1 for ll sttes q Q nd letters Σ. In this cse we simply write q = p, or q = p insted of q = {p}, or q = {p}, respectively, treting nd to e functions mpping Q Σ to Q. The utomton A hs the confluence or dimond property, for short -property, if (q ) = (q ), for every stte q Q nd, Σ. Further, A hs the equl cceptnce property, for short F-property, if q F if nd only if q F, for every stte q Q nd letter Σ. A deterministic iutomton tht hs oth the - nd the F-property is exctly wht is clled iutomton in [5]. Finlly, A hs the equl initil fn-out property, for short I-property, if I = I, for every letter Σ. Two iutomt A nd B re equivlent if they ccept the sme lnguge, which mens L(A) = L(B) 3

5 0 c 1 2 c c c 6 Fig. 1. A nondeterministic iutomton A, tht hs oth the - nd the F-property, ut not the I-property. holds. Further, we need some nottion on lnguges ssocited with sttes of iutomt. For iutomton A = (Q, Σ,,, I, F) nd stte q Q let qa = (Q, Σ,,, {q}, F) nd A q = (Q, Σ,,, I, {q}). We sy tht L( q A) is the right lnguge of stte q nd tht L(A q ) is the left lnguge of stte q. Two sttes p, q Q re equivlent, if nd only if L( p A) = L( p A). We illustrte these definitions y the following exmple. Exmple 1. Consider the nondeterministic iutomton A = (Q, Σ,,, I, F) with Q = {0, 1,...,6}, Σ = {,, c}, I = {0}, F = {6}, nd whose trnsition functions, nd re depicted in Figure 1 solid rrows denote forwrd trnsitions y, nd dshed rrows denote ckwrd trnsitions y. One cn check, tht A hs the -property, i.e., tht (q d) e = (q e) d, for ll inputs d, e Σ nd sttes q Q. For exmple we hve (0 ) c = {0, 1} c = {2, 4}, nd (0 c) = {2} = {2, 4}. Further, A hs the F-property, i.e., for ll sttes q Q, nd inputs d Σ we hve (q d) F if nd only if (q d) F. For exmple oth sets 1 = {3}, nd 1 = hve n empty intersection with F, nd the two sets 5 = {5, 6} nd 5 = {5, 6} oth contin the ccepting stte 6. However, the iutomton A does not hve the I-property, ecuse {0} = {0, 1} = {0}. If we removed the ckwrd trnsition loop on letter in stte 5, i.e., if 5 = {6}, insted of 5 = {5, 6}, then A would not hve the -property nymore (ecuse then (5 ) (5 ) ), ut it would still hve the F-property. One oserves tht the right lnguge of stte 2 is L( 2 A) =, the left lnguge of stte 2 is L(A 2 ) = c, nd the lnguge ccepted y A is L(A) = c. We will show in Section 3, tht iutomton with oth the -property, nd the F-property ccepts word w if nd only if reding w leds from some initil stte to finl stte, while only using forwrd trnsitions. With tht result, L(A) cn e esily determined in this exmple. Next we generlize the well known powerset construction of ordinry finite utomt to iutomt. For iutomton A = (Q, Σ,,, I, F), its powerset utomton is the deterministic iutomton P(A) = (Q, Σ,,, q 0, F ), where the stte set Q 2 Q consists of ll sttes tht re rechle from the initil 4

6 stte q 0 = I, the set of ccepting sttes is F = { P Q P F }, nd the forwrd nd ckwrd trnsition functions re defined s P = p, nd P = p, p P for every stte P Q nd letter Σ. To prove the correctness of this construction, we use the following simple fct: if A = (Q, Σ,,, I, F) is nondeterministic iutomton tht hs - property, then (S ) = (S ), nd if A hs the F-property, then (S ) F if nd only if (S ) F, for every S Q nd, Σ. Now we prove the following result. Lemm 2. If A is nondeterministic iutomton, then P(A) is equivlent to A, i.e., L(A) = L(P(A)). Furthermore, for ll X {, F, I}, if A hs the X-property, then the deterministic iutomton P(A) hs the X-property, too. Proof. Let A = (Q, Σ,,, I, F) e iutomton, nd let its powerset iutomton e B = P(A) = (Q, Σ,,, q 0, F ). For w Σ, we hve w L(A) if nd only if w = u 1 u 2...u k v k...v 2 v 1, with u i, v i Σ, 1 i k, nd p P [((...((((I u 1 ) v 1 ) u 2 ) v 2 )...) u k ) v k ] F, nd this in turn is equivlent to [((...((((I u 1 ) v 1 ) u 2 ) v 2 )...) u k ) v k ] F, which holds if nd only if w L(B). Thus, L(A) = L(B). Since the trnsition functions, nd of B re just the extensions of the functions, nd of A to sets of sttes, the -property, the F-property, nd the I-property re preserved y the powerset construction. We illustrte the construction in the following exmple. Exmple 3. Consider the iutomton A from Exmple 1, which is depicted in Figure 1. The powerset iutomton P(A), which is deterministic iutomton, is shown in Figure 2. Note tht since the iutomton A hs oth the -property, nd the F-property, lso the powerset iutomton P(A) hs oth these properties. 3 Bsic Properties of Biutomt In this section we study the effect of the previously defined properties of iutomt. On the one hnd, we lredy know tht the most generl model of iutomt, nmely nondeterministic iutomt without ny restrictions, chrcterizes the fmily of liner context-free lnguges [6], while on the other hnd, the most restricted iutomton model, tht is, deterministic iutomt with the - nd F-property, descries the fmily of regulr lnguges [5]. But wht else cn e sid out the ccepting power of these devices? To this end, we first tke closer look on the -property. At first glnce, we show tht it lso extends to words. Recll, tht if iutomton A with stte set Q hs the -property, then (S ) = (S ), for every suset S Q nd, Σ. 5

7 c c c c Fig. 2. The powerset iutomton P(A) for the nondeterministic iutomton A from Figure 1. The sink stte, nd trnsitions leding to it re not shown. Lemm 4. Let A = (Q, Σ,,, I, F) e nondeterministic iutomton with the -property. Then (S u) v = (S v) u, for every S Q nd u, v Σ. Proof. First we prove tht (S ) v = (S v) holds for every S Q, word w Σ, nd Σ y induction on the length of v. For v = 0, tht is, for v = λ, we hve (S ) v = S = (S v). Now let v 1. Assume tht word v cn e written s v = v, for some Σ nd v Σ. Then (S ) v = (S ) v = ((S ) ) v = ((S ) ) v. Now we cn use the inductive ssumption on v nd otin ((S ) ) v = ((S ) v ) = (S v ) = (S v). Thus, we hve shown (S ) v = (S v), for every S Q, Σ, nd v Σ. Now we cn prove the sttement of the lemm y performing induction on the length of the word u. The induction se strts with u = 0, tht is, u = λ. There we hve (S u) v = S v = (S v) u. Now let u 1. Assume tht u writes s u = u, for some Σ nd u Σ. Then (S u) v = (S u ) v = ((S ) u ) v, nd y using first the inductive ssumption on u, nd then the sttement from ove, we otin ((S ) u ) v = ((S ) v) u = ((S v) ) u = (S v) u = (S v) u, which proves the sttement of the lemm. By itertively using Lemm 4, it follows tht for iutomt with the - property the ccepting condition shown in Eqution (1) is equivlent to the condition [(I u 1 u 2... u k ) v k...v 2 v 1 ] F, i.e., such iutomton ccepts word w Σ if nd only if [(I u) v] F, for some words u, v Σ with w = uv. The cceptnce condition ecomes even simpler, if the iutomton dditionlly hs the F-property, which results from the following lemm. 6

8 Lemm 5. Let A = (Q, Σ,,, I, F) e nondeterministic iutomton with oth the -property, nd the F-property. Then [(S uv) w] F if nd only if [(S u) vw] F, for every S Q nd u, v, w Σ. Proof. We prove the sttement y induction on the length of v. Note tht the sttement holds for v = 0, since (S uv) w = (S u) vw, for v = λ. Now let v 1. In this cse the word v cn e written s v = v, for some v Σ nd letter Σ. Then y Lemm 4 it follows (S uv) w = ((S uv ) ) w = ((S uv ) w). Thus, [(S uv) w] F if nd only if [((S uv ) w) ] F. Since A hs the F-property, the ltter holds if nd only if [((S uv ) w) ] F. Oserve, tht [((S uv ) w) ] is equl to [(S uv ) w]. Now we use the inductive ssumption on v, nd see tht [(S uv ) w] F if nd only if [(S u) v w] F, which in turn is equivlent to [(S u) vw] F, nd therefore concludes the proof. By itertively using Lemm 5, it follows tht iutomton with oth the - property nd the F-property ccepts word w Σ if nd only if [I w] F, or equivlently, [I w] F. We summrize this in the following corollry. Corollry 6. If A is nondeterministic iutomton with oth the -property, nd the F-property, then L(A) = { w Σ [I w] F }. We cn pply Corollry 6 to the iutomton A from Exmple 1, nd esily see tht L(A) = c, y only considering the forwrd trnsitions. From Corollry 6, one cn see tht L(A) is regulr lnguge, if A hs oth the -property, nd the F-property. But the F-property is not essentil here, since lredy the -property lone gurntees the regulrity of the lnguge L(A), s we show in the following theorem. Theorem 7. Let A e nondeterministic iutomton with the -property. Then L(A) is regulr lnguge. Proof. Let A = (Q, Σ,,, I, F) e iutomton with the -property. Lemm 4 implies, tht A ccepts word w Σ if nd only if there re words u, v Σ, with w = uv, nd [(I u) v] F. This mens tht there re q 0, q, q f Q, such tht q 0 I, q q 0 u, q f q v, nd q f F. Thus, the lnguge L(A) cn e descried y L(A) = { u q I u } {v q v F }, q Q nd it remins to show tht oth sets L 1 (q) = { u q I u }, nd moreover L 2 (q) = { v q v F } re regulr, for every q Q. The lnguge L 1 (q) consists of ll the words tht, when red forwrd, led from some initil stte to stte q, nd lnguge L 2 consists of the words tht, when red ckwrds, led from stte q to some ccepting stte. Thus, lnguge L 1 (q) is ccepted y the nondeterministic finite utomton A 1 = (Q, Σ, δ 1, I, {q}) with δ 1 (p, ) = p, 7

9 for every p Q nd Σ this shows tht L 1 (q) is regulr lnguge. Further, the lnguge L 2 (q) R is ccepted y the nondeterministic finite utomton A 2 = (Q, Σ, δ 2, {q}, F), with δ 2 (p, ) = p, for every p Q nd Σ since regulr lnguges re closed under reversl, the set L 2 (q) is regulr lnguge, too. Since regulr lnguges re closed under conctention nd union, the proof is complete. The following exmple shows tht the lnguge ccepted y iutomton without the -property my lredy e non-regulr. Exmple 8. Let us consider the deterministic iutomton A, which is defined s A = ({0, 1, 2}, {, },,, {0}, {0}), with the trnsition functions 0 = 1, 1 = 0, nd ll other trnsitions go to the sink stte 2. The iutomton A is depicted in Figure 3, where the sink stte 2, nd ll trnsitions leding to it re not shown. This iutomton does not hve the -property, ecuse (0 ) = 0, while (0 ) = 2. The lnguge ccepted y A is L(A) = { n n n 0 }, which is well known to e liner context free ut not regulr. 0 1 Fig. 3. A deterministic iutomton without the -property, tht ccepts non-regulr lnguge. The sink stte 2, nd trnsitions leding to it re not shown. Of course there re lso iutomt tht ccept regulr lnguges, lthough they my e missing the -property. From descriptionl complexity point of view, iutomt without the -property llow more succinct representtion of regulr lnguge, when compred to iutomt with this property, or compred to deterministic finite utomt. The following exmple presents smll deterministic iutomton, such tht ny equivlent deterministic iutomton with oth the -property, nd the F-property, s well s ny equivlent deterministic finite utomton is t lest of exponentil size. Exmple 9. Consider the regulr lnguge L = (+) n (+) (+) n, which is ccepted y the deterministic iutomton A, tht is depicted in Figure 4. The iutomton A does neither hve the -property, nor the F-property.,, 0..., n 0..., n f Fig. 4. A liner-size deterministic iutomton B for the lnguge L. Undefined trnsitions led to non-ccepting trp stte, which is not shown here.,, 8

10 Further, A hs O(n) sttes, ut every equivlent deterministic finite utomton ccepting L needs Ω(2 n ) sttes. Since the miniml deterministic finite utomton is contined in the miniml deterministic iutomton with oth the - property, nd the F-property, lso every such iutomton needs Ω(2 n ) sttes. But if we stin from the F-property, the lnguge L cn lso e ccepted y deterministic iutomton B with the -property with O(n 2 ) sttes. The sttes of B re pirs (i, j), with i, j {0, 1,..., n, f}, nd dditionlly, sink stte s, the initil stte is (0, 0), the only ccepting stte is (f, f), nd the trnsition functions B, nd B re defined s follows, for ll i, j {0, 1,...,n, f}: { (i + 1, j) if i / {n, f}, (i, j) B = (f, j) if i {n, f}, (i + 1, j) if i / {n, f}, (i, j) B = s if i = n, (f, j) if i = f, { (i, j + 1) if j / {n, f}, (i, j) B = (i, f) if j {n, f}, (i, j + 1) if j / {n, f}, (i, j) B = s if j = n, (i, f) if j = f, nd the sink stte s goes to itself on every trnsition. This utomton counts the numer of symols it hs red from the left in the first component of the stte, nd the numer of symols it hs red from the right in the second component of the stte. If counter reches n, then the next symol (in the corresponding reding direction) must e n. Since the trnsition function only opertes on the first component of stte, nd the function only opertes on the second component of stte, one cn see tht B hs the -property. But since (f, n) B = (f, n) (f, f) = (f, n) B, the F-property is not present in B. This exmple shows tht, from descriptionl complexity point of view, it is expensive to trnsform iutomton tht does not hve oth the -property, nd the F-property into iutomton tht hs oth these two properties. It remins to discuss the I-property. If we consider iutomt with the - property, nd the I-property, then switching from to when reding suword induces circulr shift on the word, which cn e seen in the following lemm. Lemm 10. Let A = (Q, Σ,,, I, F) e nondeterministic iutomton with oth the -property, nd the I-property. Then (I uv) w = (I v) wu, for every u, v, w Σ. Proof. We use induction on the length of u. For u = 0, tht is, in cse u = λ we hve (I uv) w = (I v) w = (I v) wu. Now let u 1 nd ssume tht u = u, for some Σ nd u Σ. By Lemm 4, nd the I-property, we hve (I uv) w = ((I ) u v) w = ((I ) u v) w = ((I u v) ) w = (I u v) w, nd then the proof cn e concluded y using the inductive ssumption on u to otin (I u v) w = (I v) wu = (I v) wu, which concludes the proof. 9

11 Lemm 10 implies tht the left lnguge of every stte q, i.e., the set of words leding to q, in iutomton with oth the -property, nd the I-property is cyclic. Here lnguge L Σ is cyclic if nd only if L = (L), where (L) = { vu Σ uv L }. In prticulr, this implies the following result. Corollry 11. Let A e nondeterministic iutomton with oth the - nd the I-property, then L(A) is regulr cyclic lnguge. In fct, for the cnonicl iutomton, which is the miniml deterministic iutomton tht hs oth the -property, nd the F-property [5], lso the converse impliction holds. For regulr lnguge L Σ we define the cnonicl iutomton A L = (Q L, Σ, L, L, I L, F L ) with Q L = { u 1 Lv 1 u, v Σ }, initil sttes I L = {L}, finl sttes F L = { u 1 Lv 1 λ u 1 Lv 1 }, nd q L = 1 q nd q L = q 1, where. u 1 Lv 1 = { w Σ uwv L }, for u, v Σ. Thus we otin the following chrcteriztion of regulr cyclic lnguges. Theorem 12. A regulr lnguge is cyclic if nd only if its cnonicl iutomton hs the I-property. Proof. If A is iutomton, not necessrily the cnonicl one, ut with the I-property, then we know from Corollry 11, tht L(A) is regulr cyclic lnguge. For the converse impliction, let L Σ e regulr cyclic lnguge, nd let A L = (Q, Σ,,, {q 0 }, F) e its cnonicl iutomton with q 0 = L. Since L is cyclic, for every word v Σ nd Σ, we hve v L if nd only if v L. Thus, for every Σ, we otin q 0 = 1 L = { v Σ v L } which is equl to the set { v Σ v L } = L 1 = q 0, so A hs the I-property. This proves the stted clim. We cn lso chrcterize commuttive regulr lnguges y the structure of their cnonicl iutomton. A regulr lnguge L Σ is commuttive if for ll words u, v Σ nd symols, Σ we hve uv L if nd only if uv L. One cn see y induction tht this condition is equivlent to the condition tht for ll words u, v, x, y Σ we hve uxyv L if nd only if uyxv L. Theorem 13. Let L Σ e regulr lnguge nd A = (Q, Σ,,, I, F) its cnonicl iutomton. Then L is commuttive if nd only if q = q, for every q Q nd Σ. Proof. Let L Σ e regulr lnguge, nd let A = (Q, Σ,,, I, F) e the cnonicl iutomton of L, with q = q, for ll q Q nd Σ. Then, y Corollry 11, ll the right lnguges L( q A) of sttes q Q re cyclic, since q A hs the I-property. Since the right lnguges of sttes of the cnonicl iutomton re quotients u 1 Lv 1, for u, v Σ, ll these quotients re cyclic. Thus, for ll u, v, x, y Σ we hve xy u 1 Lv 1 if nd only if yx u 1 Lv 1. It follows tht L is commuttive. For the converse, ssume L is commuttive, nd consider symol Σ, nd stte q Q tht corresponds to quotient u 1 Lv 1, for some u, v Σ. 10

12 Then we hve q = [u 1 Lv 1 ] = (u) 1 Lv 1 = { x Σ uxv L }, q = [u 1 Lv 1 ] = u 1 L(v) 1 = { x Σ uxv L }, nd since L is commuttive, it follows q = q. Note tht the condition q = q together with the -property in prticulr implies tht (q ) = (q ) holds for the forwrd trnsition function of the cnonicl iutomton. This nicely shows the connection to commuttive finite utomt [7], where δ(q, ) = δ(q, ) holds for the trnsition function δ of the finite utomton. 4 The Dul of Biutomton For clssicl finite utomt, n utomton for the reversl of the ccepted lnguge cn e otined y constructing the reversl, or dul utomton, i.e., y reversing the trnsitions, nd interchnging initil nd finl sttes. For iutomt, one otins n utomton for the reversl of the lnguge y simply interchnging the trnsition functions nd. Nevertheless, it is interesting to see wht hppens, if we pply similr construction s for finite utomt to iutomt. We will see in Section 5, tht similr to finite utomt, the dul of iutomton cn e used to construct miniml iutomton. Now let us define the reversl, or dul of the iutomton A = (Q, Σ,,, I, F) s the iutomton A R = (Q, Σ, R, R, F, I), tht is otined from A y interchnging the initil nd finl sttes, nd y reversing ll trnsitions, such tht p q R if nd only if q p, nd p q R if nd only if q p. Note tht (A R ) R = A. Lemm 14. Let A = (Q, Σ,,, I, F) e nondeterministic iutomton, nd let A R = (Q, Σ, R, R, F, I) e the dul of A. Then for every sttes p, q Q nd words u, v Σ, we hve q (p u) v if nd only if p (q R v R ) R u R, nd q (p v) u if nd only if p (q R u R ) R v R. Proof. We prove the first prt of the sttement, nmely q (p u) v if nd only if p (q R v R ) R u R, y induction on uv. The second prt of the sttement then follows y symmetric rgumenttion, since (A R ) R = A. For uv = 0, i.e., for u = v = λ, we hve (p u) v = {p} = (p R v R ) R u R, so the sttement holds in this cse. Now let uv 1, then we hve uv = u v, with u, v Σ, nd Σ, such tht either u = u, or v = v. First consider the cse u = u. Then we hve q (p u) v if nd only if there re sttes p 1, p 2 Q, such tht p 1 p u, p 2 p 1, nd q p 2 v. Now we cn pply the inductive ssumption on the words u, nd v, since oth re shorter thn uv = u v, nd see tht p 1 p u holds if nd only if p p 1 R u R, nd q p 2 v holds if nd only if p 2 q R v R. Further, y definition of R, we hve p 2 p 1 if nd only if p 1 p 2 R. Putting ll this together, we hve q (p u) v if nd only if there re sttes p 1, p 2 Q, such tht p 2 q R v R, p 1 p 2 R, nd p p 1 R u R, i.e., if nd only if p (q R v R ) R u R. The other cse, v = v cn e shown similrly: q (p u) v = ((p u) v ) if nd only if there is stte p 1 Q, 11

13 such tht p 1 (p u) v, nd q p 1. By the inductive ssumption, we hve p 1 (p u) v if nd only if p (p 1 R v R ) R u R, nd y the definition of R, we hve q p 1 if nd only if p 1 q R R. Thus, we hve q (p u) v if nd only if p ((q R R ) R v R ) R u R = (q R v R ) R u R. Note tht if A hs the -property, then the sttement of Lemm 14 cn e simplified to q (p u) v if nd only if p (q R u R ) R v R. Lemm 15. Let A e nondeterministic iutomton, then the following holds: 1. A hs the -property if nd only if A R hs the -property. 2. A hs the F-property if nd only if A R hs the I-property. 3. A hs the I-property if nd only if A R hs the F-property. Proof. Let A = (Q, Σ,,, I, F) e iutomton, nd A R = (Q, Σ, R, R, F, I) e its dul. Assume A hs the -property, i.e., (q ) = (q ), for every q Q nd, Σ. To see tht A R hs the -property, consider stte q Q, nd note tht y Lemm 14 we hve (q R ) R = { p Q q (p ) }. Since A hs the -property, we know tht { p Q q (p ) } = { p Q q (p ) }, nd y using Lemm 14 gin, we otin { p Q q (p ) } = (q R ) R. Thus, we hve shown (q R) R = (q R ) R, for every q Q nd, Σ. We hve shown tht the -property of A implies the -property of A R. The reverse impliction immeditely follows, since (A R ) R = A, so the first sttement is proven. Now we show tht the F-property of A implies the I-property of A R. If A hs the F-property, then { q Q (q ) F } = {q Q (q ) F }, for every Σ. Since y Lemm 14 we hve F R = f R = { q Q f q } = { q Q (q ) F } f F nd F R = f F f F f R = { q Q f q } = { q Q (q ) F }, f F the dul A R hs the I-property note tht F is the set of initil sttes of A R. For the reverse impliction note tht (q ) F if nd only if q F R, nd if A R hs the I-property, then q F R if nd only if q F R, nd the ltter gin holds if nd only if (q ) F. Thus, the second sttement is proven. The finl sttement now follows from the fct tht (A R ) R = A. If we hve iutomton A with oth the - nd the F-property, then Lemm 15 implies tht the dul of the iutomton A hs the - nd the I- property. Further, Lemm 10 implies, tht the lnguge ccepted y the dul is cyclic. In fct, we cn show the following result. Corollry 16. Let A = (Q, Σ,,, I, F) e nondeterministic iutomton tht hs oth the - nd the F-property, nd let A R = (Q, Σ, R, R, F, I) e the dul of A. Then L(A R ) = (L(A) R ), i.e., utomton A R ccepts the cyclic shift of the reversl of L(A). 12

14 Proof. Let w L(A), then y Corollry 6, we hve (I w) F, i.e., there is stte p I, nd stte q F, such tht q p w. By Lemm 14, this is equivlent to p q R w R, which mens tht w R is ccepted y A R. Since y Corollry 11, the lnguge L(A R ) is cyclic, we know tht (w R ) L(A R ), for every w L(A), so (L(A) R ) L(A R ). For the other inclusion let w L(A R ), then we know tht there re words u, v Σ, with uv = w, such tht q 0 (q f R u) R v, for some q f F, nd q 0 I. Lemm 10 implies tht lso q 0 q f R vu, which is equivlent to q f q 0 R (vu) R, y Lemm 14. This mens tht (vu) R is ccepted y A, so vu L(A) R. Since w = uv (vu), we hve w (L(A) R ). Wht cn e sid out L(A R ), if A is iutomton with oth the - nd the I-property? Unfortuntely, the lnguge cnnot e identified y some opertion on the lnguge L(A), ecuse regulr cyclic lnguge cn e ccepted y structurlly different iutomt tht hve the - nd the I-property. From these structurl differences, lso different dul utomt, tht ccept different lnguges, cn result, s the following exmple shows. Exmple 17. Consider the cyclic lnguge L = {, }, which is ccepted y ll the three iutomt A 1, A 2, nd A 3, tht re depicted in Figure 5. Note tht Fig. 5. Three different nondeterministic iutomt A 1 (left), A 2 (middle), nd A 3 (right), ll ccepting the lnguge {, }. these three utomt hve oth the - nd the I-property. The corresponding dul utomt A R 1, AR 2, nd AR 3 re depicted in Figure 6. Note tht these three utomt hve oth the - nd the F-property. Further note, tht the lnguges L(A R 1 ) = {, }, L(AR 2 ) = {}, nd L(A 3) R = {} ccepted y the dul utomt re pirwise distinct. 5 Brzozowski-Like Minimiztion for Biutomt An interesting lgorithm for minimizing deterministic finite utomt is tht of Brzozowski [2]: given (deterministic or nondeterministic) finite utomton A, it computes P([P(A R )] R ), which turns out to e the miniml deterministic finite utomton for L(A). While the minimlity of the constructed utomton needs some rgumenttion, the fcts tht it ccepts the correct lnguge, nd tht it is deterministic finite utomton re esy to see, since the dul B R 13

15 Fig. 6. The dul utomt A R 1 (left), A R 2 (middle), nd A R 3 (right) of the corresponding iutomt from Figure 5 ccepting pirwise different lnguges. of finite utomton B ccepts the reverse of the lnguge ccepted y B, i.e., L(B R ) = L(B) R. We hve seen in the Section 4, tht the reltion etween the lnguges ccepted y iutomton A nd its dul A R is not s simple s for clssicl finite utomt. Nevertheless we cn show tht Brzozowski s minimiztion lgorithm cn still e used for minimiztion of iutomt. More precisely, we prove tht for every (deterministic or nondeterministic) iutomton A with oth the - nd the F-property, the utomton P([P(A R )] R ) is the unique miniml deterministic iutomton, tht hs oth the - nd the F-property. Note tht the middle utomton P(A R ) is deterministic iutomton, tht hs the I-property. The following lemm strts with this middle utomton. Lemm 18. Let A e deterministic iutomton with oth the - nd the I-property, nd with no unrechle sttes. Then P(A R ) is miniml iutomton with oth the - nd the F-property. Proof. Let A = (Q, Σ,,, q 0, F) e deterministic iutomton with oth the - nd the I-property, where ll sttes q Q re rechle. Further, let A R = (Q, Σ, R, R, F, {q 0 }) e its dul iutomton, nd let B = P(A R ) e the powerset iutomton of A R. Assume tht B = (Q B, Σ, B, B, q B 0, F B). Lemms 2 nd 15 imply tht B hs oth the - nd the F-property. In the following, we prove tht B does not hve pir of distinct, ut equivlent sttes. Since y definition of P ll sttes in B = P(A R ) re rechle, the minimlity of B then follows from [5]. Let P 1, P 2 Q B e two distinct sttes of B, then we my ssume tht there is n element q Q, with q P 1 \ P 2. Since q is rechle in the deterministic iutomton A, there re words u, v Σ, such tht q = (q 0 u) v. Since A hs oth the - nd the I-property, Lemm 10 implies q = q 0 vu. This mens tht in the dul utomton A R, we hve q 0 q R(vu) R, y Lemm 14. Furthermore, this mens tht in the powerset iutomton B we hve q 0 (P 1 B (vu) R ), ecuse q P 1. Since the ccepting sttes of B re the sets P Q B with q 0 P, it follows tht the word (vu) R is ccepted y B, when strting from stte P 1. Now ssume, for the ske of contrdiction, tht (vu) R is lso ccepted y B, when strting from stte P 2. Then, since B hs the - nd the F-property, we know from Corollry 6, tht q 0 P 2 B (vu) R, i.e., tht there is stte p P 2, with q 0 p R (vu) R. From Lemm 14, nd the fct tht A is deterministic, 14

16 we otin p = q 0 vu = q, which is contrdiction to q / P 2. We hve shown tht (vu) R is ccepted y B when strting from stte P 1, ut not when strting from stte P 2, so P 1 nd P 2 cnnot e equivlent. Now we re le to prove the min result of this section. Theorem 19. Let A e (deterministic or nondeterministic) iutomton with oth the - nd the F-property. Then P([P(A R )] R ) is the unique miniml iutomton with oth the - nd F-property, for the lnguge L(A). Proof. Let A = (Q, Σ,,, I, F) e iutomton with oth the - nd the F-property. Then let B = P(A R ) nd C = P(B R ), where we ssume tht B = (Q B, Σ, B, B, q0 B, F B), nd C = (Q C, Σ, C, C, q0 C, F C). Then B is deterministic iutomton with the - nd the I-property, with no unrechle sttes. So y Lemm 18, the utomton C is miniml iutomton with the - nd the F-property. It follows from [5], tht C is the unique miniml utomton, mong ll iutomt with these two properties, ccepting L(C). It remins to prove L(A) = L(C), which, due to Corollry 6, cn e done y only resoning out forwrd trnsitions: For ll words w Σ, we hve w L(A) if nd only if (I w) F. By Lemm 14, this holds if nd only if (F Rw R ) I, which is the sme s q0 B Bw R F B, y definition of B. We gin use Lemm 14, to see tht q0 B B w R F B holds if nd only if q0 B F B RB w, which y definition of C is equivlent to q0 C C w F C. Thus, we hve w L(A) if nd only if w L(C). We illustrte the lgorithm in the following exmple. Exmple 20. Let A = (Q, {, },,, I, F) e nondeterministic iutomton with Q = {0, 1, 2, 3, 4}, I = {0, 1}, F = {1, 4}, nd whose trnsition functions, nd re depicted on the left in Figure 7. Note tht A hs oth the - nd the F-property. The corresponding powerset iutomton B = P(A R ) of the dul of A is depicted in the middle in Figure 7. Finlly, the miniml deterministic iutomton C = P(B R ) is depicted on the right in Figure 7, where gin the sink stte, nd ll trnsitions leding to it re omitted. Let us follow the rgumenttion in the proof of Lemm 18, to show tht the sttes p nd s cnnot e equivlent. Note tht p = { {0}, {1, 3}, {1, 4} }, nd s = { {1, 3}, {1, 4} } differ in the element {0}, which is rechle in the iutomton B, for exmple y first reding with forwrd trnsition, nd then with ckwrd trnsition: ({1, 4} ) = {0}. One cn check tht y Lemm 10, this stte of B is lso reched y first reding forwrds, nd then forwrds: ({1, 4} ) = {0}. This in turn mens y Lemm 14 tht the word is ccepted from stte p, ut not from stte s, since {0} p \ s. Thus, sttes p, nd s cnnot e equivlent. References 1. Brzozowski, J.A.: Derivtives of regulr expressions. J. ACM 11, (1964) 2. Brzozowski, J.A.: Cnonicl regulr expressions nd miniml stte grphs for definite events. In: Mthemticl Theory of Automt, MRI Symposi Series, vol. 12, pp Polytechnic Press, NY (1962) 15

17 0 1 p r 2 3 1,4 2 1,3 0 q, s 4 t Fig. 7. Left: The nondeterministic iutomton A with the - nd the F-property. Middle: The deterministic iutomton B = P(A R ), with the - nd the I-property. Right: The miniml deterministic iutomton C = P(B R ) with the - nd F-property. The stte symols p, q, r, s, t re revitions for susets of the stte set of B. It is p = {{0}, {1, 3}, {1, 4}}, q = {{0}, {2}, {1, 3}, {1, 4}}, r = {{1, 3}}, s = {{1, 3}, {1, 4}}, nd t = {{1, 4}}. The sink stte in the iutomt B nd C nd trnsitions leding to it re not shown. 3. Chmprnud, J.-M., Duernrd, J.-P., Jenne, H., Mignot, L.: Two-sided derivtives for regulr expressions nd for hirpin expressions. rxiv: v1 [cs.fl] (2012) 4. Jirásková, G., Klím, O.: Descriptionl complexity of iutomt. In: Kutri, M., Moreir, N., Reis, R. (eds.) Proceedings of the 14th Interntionl Workshop Descriptionl Complexity of Forml Systems. LNCS, vol. 7386, pp Springer, Brg, Portugl (2012) 5. Klím, O., Polák, L.: On iutomt. RAIRO Informtique théorique et Applictions / Theoreticl Informtics nd Applictions 46(4), (2012) 6. Louknov, R.: Liner context free lnguges. In: Jones, C.B., Liu, Z., Woodcock, J. (eds.) Proceedings of the 4th Interntionl Colloquium Theoreticl Aspects of Computing. LNCS, vol. 4711, pp Springer, Mcu, Chin (2007) 7. Pin, J.-E.: Hndook of Forml Lnguges, Vol. 1, Word, Lnguge, Grmmr, vol. 1, chp. Syntctic Semigroups, pp Springer (1997) 8. Rosenerg, A.L.: A mchine reliztion of the liner context-free lnguges. Inform. Control 10, (1967) 16

18 Institut für Informtik Justus-Lieig-Universität Giessen Arndtstr. 2, Giessen, Germny Recent Reports (Further reports re ville t A. Mlcher, K. Meckel, C. Mereghetti, B. Plno, Descriptionl Complexity of Pushdown Store Lnguges, Report 1203, My M. Holzer, S. Jkoi, On the Complexity of Rolling Block nd Alice Mzes, Report 1202, Mrch M. Holzer, S. Jkoi, Grid Grphs with Digonl Edges nd the Complexity of Xms Mzes, Report 1201, Jnury H. Gruer, S. Guln, Simplifying Regulr Expressions: A Quntittive Perspective, Report 0904, August M. Kutri, A. Mlcher, Cellulr Automt with Sprse Communiction, Report 0903, My M. Holzer, A. Mletti, An n log n Algorithm for Hyper-Minimizing Sttes in (Minimized) Deterministic Automton, Report 0902, April H. Gruer, M. Holzer, Tight Bounds on the Descriptionl Complexity of Regulr Expressions, Report 0901, Ferury M. Holzer, M. Kutri, nd A. Mlcher (Eds.), 18. Theorietg Automten und Formle Sprchen, Report 0801, Septemer M. Holzer, M. Kutri, Flip-Pushdown Automt: Nondeterminism is Better thn Determinism, Report 0301, Ferury 2003 M. Holzer, M. Kutri, Flip-Pushdown Automt: k + 1 Pushdown Reversls re Better Thn k, Report 0206, Novemer 2002 M. Holzer, M. Kutri, Nondeterministic Descriptionl Complexity of Regulr Lnguges, Report 0205, Septemer 2002 H. Bordihn, M. Holzer, M. Kutri, Economy of Description for Bsic Constructions on Rtionl Trnsductions, Report 0204, July 2002 M. Kutri, J.-T. Löwe, String Trnsformtion for n-dimensionl Imge Compression, Report 0203, My 2002 A. Klein, M. Kutri, Grmmrs with Scttered Nonterminls, Report 0202, Ferury 2002 A. Klein, M. Kutri, Self-Assemling Finite Automt, Report 0201, Jnury 2002 M. Holzer, M. Kutri, Unry Lnguge Opertions nd its Nondeterministic Stte Complexity, Report 0107, Novemer 2001 A. Klein, M. Kutri, Fst One-Wy Cellulr Automt, Report 0106, Septemer 2001 M. Holzer, M. Kutri, Improving Rster Imge Run-Length Encoding Using Dt Order, Report 0105, July 2001 M. Kutri, Refining Nondeterminism Below Liner-Time, Report 0104, June 2001 M. Holzer, M. Kutri, Stte Complexity of Bsic Opertions on Nondeterministic Finite Automt, Report 0103, April 2001 M. Kutri, J.-T. Löwe, Mssively Prllel Fult Tolernt Computtions on Syntcticl Ptterns, Report 0102, Mrch 2001 A. Klein, M. Kutri, A Time Hierrchy for Bounded One-Wy Cellulr Automt, Report 0101, Jnury 2001 M. Kutri, Below Liner-Time: Dimensions versus Time, Report 0005, Novemer 2000 M. Kutri, Efficient Universl Pushdown Cellulr Automt nd their Appliction to Complexity, Report 0004, August 2000 M. Kutri, J.-T. Löwe, Mssively Prllel Pttern Recognition with Link Filures, Report 0003, June 2000

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The Degree of Irreversibility in Deterministic Finite Automata

The Degree of Irreversibility in Deterministic Finite Automata The Degree of Irreversiility in Deterministic Finite Automt Holger Bock Axelsen 1, Mrkus Holzer 2(B), nd Mrtin Kutri 2 1 Deprtment of Computer Science, University of Copenhgen, Universitetsprken 5, Copenhgen,

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Non-deterministic Finite Automata

Non-deterministic Finite Automata Non-deterministic Finite Automt From Regulr Expressions to NFA- Eliminting non-determinism Rdoud University Nijmegen Non-deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

GNFA GNFA GNFA GNFA GNFA

GNFA GNFA GNFA GNFA GNFA DFA RE NFA DFA -NFA REX GNFA Definition GNFA A generlize noneterministic finite utomton (GNFA) is grph whose eges re lele y regulr expressions, with unique strt stte with in-egree, n unique finl stte with

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

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

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

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

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

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

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

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

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

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

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

The size of subsequence automaton

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

More information

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

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

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

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

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

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

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

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

Thoery of Automata CS402

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

More information

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

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

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

Some Theory of Computation Exercises Week 1

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

More information

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

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

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

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

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

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

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

More information

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

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

FABER Formal Languages, Automata and Models of Computation

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

More information

Domino Recognizability of Triangular Picture Languages

Domino Recognizability of Triangular Picture Languages Interntionl Journl of Computer Applictions (0975 8887) Volume 57 No.5 Novemer 0 Domino Recognizility of ringulr icture Lnguges V. Devi Rjselvi Reserch Scholr Sthym University Chenni 600 9. Klyni Hed of

More information

SWEN 224 Formal Foundations of Programming WITH ANSWERS

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

More information

On Determinisation of History-Deterministic Automata.

On Determinisation of History-Deterministic Automata. On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

More information