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":"10.4230/OASIcs.Grossi.10","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.0,"publicationDate":"2025-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC13049486/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"147623903","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}