Computing the longest common prefix of a context-free language in polynomial time

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

5 Scopus citations

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 su x, of a context-free language can be computed in polynomial time.

Original languageEnglish
Title of host publication35th Symposium on Theoretical Aspects of Computer Science, STACS 2018
EditorsBrigitte Vallee, Rolf Niedermeier
PublisherSchloss Dagstuhl- Leibniz-Zentrum fur Informatik GmbH, Dagstuhl Publishing
ISBN (Electronic)9783959770620
DOIs
StatePublished - 2 Feb 2018
Event35th Symposium on Theoretical Aspects of Computer Science, STACS 2018 - Caen, France
Duration: 28 Feb 20183 Mar 2018

Publication series

NameLeibniz International Proceedings in Informatics, LIPIcs
Volume96
ISSN (Print)1868-8969

Conference

Conference35th Symposium on Theoretical Aspects of Computer Science, STACS 2018
Country/TerritoryFrance
CityCaen
Period28/02/183/03/18

Keywords

  • Combinatorics on Words
  • Context-free Languages
  • Longest Common Prefix

Fingerprint

Dive into the research topics of 'Computing the longest common prefix of a context-free language in polynomial time'. Together they form a unique fingerprint.

Cite this