An efficient algorithm to test square-freeness of strings compressed by straight-line programs

  • Authors:
  • Hideo Bannai;Travis Gagie;Tomohiro I;Shunsuke Inenaga;Gad M. Landau;Moshe Lewenstein

  • Affiliations:
  • Department of Informatics, Kyushu University, Japan;Department of Computer Science and Engineering, Aalto University, Finland;Department of Informatics, Kyushu University, Japan;Department of Informatics, Kyushu University, Japan;Department of Computer Science, University of Haifa, Israel and Department of Computer Science and Engineering, NYU-Poly, USA;Department of Computer Science, Bar Ilan University, Israel

  • Venue:
  • Information Processing Letters
  • Year:
  • 2012

Quantified Score

Hi-index 0.89

Visualization

Abstract

We give a simple algorithm that, given a straight-line program of size n for a string S of length N, tests whether S is square-free in O(n^4logN) time and O(n^2) space. The algorithm also allows us to test square-freeness on an arbitrary composition system of size c for S, in O(c^4log^5N) time and O(c^2log^2N) space, which is faster than using the algorithm by Ga@?sieniec, Karpinski, Plandowski, and Rytter (1996) [4].