R-enum Revisited: Speedup and Extension for Context-Sensitive Repeats and Net Frequencies

📅 2025-11-14
📈 Citations: 0
✨ Influential: 0
📄 PDF
🤖 AI Summary
Efficient enumeration and analysis of context-sensitive repeats in strings—such as maximal repeats, super-/near-super-maximal repeats—remain computationally challenging. Method: We propose a linear-time algorithm based on the run-length compressed Burrows–Wheeler transform (RLBWT), reducing the r-enum complexity from $O(n log log_w (n/r))$ to $O(n)$. Our approach enables, for the first time, joint computation of near-super-maximal repeats along with their net occurrences and net frequencies. We prove that the total number of net occurrences is strictly less than $2r$, and construct an $O(r)$-space data structure supporting efficient net-frequency queries for arbitrary patterns. Contributions/Results: (i) Full context-sensitive repeat enumeration in $O(n)$ time and $O(r)$ space; (ii) a new upper bound of $2r$ on the number of minimal unique substrings; (iii) a unified solution to key problems—including context diversity quantification of maximal repeats, net-frequency statistics, and dynamic net-frequency querying.

Technology Category

Knowledge Representation and Reasoning: Computational Complexity of ReasoningData Mining & Knowledge Management: Data CompressionSearch and Optimization: Local Search

Application Category

Graph Algorithms and Modeling for the Web: Representation, reconstruction, and subgraph or motif discovery in Web-related graphsWeb Mining and Content Analysis: Robustness and generalizability of Web mining methodsSearch and Retrieval-Augmented AI: Web learning to rank, online learning, and counterfactual learning for ranking
📝 Abstract
Nishimoto and Tabei [CPM, 2021] proposed r-enum, an algorithm to enumerate various characteristic substrings, including maximal repeats, in a string $T$ of length $n$ in $O(r)$ words of compressed working space, where $r le n$ is the number of runs in the Burrows-Wheeler transform (BWT) of $T$. Given the run-length encoded BWT (RLBWT) of $T$, r-enum runs in $O(nloglog_{w}(n/r))$ time in addition to the time linear to the number of output strings, where $w=Theta(log n)$ is the word size. In this paper, we improve the $O(nloglog_{w}(n/r))$ term to $O(n)$. We also extend r-enum to compute other context-sensitive repeats such as near-supermaximal repeats (NSMRs) and supermaximal repeats, and the context diversity for every maximal repeat in the same complexities. Furthermore, we study the occurrences that witness NSMRs, which have recently attracted attention under the name of net occurrences: An occurrence of a repeat is called a net occurrence if it is not covered by another repeat, and the net frequency of a repeat is the number of its net occurrences. With this terminology, an NSMR is defined to be a repeat with a positive net frequency. Given the RLBWT of $T$, we show how to compute the set $S^{nsmr}$ of all NSMRs in $T$ together with their net frequency/occurrences in $O(n)$ time and $O(r)$ space. We also show that an $O(r)$-space data structure can be built from the RLBWT to support queries of computing the net frequency of any query pattern $P$ in $O(|P|)$ time. The data structure is built in $O(r)$ space and in $O(n)$ time with high probability or deterministic $O(n+|S^{nsmr}|loglogmin(sigma,|S^{nsmr}|))$ time, where $sigmale r$ is the alphabet size of $T$. To achieve this, we prove that the total number of net occurrences is less than $2r$. We also get a new upper bound $2r$ of the number of minimal unique substrings in $T$, which may be of independent interest.
Problem

Research questions and friction points this paper is trying to address.

Improving time complexity of r-enum algorithm for substring enumeration
Extending r-enum to compute context-sensitive repeats and net frequencies
Building compact data structures for net frequency queries on patterns
Innovation

Methods, ideas, or system contributions that make the work stand out.

Improved r-enum algorithm to O(n) time complexity
Extended r-enum to compute context-sensitive repeats efficiently
Built O(r)-space data structure for net frequency queries
🔎 Similar Papers
No similar papers found.
💼 Related Jobs
No related jobs found.
K
Kotaro Kimura
Kyushu Institute of Technology, 680-4 Kawazu, Iizuka, Fukuoka 820-8502, Japan
T
Tomohiro I
Kyushu Institute of Technology, 680-4 Kawazu, Iizuka, Fukuoka 820-8502, Japan