A Constant Optimization of the Binary Indexed Tree Query Operation
Abstract: There are several data structures which can calculate the prefix sums of an array efficiently, while handling point updates on the array, such as Segment Trees and Binary Indexed Trees (BIT). Both these data structures can handle the these two operations (query and update) in $O(\log{n})$ time. In this paper, we present a data structure similar to the BIT, but with an even smaller constant. To do this, we use Zeckendorf's Theorem, a property of the Fibonacci sequence of numbers. The new data structure achieves the same complexity of $O(\log{n})$, but requires about $\log_{\phi{2}} n$ computations for the Query Operation as opposed to the $\log_{2} n$ computations required for a BIT Query Operation in the worst case.
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.