An efficient algorithm to test square-freeness of strings compressed by straight-line programs
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(n4logN) time and O(n2) space. The algorithm also allows us to test square-freeness on an arbitrary composition system of size c for S, in O(c4log5N) time and O(c2l...
Gespeichert in:
Veröffentlicht in: | Information processing letters 2012-10, Vol.112 (19), p.711-714 |
---|---|
Hauptverfasser: | , , , , , |
Format: | Artikel |
Sprache: | eng |
Schlagworte: | |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | 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(n4logN) time and O(n2) space. The algorithm also allows us to test square-freeness on an arbitrary composition system of size c for S, in O(c4log5N) time and O(c2log2N) space, which is faster than using the algorithm by Ga̧sieniec, Karpinski, Plandowski, and Rytter (1996) [4].
► Simple algorithm for square-freeness testing on compressed texts. ► Asymptotically faster than previous methods. ► Describes conversion from arbitrary composition system to small SLPs. |
---|---|
ISSN: | 0020-0190 1872-6119 |
DOI: | 10.1016/j.ipl.2012.06.017 |