[Paper Review] Inducing the LCP-Array
This paper presents a linear-time algorithm for constructing the LCP-array by extending the induced sorting technique used in suffix array construction. By integrating LCP-value induction into the suffix array algorithm, the method achieves superior practical performance, outperforming existing state-of-the-art LCP-array construction algorithms, including those based on the Burrows-Wheeler Transform.
We show how to modify the linear-time construction algorithm for suffix arrays based on induced sorting (Nong et al., DCC'09) such that it computes the array of longest common prefixes (LCP-array) as well. Practical tests show that this outperforms recent LCP-array construction algorithms (Gog and Ohlebusch, ALENEX'11).
Motivation & Objective
- To address the performance gap between fast suffix array construction and slower LCP-array construction algorithms.
- To develop a practical, linear-time algorithm for LCP-array construction that integrates naturally with induced sorting.
- To eliminate reliance on the Burrows-Wheeler Transform (BWT), which is required by some prior LCP algorithms.
- To demonstrate that inducing LCP-values during suffix array construction yields better real-world performance than standalone LCP algorithms.
- To provide a fast, integrated solution for both suffix array and LCP-array construction that leverages the efficiency of induced sorting.
Proposed method
- Extends the induced sorting algorithm for suffix arrays to simultaneously induce LCP-values for lexicographically adjacent suffixes.
- Uses the $Φ$-array (inverse suffix array) to compute LCP-values efficiently via the relation $\mathsf{LCP}[i] = \mathsf{LCP}[\mathsf{SA}^{-1}(\mathsf{SA}[i]-1)] + 1$ when $\mathsf{SA}[i-1]$ and $\mathsf{SA}[i]$ share a common prefix.
- Classifies suffixes as L-type or S-type to guide the induction process, maintaining the same type-based sorting strategy used in suffix array construction.
- Adapts the linear-time suffix array construction algorithm of Nong et al. (2009) to include LCP-value propagation during the induction phase.
- Employs a two-phase approach: first inducing the suffix array using induced sorting, then computing LCP-values by leveraging the order and structure of the induced SA.
- Uses a modified version of the sais-lite algorithm to perform both SA and LCP construction in a single pass, minimizing memory access and cache misses.
Experimental results
Research questions
- RQ1Can the induced sorting technique used in linear-time suffix array construction be extended to compute the LCP-array in linear time?
- RQ2Does integrating LCP-value induction into the suffix array construction pipeline yield better practical performance than standalone LCP algorithms?
- RQ3Can the LCP-array be constructed without relying on the Burrows-Wheeler Transform, especially in settings where BWT is not available?
- RQ4How does the performance of the proposed method compare to existing state-of-the-art LCP-array construction algorithms in terms of running time and scalability?
- RQ5What are the practical bottlenecks in LCP-array construction, and can they be mitigated by co-inducing LCP-values during SA construction?
Key findings
- The proposed algorithm outperforms all previous LCP-array construction algorithms, including those based on the Burrows-Wheeler Transform, in practical benchmarks.
- The algorithm achieves competitive performance even for large inputs, with running times consistently lower than those of the GO and naive algorithms, especially for larger datasets like 100MB and 200MB.
- For the English text dataset, the naive algorithm performs competitively due to long repeated substrings, but the proposed method still outperforms it overall.
- The combined running time of the proposed method (inducing + sais-lite) is the fastest in most test cases, often outperforming even the best combination of divsufsort and GO algorithm.
- The method does not require the BWT, making it suitable for applications like compressed suffix arrays not based on BWT, offering a practical advantage in such contexts.
- The performance gain is attributed to reduced memory access and better cache behavior due to interleaved storage of SA and LCP arrays.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.