A Disambiguation Algorithm for Finite Automata and Functional Transducers

Size: px
Start display at page:

Download "A Disambiguation Algorithm for Finite Automata and Functional Transducers"

Transcription

1 A Dismigution Algorithm for Finite Automt n Funtionl Trnsuers Mehryr Mohri Cournt Institute of Mthemtil Sienes n Google Reserh 51 Merer Street, New York, NY 1001, USA Astrt. We present new ismigution lgorithm for finite utomt n funtionl finite-stte trnsuers. We give full esription of the lgorithm, inluing etile pseuooe n nlysis, n severl illustrting exmples. Our lgorithm is often more effiient n the result rmtilly smller thn the one otine using eterminiztion for finite utomt or n existing ismigution lgorithm for trnsuers se on onstrution of Shützenerger. In vriety of ses, the size of the unmiguous trnsuer returne y our lgorithm is only liner in tht of the input trnsuer while the trnsuer given y the onstrution of Shützenerger is exponentilly lrger. Our lgorithm n e use effetively in mny pplitions to mke utomt n trnsuers more effiient to use. 1 Introution Finite utomt n trnsuers re use in vriety of pplitions in text n speeh proessing [10, 13], ioinformtis [8], imge proessing [1], optil hrter reognition [6], n mny others. In these pplitions, utomt n trnsuers re often the result of vrious omplex opertions n in generl re not effiient to use. Some optimiztion lgorithms suh s eterminiztion n mke their use more time-effiient. However, the result of eterminiztion is sometimes prohiitively lrge n not ll finite-stte trnsuers re eterminizle [7, 11]. This pper presents n nlyzes n lterntive optimiztion lgorithm, ismigution, whih in prtie n hve effiieny enefits similr to eterminiztion. Our ismigution lgorithm is novel n pplies to finite utomt, inluing utomt with ɛ-trnsitions, n to funtionl finite-stte trnsuers, tht is those representing prtil funtion. Dismigution returns n utomton or trnsuer equivlent to the input tht is unmiguous, tht is one tht mits no two epting pths lele with the sme (input) string. In mny instnes, the sene of miguity n e useful to mke serh more effiient y reuing the numer of pths to explore for very lrge utomt or trnsuers with severl hunre thousn or millions of trnsitions in text n speeh proessing or in ioinformtis, n there re mny other ritil nees for the ismigution of utomt n trnsuers.

2 For finite utomt, one wy to proee to otin n unmiguous n equivlent utomton is simply to pply the stnr eterminiztion lgorithm. But, s we shll see, for some input utomt our lgorithm n tke exponentilly less time thn eterminiztion n return n equivlent unmiguous utomton exponentilly smller thn the one otine y using eterminiztion. For finite-stte trnsuers, ismigution pplies to roer set of trnsuers thn those tht n e eterminize using the lgorithm esrie in [11], it pplies to ny funtionl trnsuer. In ontrst, it ws shown y [3] tht funtionl trnsuer is eterminizle if n only if it itionlly verifies the twins property [7, 11, ]. Our ismigution lgorithm is lso often rmtilly more effiient n results in sustntilly smller trnsuers thn those otine using ismigution lgorithm se on onstrution of Shützenerger [16, 15], lso esrie y E. Rohe n Y. Shes in the introutory hpter of [14]. In prtiulr, when the input trnsuer is unmiguous, our lgorithm simply returns the sme trnsuer, while the result of the lgorithm presente in [14] n e exponentilly lrger. The reminer of this pper is orgnize s follows. In Setion, we introue the nottion n si onepts neee for the presenttion n nlysis of our lgorithm. In Setion 3, we present our ismigution lgorithm for finite utomt in etil, inluing the proof of its orretness n rief esription of its extension to finite utomt with ɛ-trnsitions. In Setion 4, we show how the lgorithm n e e use to ismigute funtionl trnsuers n illustrte it with severl exmples. Preliminries We will enote y ɛ the empty string. A finite utomton A with ɛ-trnsitions is system (Σ, Q, I, F, E) where Σ is finite lphet, Q finite set of sttes, I Q the set of initil sttes, F Q the set of finl sttes, n E finite multiset of trnsitions, whih re elements of Q (Σ {ɛ}) Q. We enote y A = Q + E the size of n utomton A, tht is the sum of the numer sttes n trnsitions efining A. A pth π of n utomton is n element of E with onseutive trnsitions. The lel of pth is the string otine y ontention of the lels of its onstituent trnsitions. We enote y P (p, x, q) the set of pths from p to q lele with x or, more generlly, y P (R, x, R ) the set of pths lele with x from some set of sttes R to some set of sttes R. We lso enote y P (R, R ) the set of ll pths from R to R. An epting pth is n element of P (I, F ). The lnguge epte y n utomton A is the set of strings leling its epting pths n is enote y L(A). Two utomt A n B re si to e equivlent when L(A) = L(B). We will sy tht stte p n e rehe y string x when there exists pth from n initil stte to p lele with x. When two sttes n e rehe y the sme string, we sy tht they re o-rehle. We will lso sy tht two sttes p n q shre ommon future when they mit ommon string x to reh finl

3 stte, tht is when there exists string x suh tht P (p, x, F ) P (q, x, F ). For ny suset s Q n x Σ, we will enote y δ(s, x) the set of sttes tht n e rehe from the sttes in s y pth lele with x. A finite-stte trnsuer is finite utomton in whih eh trnsition is ugmente with n output lel, whih is n element of ( {ɛ}), where is finite lphet. For ny trnsuer T, we enote y T 1 its inverse, tht is the trnsuer otine from T y swpping the input n output lel of eh trnsition. We will use the stnr lgorithm to ompute the intersetion A A of two utomt A n A [1], whose sttes re pirs forme y stte of A n stte of A, n whose trnsitions re of the form ((p, q),, (p, q )), where (p,, q) is trnsition in A n (p,, q ) in A. An utomton A is si to e trim if ll of its sttes lie on some epting pth. It is si to e unmiguous if no string x Σ lels two istint epting pths, finitely miguous if there exists k N suh tht no string lels more thn k epting pths, polynomilly miguous if there exists polynomil P with oeffiients in N suh tht no string x lels more thn P ( x ) epting pths. The finite, polynomil, n exponentil miguity of n utomton with ɛ-trnsitions n e teste in polynomil time [4]. 3 Dismigution lgorithm for finite utomt In this setion, we esrie in etil our ismigution lgorithm for finite utomt. The lgorithm is first esrie for utomt without ɛ-trnsitions. The extension to the se of utomt with ɛ-trnsitions is isusse lter. Our lgorithm in generl oes not require full eterminiztion. In ft, in some ses where the eterminiztion retes n sttes where n is the numer of sttes of the input utomton, the ost of our new lgorithm or the size of its output is only in O(n). 3.1 Desription Figure 1 gives the pseuooe of the lgorithm. The first step of the lgorithm onsists of omputing the utomton A A n of trimming it y removing non-oessile sttes (line 1). The ost of this omputtion is in O( A ) sine the omplexity of intersetion is qurti n sine trimming n e one in liner time. The utomton B therey onstrute n e use to etermine in onstnt time if two sttes q n r of A tht n e rehe from I vi the sme string shre ommon future simply y heking if (q, r) is stte of B. Inee, y efinition of intersetion, this property hols iff (q, r) is stte of B. As shown y the following proposition, the utomton B is in ft iretly relte to the miguity of A. Proposition 1 ([4]). Let A e trim finite utomton with no ɛ-trnsition. A is unmiguous iff no oessile stte in A A is of the form (p, q) with p q.

