Operations on Unambiguous Finite Automata

Size: px
Start display at page:

Download "Operations on Unambiguous Finite Automata"

Transcription

1 Opertions on Unmbiguous Finite Automt Jozef Jirásek, Jr., Glin Jirásková, 2,, nd Jurj Šebej Mthemticl Institute, Slovk Acdemy of Sciences Grešákov 6, 4 Košice, Slovki jirsekjozef@gmil.com, jirskov@sske.sk 2 Institute of Computer Science, Fculty of Science, P. J. Šfárik University, Jesenná 5, 4 Košice, Slovki jurj.sebej@gmil.com Abstrct. A nondeterministic finite utomton is unmbiguous if it hs t most one ccepting computtion on every input string. We investigte the complexity of bsic regulr opertions on lnguges represented by unmbiguous finite utomt. We get tight upper bounds for intersection (mn), left nd right quotients (2 n ), positive closure (3/4 2 n ), str (3/4 2 n ), shuffle (2 mn ), nd conctention (3/4 2 m+n ). To prove tightness, we use binry lphbet for intersection nd left nd right quotients, ternry lphbet for str nd positive closure, fiveletter lphbet for shuffle, nd seven-letter lphbet for conctention. We lso get some prtil results for union nd complementtion. Introduction A nondeterministic mchine is unmbiguous if it hs t most one ccepting computtion on every input string. Ambiguity ws studied intensively minly in connection with context-free lnguges nd it is well known tht the clsses of mbiguous, unmbiguous, nd deterministic context-free lnguges re ll different. Ambiguity in finite utomt ws first considered by Schmidt [22] in his unpublished thesis, where he obtined lower bound 2 Ω( (n)) on the conversion of unmbiguous finite utomt into deterministic finite utomt, s well s for the conversion of nondeterministic finite utomt into unmbiguous finite utomt. He lso developed n interesting lower bound method for the size of unmbiguous utomt bsed on the rnk of certin mtrices. Sterns nd Hunt [24] provided polynomil lgorithms for the equivlence nd continment problems for unmbiguous finite utomt (UFAs), nd they extended them to mbiguity bounded by fixed integer k. Chn nd Ibrr [5] provided polynomil spce lgorithm to decide, given nondeterministic finite utomton (NFA), whether it is finitely mbiguous. They lso showed tht it is PSPACE-complete to decide, given n NFA M nd n integer k, whether M is k-mbiguous. Reserch supported by VEGA grnt 2/84/5. Reserch supported by VEGA grnt /42/5.

2 Ibrr nd Rvikumr [3] defined the mbiguity function M (n): N N of n NFA M such tht M (n) is the mximum number of distinct ccepting computtions of M on ny string of length n, nd they proved tht the exponentil mbiguity problem is decidble for NFAs. Weber nd Seidl [25] showed tht if n n-stte NFA is finitely mbiguous, then it is t most 5 n/2 n n -mbiguous. Alluzen et l. [] considered ε-nfas, nd they proved tht, given trim ε-cycle free NFA A, it is decidble in time tht is cubic in the number of trnsitions of A, whether A is finitely, polynomilly, or exponentilly mbiguous. Rvikumr nd Ibrr [2] considered the reltionship between different types of mbiguity of NFAs to the succinctness of their representtions, nd they provided complete picture for unry nd bounded lnguges. Exponentilly nd polynomilly mbiguous NFAs were seprted by Leung [6] by providing, for every n, n exponentilly mbiguous n-stte NFA such tht every equivlent polynomilly mbiguous NFA requires 2 n sttes. The UFA-to-DFA trdeoff ws improved to the optiml bound 2 n by Leung [7]. He described, for every n, binry n-stte UFA with unique initil stte whose equivlent DFA requires 2 n sttes. Similr binry exmple with multiple initil sttes ws given by Leiss [5], nd ternry one ws presented lredy by Lupnov [8]; note tht the reverse of Lupnov s ternry witness for NFA-to-DFA conversion is deterministic. Leung [7] elborted the Schmidt s lower bound method for the number of sttes in UFA. He considered, for lnguge L, mtrix whose rows re indexed by strings x i nd columns by strings y i, nd the entry in row x i nd column y j is if x i y j L nd it is otherwise. He showed tht the rnk of such mtrix provides lower bound on the number of sttes in ny UFA for L. Using this method, he ws ble to describe for every n n n-stte finitely mbiguous NFA, whose equivlent UFA requires 2 n sttes. A lower bound method ws further elborted by Hromkovič et l. [2]. They used communiction complexity to show tht so clled exct cover of ll s with monochromtic sub-mtrices in communiction mtrix of lnguge provides lower bound on the size of ny UFA for the lnguge. This llowed them to simplify proofs presented in [22,24]. Using communiction complexity methods, Hromkovič nd Schnitger [] showed seprtion of finitely nd polynomilly mbiguous NFAs, nd even proved hierrchy for polynomil mbiguity. A survey pper on unmbiguity in utomt theory ws presented by Colcombet [6], where he considered word utomt, tropicl utomt, infinite tree utomt, nd register utomt. He showed tht the notion of unmbiguity is not well understood so fr, nd tht some chllenging problems, including complementtion of UFAs, remin open. Unry unmbiguous utomt were exmined by Okhotin [2], who proved tht the tight upper bound for UFA-to-DFA conversion in the unry cse is given by function in e Θ( 3 n(ln n) 2), while the trde-off for NFA-to-UFA conversion is e n ln n(+o()). He lso considered the opertions of str, conctention, nd complementtion on unry UFA lnguges, nd obtined the tight upper bound (n ) 2 + for str, n upper bound mn for conctention which is tight if m, n re reltively prime, nd lower bound n 2 ϵ for complementtion. 2

