Skip to main content
Log in

An optimal time and minimal space algorithm for rectangle intersection problems

  • Published:
International Journal of Computer & Information Sciences Aims and scope Submit manuscript

Abstract

Given a set ofn iso-oriented rectangles in the plane whose sides are parallel to the coordinate axes, we consider the rectangle intersection problem, i.e., finding alls intersecting pairs. The problem is well solved in the past and its solution relies heavily on unconventional data structures such as range trees, segment trees or rectangle trees. In this paper we demonstrate that classical divide-and-conquer technique and conventional data structures such as linked lists are sufficient to achieve a time bound ofO(n logn) +s, and a space bound of Θ(n), both of which are optimal.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. M. I. Shamos, and D. Hoey, Geometric intersection problems,Proc. 17th IEEE Symp. Foundations of Computer Science, pp. 208–215 (October 1976).

  2. J. L. Bentley and T. Ottmann, Algorithms for reporting and counting geometric intersections,IEEE Trans. Comput.,C28: 643–647 (September 1979).

    Google Scholar 

  3. K. Q. Brown, Comments on ‘Algorithms for reporting and counting geometric intersections’,IEEE Trans. Comput.,C30: 147–148 (February 1981).

    Google Scholar 

  4. J. L. Bentley and D. Wood, An optimal worst-case algorithm for reporting intersections of rectangles,IEEE Trans. Comput.,C29: 571–576 (July 1980).

    Google Scholar 

  5. J. L. Bentley, Algorithms for Klee's rectangle problem, (unpublished manuscript) Carnegie-Mellon University, 1977.

  6. H. W. Six and D. Wood, The rectangle intersection problem revisited,BIT,20: 426–433, 1980.

    Google Scholar 

  7. V. Vaishnavi and D. Wood, Data structures for the rectangle containment and enclosure problems,Computer Graphics and Image Processing, 13: 372–384, 1980.

    Google Scholar 

  8. D. T. Lee and C. K. Wong, Finding intersection of rectangles by range search,J. Algorithms,2: 337–347, 1981.

    Google Scholar 

  9. H. Edelsbrunner, Dynamic rectangle intersection searching, Inst. for Informationsverarbeitung, TU Graz, Bericht 47 (February 1980).

  10. J. L. Bentley, Decomposable searching problems,Info. Proc. Lett.,8: 244–251, 1979.

    Google Scholar 

  11. G. S. Lueker and D. E. Willard, A data structure for dynamic range queries,Info. Proc. Lett, 15(5): 209–213 (December 1982).

    Google Scholar 

  12. D. T. Lee and F. P. Preparata, An improved algorithm for the rectangle enclosure problem,J. Algorithms,3(3): 218–224, 1982.

    Google Scholar 

  13. H. Edelsbrunner, A time- and space-optimal solution for the planar all intersecting rectangles problem, Inst. for Informationsverarbeitung, TU Graz, Bericht 50, (April 1980).

  14. E. M. McGreight, Efficient algorithms for enumerating intersecting intervals and rectangles, Res. Rep. CSL-80-9, Xerox PARC, Palo Alto, California, (June 1980).

  15. D. E. Knuth,The Art of Computer Programming, Vol. 3: Sorting and Searching, Addison-Wesley, Reading, Massachusetts, 1973.

    Google Scholar 

  16. H. N. Gabow and R. E. Tarjan, A linear time algorithm for a special case of disjoint set union problem,Proc. 15th ACM Symp. Theory of Computing, pp. 246–251, (April 1983).

  17. A. V. Aho, J. E. Hopcroft, and J. D. Ullman,The Designand Analysis of Efficient Computer Algorithms, Addison-Wesley, Reading, Massachusetts, 1974.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Supported in part by the National Science Foundation under Grants MCS 8342682 and ECS 8340031.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Lee, D.T. An optimal time and minimal space algorithm for rectangle intersection problems. International Journal of Computer and Information Sciences 13, 23–32 (1984). https://doi.org/10.1007/BF00989481

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF00989481

Key words

Navigation