Counting and Reporting Intersections of d-Ranges

We present a solution to the problem of reporting and counting all pairs of intersecting or overlapping d-ranges in a given set of n d-ranges. A d-range is a rectilinearly oriented rectangular d-dimensional box or brick. The three-dimensional case is presented in some detail and an 0(n log<sup>2</sup><inf>2</inf>n + k) time and 0(n log<sup>2</sup><inf>2</inf>n) space algorithm is developed for the reporting problem, where k is the number of reported intersecting pairs. This gives an 0(n log<sup>2</sup><inf>2</inf>n) time and 0(n log<inf>2</inf>n) space algorithm for the counting problem. Apart from its usefulness wherever a "bounding boxes" technique is used, the development of the algorithm is of interest in its own right because of the data structures that are introduced and because of the technique used to reduce the time needed for preprocessing. Finally, the algorithm is generalized to give an 0(2<inf>d−1</inf>n log<inf>2</inf><sup>d−n</sup>+ k) time and an 0(2<sup>d−1</sup>n log<inf>2</inf><sup>d−n</sup>) space algorithm for the d-range intersection reporting problem for d ≥ 2, which again reduces to an 0(2<sup>d−1</sup>n log<inf>2</inf><sup>d−1</sup>n) time and 0(2<sup>d−1</sup>n log<inf>2</inf><sup>d−2</sup>n) space algorithm for the counting problem. Finally, we sketch how the reporting problem can be carried out with the same space requirements as the counting problem. The bounds presented are the best known to date.