paper

Reportable Shortcuts with RLBWTs

arXiv:2609.06596

Abstract

Backward search over a run-length compressed Burrows--Wheeler transform (RLBWT) takes one step per pattern character, even when long stretches of the pattern match material that recurs throughout a highly repetitive collection. We describe \emph{shortcuts}: for a precomputed set of pairs of strings, a backward search that has just matched and finds immediately to its left in the pattern can cross in one step. Since a shortcut is taken only after its pair has been recognized in the pattern, the search can record it, and it returns a report of the shortcuts it took along with the usual BWT interval. Our motivation is pangenome graphs, where such pairs mark the places where a pattern passes through a vertex. We work out the case of a single linear reference $\Rref$, in which ranges over the length- windows of $\Rref$ starting at multiples of , and over the characters of $\Rref$ preceding such a window. We show that the resulting search counts correctly; that it crosses a stretch of the pattern matching consecutive windows of $\Rref$, whose anchors were all kept, with shortcuts, where is the longest shortcut, provided the stretch and the rest of the pattern to its right occur together in the collection; and that the shortcuts can be built from the RLBWT in $O(|\Rref| (τ+ 1) \log r)$ time plus time per BWT row they cover, plus the time to sort the anchors. On the 461-megabyte Pizza\&Chili \texttt{cere} collection of 37 genomes, shortcuts make backward search to times faster on exact patterns of length 200 to 1000, and to times faster on patterns with 1\% of their characters substituted, for 86\% more space than the RLBWT.