3 In this pper, we continue this reserch nd study the complexity of bsic regulr opertions on lnguges represented by unmbiguous finite utomt. First, we restte the lower bound method from [7,22]. Using the notions of rechble nd so clled co-rechble sttes in n NFA N, we ssign mtrix M N to the NFA N in such wy tht the rnk of M N provides lower bound on the number of sttes in ny UFA for the lnguge L(N). We use this to get ll our lower bounds. To get upper bounds, we first construct n NFA for the lnguge resulting from n opertion, nd then we pply the (incomplete) subset construction to this NFA to get n incomplete DFA, so lso UFA, for the resulting lnguge. As result, we get tight upper bounds for intersection (mn), left nd right quotients (2 n ), positive closure (3/4 2 n ), str (3/4 2 n ), shuffle (2 mn ), nd conctention (3/4 2 m+n ). To prove tightness, we lwys use smll fixed lphbets. Since the reverse of n mbiguous finite utomt is unmbiguous, the complexity of lnguge nd its reverse is the sme. Finlly, we get some prtil results for complementtion nd union. 2 Preliminries We ssume tht the reder is fmilir with bsic notions in forml lnguges nd utomt theory. For detils nd ll the unexplined notions, the reder my refer to [,23,26]. Let Σ be finite lphbet of symbols. Then Σ denotes the set of strings over the lphbet Σ including the empty string ε. The length of string w is denoted by w, nd the number of occurrences of symbol in string w by # (w). A lnguge is ny subset of Σ. For finite set X, the crdinlity of X is denoted by X, nd its power-set by 2 X. A nondeterministic finite utomton (NFA) is 5-tuple N = (Q, Σ,, I, F ), where Q is finite nonempty set of sttes, Σ is finite nonempty input lphbet, Q Σ Q is the trnsition reltion, I Q is the set of initil sttes, nd F Q is the set of finl sttes. Ech element (p,, q) of is clled trnsition of N. A computtion of N on n input string n is seguence of trnsitions (q,, q )(q, 2, q 2 ) (q n, n, q n ). The computtion is ccepting if q I nd q n F ; in such cse we sy tht the string n is ccepted by N. The lnguge ccepted by the NFA N is the set of strings L(N) = {w Σ w is ccepted by N}. An NFA N = (Q, Σ,, I, F ) is unmbiguous (UFA) if it hs t most one ccepting computtion on every input string, nd it is deterministic (DFA) if I = nd for ech stte p in Q nd ech symbol in Σ, there is t most one stte q in Q such tht (p,, q) is trnsition of N. Let us emphsize tht we llow NFAs to hve multiple initil sttes, nd DFAs to be incomplete. The trnsition reltion my be viewed s function from Q Σ to 2 Q, which cn be extended to the domin 2 Q Σ in the nturl wy. We denote this function by. Using this nottion we get L(N) = {w Σ I w F }. 3

4 Every NFA N = (Q, Σ,, I, F ) cn be converted to n equivlent incomplete DFA N = (2 Q \{ }, Σ,, I, F ), where F = {R 2 Q \{ } R F }, nd for ech R in 2 Q \ { } nd ech in Σ, the prtil trnsition function is defined s follows: R = R if R nd R is undefined otherwise. We cll the DFA N the incomplete subset utomton of NFA N. Since every incomplete DFA is UFA, we get the following observtion. Proposition. If lnguge L is ccepted by n n-stte NFA, then L is ccepted by UFA of t most 2 n sttes. The reverse w R of string w is defined by ε R = ε nd (v) R = v R where Σ nd v Σ. The reverse of lnguge L is the lnguge L R defined by L R = {w R w L}. The reverse of n utomton N = (Q, Σ,, I, F ) is the NFA N R obtined from N by swpping the role of initil nd finl sttes nd by reversing ll the trnsitions. Formlly, we hve N R = (Q, Σ, R, F, I), where q R = {p Q q p } for ech stte q in Q nd ech symbol in Σ. The NFA N R ccepts the reverse of the lnguge L(N). Let N = (Q, Σ,, I, F ) be n NFA. We sy tht set S is rechble in N if there is string w in Σ such tht S = I w. Next, we sy tht set T is co-rechble in N if T is rechble in N R. In wht follows we re interesting in non-empty rechble nd co-rechble sets, nd we use the following nottion: R = {S Q S is rechble in N nd S }, () C = {T Q S is co-rechble in N nd T }. (2) The next observtion uses the notions of rechble nd co-rechble sets in n NFA to get chrcteriztion of unmbiguous utomt. Proposition 2. Let R nd C be the fmilies of non-empty rechble nd corechble sets in n NFA N. Then N is unmbiguous if nd only if S T for ech S in R nd ech T in C. Proof. (If) Assume tht S T for ech S in R nd ech T in C. Suppose for contrdiction, tht there is string w, on which N hs two distinct ccepting computtions. Let be the first symbol in w such tht fter reding, the two corresponding sttes in these computtions re distinct; denote the two sttes by p nd q, respectively. Then w = uv for some strings u nd v. Let S = I u nd T = F R v R. Then S R, T C, nd S T {p, q}, contrdiction. (Only if) For contrdiction, suppose tht N is unmbiguous nd there re two distinct sttes p, q in S T. Let S be rechble by u nd T be co-rechble by v. Then there re two distinct ccepting computtions on uv R u v : s p R f u v nd s 2 q R f 2 for some sttes s, s 2 in I nd f, f 2 in F, contrdiction. If N R is deterministic, then ech co-rechble set in N is of size one, nd we get the following result. Corollry 3. Let N be n NFA. If N R is deterministic, then N is unmbiguous. 4

