Data Structures for Retrieval on Square Grids

Families of data structures are presented for retrieval of the sum of values of points within a half plane or polygon, given that the points are at integral coordinates $(N \times N)$ in the plane. Fredman has shown that the problem has a lower bound of $\Omega (N^{{2 / 3}} )$ for intermixed updates and retrievals. When the points are not restricted to integral coordinates, Edelsbrunner and Welzl have shown a retrieval time of $O(N^{ \approx 1.39} )$ (update time$ = O(N^2 \log N)$). One of the data structures presented here permits intermixed updates and retrievals in $O(N^{{2 / {\log N}}})$.We store multiple, rotated data structures to match against the query. Rotation appears to be an effective method for trading-off update time against retrieval time for geometric problems. We also present constructions for efficient retrieval of triangles and polygons. For our data structures, the expected complexity when the points are uniformly distributed is less than the worst case complexity when the points are a...