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 prefix-free susets Properties Constructing Susets of certin properties Stte complexity Non-regulr MPFS Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 2/22
DFA A = (Q, Σ, δ, s, F) Definitions We consider incomplete, trim DFAs. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 3/22
DFA A = (Q, Σ, δ, s, F) Definitions We consider incomplete, trim DFAs. u p v iff w: uw = v u < p v iff u p v nd u v (w ε) Set P is prefix-free iff u, v P: u v p Set P is mximl prefix-free suset of L iff: P L P is prefix-free u L: v P: u v or v u p p Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 4/22
Constructing MPFS Let A = (Q, Σ, δ, s, F); F' F Construct A F ' = (Q, Σ, δ', s, F') δ'(q, ) undefined if q F' s in A otherwise. L(A F ' ) is PFS of L(A) If q F \ F' rechle in A F ' : w ccepted from q in A F ' then L(A F ' ) is MPFS of L(A). 1 2 3 4 1 2 3 4 1 2 3 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 5/22
Constructing some PFS...remove ll strings which re proper prefixes? L 1 = L \ {w L v ε: wv L} A 1 = (Q, Σ, δ, s, F 1 ) F 1 = {q F w ε ccepted from q} 1 2 3 1 2 3 4 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 6/22
Results...remove ll strings which re proper prefixes? sc(l 1 ) sc(l) L unry: sc(l 1 ) = 1 or sc(l 1 ) = n 1 k n there is inry L with sc(l) = n nd sc(l 1 ) = k L 1 is PFS of L. If L is finite, L 1 is lrgest MPFS of L. Otherwise, L Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 7/22
Constructing some PFS...remove ll strings which hve proper prefix? L 2 = L \ {w L u L, v ε: w = uv} A 2 = (Q, Σ, δ 2, s, F) δ 2 undefined for q F, s in A otherwise. 1 2 3 1 2 3 4 4 Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 8/22
Results...remove ll strings which hve proper prefix? sc(l 2 ) sc(l) + 1 1 k n + 1 there is unry L with sc(l) = n nd sc(l 2 ) = k L 2 is MPFS of L. If L 2 is infinite, L does not hve ny finite MPFS. If L 2 is finite, it is smllest MPFS of L. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 9/22
Finding lrgest finite MPFS L hs oth finite nd infinite MPFS. We cn find the smllest (L 2 ), cn we find the lrgest finite MPFS? Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 10/22
Finding lrgest finite MPFS L hs oth finite nd infinite MPFS. We cn find the smllest (L 2 ), cn we find the lrgest finite MPFS? Yes we cn! Polynomil-time lgorithm which either: finds F' F, such tht L(A F ' ) is lrgest finite MPFS of L; or determines tht no lrgest finite MPFS of L exists. Only infinite MPFS. Finite MPFS of unlimited size. sc(l(a F ' )) sc(l) + 1 Reched for every 1 k n + 1 on unry lnguges. Construction in pper. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 11/22
Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (1) trnsition out of the cycle: Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 12/22
Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (1) trnsition out of the cycle: Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 13/22
Infinite MPFS Tsk: Find n infinite regulr MPFS of L = L(A). L infinite A contins cycle (2) no trnsition out of ny cycle: Only finite prefix-free sets! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 14/22
Stte complexity For every n 2, there exists lnguge L with sc(l) = n, such tht every infinite MPFS of L hs sc 2n.... For every n 4, there exists lnguge L with sc(l) = n, which hs infinite MPFS of unlimited sc. L = + { i i n 3} P k = + { k } sc(p k ) = k Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 15/22
Non-regulr MPFS of regulr lnguges Regulr lnguge L with non-regulr MPFS: L = ** P = { n n n > 0} Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 16/22
Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } P = {w P u L: w < p u} Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 17/22
Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } P = {w P u L: w < p u} Assume tht P + is finite: Let R = L \ {[w] w P + } Let R = {w R u R: w < p u} Clim: R = P Thus P = P + P is regulr! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 18/22
Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w P + \ S} Extend S' to MPFS S''. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 19/22
Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w Extend S' to MPFS S''. P + \ S} Picking two different S 1, S 2 results in two different S 1 '', S 2 ''. Uncountly mny choices uncountly mny MPFS. Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 20/22
Non-regulr MPFS of regulr lnguges L hs non-regulr MPFS L hs uncountly mny MPFS. Let P e non-regulr MPFS of regulr lnguge L. P + = {w P u w L: w < p u w } (infinite) P = {w P u L: w < p u} Pick S P + Let S' = S { wu w w Extend S' to MPFS S''. P + \ S} Picking two different S 1, S 2 results in two different S 1 '', S 2 ''. Uncountly mny choices uncountly mny MPFS. Further results on non-regulr MPFS in n upcoming pper! Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 21/22
Thnk you for your ttention! Questions? Prefix-Free Susets of Regulr Lnguges nd Descriptionl Complexity Jozef Jirásek, Jurj Šeej 22/22