Abstract.
We present a new sublinear-size index structure for finding all occurrences of a given q -gram in a text. Such a q -gram index is needed in many approximate pattern matching algorithms. All earlier q -gram indexes require at least O(n) space, where n is the length of the text. The new Lempel—Ziv index needs only O(n/log n) space while being as fast as previous methods. The new method takes advantage of repetitions in the text found by Lempel—Ziv parsing.
Similar content being viewed by others
Author information
Authors and Affiliations
Additional information
Received November 1996; revised March 1997.
Rights and permissions
About this article
Cite this article
Kärkkäinen, J., Sutinen, E. Lempel—Ziv Index for q -Grams . Algorithmica 21, 137–154 (1998). https://doi.org/10.1007/PL00009205
Issue Date:
DOI: https://doi.org/10.1007/PL00009205