Longest Common Extensions with Recompression

preprint2016arXivOpen access

Abstract

Given two positions ii and jj in a string TT of length NN, a longest common extension (LCE) query asks for the length of the longest common prefix between suffixes beginning at ii and jj. A compressed LCE data structure is a data structure that stores TT in a compressed form while supporting fast LCE queries. In this article we show that the recompression technique is a powerful tool for compressed LCE data structures. We present a new compressed LCE data structure of size O(zlg⁡(N/z))O(z \lg (N/z)) that supports LCE queries in O(lg⁡N)O(\lg N) time, where zz is the size of Lempel-Ziv 77 factorization without self-reference of TT. Given TT as an uncompressed form, we show how to build our data structure in O(N)O(N) time and space. Given TT as a grammar compressed form, i.e., an straight-line program of size n generating TT, we show how to build our data structure in O(nlg⁡(N/n))O(n \lg (N/n)) time and O(n+zlg⁡(N/z))O(n + z \lg (N/z)) space. Our algorithms are deterministic and always return correct answers.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.