{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/run-compressed-rank-select-for-large","title":"Run Compressed Rank/Select for Large Alphabets","arxiv_id":"1711.02910","date":"2017-11-08","proceeding":null,"authors":["José Fuentes-Sepúlveda","Juha Kärkkäinen","Dmitry Kosolobov","Simon J. Puglisi"],"abstract":"Given a string of length $n$ that is composed of $r$ runs of letters from the alphabet $\\{0,1,\\ldots,\\sigma{-}1\\}$ such that $2 \\le \\sigma \\le r$, we describe a data structure that, provided $r \\le n / \\log^{\\omega(1)} n$, stores the string in $r\\log\\frac{n\\sigma}{r} + o(r\\log\\frac{n\\sigma}{r})$ bits and supports select and access queries in $O(\\log\\frac{\\log(n/r)}{\\log\\log n})$ time and rank queries in $O(\\log\\frac{\\log(n\\sigma/r)}{\\log\\log n})$ time. We show that $r\\log\\frac{n(\\sigma-1)}{r} - O(\\log\\frac{n}{r})$ bits are necessary for any such data structure and, thus, our solution is succinct. We also describe a data structure that uses $(1 + \\epsilon)r\\log\\frac{n\\sigma}{r} + O(r)$ bits, where $\\epsilon > 0$ is an arbitrary constant, with the same query times but without the restriction $r \\le n / \\log^{\\omega(1)} n$. By simple reductions to the colored predecessor problem, we show that the query times are optimal in the important case $r \\ge 2^{\\log^\\delta n}$, for an arbitrary constant $\\delta > 0$. We implement our solution and compare it with the state of the art, showing that the closest competitors consume 31-46% more space.","url_abs":"http://arxiv.org/abs/1711.02910v3","url_pdf":"http://arxiv.org/pdf/1711.02910v3.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"run-compressed-rank-select-for-large","repo_url":"https://github.com/jfuentess/sdsl-lite","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":null,"developers":"https://syntology.ai/developers"},"arxiv_metadata":null,"syntology_extracted_results":null}