Counting and Reporting Red/Blue Segment Intersections

We simplify the red/blue segment intersection algorithm of Chazelle et al: Given sets of n disjoint red and n disjoint blue segments, we count red/blue intersections in O(n log n) time using O(n) space or report them in additional time proportional to their number. Our algorithm uses a plane sweep to presort the segments; then it operates on a list of slabs that efficiently stores a single level of a segment tree. With no dynamic memory allocation, low pointer overhead, and mostly sequential memory reference, our algorithm performs well even with inadequate physical memory.

[1]  Michael Ian Shamos,et al.  Computational geometry: an introduction , 1985 .

[2]  Bernard Chazelle,et al.  An optimal algorithm for intersecting line segments in the plane , 1988, [Proceedings 1988] 29th Annual Symposium on Foundations of Computer Science.

[3]  Harry G. Mairson,et al.  Reporting and Counting Intersections Between Two Sets of Line Segments , 1988 .

[4]  Michael Ian Shamos,et al.  Geometric intersection problems , 1976, 17th Annual Symposium on Foundations of Computer Science (sfcs 1976).

[5]  Mark H. Overmars,et al.  Batched Dynamic Solutions to Decomposable Searching Problems , 1985, J. Algorithms.

[6]  Thomas Ottmann,et al.  Algorithms for Reporting and Counting Geometric Intersections , 1979, IEEE Transactions on Computers.