Computer Science > Data Structures and Algorithms
[Submitted on 24 Nov 2013 (v1), revised 4 Dec 2013 (this version, v3), latest version 3 Aug 2016 (v6)]
Title:On Updating and Querying Sub-arrays of Multidimensional Arrays
View PDFAbstract:For the purpose of this paper, updating a sub-array of the given $d$-dimensional array, with a constant, refers to the addition of the constant to all the elements of the sub-array. Querying a sub-array refers to computation of the sum of all the elements in the sub-array. The 1D updating and querying problem has been studied intensively, and is usually solved using segment trees. This paper presents an algorithm incorporating Binary Indexed Tree to accomplish the same task. The algorithm is then extended to update and query sub-matrices in a matrix (two-dimensional array). Finally, a general solution is proposed for a $d$-dimensional array, with $N$ elements along every dimension, having complexity $O(2^d*log^{d}N)$ for each operation (query or update). This is an improvement, in terms of complexity, over previously devised algorithms utilizing space-partitioning trees like Quad-tree and Octree.
Submission history
From: Pushkar Mishra [view email][v1] Sun, 24 Nov 2013 08:18:04 UTC (6 KB)
[v2] Tue, 3 Dec 2013 15:28:05 UTC (6 KB)
[v3] Wed, 4 Dec 2013 17:27:11 UTC (6 KB)
[v4] Thu, 23 Jan 2014 12:19:36 UTC (84 KB)
[v5] Sun, 1 Nov 2015 10:34:52 UTC (388 KB)
[v6] Wed, 3 Aug 2016 22:19:11 UTC (396 KB)
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer (What is the Explorer?)
Connected Papers (What is Connected Papers?)
Litmaps (What is Litmaps?)
scite Smart Citations (What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv (What is alphaXiv?)
CatalyzeX Code Finder for Papers (What is CatalyzeX?)
DagsHub (What is DagsHub?)
Gotit.pub (What is GotitPub?)
Hugging Face (What is Huggingface?)
Papers with Code (What is Papers with Code?)
ScienceCast (What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower (What are Influence Flowers?)
CORE Recommender (What is CORE?)
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.