[Paper Review] Enhanced Covers of Regular & Indeterminate Strings using Prefix Tables
This paper introduces a novel, prefix table-based algorithm for computing the minimum enhanced cover (MEC) array of a string, achieving optimal O(n) expected time complexity and significantly improved space efficiency over prior border array-based methods. The approach enables efficient computation of enhanced covers not only for regular strings but also for indeterminate strings (e.g., DNA sequences with ambiguous nucleotides), leveraging the robustness of prefix tables under nontransitive matching relations.
A \itbf{cover} of a string $x = x[1..n]$ is a proper substring $u$ of $x$ such that $x$ can be constructed from possibly overlapping instances of $u$. A recent paper \cite{FIKPPST13} relaxes this definition --- an \itbf{enhanced cover} $u$ of $x$ is a border of $x$ (that is, a proper prefix that is also a suffix) that covers a {\it maximum} number of positions in $x$ (not necessarily all) --- and proposes efficient algorithms for the computation of enhanced covers. These algorithms depend on the prior computation of the \itbf{border array} $\beta[1..n]$, where $\beta[i]$ is the length of the longest border of $x[1..i]$, $1 \le i \le n$. In this paper, we first show how to compute enhanced covers using instead the \itbf{prefix table}: an array $\pi[1..n]$ such that $\pi[i]$ is the length of the longest substring of $x$ beginning at position $i$ that matches a prefix of $x$. Unlike the border array, the prefix table is robust: its properties hold also for \itbf{indeterminate strings} --- that is, strings defined on {\it subsets} of the alphabet $\Sigma$ rather than individual elements of $\Sigma$. Thus, our algorithms, in addition to being faster in practice and more space-efficient than those of \cite{FIKPPST13}, allow us to easily extend the computation of enhanced covers to indeterminate strings. Both for regular and indeterminate strings, our algorithms execute in expected linear time. Along the way we establish an important theoretical result: that the expected maximum length of any border of any prefix of a regular string $x$ is approximately 1.64 for binary alphabets, less for larger ones.
Motivation & Objective
- To develop a more efficient and space-saving algorithm for computing the minimum enhanced cover (MEC) array of a string.
- To extend the computation of enhanced covers to indeterminate strings, where traditional border arrays fail due to nontransitive matching.
- To demonstrate that prefix tables are more robust than border arrays for handling indeterminate strings, especially in bioinformatics contexts like DNA sequence analysis.
- To establish theoretical bounds on the expected maximum border length in random strings, showing it converges to approximately 1.64 for binary alphabets.
Proposed method
- Uses the prefix table π[i] = length of the longest substring starting at position i that matches a prefix of x.
- Replaces the border array β used in prior work with the prefix table π, which is robust under nontransitive matching in indeterminate strings.
- Introduces the maximum no cover array MNC[q] to identify the longest prefix of length q with no cover, computed via the cover array γ.
- Employs a preprocessing step to compute B = max(π[2..n]), the maximum border length, in O(n) time.
- Applies a modified cover detection procedure using MNC and prefix table properties to compute MEC and CMEC arrays efficiently.
- Extends the algorithm to indeterminate strings by using the rooted cover model and the precomputed prefix table for partial words.
Experimental results
Research questions
- RQ1Can the computation of enhanced covers be made more efficient and space-effective by replacing the border array with the prefix table?
- RQ2Does the prefix table maintain its correctness and utility in the context of indeterminate strings with nontransitive matching?
- RQ3What is the expected maximum length of any border in a random string, and how does it vary with alphabet size?
- RQ4Can the MEC array be computed in linear expected time for both regular and indeterminate strings using the prefix table?
- RQ5How does the performance of the prefix table-based algorithm compare to the border array-based algorithm in practice?
Key findings
- The proposed prefix table-based algorithm computes the MEC and CMEC arrays in O(n) expected time and Θ(log n) additional space, significantly improving over the O(n log n) worst-case time of prior methods.
- The expected maximum border length in a random binary string converges to approximately 1.64 as n → ∞, with lower values for larger alphabets.
- The prefix table is robust under nontransitive matching, allowing correct computation of enhanced covers in indeterminate strings where border arrays fail.
- For indeterminate strings, the expected number of borders is bounded by a constant (~29), enabling O(n) expected time complexity for the enhanced cover computation.
- Empirical evaluation shows the prefix-based algorithm (ECP) outperforms the border-based algorithm (ECB) in both speed and scalability, exhibiting linear behavior across all binary strings of length 2 to 30.
- The algorithm can be further optimized using compressed POS/LEN representations of the prefix table, reducing space usage in practice.
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.