Detecting regularities on grammar-compressed strings

Tomohiro I, Wataru Matsubara, Kouji Shimohira, Shunsuke Inenaga, Hideo Bannai, Masayuki Takeda, Kazuyuki Narisawa, Ayumi Shinohara

Research output: Chapter in Book/Report/Conference proceedingConference contribution

2 Citations (Scopus)


We solve the problems of detecting and counting various forms of regularities in a string represented as a Straight Line Program (SLP). Given an SLP of size n that represents a string s of length N, our algorithm computes all runs and squares in s in O(n3 h) time and O(n2) space, where h is the height of the derivation tree of the SLP. We also show an algorithm to compute all gapped-palindromes in O(n3 h + gnhlog N) time and O(n2) space, where g is the length of the gap. The key technique of the above solution also allows us to compute the periods and covers of the string in O(n2 h) time and O(nh(n + log2 N)) time, respectively.

Original languageEnglish
Title of host publicationMathematical Foundations of Computer Science 2013 - 38th International Symposium, MFCS 2013, Proceedings
PublisherSpringer Verlag
Number of pages12
ISBN (Print)9783642403125
Publication statusPublished - 2013
Event38th International Symposium on Mathematical Foundations of Computer Science, MFCS 2013 - Klosterneuburg, Austria
Duration: Aug 26 2013Aug 30 2013

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349


Other38th International Symposium on Mathematical Foundations of Computer Science, MFCS 2013

All Science Journal Classification (ASJC) codes

  • Theoretical Computer Science
  • Computer Science(all)


Dive into the research topics of 'Detecting regularities on grammar-compressed strings'. Together they form a unique fingerprint.

Cite this