Nathaniel K Brown, Travis Gagie, Giovanni Manzini, Gonzalo Navarro, Marinella Sciortino
{"title":"Faster run-length compressed suffix arrays.","authors":"Nathaniel K Brown, Travis Gagie, Giovanni Manzini, Gonzalo Navarro, Marinella Sciortino","doi":"10.4230/OASIcs.Grossi.10","DOIUrl":null,"url":null,"abstract":"<p><p>We first review how we can store a run-length compressed suffix array (RLCSA) for a text <math><mi>T</mi></math> of length <math><mi>n</mi></math> over an alphabet of size <math><mi>σ</mi></math> whose Burrows-Wheeler Transform (BWT) consists of <math><mi>r</mi></math> runs in <math><mi>O</mi> <mo>(</mo> <mi>r</mi> <mspace></mspace> <mtext>log</mtext> <mo>(</mo> <mi>n</mi> <mo>/</mo> <mi>r</mi> <mo>)</mo> <mo>+</mo> <mi>r</mi> <mspace></mspace> <mtext>log</mtext> <mspace></mspace> <mi>σ</mi> <mo>+</mo> <mi>σ</mi> <mo>)</mo></math> bits such that later, given character <math><mi>a</mi></math> and the suffix-array (SA) interval for <math><mi>P</mi></math> , we can find the SA interval for <math><mi>a</mi> <mi>P</mi></math> in <math><mi>O</mi> <mfenced><mrow><mtext>log</mtext> <mspace></mspace> <msub><mrow><mi>r</mi></mrow> <mrow><mi>a</mi></mrow> </msub> <mo>+</mo> <mtext>log</mtext> <mspace></mspace> <mtext>log</mtext> <mspace></mspace> <mi>n</mi></mrow> </mfenced> </math> time, where <math> <msub><mrow><mi>r</mi></mrow> <mrow><mi>a</mi></mrow> </msub> </math> is the number of runs of copies of <math><mi>a</mi></math> in the BWT. We then show how to modify the RLCSA such that we find the SA interval for <math><mi>a</mi> <mi>P</mi></math> in only <math><mi>O</mi> <mfenced><mrow><mtext>log</mtext> <mspace></mspace> <msub><mrow><mi>r</mi></mrow> <mrow><mi>a</mi></mrow> </msub> </mrow> </mfenced> </math> time, without increasing its asymptotic space bound. Our key idea is applying a result by Nishimoto and Tabei (ICALP 2021) and then replacing rank queries on sparse bitvectors by a constant number of select queries. We also review two-level indexing and discuss how our faster RLCSA may be useful in improving it. Finally, we briefly discuss how two-level indexing may speed up a recent heuristic for finding maximal exact matches of a pattern with respect to an indexed text.</p>","PeriodicalId":30207,"journal":{"name":"OASIcs OpenAccess Series in Informatics","volume":"132 ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2025-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13049486/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"OASIcs OpenAccess Series in Informatics","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/OASIcs.Grossi.10","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/8/11 0:00:00","PubModel":"Epub","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
We first review how we can store a run-length compressed suffix array (RLCSA) for a text of length over an alphabet of size whose Burrows-Wheeler Transform (BWT) consists of runs in bits such that later, given character and the suffix-array (SA) interval for , we can find the SA interval for in time, where is the number of runs of copies of in the BWT. We then show how to modify the RLCSA such that we find the SA interval for in only time, without increasing its asymptotic space bound. Our key idea is applying a result by Nishimoto and Tabei (ICALP 2021) and then replacing rank queries on sparse bitvectors by a constant number of select queries. We also review two-level indexing and discuss how our faster RLCSA may be useful in improving it. Finally, we briefly discuss how two-level indexing may speed up a recent heuristic for finding maximal exact matches of a pattern with respect to an indexed text.