Computing the Longest Common Prefix of a Context-free Language in Polynomial Time

Authors Michael Luttenberger, Raphaela Palenta, Helmut Seidl



PDF
Thumbnail PDF

File

LIPIcs.STACS.2018.48.pdf
  • Filesize: 0.54 MB
  • 13 pages

Document Identifiers

Author Details

Michael Luttenberger
Raphaela Palenta
Helmut Seidl

Cite AsGet BibTex

Michael Luttenberger, Raphaela Palenta, and Helmut Seidl. Computing the Longest Common Prefix of a Context-free Language in Polynomial Time. In 35th Symposium on Theoretical Aspects of Computer Science (STACS 2018). Leibniz International Proceedings in Informatics (LIPIcs), Volume 96, pp. 48:1-48:13, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2018)
https://doi.org/10.4230/LIPIcs.STACS.2018.48

Abstract

We present two structural results concerning the longest common prefixes of non-empty languages. First, we show that the longest common prefix of the language generated by a context-free grammar of size N equals the longest common prefix of the same grammar where the heights of the derivation trees are bounded by 4N. Second, we show that each non-empty language L has a representative subset of at most three elements which behaves like L w.r.t. the longest common prefix as well as w.r.t. longest common prefixes of L after unions or concatenations with arbitrary other languages. From that, we conclude that the longest common prefix, and thus the longest common suffix, of a context-free language can be computed in polynomial time.
Keywords
  • longest common prefix
  • context-free languages
  • combinatorics on words

Metrics

  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    0
    PDF Downloads

References

  1. Adrien Boiret. Normal form on linear tree-to-word transducers. In Adrian-Horia Dediu, Jan Janousek, Carlos Martín-Vide, and Bianca Truthe, editors, Language and Automata Theory and Applications - 10th International Conference, LATA 2016, Prague, Czech Republic, March 14-18, 2016, Proceedings, volume 9618 of Lecture Notes in Computer Science, pages 439-451. Springer, 2016. URL: http://dx.doi.org/10.1007/978-3-319-30000-9_34.
  2. Adrien Boiret and Raphaela Palenta. Deciding equivalence of linear tree-to-word transducers in polynomial time. In Srecko Brlek and Christophe Reutenauer, editors, Developments in Language Theory - 20th International Conference, DLT 2016, Montréal, Canada, July 25-28, 2016, Proceedings, volume 9840 of Lecture Notes in Computer Science, pages 355-367. Springer, 2016. URL: http://dx.doi.org/10.1007/978-3-662-53132-7_29.
  3. Christian Choffrut and Juhani Karhumäki. Combinatorics of Words, pages 329-438. Springer Berlin Heidelberg, 1997. URL: http://dx.doi.org/10.1007/978-3-642-59136-5_6.
  4. Javier Esparza and Michael Luttenberger. Solving fixed-point equations by derivation tree analysis. In Andrea Corradini, Bartek Klin, and Corina Cîrstea, editors, Algebra and Coalgebra in Computer Science - 4th International Conference, CALCO 2011, Winchester, UK, August 30 - September 2, 2011. Proceedings, volume 6859 of Lecture Notes in Computer Science, pages 19-35. Springer, 2011. URL: http://dx.doi.org/10.1007/978-3-642-22944-2_2.
  5. N. J. Fine and H. S. Wilf. Uniqueness theorems for periodic functions. Proceedings of the American Mathematical Society, 16(1):109-114, 1965. URL: http://www.jstor.org/stable/2034009.
  6. Toru Kasai, Gunho Lee, Hiroki Arimura, Setsuo Arikawa, and Kunsoo Park. Linear-time longest-common-prefix computation in suffix arrays and its applications. In Combinatorial Pattern Matching, 12th Annual Symposium, CPM 2001 Jerusalem, Israel, July 1-4, 2001 Proceedings, pages 181-192, 2001. Google Scholar
  7. Martin Lange and Hans Leiß. To CNF or not to cnf? an efficient yet presentable version of the CYK algorithm. Informatica Didactica, 8, 2009. URL: http://www.informatica-didactica.de/cmsmadesimple/index.php?page=LangeLeiss2009.
  8. Grégoire Laurence, Aurélien Lemay, Joachim Niehren, Slawek Staworko, and Marc Tommasi. Normalization of sequential top-down tree-to-word transducers. In Adrian-Horia Dediu, Shunsuke Inenaga, and Carlos Martín-Vide, editors, Language and Automata Theory and Applications - 5th International Conference, LATA 2011, Tarragona, Spain, May 26-31, 2011. Proceedings, volume 6638 of Lecture Notes in Computer Science, pages 354-365. Springer, 2011. URL: http://dx.doi.org/10.1007/978-3-642-21254-3_28.
  9. Grégoire Laurence, Aurélien Lemay, Joachim Niehren, Slawek Staworko, and Marc Tommasi. Learning sequential tree-to-word transducers. In Adrian-Horia Dediu, Carlos Martín-Vide, José Luis Sierra-Rodríguez, and Bianca Truthe, editors, Language and Automata Theory and Applications - 8th International Conference, LATA 2014, Madrid, Spain, March 10-14, 2014. Proceedings, volume 8370 of Lecture Notes in Computer Science, pages 490-502. Springer, 2014. URL: http://dx.doi.org/10.1007/978-3-319-04921-2_40.
  10. Markus Lohrey. Algorithmics on slp-compressed strings: A survey. Groups Complexity Cryptology, 4(2):241-299, 2012. URL: http://dx.doi.org/10.1515/gcc-2012-0016.
  11. Michael Luttenberger, Raphaela Palenta, and Helmut Seidl. Computing the longest common prefix of a context-free language in polynomial time. CoRR, abs/1702.06698, 2017. URL: http://arxiv.org/abs/1702.06698.
  12. Wojciech Plandowski. Testing equivalence of morphisms on context-free languages. In Jan van Leeuwen, editor, Algorithms - ESA '94, Second Annual European Symposium, Utrecht, The Netherlands, September 26-28, 1994, Proceedings, volume 855 of Lecture Notes in Computer Science, pages 460-470. Springer, 1994. URL: http://dx.doi.org/10.1007/BFb0049431.
Questions / Remarks / Feedback
X

Feedback for Dagstuhl Publishing


Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail