on the complexity of k piecewise testability and the
play

On the Complexity of k-Piecewise Testability and the Depth of - PowerPoint PPT Presentation

On the Complexity of k-Piecewise Testability and the Depth of Automata Tom Masopust and Michal Thomazo TU Dresden, Germany DLT 2015 1 / 24 Problems 2 / 24 Problems Problem (k-PiecewiseTestability) Input: an automaton (min. DFA or NFA)


  1. On the Complexity of k-Piecewise Testability and the Depth of Automata Tomáš Masopust and Michaël Thomazo TU Dresden, Germany DLT 2015 1 / 24

  2. Problems 2 / 24

  3. Problems Problem (k-PiecewiseTestability) Input: an automaton (min. DFA or NFA) A Output: Y ES if and only if L ( A ) is k-PT Quest.: complexity Problem (Bounds on automata of k-PT languages) Input: Σ = { a 1 , a 2 ,..., a n } , n ≥ 1 , and k ≥ 1 Quest.: length of a longest word, w , such that 1. sub k ( w ) : = { u ∈ Σ ∗ | u � v , | u | ≤ k } 1 = Σ ≤ k , 2. prefixes w 1 � = w 2 of w , sub k ( w 1 ) � = sub k ( w 2 ) 1 abc � bacabbabca 3 / 24

  4. Piecewise testable languages (PT) Definition A regular language is piecewise testable if it is a finite boolean combination of languages of the form Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ where n ≥ 0 and a i ∈ Σ . It is k-piecewise testable (k-PT) if n ≤ k . 4 / 24

  5. Piecewise testable languages (PT) Definition A regular language is piecewise testable if it is a finite boolean combination of languages of the form Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ where n ≥ 0 and a i ∈ Σ . It is k-piecewise testable (k-PT) if n ≤ k . Example (PT language) Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ � a 1 a 2 ··· a n ∈ L 4 / 24

  6. PT recognition Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ � � Bool 2 ) Theorem (min. DFA characterization 1. Partially ordered – acyclic, but with self-loops 2. Confluent – ∀ q ∈ Q , ∀ a , b ∈ Σ , ∃ w ∈ { a , b } ∗ s.t. ( qa ) w = ( qb ) w p a , b c a c b q 2 Version by Klíma + Polák 2013 5 / 24

  7. PT recognition Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ � � Bool 2 ) Theorem (min. DFA characterization 1. Partially ordered – acyclic, but with self-loops 2. Confluent – ∀ q ∈ Q , ∀ a , b ∈ Σ , ∃ w ∈ { a , b } ∗ s.t. ( qa ) w = ( qb ) w p w ∈ { a , b } ∗ a , b c a a c b b w q 2 Version by Klíma + Polák 2013 5 / 24

  8. What do we know about PT languages? 6 / 24

  9. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial 6 / 24

  10. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) 6 / 24

  11. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) ◮ Trahtman 2001 piecewise testability for DFAs in quadratic time 6 / 24

  12. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) ◮ Trahtman 2001 piecewise testability for DFAs in quadratic time ◮ Klíma, Polák 2013 another quadratic-time algorithm for DFAs 6 / 24

  13. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) ◮ Trahtman 2001 piecewise testability for DFAs in quadratic time ◮ Klíma, Polák 2013 another quadratic-time algorithm for DFAs ◮ Cho and Huynh 1991 piecewise testability for DFAs is NL-complete 6 / 24

  14. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) ◮ Trahtman 2001 piecewise testability for DFAs in quadratic time ◮ Klíma, Polák 2013 another quadratic-time algorithm for DFAs ◮ Cho and Huynh 1991 piecewise testability for DFAs is NL-complete ◮ Holub, M., Thomazo 2014 + piecewise testability for NFAs is PS PACE -complete 6 / 24

  15. What do we know about PT languages? ◮ Simon 1975 piecewise testable = J -trivial ◮ Stern 1985 piecewise testability for DFAs is in PT IME , O ( n 5 ) ◮ Trahtman 2001 piecewise testability for DFAs in quadratic time ◮ Klíma, Polák 2013 another quadratic-time algorithm for DFAs ◮ Cho and Huynh 1991 piecewise testability for DFAs is NL-complete ◮ Holub, M., Thomazo 2014 + piecewise testability for NFAs is PS PACE -complete ◮ Boja´ nczyk, Segoufin, Straubing 2012 PT tree languages 6 / 24

  16. Problem 1 7 / 24

  17. k-PiecewiseTestability Σ ∗ a 1 Σ ∗ a 2 Σ ∗ ··· Σ ∗ a n Σ ∗ � � with n ≤ k Bool Problem (k-PiecewiseTestability) Input: An automaton (min. DFA or NFA) A Output: Y ES if and only if L ( A ) is k-PT Trivially decidable – finite number of k-PTL over Σ A 8 / 24

  18. DFAs 9 / 24

  19. Complexity of k-Piecewise Testability for DFAs Theorem The following problem N AME : K -P IECEWISE T ESTABILITY I NPUT : a minimal DFA A O UTPUT : Y ES if and only if L ( A ) is k-PT belongs to co- NP . 10 / 24

  20. 0-Piecewise Testability DFAs � Σ ∗ L ( A ) is 0-PT iff L ( A ) = 0 / Complexity O ( 1 ) 11 / 24

  21. 1-Piecewise Testability Theorem To decide whether a min. DFA recognizes a 1-PT language is in L OG S PACE . L ( A ) 1-PT iff the two patterns hold in every state and letter(s) a b a a a b Syntactic monoids of 1-PTL defined by equations x = x 2 and xy = yx . 3 3 Simon, Blanchet-Sadri 12 / 24

  22. 2-Piecewise Testability Theorem To decide whether a min. DFA recognizes a 2-PT language is NL -complete. A min. acyclic and confluent DFA (checked in NL); L ( A ) 2-PT iff ∀ a ∈ Σ , ∀ s ∈ Q s.t. q 0 w = s for a w ∈ Σ ∗ with | w | a ≥ 1 , sba = saba ∀ b ∈ Σ ∪{ ε } . y a b a q 0 s a a b Synt. monoids of 2-PT defined by xyzx = xyxzx and ( xy ) 2 = ( yx ) 2 (Blanchet-Sadri) y z x x q 0 s x x z 13 / 24

  23. 2-Piecewise Testability Theorem To decide whether a min. DFA recognizes a 2-PT language is NL -complete. A min. acyclic and confluent DFA (checked in NL); L ( A ) 2-PT iff ∀ a ∈ Σ , ∀ s ∈ Q s.t. q 0 w = s for a w ∈ Σ ∗ with | w | a ≥ 1 , sba = saba ∀ b ∈ Σ ∪{ ε } . y a b a q 0 s a a b Synt. monoids of 2-PT defined by xyzx = xyxzx and ( xy ) 2 = ( yx ) 2 (Blanchet-Sadri) y z x x q 0 s x x z 13 / 24

  24. 2-Piecewise Testability Theorem To decide whether a min. DFA recognizes a 2-PT language is NL -complete. A min. acyclic and confluent DFA (checked in NL); L ( A ) 2-PT iff ∀ a ∈ Σ , ∀ s ∈ Q s.t. q 0 w = s for a w ∈ Σ ∗ with | w | a ≥ 1 , sba = saba ∀ b ∈ Σ ∪{ ε } . y a b a q 0 s a a b Synt. monoids of 2-PT defined by xyzx = xyxzx and ( xy ) 2 = ( yx ) 2 (Blanchet-Sadri) y z x x q 0 s x x z 13 / 24

  25. 3-Piecewise Testability Theorem To decide whether a min. DFA recognizes a 3-PT language is NL -complete. Blachet-Sadri: Equations ( xy ) 3 = ( yx ) 3 , xzyxvxwy = xzxyxvxwy and ywxvxyzx = ywxvxyxzx 14 / 24

  26. k-Piecewise Testability Theorem N AME : K -P IECEWISE T ESTABILITY I NPUT : a minimal DFA A O UTPUT : Y ES if and only if L ( A ) is k-PT Complexity: in co- NP ◮ O ( 1 ) for k = 0 , ◮ L OG S PACE for k = 1 , ◮ NL -complete for k = 2 , 3 , 15 / 24

  27. k-Piecewise Testability Theorem N AME : K -P IECEWISE T ESTABILITY I NPUT : a minimal DFA A O UTPUT : Y ES if and only if L ( A ) is k-PT Complexity: in co- NP ◮ O ( 1 ) for k = 0 , ◮ L OG S PACE for k = 1 , ◮ NL -complete for k = 2 , 3 , Recently, a co-NP upper bound in terms of separability Hofman, Martens, “Separability by Short Subsequences and Subwords”, ICDT 2015 15 / 24

  28. k-Piecewise Testability Theorem N AME : K -P IECEWISE T ESTABILITY I NPUT : a minimal DFA A O UTPUT : Y ES if and only if L ( A ) is k-PT Complexity: in co- NP ◮ O ( 1 ) for k = 0 , ◮ L OG S PACE for k = 1 , ◮ NL -complete for k = 2 , 3 , ◮ co- NP -complete for k ≥ 4 . Recently, a co-NP upper bound in terms of separability Hofman, Martens, “Separability by Short Subsequences and Subwords”, ICDT 2015 Even more recently, co-NP-completeness for k ≥ 4 Klíma, Kunc, Polák, “Deciding k -piecewise testability”, submitted, unaccessible Thanks to an anonymous reviewer and the authors 15 / 24

  29. NFAs 16 / 24

  30. Complexity of k-PT for NFAs Theorem The following problem N AME : K -P IECEWISE T ESTABILITY NFA I NPUT : an NFA A O UTPUT : Y ES if and only if L ( A ) is k-PT is PS PACE -complete. 17 / 24

  31. Problem 2 18 / 24

  32. Bounds on min. DFAs of k-PT languages Problem (Bounds on automata of k-PT languages) Input: Σ = { a 1 , a 2 ,..., a n } , n ≥ 1 , and k ≥ 1 Quest.: length of a longest word, w , s.t. 1. sub k ( w ) : = { u ∈ Σ ∗ | u � v , | u | ≤ k } 4 = Σ ≤ k , 2. prefixes w 1 � = w 2 of w , sub k ( w 1 ) � = sub k ( w 2 ) 4 abc � bacabbabca 19 / 24

  33. Bounds on min. DFAs of k-PT languages Problem (Bounds on automata of k-PT languages) Input: Σ = { a 1 , a 2 ,..., a n } , n ≥ 1 , and k ≥ 1 Quest.: length of a longest word, w , s.t. 1. sub k ( w ) : = { u ∈ Σ ∗ | u � v , | u | ≤ k } 4 = Σ ≤ k , 2. prefixes w 1 � = w 2 of w , sub k ( w 1 ) � = sub k ( w 2 ) Solution � k + n � | w | = − 1 k 4 abc � bacabbabca 19 / 24

  34. Consequences Theorem (Klíma + Polák 2013) Given a min. DFA recognizing a PT language. If the depth is k , then the language is k -PT. 5 depth = # states on longest simple path − 1 ; simple path = all states pairwise different 6 states are ∼ k classes: u ∼ k v iff sub k ( u ) = sub k ( v ) 20 / 24

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend