An Optimal Worst Case Algorithm for Reporting Intersections of Rectangles

  • Authors:
  • J. L. Bentley;D. Wood

  • Affiliations:
  • Departments of Computer Science and Mathematics, Carnegie-Mellon University;-

  • Venue:
  • IEEE Transactions on Computers
  • Year:
  • 1980

Quantified Score

Hi-index 15.00

Visualization

Abstract

In this paper we investigate the problem of reporting all intersecting pairs in a set of n rectilinearly oriented rectangles in the plane. This problem arises in applications such as design rule checking of very large-scale integrated (VLSI) circuits and architectural databases. We describe an algorithm that solves this problem in worst case time proportional to n lg n + k, where k is the number of interesecting pairs found. This algorithm is optimal to within a constant factor. As an intermediate step of this algorithm, we solve a problem related to the range searching problem that arises in database applications. Although the algorithms that we describe are primarily theoretical devices (being very difficult to code), they suggest other algorithms that are quite practical.