Abstract
Rank and select queries are the fundamental building blocks of the compressed data structures. On a given bit string of length <tex>$n$</tex>, counting the number of set bits up to a certain position is named as the rank, and finding the position of the <tex>$k$</tex>th set bit is the select query. We present a new data structure and the procedures on it to support rank/select operations. The proposed scheme introduces (<tex>$\frac{\log 2m}{d}+\frac{\log n}{s\cdot d}$</tex>) overhead bits per each bit over the <tex>$n$</tex>-bits long input bit string, where <tex>$d$</tex> is the inner-block size in bits, <tex>$s$</tex> is the number of inner-blocks in a super-block, and <tex>$m$</tex> is a properly chosen constant modulus value. When compared to the previous two-level hierarchical data structures that generate <tex>$(\frac{\log(s\cdot d)}{d}+\frac{\log n}{s\cdot d})$</tex> overhead bits per bit, the new approach reduces the space consumption significantly with proper selection of the parameters. With the new data structure, the rank queries are usually (≈ 90% of the time) executed in <tex>$O(t_{d})$</tex> time, where <tex>$O(t_{d})$</tex> is the time required to compute a rank in an inner-block of length <tex>$d$</tex>-bits, which is assumed to be constant via the wide-register instructions in modern processors. Seldom, it may require to investigate more than one block, where on average this is observed to be around two blocks, empirically. We provide probabilistic analyses on how to choose the appropriate parameters and present several trade-offs to guarantee constant-time rank. We also investigate using the same data structure to support the select queries as well. Experimental evaluation of the introduced scheme revealed that the proposed data structure consumes nearly 30%-50% less space than its alternatives by introducing less than 5% overhead, while the speed is either better or very competitive when compared with the current state-of the art implementations both in terms of rank and select.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.