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 Suffix-Free Lnguges
Outline DFAs nd NFAs Miniml Automt Suffix Free Lnguges Desriptionl Complexity of Intersetion nd Union Summry nd Open Prolems Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Deterministi nd Nondeterministi Finite Automt Exmple (DFA A = (Q,Σ,δ,s,F)) A 0 1 2 Q = {0,1,2} Σ = {,} δ : Q Σ Q s = 0 F = {0,2} (omplete) L(A) = {w {,} the numer of s in w is even} Exmple (NFA M 3 = (Q,Σ,δ,s,F)) M 3, 0 Q = {0,1,2,3} Σ = {,} δ : Q Σ 2 Q s = 0, 1 2, F = {3} (ε-free, single initil stte) L 3 = {w {,} w ontins n in the third position from the end} 3 Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Miniml Deterministi Finite Automt Automt A nd B re equivlent if L(A) = L(B). A df A is miniml if every equivlent df hs t lest s mny sttes s A. Exmple A 0 1 2 L(A) = {w {,} # (w) is even} B 0 1 2 L(A) = L(B) 3, Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Miniml Deterministi Finite Automt Automt A nd B re equivlent if L(A) = L(B). A df A is miniml if every equivlent df hs t lest s mny sttes s A. Exmple A 0 1 2 L(A) = {w {,} # (w) is even} B 0 1 2 L(A) = L(B) 3, Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Miniml Deterministi Finite Automt Automt A nd B re equivlent if L(A) = L(B). A df A is miniml if every equivlent df hs t lest s mny sttes s A. Exmple A 0 1 2 L(A) = {w {,} # (w) is even} Theorem A df is miniml if (1) eh stte is rehle, (2) no two sttes re equivlent. 0 1 The miniml df epting L(A). Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Miniml Deterministi Finite Automt Automt A nd B re equivlent if L(A) = L(B). A df A is miniml if every equivlent df hs t lest s mny sttes s A. Exmple A 0 1 2 L(A) = {w {,} # (w) is even} The stte omplexity of L is the numer of sttes in the miniml DFA for L. 0 1 The stte omplexity of L(A) is 2. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Fooling-Set Lower-Bound Method A set of pirs of strings {(x 1,y 1 ),(x 2,y 2 ),...,(x n,y n )} is fooling set for L, if (F1) x i y i L for ll i, (F2) if i j, then x i y j / L or x j y i / L. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Fooling-Set Lower-Bound Method A set of pirs of strings {(x 1,y 1 ),(x 2,y 2 ),...,(x n,y n )} is fooling set for L, if (F1) x i y i L for ll i, (F2) if i j, then x i y j / L or x j y i / L. Exmple Σ = {,,m,n} L = n(m+) A = {( ε,nm), ( n, m ), ( n, m )} is fooling set for L. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Fooling-Set Lower-Bound Method A set of pirs of strings {(x 1,y 1 ),(x 2,y 2 ),...,(x n,y n )} is fooling set for L, if (F1) x i y i L for ll i, (F2) if i j, then x i y j / L or x j y i / L. Lemm (Aho 83, Birget 92) If A is fooling set for L, then every NFA epting L hs t lest A sttes. Exmple Σ = {,,m,n} L = n(m+) A = {( ε,nm), ( n, m ), ( n, m )} is fooling set for L. The nondeterministi stte omplexity of L is 3. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Cross-Produt Automton for Intersetion nd Union Given DFAs A = (Q A,Σ,δ A,s A,F A ) B = (Q B,Σ,δ B,s B,F B ) their ross-produt utomton is (Q,Σ,δ,s,F) with Q = Q A Q B δ((p,q),) = (δ A (p,),δ B (q,)) s = (s A,s B ) F = F A F B for intersetion F = (F A Q B ) (Q A F B ) for union Exmple (Σ = {,,m,n}) A B n m q, 1 q 2 q 3 q 4 m,n L(A) L(B) = { nm } ded p 1 q 2 p 1 q 3 p 1 q 4 p 1 d p 2 q 1 p 2 q 2 p 2 q 3 p 2 q 4 p 2 d m,m p p 3 p 3 q 3 q q m 1 3 p 3 q,m 2 4 p 3 d m,n d q 1 m,,,m,n p n n, 1 p 2 p 3 ded,,m,n p q 1 1 n m q q q, d 2 d 3 d 4 d d m,n,,m,n Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Cross-Produt Automton for Intersetion nd Union Given DFAs A = (Q A,Σ,δ A,s A,F A ) B = (Q B,Σ,δ B,s B,F B ) their ross-produt utomton is (Q,Σ,δ,s,F) with Q = Q A Q B δ((p,q),) = (δ A (p,),δ B (q,)) s = (s A,s B ) F = F A F B for intersetion F = (F A Q B ) (Q A F B ) for union Exmple (Σ = {,,m,n}) A B L(A) n m q, 1 q 2 q 3 q 4 m,n ded = n(m+)* n*m p 1 q 2 p 1 q 3 p 1 q 4 p 1 d p 2 q 1 p 2 q 2 p 2 q 3 p 2 q 4 p 2 d m,m p 3 q 1 p 3 q m 2 p 3 q 3 p 3 q,m 4 p 3 d m,n d q 1 m,,,m,n p n n, 1 p 2 p 3 ded,,m,n p q 1 1 n L(B) m q 2 q, d d 3 d q 4 d d m,n,,m,n Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Outline Suffix Free Lnguges Desriptionl Complexity of Intersetion nd Union Summry nd Open Prolems Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Suffix-Free Regulr Lnguges A regulr lnguge L is suffix-free if there re no two different strings u nd v in L suh tht u= wv. Exmple m,,,m,n n n, A p 1 p 2 p 3 ded,,m,n L(A) = n(m+)* B n m q, 1 q 2 q 3 q 4 m,n ded L(B) = n*m Theorem (Hn, Slom 2008) In the miniml (omplete) DFA for suffix free lnguge, there is ded stte; no trnsition goes to the initil stte. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Stte Complexity of Opertions on Suffix-Free Lnguges (Hn, Slom 2008) Opertion Suffix-Free Σ Regulr Σ L 2 n 2 + 1 4 2 n 1 + 2 n 2 2 L R 2 n 2 + 1 3 2 n 2 K L (m 1)2 n 2 + 1 4 (m 1)2 n + 2 n 1 2 K L mn 2(m + n) + 6 3 mn 2 K L mn (m + n) + 2 5 mn 2 Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Binry Worst-Cse Exmples Exmple (Str, Mslov 1970) 1 2 3... n 1 n 2 n 1 + 2 n 2 Exmple (Reversl, Leiss 1981) 1 2 3... n 1 n 2 n Exmple (Contention) 1 2 3... m 1 m 1 2 3... n 1 n (m 1)2 n + 2 n 1 Exmple (Union, Mslov 1970) 1 2 3... m 1 m 1 2 3... n 1 n mn Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Stte Complexity of Opertions on Suffix-Free Lnguges Opertion Suffix-Free Σ Regulr Σ L 2 n 2 + 1 4 2 n 1 + 2 n 2 2 L R 2 n 2 + 1 3 2 n 2 K L (m 1)2 n 2 + 1 4 (m 1)2 n + 2 n 1 2 K L mn 2(m + n) + 6 3 mn 2 K L mn (m + n) + 2 5 mn 2 A B m,,,m,n p n n, 1 p 2 p 3 ded,,m,n n m q, 1 q 2 q 3 q 4 m,n Upper ounds on ded L(A) L(B) nd L(A) L(B) p q p 1 q 2 p 1 q 3 p 1 q 1 1 4 p 1 d n p 2 q 1 p 2 q 2 p 2 q 3 p 2 q 4 p 2 d m,m p p 3 p 3 q 3 q q m 1 2 3 p 3 q,m 4 p 3 d m,n m d q q q q, 1 d 2 d 3 d 4 d d m,n,,m,n Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Our Results on Binry Suffix-Free Regulr Lnguges Theorem (Stte omplexity of intersetion) The upper ound mn 2(m + n) + 6 on the stte omplexity of intersetion of suffix-free lnguges is tight in the inry se. Theorem (Stte omplexity of union) The upper ound mn (m + n) + 2 on the stte omplexity of union of suffix-free lnguges is tight in the inry se. Proof. Witness lnguges for oth opertions:, 1 2 3 4... m 1 m 1 2, 3, 4,,... n 1 n, Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Our Results on Binry Suffix-Free Regulr Lnguges II Theorem (Nondeterministi stte omplexity of intersetion) The nondeterministi stte omplexity of intersetion of inry suffix-free lnguges is mn (m + n) + 2. 1 2 3... m 1 m 1 2, 3,,..., n 1 n Theorem (Nondeterministi stte omplexity of union) The nondeterministi stte omplexity of union of inry suffix-free lnguges is m + n 1. 1 2... m 1 m 1 2... n 1 n Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Intersetion nd Union of Suffix-Free Lnguges: Not Only Worst Cses Miniml suffix free Miniml suffix free m stte DFA for K n stte DFA for L Miniml DFA for K L ( for K L )??? sttes Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Intersetion nd Union of Suffix-Free Lnguges: Not Only Worst Cses Miniml suffix free Miniml suffix free Miniml suffix free Miniml suffix free m stte DFA for K n stte DFA for L m stte NFA for K n stte NFA for L Miniml DFA for K L ( for K L )??? sttes Miniml NFAs for K L ( for K L )??? sttes Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Intersetion nd Union of Suffix-Free Lnguges: Not Only Worst Cses Miniml suffix free Miniml suffix free Miniml suffix free Miniml suffix free m stte DFA for K n stte DFA for L m stte NFA for K n stte NFA for L Miniml DFA for K L ( for K L )??? sttes Theorem (Deterministi se) The size of miniml DFA for K L my e 1,2,...,mn 2(m + n) + 6 for ternry lphet. The size of miniml DFA for K L my e 1,2,...,mn 2(m + n) + 6 for ternry lphet. Miniml NFAs for K L ( for K L )??? sttes Theorem (Nondeterministi se) The size of miniml NFA for K L my e 1,2,...,mn (m + n) + 2 for four-letter lphet. The size of miniml NFA for K L my e 2,3,...,m + n 1 for ternry lphet. Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Outline Summry nd Open Prolems Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Summry nd Open Prolems Our Results on Binry Suffix-Free Lnguges: Binry Suffix-Free Binry Regulr s(intersetion) mn 2(m + n) + 6 mn s(union) mn (m + n) + 2 mn ns(intersetion) mn (m + n) + 2 mn ns(union) m + n 1 m + n + 1 Are There Any Holes? s Σ ns Σ K L 1..mn 2(m + n) + 6 3 1..mn (m + n) + 2 4 K L 1..mn 2(m + n) + 6 3 2..m + n 1 3 Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges
Thnk You for Your Attention Glin Jirásková nd Pvol Olejár Binry Suffix-Free Lnguges