https://arxiv.org/abs/1904.12370 Skip to main content Cornell University We gratefully acknowledge support from the Simons Foundation, member institutions, and all contributors. Donate arxiv logo > cs > arXiv:1904.12370 [ ] Help | Advanced Search [All fields ] Search arXiv logo Cornell University Logo [ ] GO quick links * Login * Help Pages * About Computer Science > Data Structures and Algorithms arXiv:1904.12370 (cs) [Submitted on 28 Apr 2019 (v1), last revised 14 Oct 2019 (this version, v2)] Title:Compact Fenwick trees for dynamic ranking and selection Authors:Stefano Marchini, Sebastiano Vigna View a PDF of the paper titled Compact Fenwick trees for dynamic ranking and selection, by Stefano Marchini and 1 other authors View PDF Abstract:The Fenwick tree is a classical implicit data structure that stores an array in such a way that modifying an element, accessing an element, computing a prefix sum and performing a predecessor search on prefix sums all take logarithmic time. We introduce a number of variants which improve the classical implementation of the tree: in particular, we can reduce its size when an upper bound on the array element is known, and we can perform much faster predecessor searches. Our aim is to use our variants to implement an efficient dynamic bit vector: our structure is able to perform updates, ranking and selection in logarithmic time, with a space overhead in the order of a few percents, outperforming existing data structures with the same purpose. Along the way, we highlight the pernicious interplay between the arithmetic behind the Fenwick tree and the structure of current CPU caches, suggesting simple solutions that improve performance significantly. Subjects: Data Structures and Algorithms (cs.DS) Cite as: arXiv:1904.12370 [cs.DS] (or arXiv:1904.12370v2 [cs.DS] for this version) https://doi.org/10.48550/arXiv.1904.12370 Focus to learn more arXiv-issued DOI via DataCite Submission history From: Sebastiano Vigna [view email] [v1] Sun, 28 Apr 2019 19:04:24 UTC (790 KB) [v2] Mon, 14 Oct 2019 14:04:03 UTC (1,660 KB) Full-text links: Access Paper: View a PDF of the paper titled Compact Fenwick trees for dynamic ranking and selection, by Stefano Marchini and 1 other authors * View PDF * TeX Source * Other Formats view license Current browse context: cs.DS < prev | next > new | recent | 2019-04 Change to browse by: cs References & Citations * NASA ADS * Google Scholar * Semantic Scholar DBLP - CS Bibliography listing | bibtex Stefano Marchini Sebastiano Vigna a export BibTeX citation Loading... BibTeX formatted citation x [loading... ] Data provided by: Bookmark BibSonomy logo Reddit logo (*) Bibliographic Tools Bibliographic and Citation Tools [ ] Bibliographic Explorer Toggle Bibliographic Explorer (What is the Explorer?) [ ] Litmaps Toggle Litmaps (What is Litmaps?) [ ] scite.ai Toggle scite Smart Citations (What are Smart Citations?) ( ) Code, Data, Media Code, Data and Media Associated with this Article [ ] Links to Code Toggle CatalyzeX Code Finder for Papers (What is CatalyzeX?) [ ] DagsHub Toggle DagsHub (What is DagsHub?) [ ] GotitPub Toggle Gotit.pub (What is GotitPub?) [ ] Links to Code Toggle Papers with Code (What is Papers with Code?) [ ] ScienceCast Toggle ScienceCast (What is ScienceCast?) ( ) Demos Demos [ ] Replicate Toggle Replicate (What is Replicate?) [ ] Spaces Toggle Hugging Face Spaces (What is Spaces?) [ ] Spaces Toggle TXYZ.AI (What is TXYZ.AI?) ( ) Related Papers Recommenders and Search Tools [ ] Link to Influence Flower Influence Flower (What are Influence Flowers?) [ ] Connected Papers Toggle Connected Papers (What is Connected Papers?) [ ] Core recommender toggle CORE Recommender (What is CORE?) * Author * Venue * Institution * Topic ( ) About arXivLabs arXivLabs: experimental projects with community collaborators arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website. Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them. Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs. Which authors of this paper are endorsers? | Disable MathJax (What is MathJax?) * About * Help * Click here to contact arXiv Contact * Click here to subscribe Subscribe * Copyright * Privacy Policy * Web Accessibility Assistance * arXiv Operational Status Get status notifications via email or slack