5 Recll tht the stte complexity of regulr lnguge L, sc(l), is the smllest number of sttes in ny complete DFA ccepting the lnguge L. The stte complexity of regulr opertion is the mximl stte complexity of lnguges resulting from the opertion, considered s the function of stte complexities of the rguments. The nondeterministic stte complexity of lnguges nd opertions is defined nlogously using NFA representtion of lnguges. We define the unmbiguous stte complexity of regulr lnguge L, usc(l), s the smllest number of sttes in ny UFA for L. To prove tht DFA is miniml, we only need to show tht ll its sttes re rechble from the initil stte, nd tht no two distinct sttes re equivlent. To prove minimlity of NFAs, fooling set lower bound method my be used [2,8]. To prove lower bound for the size of UFA, method bsed on rnks of certin mtrices ws developed by Schmidt [22, Theorem 3.9], Leung [7, Theorem 2] nd Hromkovič et l. [2]. We use it in the following sttement. Proposition 4 ([2,7,22]). Let L be ccepted by n NFA N. Let R nd C be the fmilies of non-empty rechble nd co-rechble sets in N, respectively. Let M N be the mtrix in which the rows re indexed by sets in R, the columns re indexed by sets in C, nd in the entry (S, T ), we hve / if S nd T re/ re not disjoint. Then usc(l) rnk(m N ). Proof. Let A be miniml UFA ccepting L. Consider mtrix M A, in which rows re indexed by the sttes of A nd columns re indexed by strings generting the co-rechble sets in C. The entry (q, w) is if w R is ccepted by A from q, nd it is otherwise. Then every row of M N is sum of the rows of M A corresponding to the sttes in S: Notice tht since A is UFA, for every column there is t most one such row tht contins. Thus every row of M N is liner combintion of rows in M A, nd therefore rnk(m N ) rnk(m A ) usc(l). Throughout our pper, we use the following observtion from [6] nd its corollry stted in the proposition below. Lemm 5 ([6, Lemm 3]). Let Q = n nd M n be 2 n 2 n mtrix over the field with chrcteristic 2 with rows nd columns indexed by non-empty subsets of Q such tht M n (S, T ) = if S T nd M n (S, T ) = otherwise. Then the rnk of M n is 2 n. Proposition 6. Let L be ccepted by n NFA N. Let R be the fmily of ll non-empty rechble sets in N. If ech non-empty set is co-rechble in NFA N, then usc(l) R. Proof. Consider the mtrix M N given by Proposition 4. Notice tht M N contins R rows of the mtrix M n given in Lemm 5. By Lemm 5, the rnk of M n is 2 n, so the rows of M n re linerly independent. Therefore ll the rows of M N must be linerly independent, nd we hve rnk(m N ) = R. Hence usc(l) rnk(m N ) = R by Proposition 4. 5

