Multidimensional segment trees can do range updates in poly-logarithmic time

Updating and querying on a range is a classical algorithmic problem with a multitude of applications. The Segment Tree data structure is particularly notable in handling the range query and update operations. A Segment Tree divides the range into disjoint segments and merges them together to perform...

Full description

Saved in:
Bibliographic Details
Published in:Theoretical computer science Vol. 854; pp. 30 - 43
Main Authors: Ibtehaz, Nabil, Kaykobad, M., Sohel Rahman, M.
Format: Journal Article
Language:English
Published: Elsevier B.V 16-01-2021
Subjects:
Online Access:Get full text
Tags: Add Tag
No Tags, Be the first to tag this record!
Description
Summary:Updating and querying on a range is a classical algorithmic problem with a multitude of applications. The Segment Tree data structure is particularly notable in handling the range query and update operations. A Segment Tree divides the range into disjoint segments and merges them together to perform range queries and range updates elegantly. Although this data structure is remarkably potent for 1-dimensional problems, it falls short in higher dimensions. Lazy Propagation enables the operations to be computed in O(logn) time in a single dimension. However, the concept of lazy propagation could not be translated to higher-dimensional cases, which imposes a time complexity of O(nk−1logn) for operations on k-dimensional data. In this work, we have made an attempt to emulate the idea of lazy propagation differently so that it can be applied for 2-dimensional cases. Moreover, the proposed modification should be capable of performing most general aggregate functions similar to the original Segment Tree, and can also be extended to even higher dimensions. Our proposed algorithm manages to perform range sum queries and updates in O(log2⁡n) time for a 2-dimensional problem, which becomes O(logd⁡n) for a d-dimensional situation.
ISSN:0304-3975
1879-2294
DOI:10.1016/j.tcs.2020.11.034