A unifying look at data structures
Communications of the ACM
LATIN '00 Proceedings of the 4th Latin American Symposium on Theoretical Informatics
Scaling and related techniques for geometry problems
STOC '84 Proceedings of the sixteenth annual ACM symposium on Theory of computing
Optimal External Memory Interval Management
SIAM Journal on Computing
New dynamic balanced search trees with worst-case constant update time
Journal of Automata, Languages and Combinatorics - Special issue: Selected papers of the 13th Australasian workshop on combinatorial algorithms
SIAM Journal on Computing
Random Structures & Algorithms
Space-Efficient Preprocessing Schemes for Range Minimum Queries on Static Arrays
SIAM Journal on Computing
Optimal succinctness for range minimum queries
LATIN'10 Proceedings of the 9th Latin American conference on Theoretical Informatics
Hi-index | 0.00 |
Cartesian trees have found numerous applications due to a peculiar rigid structure whose properties can be exploited in various ways. This rigidness, however, is also an obstacle when updating the structure since it can lead to a very unbalanced shape and so up to now most applications either assumed a random distribution of the keys or considered only the static case. In this paper we present a framework for efficiently maintaining a Cartesian tree under insertions and weak deletions in O(log n) amortized time per operation, using O(n) space. We show that the amortized cost of updating a Cartesian tree is $O(1 + \mathcal{H}(T)/n)$ where $\mathcal{H}(T) = O(nlogn)$ is an entropy-related measure for the partial order encoded by T. We also show how to exploit this property by implementing an algorithm which performs these updates in O(log n) time per operation. No poly-logarithmic update bounds were previously known.