6 3 Opertions on Unmbiguous Finite Automt We strt with the reversl nd intersection opertions. Then we continue with left nd right quotients. Notice tht if n NFA N is unmbiguous then lso N R is unmbiguous. Hence we get the following result. Theorem 7 (Reversl). Let L be regulr lnguge. Then usc(l R ) = usc(l). Proof. If L is ccepted by n unmbiguous NFA N, then L R is ccepted by N R which is unmbiguous s well, nd hs the sme number of sttes s N. Hence usc(l R ) usc(l). On the other hnd, the lnguge L R cnnot be ccepted by ny smller UFA becuse otherwise the lnguge L = (L R ) R would be ccepted by smller UFA s well. Theorem 8 (Intersection). Let K nd L be lnguges over Σ with usc(k)=m nd usc(l) = n. Then usc(k L) mn, nd the bound is tight if Σ 2. Proof. To get the upper bound, let K nd L be ccepted m-stte nd n-stte UFAs A = (Q A, Σ, A, I A, F A ) nd B = (Q B, Σ, B, I B, F B ), respectively. Construct the product utomton N = (Q A Q B, Σ,, I A I B, F A F B ), where (p, q) = p A q B. Then N is n mn-stte UFA for K L. To prove tightness, consider lnguges K = {w {, b} # (w) = m }, nd L = {w {, b} # b (w) = n }, which re ccepted by UFAs A = ({,,, m }, {, b}, A, {}, {m }), where i A = i + if i m 2 nd i A b = i for ech stte i, nd B = ({,,, n }, {, b}, B, {}, {n }), where j B = j for ech j nd j B b = j + if j n 2, respectively. Construct the product utomton N s described bove, nd notice tht ech singleton set {(i, j)} is rechble nd co-rechble in N. Hence M N is n mn mn identity mtrix, nd the theorem follows by Proposition 4. The left quotient of lnguge L by string w is w\l = {x w x L}, nd the left quotient of lnguge L by lnguge K is the lnguge K\L = w K w\l. The stte complexity of the left quotient opertion is 2n [27], nd its nondeterministic stte complexity is n+ [4]. In both cses, the witness lnguges re defined over binry lphbet. Our next result shows tht the tight upper bound for UFAs is 2 n. To prove tightness we use binry lphbet. Theorem 9 (Left Quotient). Let K, L Σ, usc(k) = m, nd usc(l) = n. Then usc(k \ L) 2 n, nd the bound is tight if Σ 2. Proof. To get n upper bound, let A be n n-stte UFA for L. Construct n n- stte NFA N for K \ L from A by mking initil ll sttes of A tht re rechble from the initil set by some string in K. By Proposition, usc(k \ L) 2 n. For tightness, let K = { k k m } nd L be the lnguge ccepted by the n-stte DFA A = ({,,, n }, {, b}, {}, {,,, n }) shown in Fig.. Notice tht ech stte of A is rechble by some string in K. Construct n n-stte NFA N for K \ L from A by mking ll the sttes initil. Hence the initil set of N is {,,, n }. Next, we cn shift every rechble subset right 6

7 b b b n 2 n Fig.. The UFA of lnguge L with usc(k \ L) = 2 n, where K = m. by one (modulo n) by reding, nd we cn remove the stte n from ny subset contining stte n by reding b. Therefore ech non-empty set is rechble in N. To construct N R, we only need to reverse the trnsitions on in N. The initil subset of N R is {,,, n }, nd we cn gin shift ny subset nd remove one stte s before. It follows tht every non-empty set is rechble in N R, tht is, co-rechble in NFA N. By Proposition 6, we hve usc(k \ L) 2 n. The right quotient of lnguge L by string w is L/w = {x x w L}, nd the right quotient of lnguge L by lnguge K is L/K = w K L/w. If lnguge L is ccepted by n n-stte DFA or NFA A, then the lnguge L/K is ccepted by n utomton tht is exctly the sme s A, except for the set of finl sttes tht consists of ll sttes of A, from which some string in K is ccepted by A [27]. Thus sc(l/k) n nd nsc(l/k) n. The tightness of the first upper bound hs been shown using binry lnguges in [27]. The second upper bound is met by unry lnguges m nd n. Our next im is to show tht the tight upper bound for unmbiguous finite utomt is 2 n, with witnesses defined over binry lphbet. Theorem (Right Quotient). Let K, L Σ, usc(k) = m, nd usc(l) = n. Then usc(l / K) 2 n, nd the bound is tight if Σ 2. Proof. To get n upper bound, let A be n n-stte UFA for L. Construct n n- stte NFA for L / K s described bove. By Proposition, usc(l / K) 2 n. To prove tightness, let K = { k k m } nd L be the lnguge ccepted by the n-stte NFA A = ({,,, n }, {, b}, {,,, n }, {n }) shown in Fig. 2. Since the utomton A R is deterministic, the NFA A is unmbiguous by Corollry 3. Since string in K is ccepted by A from ech stte of A, we construct n NFA N for L / K from A by mking ll the sttes of A finl. Notice tht we obtin the sme NFA s in the proof of the previous lemm, thus by the sme rguments usc(l / K) 2 n. b b b n 2 n Fig. 2. The UFA of lnguge L with usc(l / K) = 2 n, where K = m. 7

8 cd df df df d d, f d, f, c, c, c m c c, f c, f cf cf c c d d d b b b b, d b, d b, d n b cf c b Fig. 3. Witness UFAs for shuffle meeting the upper bound 2 mn (left) nd sketch of the resulting NFA N. Now let us continue with the shuffle nd conctention opertions. The shuffle of two strings u nd v over n lphbet Σ is defined s the set of strings u v = {u v u k v k u = u u k, v = v v k, u,, u k, v,, v k Σ }. The shuffle of lnguges K nd L over Σ is defined by KL = u K,v L u v. The stte complexity of the shuffle opertion on lnguges represented by incomplete deterministic utomt ws studied by Câmpenu et l. [3]. They proved tht 2 mn is tight upper bound for tht cse. Here we show tht the sme upper bound is tight lso for UFAs, nd to prove tightness, we use lmost the sme lnguges s in [3, Theorem ]. Up to our best knowledge, the problem is still open for complete deterministic utomt. Theorem (Shuffle). Let K, L Σ, usc(k) = m, nd usc(l) = n. Then usc(l K) 2 mn, nd the bound is tight if Σ 5. Proof. Let A = (Q A, Σ, A, I A, F A ) nd B = (Q B, Σ, B, I B, F B ) be m- nd n-stte UFAs for K nd L respectively. Then K L is ccepted by n mnstte NFA N = (Q A Q B, Σ,, I A I B, F A F B ), where for ech stte (p, q) in Q A Q B nd ech symbol in Σ, we hve (p, q) = (p A {q}) ({p} q B ). Hence usc(k L) 2 mn by Proposition. To prove tightness, let Σ = {, b, c, d, f}. Let K nd L be the regulr lnguges ccepted by DFAs A = ({,,, m }, Σ, A, {}, {m }) nd B = ({,,, n }, Σ, B, {}, {n }) shown in Fig. 3 (left); notice tht these DFAs re the sme s in [3, Theorem ] up to the position of finl sttes. Construct n NFA N for K L s described bove. Fig. 3 (right) shows sketch of the resulting NFA. It is shown in [3] tht ech non-empty set is rechble in N: The initil set {(, )} goes to the full set {,,, m } {,,, n } by c m d n, nd for ech subset S with (i, j) S, we hve S m i b n j f i b j = S \ {(i, j)}. Next, in N R we hve {(m, n )} R c m d n = {,,, m } {,,, n }, nd S R i b j f m i b n j = S \ {(i, j)} for ech subset S with (i, j) S. It follows tht ech non-empty set is co-rechble in N, so usc(l) 2 mn. 8

9 The conctention of lnguges K nd L is KL = {uv u K nd v L}. The stte complexity of conctention is m2 n 2 n, nd its nondeterministic stte complexity is m + n. In both cses, the witnesses re defined over binry lphbet [9,4,9,27]. In the next theorem we get tight upper bound for conctention on UFAs. To prove tightness, we use seven-letter lphbet. Theorem 2 (Conctention). Let K, L Σ, usc(k)=m, nd usc(l)= n, where m, n 2. Then usc(kl) 3/4 2 m+n, nd the bound is tight if Σ 6. Proof. Let A = (Q A, Σ, A, I A, F A ) nd B = (Q B, Σ, B, I B, F B ) be UFAs for lnguges K nd L, respectively. Let Q A = m, F A = k, Q B = n, I B = l. Construct n NFA N = (Q A Q B, Σ,, I, F B ) for KL, where for ech q in Q A Q B nd ech in Σ, q A, if q Q A nd q A F A = ; q = q A I B, if q Q A nd q A F A ; q B, if q Q B, nd { I A, if I A F A = ; I = I A I B, otherwise. Notice tht if set S is rechble in the NFA N nd S F A, then I B S. It follows tht the number of rechble sets is 2 m k 2 n +(2 m 2 m k )2 n l, which is mximl if l =. In such cse, this number equls (2 m + 2 m k )2 n, which is mximl if k =. After excluding the empty set, we get the upper bound. For tightness, let K nd L be lnguges over {, b, c, d, α, β, γ} ccepted by utomt A nd B shown in Fig. 4, where Q A = {q, q,, q m } nd Q B = {,,, n }. Notice tht A R nd B re deterministic, so A nd B re unmbiguous. Construct n NFA N for KL from utomt A nd B s described bove, tht is, by dding trnsitions on, b, c from stte q m 2 to stte, nd by dding trnsitions on α, β, γ from stte q m to stte. The initil stte of N is q nd the unique finl stte is n. α, β, γ, b, c, d α, β, γ, d α, β, γ, d α, β, γ q, b q, b, c, b, c q m 2, b, c q m, b, c, d, β, b, c, d, γ, b, c, d, γ, b, c, d, γ α α, β α, β n 2 α, β n α, β Fig. 4. Witness UFAs for conctention meeting the upper bound 3/4 2 m+n. 9

10 First, let us show tht the fmily of ll the non-empty sets tht re rechble in N contins ech subset S T, where S Q A, T Q B nd if q m S then T. Consider severl cses: () Let S = {q m } T, where T Q B nd T. The set {q m, } is reched from the initil set {q } by m. Next, ech set {q m,, j 2,, j k } of size k + is reched from the set {q m,, j 3 j 2 +,, j k j 2 + } of size k by the string αβ j 2. This proves cse () by induction. (2) Let S Q A, T Q B, nd T. The set {q } T is reched by from the set {q m } T which is considered in cse (). Next, in the NFA A, ech subset S of Q A with q / S is reched from set S of the sme size nd with S by string in, nd ech set such set S is reched from smller set by string in cb. This proves cse (2) by induction since there is loop on, b, c in ech stte of T, nd we hve T. (3) Let S Q A nd q m / S. Let T Q B nd / T. Then the set S T is reched by γ from the set S T {} which is considered in cse (2). It follows tht N hs 3/4 2 m+n non-empty rechble sets. Now let us show tht ech non-empty set is co-rechble in N. First, notice tht in B R, we cn shift ech set cycliclly by using string in α, nd we cn eliminte stte from ech set contining using γ. This mens tht ech subset of Q B is reched from Q B in B R. Similrly, ech string in performs cyclic shift of ny set in A R. Next, we cn eliminte stte q i from ny set S contining the stte q i nd stte q j with j > i: We shift S cycliclly so tht stte q i is moved to q, then we use string in c + to merge originl sttes q i nd q j. After tht reding string in results in eliminting the stte q i from the originl set S. Therefore, ech non-empty subset of Q A is rechble from Q A in A R. The empty set is reched from {q } by c in A R. It follows tht for ech S Q A with q m S nd ech T Q B, there exist string u S over {, c} nd string v T over {α, γ} such tht in N R, we hve {n } αn m α Q A {n } u S S {n } αn β n u S Q T B S T ; recll tht there is loop on, b, c in ech stte of Q B, nd there is loop on α, β, γ in ech stte of Q A. Next if q m / S, then for ech T Q B the set S T is reched from S {q m } T by d since we hve loop on d in ech stte of A nd B, except for stte q m. Hence ech non-empty set is co-rechble in NFA N, nd our proof is complete. Now we consider the Kleene closure (str) nd positive closure opertions. For lnguge L, the str of L is the lnguge L = i Li, where L = {ε} nd L i+ = L i L. The positive closure of L is L + = i Li. The stte complexity of the str opertion is 3/4 2 n with binry witness lnguges [9,27]. In the unry cse, the tight upper bound is (n ) 2 + [4,27]. The nondeterministic stte complexity of str is n +, with witnesses defined over unry lphbet [9]. We first consider the positive closure of UFA lnguges, nd we get tight upper bound 3/4 2 n on its complexity. Our worst-cse exmple is defined over ternry lphbet.

11 Theorem 3 (Positive Closure). Let L be lnguge over Σ with usc(l) = n, where n 2. Then usc(l + ) 3/4 2 n, nd the bound is tight if Σ 3. Proof. To get n upper bound, let A = (Q, Σ,, I, F ) be n n-stte UFA for L. Construct n NFA N = (Q, Σ, +, I, F ) for L + where the trnsition function + is defined s{ q I, if q F ; q + = q, otherwise for ech stte q in Q nd ech symbol in Σ. Notice tht if set S is rechble in N nd S F, then I S. Hence set contining some finl stte of A nd not contining some initil stte of A cnnot be rechble in N. Denote this fmily of unrechble sets by Unrech. Let us count the number of such sets. To this im, denote I \ F = i, I F = j, nd F \ I = k. Since A is unmbiguous, we must hve j. Consider three cses: () Let j =. Then we must hve i, k since A hs t lest one initil nd t lest one finl stte. A set in Unrech contins non-empty subset of F, non-universl subset of I, nd ny subset of the remining sttes. Thus we hve Unrech = (2 i )(2 k )2 n i k = ( 2 i )( 2 k )2n /4 2 n. (2) Let j = nd i = k =. Then A hs one initil stte, which is lso the only finl stte of A. Then L = L +, nd so usc(l + ) = usc(l). (3) Let j = nd let t lest one of i, k be positive. A set in Unrech which contins the unique initil nd finl stte must contin non-universl subset of I \ F. A set which does not contin this stte must contin non-empty subset of F \ I. Thus we hve Unrech = ( (2 i )2 k + 2 i (2 k ) ) 2 n i k = ( 2 k+ 2 i+ ) 2 n /4 2 n. In cse (2), we hve n 3/4 2 n since n 2. Next, in cses () nd (3), t lest /4 2 n subsets re unrechble. The empty subset is not in Unrech. It follows tht there re t most 3/4 2 n rechble non-empty subsets in N. This proves the upper bound. To prove tightness, let L be the lnguge ccepted by the ternry DFA A shown in Fig. 5 (top). Construct the NFA N for L + s described bove. Notice tht the DFA A restricted to the lphbet {, b} is the sme s the witness DFA for the str opertion from [27, Theorem 3.3, Fig. 4] In prticulr, this mens tht N hs 3/4 2 n non-empty rechble subsets. Let us show tht ech non-empty set is co-rechble in N. To this im, we use only the trnsitions on nd c. Fig. 5 (bottom) shows these trnsitions in N R. Notice, tht we cn shift ech subset S of {,,, n } cycliclly by one to the set {(s ) mod n s S}: we use if / S or if both nd n re in S, nd we use c otherwise. Next, we cn eliminte stte i from ny set contining sttes i nd i +. It follows tht ech non-empty set is rechble from {,,, n } in N R. To conclude the proof, notice tht the initil set {n } of N R goes to {,,, n } by the string n2.

12 bc c c c, b, b, b, b n 3 n 2 n b c c c c n 3 n 2 n c Fig. 5. The witness UFA for positive closure meeting the upper bound 3/4 2 n (top), nd the trnsitions on, c in the NFA N R (bottom). Finlly, let us show tht the tight upper bound for str on UFAs is 3/4 2 n, nd tht it is met by the lnguge ccepted by the UFA shown in Fig. 5 (top). Theorem 4 (Str). Let L be regulr lnguge over Σ with usc(l) = n, where n 2. Then usc(l ) 3/4 2 n, nd the bound is tight if Σ 3. Proof. The upper bound follows from the previous theorem since if ε L, then L + = L, nd otherwise we only need to dd one more initil nd finl stte to the UFA for L + to ccept the empty string. The resulting utomton is unmbiguous since the new stte ccepts only the empty string which is not ccepted by UFA for L +. For tightness, consider the lnguge L ccepted by the UFA A shown in Fig. 5 (top). Construct n NFA N for L from UFA A by dding new initil nd finl stte q, nd by dding the trnsitions on, b from n 2 to, nd the trnsition by c from n to. As shown in [27, Theorem 3.3] the NFA N hs 3/4 2 n rechble sets: the initil set {q, }, ll the subsets of {,,, n } contining stte, nd ll the non-empty subsets of {, 2,, n 2}. Next, consider the NFA N R. The initil set of N R is {q, n }. Next, s we hve shown in the proof of Theorem 3, ech non-empty set is rechble in N R. Now consider the 3/4 2 n 2 n mtrix M N. {q, n } T {n } T = {n } {q, } S n S S n / S Tble. Mtrix M N for NFA N for the str of the lnguge from Fig. 5 (top). 2

13 Assume tht the first row is indexed by {q, }, then there re rows indexed by rechble sets contining n, nd then by rechble sets not contining n. Next, ssume tht the first column is indexed by the initil co-rechble set {q, n }, the lst column is indexed by {n }, nd ll the remining columns re indexed by the remining co-rechble sets. This is illustrted in Tble. Then the rnk of the sub-mtrix obtined from M N by removing the first row nd the first column is 3/4 2 n. Next, notice tht the first nd the lst columns differ only in the entry in the first row. Hence the first row cnnot be expressed s liner combintion of ny others rows. Therefore rnk(m N ) = 3/4 2 n, nd the theorem follows by Proposition 4. 4 Prtil Results for Complementtion nd Union In this section we present prtil results for the complementtion nd union opertions on UFA lnguges. The complement of lnguge L over Σ is the lnguge L c = Σ \ L. A lnguge nd its complement hve the sme stte complexity since to get DFA for the complement of L, we only need to interchnge the sets of finl nd non-finl sttes in DFA for L. For NFAs, the tight upper bound for complementtion is 2 n with witnesses defined over binry lphbet [9,4]. For unry UFAs, the problem ws studied by Okhotin who provided lower bound n 2 o() for complementtion of unry UFAs [2, Theorem 6]. In the next theorem we del with n upper bound. Then we consider union. Theorem 5 (Complementtion: Upper Bound). Let L be regulr lnguge with usc(l) = n, where n 7. Then usc(l c ) 2.79n+log n. Proof. Let A be n n-stte UFA for L nd R nd C be the sets of non-empty rechble nd co-rechble sets of A. First, we show tht usc(l c ) min{ R, C }. We hve usc(l c ) R since we cn get DFA for L c by pplying the subset construction to A nd by interchnging the sets of finl nd non-finl sttes in the resulting DFA tht hs R rechble sttes. Next, we hve usc(l c ) C since the NFA A R is unmbiguous, so usc((l R ) c ) C which mens tht usc(l c ) C since complement nd reversl commutes nd the reverse of UFA is UFA. Next, let k = mx{ X X R}, nd pick set S in R of size k. Then ech set in R hs size t most k, nd ech set in C my hve t most one element in S by Proposition 2. Thus R ( ) n + ( ) n ( ) n nd C (k + )2 n k. k If k n/2, then C (n/2 + ) 2 n/2 2.5n+log n, nd the theorem follows. Now ssume tht k < n/2. Then R k ( ) n k n( en k )k nd C n2 n k. Let r(k) = n( en k )k nd c(k) = n2 n k. Then r(k) increses, while c(k) decreses with k. It follows tht if we pick k such tht k < n/2, then usc(l c ) r(k ) if k k, nd usc(l c ) c(k ) otherwise. By setting k = nx nd by solving ( en nx )nx = 2 n nx, we get x =.244, k =.244n, r(k ) n+log n, nd c(k ) n+log n. This completes our proof. 3

14 b b b p p p 2 p m d d d q c q c q 2 c c q n c Fig. 6. The UFAs for union meeting the bound mn + m + n; the loops on c, d resp. on, b in ech stte of A nd B, respectively, re not displyed. Proposition 6 (Union). Let K nd L be lnguges over Σ with usc(k) = m nd usc(l) = n, where m n. Then () usc(k L) m + n usc(k c ) m + n2.79n+log n ; (b) the bound mn + m + n is met if Σ 7. Proof. () The clim follows from the equlity K L = K (L K c ), where denotes disjoint union, since we hve usc(l K c ) n usc(l c ) by Theorem 8, nd, moreover, the NFA for disjoint union of UFAs is unmbiguous. The second inequlity is given by Theorem 5. (b) Let K nd L be the lnguges over {, b, c, d} ccepted by DFAs A nd B, such tht we hve loop on c, d in ech stte of A nd loop on, b in ech stte of B; the remining trnsitions re shown in Fig. 6. Construct n NFA N for K L from A nd B so tht the set of initil sttes is {p, q } nd the set of finl sttes is {p,, p m, q,, q n }. Then the sets {p i, q j }, {p i }, {q j } with i m nd j n re rechble in N. To conclude the proof notice tht ech set is co-rechble in N since we cn shift ny set in A cycliclly by reding nd eliminte one stte by reding b, while ech stte of B remins in itself. The sme cn by done symmetriclly with the sets in B. 5 Conclusions We investigted the complexity of bsic regulr opertions on lnguges represented by unmbiguous finite utomt. Since the reverse of n unmbiguous utomton is unmbiguous, lnguge nd its reversl hve the sme complexity for UFAs. Next, we obtined tight upper bounds for intersection (mn), left nd right quotients (2 n ), positive closure (3/4 2 n ), str (3/4 2 n ), shuffle (2 mn ), nd conctention (3/4 2 m+n ). To get upper bounds, we constructed n NFA for the lnguge resulting from n opertion, nd pplied the (incomplete) subset construction to it. For lower bounds, we defined witness lnguges in such wy tht we were ble to ssign mtrix to resulting lnguge. The rnk of this mtrix provided lower bound on the unmbiguous stte complexity of the resulting lnguge. 4

15 To prove tightness, we used binry lphbet for intersection nd left nd right quotients, ternry lphbet for str nd positive closure, five-letter lphbet for shuffle, nd seven-letter lphbet for conctention. For complementtion nd union, we provided upper bounds 2.79 n+log n nd m + n2.79 n+log n, respectively. Finlly, we got lower bound mn + m + n for union in the quternry cse. The exct complexity of complementtion nd union on UFAs remins open. All our result re summrized nd compred to the known results on the stte complexity nd nondeterministic stte complexity of the considered opertions in Tble 2. In the cse of complementtion, we tried to use fooling set lower bound method, but we were ble to describe fooling set for the complement of n n-stte UFA lnguge only of size n + log n. Moreover, it seems tht every such fooling set is of size which is liner in n [7]. Thus the fooling set technique cnnot be used to get lrger lower bound. Neither the method bsed on the rnk of mtrices cn be used here since the mtrices of lnguge nd its complement hve the sme rnk, up to one. Therefore, to get lrger lower bound for complementtion, some other techniques should be developed. sc Σ nsc Σ usc Σ reversl 2 n 2 n + 2 n intersection mn 2 mn 2 mn 2 left quotient 2 n 2 n n 2 right quotient n n 2 n 2 positive closure 3/4 2 n 2 n 3/4 2 n 3 str 3/4 2 n 2 n + 3/4 2 n 3 shuffle 2 (m )(n ) 5 mn 2 2 mn 5 conctention (m /2) 2 n 2 m + n 2 3/4 2 m+n 7 complement n 2 n n+log n n 2 ϵ [2] union mn 2 m + n + 2 m + n2.79n+log n mn + m + n 4 Tble 2. The complexity of regulr opertions: stte complexity, nondeterministic stte complexity, unmbiguous stte complexity, nd the sizes of lphbets for worst-cse exmples. References. Alluzen, C., Mohri, M., Rstogi, A.: Generl lgorithms for testing the mbiguity of finite utomt nd the double-tpe mbiguity of finite-stte trnsducers. Int. J. Found. Comput. Sci. 22(4), (2), S

16 2. Birget, J.: Prtil orders on words, miniml elements of regulr lnguges nd stte complexity. Theor. Comput. Sci. 9(2), (993), 6/ (93)96-U 3. Câmpenu, C., Slom, K., Yu, S.: Tight lower bound for the stte complexity of shuffle of regulr lnguges. Journl of Automt, Lnguges nd Combintorics 7(3), 33 3 (22) 4. Čevorová, K.: Kleene str on unry regulr lnguges. In: Jürgensen, H., Reis, R. (eds.) Descriptionl Complexity of Forml Systems - 5th Interntionl Workshop, DCFS 23, London, ON, Cnd, July 22-25, 23. Proceedings. Lecture Notes in Computer Science, vol. 83, pp Springer (23), 5. Chn, T., Ibrr, O.H.: On the finite-vluedness problem for sequentil mchines. Theor. Comput. Sci. 23, 95 (983), (88) Colcombet, T.: Unmbiguity in utomt theory. In: Shllit, J., Okhotin, A. (eds.) Descriptionl Complexity of Forml Systems - 7th Interntionl Workshop, DCFS 25, Wterloo, ON, Cnd, June 25-27, 25. Proceedings. Lecture Notes in Computer Science, vol. 98, pp Springer (25), 7/ _ 7. Eliáš, P.: Fooling sets for complements of UFA lnguges. Unpublished mnuscript (26) 8. Glister, I., Shllit, J.: A lower bound technique for the size of nondeterministic finite utomt. Inf. Process. Lett. 59(2), (996), 6/2-9(96) Holzer, M., Kutrib, M.: Nondeterministic descriptionl complexity of regulr lnguges. Int. J. Found. Comput. Sci. 4(6), 87 2 (23), Hopcroft, J.E., Ullmn, J.D.: Introduction to Automt Theory, Lnguges nd Computtion. Addison-Wesley (979). Hromkovič, J., Schnitger, G.: Ambiguity nd communiction. Theory Comput. Syst. 48(3), (2), 2. Hromkovič, J., Seibert, S., Krhumäki, J., Kluck, H., Schnitger, G.: Communiction complexity method for mesuring nondeterminism in finite utomt. Inf. Comput. 72(2), (22), 3. Ibrr, O.H., Rvikumr, B.: On sprseness, mbiguity nd other decision problems for cceptors nd trnsducers. In: Monien, B., Vidl-Nquet, G. (eds.) STACS 86, 3rd Annul Symposium on Theoreticl Aspects of Computer Science, Orsy, Frnce, Jnury 6-8, 986, Proceedings. Lecture Notes in Computer Science, vol. 2, pp Springer (986), Jirásková, G.: Stte complexity of some opertions on binry regulr lnguges. Theor. Comput. Sci. 33(2), (25), Leiss, E.L.: Succint representtion of regulr lnguges by boolen utomt. Theor. Comput. Sci. 3, (98), S (8) Leung, H.: Seprting exponentilly mbiguous finite utomt from polynomilly mbiguous finite utomt. SIAM J. Comput. 27(4), (998), dx.doi.org/.37/s

17 7. Leung, H.: Descriptionl complexity of nf of different mbiguity. Int. J. Found. Comput. Sci. 6(5), (25), S Lupnov, O.B.: A comprison of two types of finite utomt. Problemy Kibernetiki 9, Kibernetiki (963), (in Russin) Germn trnsltion: Über den Vergleich zweier Typen endlicher Quellen. Probleme der Kybernetik 6, (966) 9. Mslov, A.N.: Estimtes of the number of sttes of finite utomt. Soviet Mth. Dokldy, (97) 2. Okhotin, A.: Unmbiguous finite utomt over unry lphbet. Inf. Comput. 22, 5 36 (22), 2. Rvikumr, B., Ibrr, O.H.: Relting the type of mbiguity of finite utomt to the succinctness of their representtion. SIAM J. Comput. 8(6), (989), Schmidt, E.M.: Succinctness of description of context-free, regulr, nd finite lnguges. Ph. D. thesis. Cornell University (978) 23. Sipser, M.: Introduction to the theory of computtion. PWS Publishing Compny (997) 24. Sterns, R.E., Hunt, H.B.: On the equivlence nd continment problems for unmbiguous regulr expressions, regulr grmmrs nd finite utomt. SIAM J. Comput. 4(3), (985), Weber, A., Seidl, H.: On the degree of mbiguity of finite utomt. Theor. Comput. Sci. 88(2), (99), B 26. Yu, S.: Hndbook of Forml Lnguges: Volume Word, Lnguge, Grmmr, chp. Regulr Lnguges, pp. 4. Springer Berlin Heidelberg, Berlin, Heidelberg (997), Yu, S., Zhung, Q., Slom, K.: The stte complexities of some bsic opertions on regulr lnguges. Theor. Comput. Sci. 25(2), (994), doi.org/.6/ (92)-f 7

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

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

More information

Theory of Computation Regular Languages

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

More information

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

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

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

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

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

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

More information

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

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

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

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

More information

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

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

More information

CS375: Logic and Theory of Computing

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

More information

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

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

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

More information

Finite-State Automata: Recap

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

More information

Lecture 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

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

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

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

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

More information

Convert the NFA into DFA

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

More information

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

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

The Magic Number Problem for Subregular Language Families

The Magic Number Problem for Subregular Language Families The Mgic Number Problem for Subregulr Lnguge Fmilies Mrkus Holzer Sebstin Jkobi Mrtin Kutrib Institut für Informtik, Universität Giessen, Arndtstr. 2, 35392 Giessen, Germny emil: {holzer,jkobi,kutrib}@informtik.uni-giessen.de

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

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

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

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

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

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

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

NFAs continued, Closure Properties of Regular Languages

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

More information

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

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

More information

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

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

More information

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

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

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

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

CSCI FOUNDATIONS OF COMPUTER SCIENCE

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

More information

Minimal DFA for Symmetric Difference NFA

Minimal DFA for Symmetric Difference NFA Miniml DFA for Symmetric Difference NFA Brink vn der Merwe 1, Hellis Tmm 2, nd Lynette vn Zijl 1 1 Deprtment of Computer Science Stellenbosch University, Privte Bg X1, 7602 Mtielnd, South Afric bvdm@cs.sun.c.z,lvzijl@sun.c.z

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

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

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

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

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

More information

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

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

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

Prefix-Free Subsets of Regular Languages and Descriptional Complexity

Prefix-Free Subsets of Regular Languages and Descriptional Complexity Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek Jurj Šeej DCFS 2015 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 1/22 Outline Mximl

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

Operations on Unambiguous Finite Automata

Operations on Unambiguous Finite Automata Mathematical Institute, Slovak Academy of Sciences, Košice, Slovakia Joint work with Jozef Jirásek, Jr, and Juraj Šebej DLT 2016, Montréal, Québec, Canada Nondeterministic and Deterministic Finite Automata

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

Convex Sets and Functions

Convex Sets and Functions B Convex Sets nd Functions Definition B1 Let L, +, ) be rel liner spce nd let C be subset of L The set C is convex if, for ll x,y C nd ll [, 1], we hve 1 )x+y C In other words, every point on the line

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

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

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

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

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

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

More information

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

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

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

More information

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

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

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

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

More information

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

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below.

Duality # Second iteration for HW problem. Recall our LP example problem we have been working on, in equality form, is given below. Dulity #. Second itertion for HW problem Recll our LP emple problem we hve been working on, in equlity form, is given below.,,,, 8 m F which, when written in slightly different form, is 8 F Recll tht we

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

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

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

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

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

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

More information

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

Relating logic to formal languages

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

More information

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

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

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

More information

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

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

Here we study square linear systems and properties of their coefficient matrices as they relate to the solution set of the linear system.

Here we study square linear systems and properties of their coefficient matrices as they relate to the solution set of the linear system. Section 24 Nonsingulr Liner Systems Here we study squre liner systems nd properties of their coefficient mtrices s they relte to the solution set of the liner system Let A be n n Then we know from previous

More information

CSC 473 Automata, Grammars & Languages 11/9/10

CSC 473 Automata, Grammars & Languages 11/9/10 CSC 473 utomt, Grmmrs & Lnguges 11/9/10 utomt, Grmmrs nd Lnguges Discourse 06 Decidbility nd Undecidbility Decidble Problems for Regulr Lnguges Theorem 4.1: (embership/cceptnce Prob. for DFs) = {, w is

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

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

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

More information

CS 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

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

CS 275 Automata and Formal Language Theory

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

More information

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

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

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

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

More information

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata

5.1 Definitions and Examples 5.2 Deterministic Pushdown Automata CSC4510 AUTOMATA 5.1 Definitions nd Exmples 5.2 Deterministic Pushdown Automt Definitions nd Exmples A lnguge cn be generted by CFG if nd only if it cn be ccepted by pushdown utomton. A pushdown utomton

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

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

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

A tutorial on sequential functions

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

More information

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

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

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

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

More information

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

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

More information

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1

a,b a 1 a 2 a 3 a,b 1 a,b a,b 2 3 a,b a,b a 2 a,b CS Determinisitic Finite Automata 1 CS4 45- Determinisitic Finite Automt -: Genertors vs. Checkers Regulr expressions re one wy to specify forml lnguge String Genertor Genertes strings in the lnguge Deterministic Finite Automt (DFA) re nother

More information

Bases for Vector Spaces

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

More information

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

New Expansion and Infinite Series

New Expansion and Infinite Series Interntionl Mthemticl Forum, Vol. 9, 204, no. 22, 06-073 HIKARI Ltd, www.m-hikri.com http://dx.doi.org/0.2988/imf.204.4502 New Expnsion nd Infinite Series Diyun Zhng College of Computer Nnjing University

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

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, section 003, George Mson University, Fll 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Septemer 7 1. Prove (p q) (p q), () (5pts) using truth tles. p q

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

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