4 Dismigution(A) 1 B Trim(A A) for eh i I o 3 s {i : i I (i, i ) B} 4 I Q Q {(i, s)} 5 Enqueue(Q, (i, s)) 6 for eh (u, u ) I o 7 R R {(u, u )} 8 while Q o 9 (p, s) He(Q) 10 Dequeue(Q) 11 if `(p F ) n ( (p, s ) F with (p, s ) R (p, s)) then 1 F F {(p, s)} 13 for eh (p,, q) E o 14 t {r δ(s, ): (q, r) B} 15 if ` ((p, s ),, (q, t)) E with (p, s ) R (p, s) then 16 if ((q, t) Q ) then 17 Q Q {(q, t)} 18 Enqueue(Q, (q, t)) 19 E E `(p, s),, (q, t) 0 for eh (p, s ) suh tht `(p, s )R (p, s) n `(p, s ),, (q, t ) E o 1 R R {(q, t), (q, t ))} return A Fig. 1. New ismigution lgorithm for finite utomt. Proof. Sine A is trim, the sttes of A A re ll essile y onstrution. Thus, stte (p, q) in A A is oessile iff it lies on n epting pth, tht is y efinition of intersetion, iff there re two pths π = π 1 π P (I, F ) n π = π 1π P (I, F ) with π 1 P (I, p) n π 1 P (I, q), with π 1 n π 1 shring the sme lel n π n π lso shring the sme lel. Thus, A is unmiguous iff p = q. The lgorithm onstruts n unmiguous utomton A = (Q, E, I, F ). The set of sttes Q re of the form (p, s) where p is stte of A n s suset of the sttes of A. Line efines the initil sttes whih re of the form (i, s) with i I n s suset of the sttes in I shring ommon future with i. The lgorithm mintins reltion R suh tht two sttes of A re in reltion vi R iff they n e rehe y the sme string from the initil sttes. In prtiulr, sine ll initil sttes re rehle y ɛ, ny two pir of initil sttes re in reltion vi R (lines 6-7). The lgorithm lso mintins queue Q ontining the set of sttes (p, s) of Q left to exmine n for whih the outgoing trnsitions re to e etermine. The queue isipline, tht is the orer in whih sttes re e or extrte from Q is ritrry n oes not ffet the orretness of the lgorithm. However, ifferent orerings n result in ifferent ut equivlent resulting utomt. At eh exeution of the loop of lines 8-1, new stte (p, s) is extrte from Q (lines 9-10). To voi n miguity ue to finlity, stte (p, s) is me finl only if there is no finl stte (p, s ) F in reltion with (p, s) (lines 11-1).

5 0 1 3 (0, {0}) (1, {1, }) (1, {1}) (, {1, } (3, {3}) (0, {0}) (1, {0, 1, }) (1, {0, 1}) (, {}) (3, {3}) (, {}) () () () Fig.. Illustrtion of the ismigution lgorithm. () Automton A. () Result of ismigution lgorithm pplie to A. One of the two she trnsitions is isllowe y the lgorithm. () Result of eterminiztion pplie to A. Eh outgoing trnsition (p,, q) of p is then exmine. Line 14 efines t to e the suset of the sttes of A tht n e rehe from stte of s y reing x ut exlues sttes q tht o not shre ommon future with q. This is euse the susets re use to etet miguities. If q n q o not shre ommon future even though there re pths with the sme lel x rehing them, these pths nnot e omplete to reh finl stte with the sme lel. Thus, if X is the set of strings leing to stte (p, s) of Q, the suset s ontins extly the set of sttes r of A tht n e rehe vi X from I n tht shre ommon future with p. To voi reting two pths from I to (q, t) with the sme lels, the trnsition from (p, s) to (q, t) with lel q is not rete if there exists lrey one from (p, s ) to (q, t) for stte (p, s ) tht n rehe y string lso rehing (p, s) (onition of line 15). Note tht if (p, s) is extrte from Q efore stte (p, s ) with (p, s )R(p, s), then the trnsition from (p, s) to (q, t) is rete first n the one from (p, s ) to (q, t) not rete. This is how the queue isipline irets the hoie of the trnsitions rete. Lines (q, t) to Q when it is not lrey in Q n line 19 s the new trnsition efine to E. After retion of this trnsition, the estintion stte (q, t) is then put in reltion with ll sttes (q, t ) rehe y trnsition lele with Σ from stte (p, s ) tht is in reltion with (p, s). Figure illustrtes the pplition of the lgorithm in simple se. Oserve tht sttes 1 or re not inlue in the suset of (0, {0}) in the utomton of Figure () sine 0 oes not shre ommon future with 1 or. Figure lso shows the result of the pplition of eterminiztion to the sme exmple. As n e seen from this exmple, in some instnes, eterminiztion retes more trnsitions thn ismigution. Some sttes rete y the ismigution lgorithm my e non-oessile, tht is, they my mit no trnsition to finl stte euse their output trnsitions were not onstrute to voi generting miguity. These sttes n the trnsitions leing to them n e remove in liner time using stnr trimming lgorithm. In the se of the

6 n-1 n n-1 (n-1) n () () Fig. 3. Exmples of utomt A for whih eterminiztion returns n exponentilly lrger utomton while our lgorithm returns A (for ()) or n utomton whose size is liner in A (for ()). () Automton representing the regulr expression (+) (+) n, whose miniml eterministi equivlent hs size Ω( n ). () Automton representing the regulr expression ( + ) (( + ) n + n ), whose eterminiztion results in n utomton with Ω( n ) sttes. utomton of Figure (), the stte whose she trnsition is not onstrute n e trimme. More generlly, note tht when the input utomton is unmiguous, the susets rete y our lgorithm re reue to singletons: y Proposition 1, suset nnot ontin two istint sttes in tht se. In suh ses, our lgorithm simply returns the sme utomton A. The work one fter omputtion of B is lso liner in A. In ontrst, the eterminiztion of A my le to low-up, even when the utomton is unmiguous. In prtiulr, for the stnr se of the non-eterministi utomton of Figure 3() representing the regulr expression ( + ) ( + ) n, it is known tht eterminiztion retes n+1 1 sttes. However, this utomton is unmiguous n our lgorithm returns the sme utomton unhnge. The utomton of Figure 3() is similr ut is miguous. Nevertheless, it is not hr to see tht gin the size of the utomton returne y eterminiztion is exponentil n tht tht of the utomton output y our lgorithm is only liner. 3. Anlysis The termintion of the lgorithm is gurntee y the ft tht the numer of sttes n trnsitions rete must e finite. This is euse the numer of possile susets s of sttes of A is finite, therey lso the numer of pirs (p, s) rete y the lgorithm where p is stte of A n s suset. Also, the numer of trnsitions rete t stte (p, s) is t most equl to the numer of sttes leving p in A. In the worst se, the lgorithm my rete exponentilly mny susets n thus the omputtionl omplexity of the lgorithm is exponentil. In mny prtil ses, however, this worst se ehvior is not oserve. In prtiulr, the utomton returne y our ismigution lgorithm is sustntilly smller thn the one otine y pplition of eterminiztion. We will now show tht the utomton returne y the lgorithm is unmiguous using the following lemm. Lemm 1. Let (q, t) n (q, t ) e two sttes onstrute y lgorithm Dismigution run on input utomton A, then (q, t) R (q, t ) iff (q, t) n (q, t ) re o-rehle.

7 Proof. We will show y inution on the length of strings x tht if two sttes (q, t) n (q, t ) re oth rehle y x, then (p, s) R (q, t ). The steps of lines 6-7 ensure tht (q, t) R (q, t ) when oth sttes re initil, tht is, when they re rehle y ɛ. Assume tht it hols for ll strings x of length less thn or equl to n. Let x = x e string of length n + 1 with x Σ n Σ n ssume tht (q, t) n (q, t ) re oth rehle y x. Then, there exists stte (p, s) rehle y x n mitting trnsition lele with leing to (q, t) n similrly stte (p, s ) rehle y x n mitting trnsition lele with leing to (q, t ). Then, y the inution hypothesis, we hve (p, s) R (p, s ), thus (q, t) R (q, t ) is gurntee y exeution of the steps of lines 0-1. This proves the implition orresponing to one sie. The onverse hols strightforwrly y onstrution (lines 6-7 n 0-1). Proposition. The utomton A returne y lgorithm Dismigution run on input utomton A is unmiguous. Proof. Let π 1 n π e two pths in A from I to F with the sme lel x Σ. If x = ɛ, π 1 is pth from some initil stte (i 1, s 1 ) to (i 1, s 1 ) n similrly π pth from some initil stte (i, s ) to (i, s ). All initil sttes re in reltion (lines 6-7), therefore t most one n e me finl (lines 11-1). This implies tht (i 1, s 1 ) = (i, s ) n π 1 = π. Let (q 1, t 1 ) e the estintion stte of π 1 n (q, t ) the estintion stte of π. Sine (q 1, t 1 ) n (q, t ) re oth rehle y x, y Lemm 1, we hve (q 1, t 1 ) R (q, t ). Sine no two istint equivlent sttes n e me finl (lines 11-1), we must hve (q 1, t 1 ) = (q, t ). If x = ɛ, this implies tht the two pths π 1 n π oinie. If x ɛ, x n e written s x = x with x Σ n Σ n π 1 n π n e eompose s π 1 = π 1e 1 n π = π e with e 1 n e trnsitions lele with leing to (q 1, t 1 ). Let (p 1, s 1 ) e the estintion stte of π 1 n (p, s ) the estintion stte of π. Sine π 1 n π re oth lele with x, y Lemm 1, we hve (p 1, s 1 ) R (p 1, s 1). By the onition of line 15, if (p 1, s 1 ) (p 1, s 1), (p 1, s 1 ) n (p 1, s 1) nnot oth mit trnsition lele with n leing to the sme stte (q 1, t 1 ). Thus, we must hve (p 1, s 1 ) = (p 1, s 1). Proeeing in the sme wy with π 1 n π n so on shows tht the pths π 1 n π oinie, whih onlues the proof. The following lemms will e use to show the equivlene etween the utomton returne y the lgorithm n the input utomton. Lemm. Let (p, s) e stte onstrute y lgorithm Dismigution run on input utomton A. If (p, s) is rehle y the strings u n v in A, then the set of sttes rehle y u in A n shring ommon future with p oinies with the set of sttes rehle y v in A n shring ommon future with p. Proof. We show y reurrene on the length of u tht if stte (p, s) is rehle y u in A, then s is the set of sttes rehle y u n shring ommon future with p. This property hols strightforwrly for u = ɛ y the onstrution of lines -5. Assume now tht it hols for ll u of length less thn or equl to n.

8 Let u = u with u Σ of length n n Σ. If (p, s) is rehle y u, there must exist some stte (p, s ) rehle y u n mitting trnsition lele with leing to (p, s). By the inution hypothesis, s is the set of sttes rehle y u n shring ommon future with p. By efinition of s (line 14), s = {q δ(s, ): (q, p) B}, thus the sttes in s re ll rehle y u n shre ommon future with p. Conversely, let q e stte rehle y u n shring future with p. There is trnsition lele with from some stte q rehle y u. Sine q mits trnsition to q lele with n p mits trnsition lele with to p, n p n q shre ommon future, p n q must lso shre ommon future. By the inution hypothesis, s is the set of sttes rehle y u n shring ommon future with p, therefore q is in s. Sine q δ(q, ) n q shres ommon future with p, this implies tht q is in s. This shows tht the sttes in s re those rehle y u n shring ommon future with p. Lemm 3. Let A e the utomton returne y lgorithm Dismigution run on input utomton A. Let q e stte rehle in A y string x. Then, there exists stte (q, t) in A for some suset t suh tht (q, t) is rehle y x in A. Proof. We will prove the property y inution on the length of x. The property strightforwrly hols for x = ɛ y the onstrution steps of lines -5. Assume now tht it hols for ll strings of length less thn or equl to n n let x = u with u string of length n n Σ. If q is rehle y string x in A, then there exists stte p 0 in A rehle y u n mitting trnsition lele with leing to q. By the inution hypothesis, there exists stte (p 0, s 0 ) in A rehle y u. Now, the property lerly hols for (q, t 0 ) if the trnsition lele with leving (p 0, s 0 ) is onstrute t lines 15-19, with t 0 efine t line 14. Otherwise, y the test of line 15, there must exist in A istint stte (p 1, s 0) mitting trnsition lele with leing to (q, t 0 ) with (p 1, s 0) R (p 0, s 0 ). Note tht we nnot hve p 1 = p 0, sine the sme string nnot reh two istint sttes (p 0, s 0 ) n (p 0, s 1 ). Now, sine (p 1, s 0) mits trnsition lele with leing to (q, t 0 ), p 1 must mit trnsition lele with n leing to q. Thus, p 1 n p 0 shre ommon future in A. Sine (p 1, s 0) R (p 0, s 0 ), y Lemm 1, they re rehle y ommon string v. Thus, oth u n v reh (p 0, s 0 ). By Lemm, this implies tht the set of sttes in A rehle y u n v n shring ommon future with p 0 re the sme. Sine p 1 n p 0 shre ommon future in A n v rehes oth p 0 n p 1, u must lso reh p 1 in A. If u rehes (p 1, s 0), then (q, t 0 ) n e rehe y x sine (p 1, s 0) mits trnsition lele with leing to (q, t). Otherwise, y the inution hypothesis, there must exist istint stte (p 1, s 1 ) in A rehle y u, with p 1 mitting trnsition lele with to q. Repplying the rgument lrey presente for (p 0, s 0 ) to (p 1, s 1 ), either we fin pth in A lele with x to stte (q, t 1 ), or there exists stte (p, s ) in A with the sme property s (p 0, s 0 ) with p istint from p 1 n p 0. Sine the numer of istint suh sttes is finite,

9 reiterting this proess gurntees fining pth in A lele with x to stte (q, t k ) fter some finite numer of times k. Thus, the property hols in ll ses. Lemm 4. Let A e the utomton returne y lgorithm Dismigution run on input utomton A, then L(A ) L(A). Proof. The proof rgument is similr to tht of Lemm 3. Let x e string rehing finl stte q 0 F in A. By Lemm 3, there exists stte (q 0, t 0 ) in A rehle y x. If stte (q 0, t 0 ) is me finl (lines 11-1), this shows tht x is epte y A. Otherwise, there must exist finl stte (q 1, t 0) with (q 1, t 0) R (q 0, t 0 ). Note tht this implies tht q 1 is finl. Note lso tht we hve q 1 q 0 sine two sttes (q 0, t 0 ) n (q 0, t 0) nnot e o-rehle with t 0 t 0. Sine (q 1, t 0) R (q 0, t 0 ), there exists string x 1 rehing oth sttes. Sine (q 0, t 0 ) is rehle y oth x n x 1, y Lemm, the set of sttes in A rehle y x n shring ommon future with q 0 n those rehle y x 1 n shring ommon future with q 0 re the sme. q 1 shres ommon future with q 0 sine oth sttes re finl n q 1 is rehle y x 1, therefore q 1 is rehle y x. Now, if x rehes (q 1, t 0), this shows tht x is epte y A. Otherwise, y Lemm 3, there exists stte (q 1, t 1 ) in A rehle y x. We n repply to (q 1, t 1 ) the sme rgument s for (q 0, t 0 ) sine q 1 is finl stte. Doing so, we either fin finl stte in A rehle y x or stte (q, t ) in A with the sme properties s (q 0, t 0 ) with q 0, q 1, n q ll istint. Sine the numer of sttes of A is finite, reiterting this proess gurntees fining finl stte rehle y x. This onlues the proof. Proposition 3. The utomton A returne y lgorithm Dismigution run on input utomton A is equivlent to A. Proof. By onstrution, pth ((p 1, s 1 ), 1, (p, s )) ((p k, s k ), k, (p k+1, s k+1 )) is rete in A only if the pth (p 1, 1, p ) (p k, k, p k+1 ) exists in A, n stte (p, s) is me finl in A only if p is finl in A. Thus, if string x = 1 k is epte y A it is lso epte y A, whih shows tht L(A ) L(A). the reverse inlusion hols y Lemm 4. The following theorem follows iretly y Propositions n 3. Theorem 1. The utomton A returne y lgorithm Dismigution run on input utomton A is n unmiguous utomton equivlent to A. Note tht the sttes isllowe vi the onition of our lgorithm re the miniml ones tht n e sfely remove from the susets to hek the presene of miguities. 3.3 Dismigution of utomt with ɛ-trnsitions Our lgorithm n lso e extene to the se of utomt with ɛ-trnsitions. We riefly esrie tht extension. Let A e n input utomton with ɛ-trnsitions.

10 0 ε 1 4 ε 5 3 (0, {0, 4}) ε (1, {1,, 5}) (, {1,, 5}) ε (4, {0, 4}) (5, {1,, 5}) (3, {3}) () () Fig. 4. () Automton A with ɛ-trnsitions. () Unmiguous utomton equivlent to A returne y our ismigution lgorithm. The she trnsition is isllowe y the lgorithm. Here, the utomton B use to etermine pirs of sttes shring the sme future is otine similrly y omputing the intersetion A A y using n ɛ-filter [1] n y trimming the result y removing non-oessile sttes n trnsitions. For ny set R of sttes of A, let ɛ[r] enote the ɛ-losure of R, tht is the set of sttes rehle from sttes of R vi pths lele with ɛ. To exten the lgorithm to over the se of utomt with ɛ-trnsitions, it suffies to proee s follows. The initil sttes re efine y the set of (i, s) with i I n s = {q ɛ[i]: (i, q) B}. At line 14, δ(s, ) is efine s the set of sttes rehle from s y reing, inluing vi ɛ-trnsitions. Finlly, the reltion R is extene to ɛ-trnsitions s follows: for eh (p, s ) suh tht (p, s ) R (p, s) n ((p, s), ɛ, (q, t )) E, (p, s ) is put in reltion with (q, t ). Figure 4 illustrtes the pplition of our lgorithm in tht se. 4 Dismigution of finite-stte trnsuers In this setion, we onsier the prolem of etermining n unmiguous trnsuer equivlent to given funtionl finite-stte trnsuer, tht is finite-stte trnsuer representing (prtil) rtionl funtion, or equivlently one ssoiting t most one output string to ny input string. The funtionlity of finite-stte trnsuer T n e teste effiiently from the trnsuer T T 1 s shown y []. Theorem ([]). There exists n lgorithm for testing the funtionlity of finite-stte trnsuer T with output lphet in time O( E + Q ). One possile lgorithm for fining n unmiguous trnsuer equivlent to funtionl trnsuer is eterminiztion [11], however, s isusse erlier, not ll funtionl trnsuers mit n equivlent eterministi trnsuer. Figure 5() shows n exmple of suh funtionl trnsuer whih in ft is unmiguous. A trim funtionl trnsuer is eterminizle iff it mits the twins property [3]. We will esrie inste ismigution lgorithm oes not require tht itionl property. It is known tht ny funtionl trnsuer n e represente y n unmiguous trnsuer [9, 5]. For funtionl trnsuer, y efinition, two epting pths with the sme input lel hve the sme output lels. Thus, for ismiguting funtionl trnsuer, only input lels mtter n

11 0 : : : 1 : 0 : 3 4 : :ε 1 : :ε : :ε 3 (0, {0}) (1, {1, }) : (3, {3}) (, {1, }) () () () : :ε Fig. 5. () Unmiguous finite-stte trnsuer mitting no sequentil or eterministi equivlent. () Funtionl trnsuer T. () Dismigute trnsuer equivlent to T returne y our lgorithm. One of the two she trnsitions is isllowe y the lgorithm. our utomt ismigution n e reily pplie to rete n unmiguous trnsuer equivlent to n input funtionl trnsuer. Our ismigution lgorithm gives onstrutive proof of the existene of n equivlent unmiguous trnsuer for rtionl funtion. The ifferent possile ross-setions of the onstrution of [9] orrespon to ifferent orers in whih trnsitions re visite n isllowe y our lgorithm. Figure 5()-() illustrtes the pplition of the lgorithm in the se of simple funtionl trnsuer. As lrey pointe out, our lgorithm ompres fvorly with the existing ismigution lgorithm for finite-stte trnsuers of Shützenerger [16, 15]. Tht onstrution n e onisely esrie s follows. Let D e eterministi utomton otine y eterminiztion of the input utomton A of the funtionl trnsuer T, tht is the utomton otine y removing the output lels of T. Then, the lgorithm onsists of omposing D with T using the stnr omposition lgorithm for finite-stte trnsuers while isllowing finlity of two omposition sttes (p, s) n (q, s) with the sme eterminiztion suset s n istint sttes p n q of T, n similrly isllowing ll ut one trnsition lele with from two sttes (p, s) n (q, s) to the sme stte, to voi generting miguities. As n e seen from this esription, the lgorithm requires the eterminiztion of A. This is impliit in the esription of this onstrution in [14]. In ontrst, our ismigution lgorithm tht oes not require the eterminiztion of A n s seen in the previous setions n return exponentilly smller utomt thn those returne y eterminiztion is some ses. Consier for exmple the finite-stte trnsuers efine s the utomt of Figure 3 with eh trnsition ugmente with n output lel ientil to its output lel. The onstrution of Shützenerger requires for those trnsuers the eterminiztion of the input utomt, thus its ost s well s the size of the result re exponentil with respet to the size of the output s lrey isusse in Setion 3. Unlike tht onstrution, s in the utomt se, our lgorithm returns the sme trnsuer or returns one whose size is only liner in tht of the input. The susets efine y our ismigution lgorithm re never lrger thn those efine in the suset onstrution of eterminiztion. This is euse for stte (p, s) onstrute in the lgorithm, only sttes shring ommon future with p re kept in the suset s. In ition to mking the size of the susets shorter, this lso reues the numer of sttes rete: two possile sttes (p, s ) n (p, s ) in the onstrution of Shützenerger re reue to the sme (p, s)

12 : : 1 :ε :ε (1, {1,, 3}) :ε 0 :ε :ε : : 4 : (, {1,, 3}) :ε : : :ε :ε : : 3 () (0, {0}) : : (3, {1,, 3}) :ε :ε (4, {4}) : : (1, {1, }) :ε :ε :ε (1, {1, }) :ε : (0, {0}) :ε :ε (, {1, }) : : (4, {4}) : (, {1, }) : :ε : :ε : (3, {3}) (3, {3}) () () Fig. 6. Dismigution of funtionl trnsuers. () Funtionl trnsuer T. () Unmiguous trnsuer equivlent to T returne y our lgorithm. The she trnsitions re isllowe y the lgorithm. () Unmiguous trnsuer returne y the ismigution onstrution of Shützenerger [16, 15]. fter removl from s n s of the sttes not shring ommon future with p. This les in mny ses to trnsuers exponentilly smller thn those generte y the onstrution of Shützenerger n similr improvements in time effiieny. The oservtion just emphsize n e illustrte y the simple exmple of Figure 6. The trnsuer T of Figure 6() is funtionl ut is not unmiguous. Figure 6() shows the result of our ismigution lgorithm whih is n unmiguous trnsuer equivlent to T with the sme numer of sttes. In ontrst, the trnsuer rete y the onstrution of Shützenerger (Figure 6()) hs severl more sttes n trnsitions n some lrger susets. 5 Conlusion We presente new n often more effiient lgorithm for the ismigution of finite utomt n funtionl trnsuers. This lgorithm is of gret prtil importne in vriety of pplitions inluing text n speeh proessing, ioinformtis, n in mny other pplitions where they n e use to inrese serh effiieny. We hve lso esigne nturl extension of these lgorithms to some ro fmilies of weighte utomt n trnsuers efine over ifferent semirings. We will present these extensions s well s their theoretil nlysis in longer version of this pper.

13 Aknowlegments I thnk Cyril Alluzen n Mihel Riley for isussions out this work. This reserh ws supporte y Google Reserh Awr. Referenes 1. J. Alert n J. Kri. Digitl imge ompression. In Hnook of weighte utomt. Springer, C. Alluzen n M. Mohri. Effiient lgorithms for testing the twins property. Journl of Automt, Lnguges n Comintoris, 8(): , C. Alluzen n M. Mohri. Finitely susequentil trnsuers. Interntionl Journl of Fountions of Computer Siene, 14(6): , C. Alluzen, M. Mohri, n A. Rstogi. Generl lgorithms for testing the miguity of finite utomt n the oule-tpe miguity of finite-stte trnsuers. Int. J. Foun. Comput. Si., (4): , J. Berstel. Trnsutions n Context-Free Lnguges. Teuner Stuienuher, T. M. Breuel. The OCRopus open soure OCR system. In Proeeings of IS&T/SPIE 0th Annul Symposium, C. Choffrut. Contriutions à l étue e quelques fmilles remrqules e fontions rtionnelles. PhD thesis, Université Pris 7, LITP: Pris, Frne, R. Durin, S. R. Ey, A. Krogh, n G. J. Mithison. Biologil Sequene Anlysis: Proilisti Moels of Proteins n Nulei Ais. Cmrige University Press, S. Eilenerg. Automt, Lnguges n Mhines, volume A. Aemi Press, R. M. Kpln n M. Ky. Regulr moels of phonologil rule systems. Computtionl Linguistis, 0(3), M. Mohri. Finite-stte trnsuers in lnguge n speeh proessing. Computtionl Linguistis, 3():69 311, M. Mohri. Weighte utomt lgorithms. In Hnook of Weighte Automt, pges Springer, M. Mohri, F. C. N. Pereir, n M. Riley. Speeh reognition with weighte finitestte trnsuers. In Hnook on speeh proessing n speeh ommunition. Springer, E. Rohe n Y. Shes, eitors. Finite-Stte Lnguge Proessing. MIT Press, J. Skrovith. A onstrution on finite utomt tht hs remine hien. Theor. Comput. Si., 04(1-):05 31, M. P. Shützenerger. Sur les reltions rtionnelles entre monoies lires. Theor. Comput. Si., 3():43 59, 1976.

2.4 Theoretical Foundations

2.4 Theoretical Foundations 2 Progrmming Lnguge Syntx 2.4 Theoretil Fountions As note in the min text, snners n prsers re se on the finite utomt n pushown utomt tht form the ottom two levels of the Chomsky lnguge hierrhy. At eh level

More information

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

Compression of Palindromes and Regularity.

Compression of Palindromes and Regularity. Compression of Plinromes n Regulrity. Kyoko Shikishim-Tsuji Center for Lierl Arts Eution n Reserh Tenri University 1 Introution In [1], property of likstrem t t view of tse is isusse n it is shown tht

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

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

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

General Algorithms for Testing the Ambiguity of Finite Automata

General Algorithms for Testing the Ambiguity of Finite Automata TR2007-908 Generl Algorithms for Testing the Amiguity of Finite Automt Cyril Alluzen 1,, Mehryr Mohri 1,2, nd Ashish Rstogi 1 1 Cournt Institute of Mthemtil Sienes, 251 Merer Street, New York, NY 10012.

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Subsequence Automata with Default Transitions

Subsequence Automata with Default Transitions Susequene Automt with Defult Trnsitions Philip Bille, Inge Li Gørtz, n Freerik Rye Skjoljensen Tehnil University of Denmrk {phi,inge,fskj}@tu.k Astrt. Let S e string of length n with hrters from n lphet

More information

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER MACHINES AND THEIR LANGUAGES ANSWERS The University of ottinghm SCHOOL OF COMPUTR SCIC A LVL 2 MODUL, SPRIG SMSTR 2015 2016 MACHIS AD THIR LAGUAGS ASWRS Time llowed TWO hours Cndidtes my omplete the front over of their nswer ook nd sign their

More information

General Algorithms for Testing the Ambiguity of Finite Automata

General Algorithms for Testing the Ambiguity of Finite Automata Generl Algorithms for Testing the Amiguity of Finite Automt Cyril Alluzen 1,, Mehryr Mohri 2,1, nd Ashish Rstogi 1, 1 Google Reserch, 76 Ninth Avenue, New York, NY 10011. 2 Cournt Institute of Mthemticl

More information

General Suffix Automaton Construction Algorithm and Space Bounds

General Suffix Automaton Construction Algorithm and Space Bounds Generl Suffix Automton Constrution Algorithm nd Spe Bounds Mehryr Mohri,, Pedro Moreno, Eugene Weinstein, Cournt Institute of Mthemtil Sienes 251 Merer Street, New York, NY 10012. Google Reserh 76 Ninth

More information

General Algorithms for Testing the Ambiguity of Finite Automata and the Double-Tape Ambiguity of Finite-State Transducers

General Algorithms for Testing the Ambiguity of Finite Automata and the Double-Tape Ambiguity of Finite-State Transducers Interntionl Journl of Foundtions of Computer Science c World Scientific Pulishing Compny Generl Algorithms for Testing the Amiguity of Finite Automt nd the Doule-Tpe Amiguity of Finite-Stte Trnsducers

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic Automata vs Deterministic Automata Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n

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

Automata and Regular Languages Chpter 9 Automt n Regulr Lnguges 9. Introution This hpter looks t mthemtil moels of omputtion n lnguges tht esrie them. The moel-lnguge reltionship hs multiple levels. We shll explore the simplest level,

More information

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering

Petri Nets. Rebecca Albrecht. Seminar: Automata Theory Chair of Software Engeneering Petri Nets Ree Alreht Seminr: Automt Theory Chir of Softwre Engeneering Overview 1. Motivtion: Why not just using finite utomt for everything? Wht re Petri Nets nd when do we use them? 2. Introdution:

More information

Finite State Automata and Determinisation

Finite State Automata and Determinisation Finite Stte Automt nd Deterministion Tim Dworn Jnury, 2016 Lnguges fs nf re df Deterministion 2 Outline 1 Lnguges 2 Finite Stte Automt (fs) 3 Non-deterministi Finite Stte Automt (nf) 4 Regulr Expressions

More information

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

INTRODUCTION TO AUTOMATA THEORY

INTRODUCTION TO AUTOMATA THEORY Chpter 3 INTRODUCTION TO AUTOMATA THEORY In this hpter we stuy the most si strt moel of omputtion. This moel els with mhines tht hve finite memory pity. Setion 3. els with mhines tht operte eterministilly

More information

Lecture 2: Cayley Graphs

Lecture 2: Cayley Graphs Mth 137B Professor: Pri Brtlett Leture 2: Cyley Grphs Week 3 UCSB 2014 (Relevnt soure mteril: Setion VIII.1 of Bollos s Moern Grph Theory; 3.7 of Gosil n Royle s Algeri Grph Theory; vrious ppers I ve re

More information

Section 2.3. Matrix Inverses

Section 2.3. Matrix Inverses Mtri lger Mtri nverses Setion.. Mtri nverses hree si opertions on mtries, ition, multiplition, n sutrtion, re nlogues for mtries of the sme opertions for numers. n this setion we introue the mtri nlogue

More information

= state, a = reading and q j

= state, a = reading and q j 4 Finite Automt CHAPTER 2 Finite Automt (FA) (i) Derterministi Finite Automt (DFA) A DFA, M Q, q,, F, Where, Q = set of sttes (finite) q Q = the strt/initil stte = input lphet (finite) (use only those

More information

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

Regular languages refresher

Regular languages refresher Regulr lnguges refresher 1 Regulr lnguges refresher Forml lnguges Alphet = finite set of letters Word = sequene of letter Lnguge = set of words Regulr lnguges defined equivlently y Regulr expressions Finite-stte

More information

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 )

Necessary and sucient conditions for some two. Abstract. Further we show that the necessary conditions for the existence of an OD(44 s 1 s 2 ) Neessry n suient onitions for some two vrile orthogonl esigns in orer 44 C. Koukouvinos, M. Mitrouli y, n Jennifer Seerry z Deite to Professor Anne Penfol Street Astrt We give new lgorithm whih llows us

More information

Lecture 8: Abstract Algebra

Lecture 8: Abstract Algebra Mth 94 Professor: Pri Brtlett Leture 8: Astrt Alger Week 8 UCSB 2015 This is the eighth week of the Mthemtis Sujet Test GRE prep ourse; here, we run very rough-n-tumle review of strt lger! As lwys, this

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4 Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones

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

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

More information

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ Running n NFA & the suset lgorithm (NFA->DFA) CS 350 Fll 2018 gilry.org/lsses/fll2018/s350/ 1 NFAs operte y simultneously exploring ll pths nd epting if ny pth termintes t n ept stte.!2 Try n exmple: L

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

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

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

More information

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area

On a Class of Planar Graphs with Straight-Line Grid Drawings on Linear Area Journl of Grph Algorithms n Applitions http://jg.info/ vol. 13, no. 2, pp. 153 177 (2009) On Clss of Plnr Grphs with Stright-Line Gri Drwings on Liner Are M. Rezul Krim 1,2 M. Siur Rhmn 1 1 Deprtment of

More information

Aperiodic tilings and substitutions

Aperiodic tilings and substitutions Aperioi tilings n sustitutions Niols Ollinger LIFO, Université Orléns Journées SDA2, Amiens June 12th, 2013 The Domino Prolem (DP) Assume we re given finite set of squre pltes of the sme size with eges

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

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

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

On the Spectra of Bipartite Directed Subgraphs of K 4

On the Spectra of Bipartite Directed Subgraphs of K 4 On the Spetr of Biprtite Direte Sugrphs of K 4 R. C. Bunge, 1 S. I. El-Znti, 1, H. J. Fry, 1 K. S. Kruss, 2 D. P. Roerts, 3 C. A. Sullivn, 4 A. A. Unsiker, 5 N. E. Witt 6 1 Illinois Stte University, Norml,

More information

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

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

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza

Laboratory for Foundations of Computer Science. An Unfolding Approach. University of Edinburgh. Model Checking. Javier Esparza An Unfoling Approh to Moel Cheking Jvier Esprz Lbortory for Fountions of Computer Siene University of Einburgh Conurrent progrms Progrm: tuple P T 1 T n of finite lbelle trnsition systems T i A i S i i

More information

Petri automata for Kleene allegories

Petri automata for Kleene allegories Petri utomt for Kleene llegories Pul Brunet, mien Pous To ite this version: Pul Brunet, mien Pous. Petri utomt for Kleene llegories. Logi in omputer Siene, Jul 205, Kyoto, Jpn. I, pp.68-79, 205, .

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

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version A Lower Bound for the Length of Prtil Trnsversl in Ltin Squre, Revised Version Pooy Htmi nd Peter W. Shor Deprtment of Mthemtil Sienes, Shrif University of Tehnology, P.O.Bo 11365-9415, Tehrn, Irn Deprtment

More information

POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS

POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS Bull. Koren Mth. So. 35 (998), No., pp. 53 6 POSITIVE IMPLICATIVE AND ASSOCIATIVE FILTERS OF LATTICE IMPLICATION ALGEBRAS YOUNG BAE JUN*, YANG XU AND KEYUN QIN ABSTRACT. We introue the onepts of positive

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

SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVEX STOCHASTIC PROCESSES ON THE CO-ORDINATES

SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVEX STOCHASTIC PROCESSES ON THE CO-ORDINATES Avne Mth Moels & Applitions Vol3 No 8 pp63-75 SOME INTEGRAL INEQUALITIES FOR HARMONICALLY CONVE STOCHASTIC PROCESSES ON THE CO-ORDINATES Nurgül Okur * Imt Işn Yusuf Ust 3 3 Giresun University Deprtment

More information

Designing finite automata II

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

More information

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

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

More information

A Short Introduction to Self-similar Groups

A Short Introduction to Self-similar Groups A Short Introution to Self-similr Groups Murry Eler* Asi Pifi Mthemtis Newsletter Astrt. Self-similr groups re fsinting re of urrent reserh. Here we give short, n hopefully essile, introution to them.

More information

Separable discrete functions: recognition and sufficient conditions

Separable discrete functions: recognition and sufficient conditions Seprle isrete funtions: reognition n suffiient onitions Enre Boros Onřej Čepek Vlimir Gurvih Novemer 21, 217 rxiv:1711.6772v1 [mth.co] 17 Nov 217 Astrt A isrete funtion of n vriles is mpping g : X 1...

More information

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014 S 224 DIGITAL LOGI & STATE MAHINE DESIGN SPRING 214 DUE : Mrh 27, 214 HOMEWORK III READ : Relte portions of hpters VII n VIII ASSIGNMENT : There re three questions. Solve ll homework n exm prolems s shown

More information

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points: Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

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

A Process-Algebraic Semantics for Generalised Nonblocking

A Process-Algebraic Semantics for Generalised Nonblocking A Proess-Algeri Semntis for Generlise Nonloking Simon Wre Roi Mlik Deprtment of Computer Siene The University of Wikto Privte Bg 3105, Hmilton 3240, New Zeln Emil: {siw4,roi}@s.wikto..nz Astrt Generlise

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

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

Hybrid Systems Modeling, Analysis and Control

Hybrid Systems Modeling, Analysis and Control Hyrid Systems Modeling, Anlysis nd Control Rdu Grosu Vienn University of Tehnology Leture 5 Finite Automt s Liner Systems Oservility, Rehility nd More Miniml DFA re Not Miniml NFA (Arnold, Diky nd Nivt

More information

CONTROLLABILITY and observability are the central

CONTROLLABILITY and observability are the central 1 Complexity of Infiml Oservle Superlnguges Tomáš Msopust Astrt The infiml prefix-losed, ontrollle nd oservle superlnguge plys n essentil role in the reltionship etween ontrollility, oservility nd o-oservility

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

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching

CS261: A Second Course in Algorithms Lecture #5: Minimum-Cost Bipartite Matching CS261: A Seon Course in Algorithms Leture #5: Minimum-Cost Biprtite Mthing Tim Roughgren Jnury 19, 2016 1 Preliminries Figure 1: Exmple of iprtite grph. The eges {, } n {, } onstitute mthing. Lst leture

More information

I 3 2 = I I 4 = 2A

I 3 2 = I I 4 = 2A ECE 210 Eletril Ciruit Anlysis University of llinois t Chigo 2.13 We re ske to use KCL to fin urrents 1 4. The key point in pplying KCL in this prolem is to strt with noe where only one of the urrents

More information

Monochromatic Plane Matchings in Bicolored Point Set

Monochromatic Plane Matchings in Bicolored Point Set CCCG 2017, Ottw, Ontrio, July 26 28, 2017 Monohromti Plne Mthings in Biolore Point Set A. Krim Au-Affsh Sujoy Bhore Pz Crmi Astrt Motivte y networks interply, we stuy the prolem of omputing monohromti

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

Factorising FACTORISING.

Factorising FACTORISING. Ftorising FACTORISING www.mthletis.om.u Ftorising FACTORISING Ftorising is the opposite of expning. It is the proess of putting expressions into rkets rther thn expning them out. In this setion you will

More information

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata

Descriptional Complexity of Non-Unary Self-Verifying Symmetric Difference Automata Desriptionl Complexity of Non-Unry Self-Verifying Symmetri Differene Automt Lurette Mris 1,2 nd Lynette vn Zijl 1 1 Deprtment of Computer Siene, Stellenosh University, South Afri 2 Merk Institute, CSIR,

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

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

Unfoldings of Networks of Timed Automata

Unfoldings of Networks of Timed Automata Unfolings of Networks of Time Automt Frnk Cssez Thoms Chtin Clue Jr Ptrii Bouyer Serge H Pierre-Alin Reynier Rennes, Deemer 3, 2008 Unfolings [MMilln 93] First efine for Petri nets Then extene to other

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

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

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

Compiler Design. Spring Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Siene Deprtment Compiler Design Spring 7 Lexil Anlysis Smple Exerises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sienes Institute 47 Admirlty Wy, Suite

More information

arxiv: v2 [math.co] 31 Oct 2016

arxiv: v2 [math.co] 31 Oct 2016 On exlue minors of onnetivity 2 for the lss of frme mtrois rxiv:1502.06896v2 [mth.co] 31 Ot 2016 Mtt DeVos Dryl Funk Irene Pivotto Astrt We investigte the set of exlue minors of onnetivity 2 for the lss

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

Maximum size of a minimum watching system and the graphs achieving the bound

Maximum size of a minimum watching system and the graphs achieving the bound Mximum size of minimum wthing system n the grphs hieving the oun Tille mximum un système e ontrôle minimum et les grphes tteignnt l orne Dvi Auger Irène Chron Olivier Hury Antoine Lostein 00D0 Mrs 00 Déprtement

More information

CSC2542 State-Space Planning

CSC2542 State-Space Planning CSC2542 Stte-Spe Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Fll 2010 1 Aknowlegements Some the slies use in this ourse re moifitions of Dn Nu s leture slies for the textook

More information

Solutions to Problem Set #1

Solutions to Problem Set #1 CSE 233 Spring, 2016 Solutions to Prolem Set #1 1. The movie tse onsists of the following two reltions movie: title, iretor, tor sheule: theter, title The first reltion provies titles, iretors, n tors

More information

Logic, Set Theory and Computability [M. Coppenbarger]

Logic, Set Theory and Computability [M. Coppenbarger] 14 Orer (Hnout) Definition 7-11: A reltion is qusi-orering (or preorer) if it is reflexive n trnsitive. A quisi-orering tht is symmetri is n equivlene reltion. A qusi-orering tht is nti-symmetri is n orer

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

Abstraction of Nondeterministic Automata Rong Su

Abstraction of Nondeterministic Automata Rong Su Astrtion of Nondeterministi Automt Rong Su My 6, 2010 TU/e Mehnil Engineering, Systems Engineering Group 1 Outline Motivtion Automton Astrtion Relevnt Properties Conlusions My 6, 2010 TU/e Mehnil Engineering,

More information

Introduction to Olympiad Inequalities

Introduction to Olympiad Inequalities Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

More information

Symbolic Automata for Static Specification Mining

Symbolic Automata for Static Specification Mining Symoli Automt for Stti Speifition Mining Hil Peleg 1, Shron Shohm, Ern Yhv, n Hongseok Yng 1 Tel Aviv University, Isrel Tel Aviv-Yffo Aemi College, Isrel University of Ofor, UK Tehnion, Isrel Astrt. We

More information

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx Applitions of Integrtion Are of Region Between Two Curves Ojetive: Fin the re of region etween two urves using integrtion. Fin the re of region etween interseting urves using integrtion. Desrie integrtion

More information

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras

On Implicative and Strong Implicative Filters of Lattice Wajsberg Algebras Glol Journl of Mthemtil Sienes: Theory nd Prtil. ISSN 974-32 Volume 9, Numer 3 (27), pp. 387-397 Interntionl Reserh Pulition House http://www.irphouse.om On Implitive nd Strong Implitive Filters of Lttie

More information

PREDICTABILITY IN DISCRETE-EVENT SYSTEMS UNDER PARTIAL OBSERVATION 1. Sahika Genc, Stéphane Lafortune

PREDICTABILITY IN DISCRETE-EVENT SYSTEMS UNDER PARTIAL OBSERVATION 1. Sahika Genc, Stéphane Lafortune PREDICTABILITY IN DISCRETE-EVENT SYSTEMS UNDER PARTIAL OBSERVATION 1 Shik Gen, Stéhne Lfortune Dertment of Eletril Engineering n Comuter Siene, University of Mihign, 1301 Bel Avenue, Ann Aror, MI 48109-2122,

More information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

More information

On the existence of a cherry-picking sequence

On the existence of a cherry-picking sequence On the existene of herry-piking sequene Jnosh Döker, Simone Linz Deprtment of Computer Siene, University of Tüingen, Germny Deprtment of Computer Siene, University of Aukln, New Zeln Astrt Reently, the

More information

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Now we must transform the original model so we can use the new parameters. = S max. Recruits MODEL FOR VARIABLE RECRUITMENT (ontinue) Alterntive Prmeteriztions of the pwner-reruit Moels We n write ny moel in numerous ifferent ut equivlent forms. Uner ertin irumstnes it is onvenient to work with

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

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t

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