Skip to main content
Log in

On counting pairs of intersecting segments and off-line triangle range searching

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We describe a method for decomposing planar sets of segments and points. Using this method we obtain new efficientdeterministic algorithms for counting pairs of intersecting segments, and for answering off-line triangle range queries. In particular we obtain the following results:

  1. (1)

    Givenn segments in the plane, the number of pairs of intersecting segments is counted in timeO(n 1+ɛ+K 1/3 n 2/3+ɛ), whereK is the number of intersection points among the segments, and ɛ>0 is an arbitrarily small constant.

  2. (2)

    Givenn segments in the plane which are colored with two colors, the number of pairs ofbichromatic intersecting segments is counted in timeO(n 1+ɛ+K m 1/3 n 2/3+ɛ), whereK m is the number ofmonochromatic intersection points, and ɛ>0 is an arbitrarily small constant.

  3. (3)

    Givenn weighted points andn triangles on a plane, the sum of weights of points in each triangle is computed in timeO(n 1+ε1/3 n 2/3+ε), where ϰ is the number of vertices in the arrangement of the triangles, and ɛ>0 is an arbitrarily small constant.

The above bounds depend sublinearly on the number of intersections among input segmentsK (resp.K m , ϰ), which is desirable sinceK (resp.K m , ϰ) can range from zero toO(n 2). All of the above algorithms use optimal Θ(n) storage. The constants of proportionality in the big-Oh notation increase as ɛ decreases. These results are based on properties of the sparse nets introduced by Chazelle [Cha3].

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.

Institutional subscriptions

Similar content being viewed by others

References

  • [A1] P. K. Agarwal. Partitioning arrangements of lines, I: An efficient deterministic algorithm.Discrete Comput. Geom., 5:449–483, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  • [A2] P. K. Agarwal. Partitioning arrangements of lines, II: Applications.Discrete Comput. Geom., 5:533–573, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  • [AS] P. K. Agarwal and M. Sharir. Red-blue intersection detection algorithms, with applications to motion planning and collision detection.SIAM J. Comput., 19:297–321, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  • [BO] J. L. Bentley and T. Ottman. Algorithms for reporting and counting geometric intersections.IEEE Trans. Comput., 28:643–647, 1979.

    MATH  Google Scholar 

  • [CE] B. Chazelle and H. Edelsbrunner. An optimal algorithm for intersecting line segments in the plane.J. Assoc. Comput. Mach., 39(1):1–54, 1992.

    MATH  MathSciNet  Google Scholar 

  • [CEGS] B. Chazelle, H. Edelsbrunner, L. Guibas, and M. Sharir. Algorithms for bichromatic line segment problems and polyhedra terrains.Algorithmica, 11:116–132, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  • [CF] B. Chazelle and J. Friedman. A deterministic view of random sampling and its use in geometry.Combinatorica, 10(3):229–249, 1990.

    Article  MATH  MathSciNet  Google Scholar 

  • [Cha1] B. Chazelle. Reporting and counting segment intersections.J. Comput. System Sci., 32:156–182, 1986.

    Article  MATH  MathSciNet  Google Scholar 

  • [Cha2] B. Chazelle. Lower bounds on the complexity of polytope range searching.J. Amer. Math. Soc., 2:637–666, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  • [Cha3] B. Chazelle. Cutting hyperplanes for divide and conquer.Discrete Comput. Geom., 9:145–158, 1993.

    Article  MATH  MathSciNet  Google Scholar 

  • [Cha4] B. Chazelle. Lower bounds for off-line range range searching.Proc. 27th ACM Symp. on Theory of Computing, pages 733–740, 1995.

  • [Cla] K. L. Clarkson. New applications of random sampling in computational geometry.Discrete Comput. Geom., 2:195–222, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  • [CS] K. Clarkson and P. Shor. Applications of random sampling in computational geometry, II.Discrete Comput. Geom., 4:387–422, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  • [CSW] B. Chazelle, M. Sharir, and E. Welzl. Quasi-optimal upper bounds for simplex range searching and new zone theorems.Algorithmica, 8:407–429, 1992.

    Article  MATH  MathSciNet  Google Scholar 

  • [CW] B. Chazelle and E. Welzl. Quasi-optimal range searching in spaces of finite VC-dimension.Discrete Comput. Geom., 4:467–489, 1989.

    Article  MATH  MathSciNet  Google Scholar 

  • [CY] R. Cole and C. K. Yap. Geometric retrieval problems.Inform. and Control, 63:39–57, 1985.

    Article  MathSciNet  Google Scholar 

  • [dBS] M. de Berg and O. Schwarzkopf. Cuttings and applications. Technical Report TR CS-92-26, Department of Computer Science, Utrecht University, 1992.

  • [E] H. Edelsbrunner.Algorithms in Combinatorial Geometry. Springer-Verlag, New York, 1987.

    MATH  Google Scholar 

  • [EOS] H. Edelsbrunner, J. O'Rourke, and R. Seidel. Constructing arrangements of lines and hyperplanes with applications.SIAM J. Comput., 15:341–363, 1986.

    Article  MATH  MathSciNet  Google Scholar 

  • [ES] J. Erickson and R. Seidel. Better lower bounds on detecting affine and spherical degeneracies.Proc. 34th Symp. on Foundations of Computer Science, pages 528–536, 1993.

  • [ESS] H. Edelsbrunner, R. Seidel, and M. Sharir. On the zone theorem for hyperplane arrangements.SIAM J. Comput., 22(2):418–429, 1993.

    Article  MATH  MathSciNet  Google Scholar 

  • [EW] H. Edelsbrunner and E. Welzl. Halfplanar range search in linear space ando(n 0,695) query time.Inform. Process. Lett., 23:289–293, 1986.

    Article  MATH  Google Scholar 

  • [FVFH] J. D. Foley, A. Van Dam, S. K. Feiner, and J. F. Hughes.Computer Graphics: Principles and Practice. Addison-Wesley, Reading, MA. 1990.

    Google Scholar 

  • [GOS] L. Guibas, M. Overmars, and M. Sharir. Intersecting line segments, ray shooting, and other applications of geometric partitioning techniques.Proc. 1st Scand. Workshop on Algorithm Theory, pages 64–73. Lecture Notes in Computer Science, volume 318. Springer-Verlag, Berlin, 1988.

    Google Scholar 

  • [HW] D. Haussler and E. Welzl. ɛ-nets and simplex range queries.Discrete Comput. Geom., 2:127–151, 1987.

    Article  MATH  MathSciNet  Google Scholar 

  • [K] R. Karp. On-line algorithms versus off-line algorithms: how much is it worth to know the future? Technical Report TR-92-044, International Computer Science Institute, 1992.

  • [Mal] F. M. Maley. A generic algorithm for one-dimensional homotopic compactation.Algorithmica, 6:103–128, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  • [Mat1] J. Matoušek. Cutting hyperplane arrangements.Discrete Comput. Geom., 6:385–406, 1991.

    MathSciNet  Google Scholar 

  • [Mat2] J. Matoušek. Efficient partition trees.Discrete Comput. Geom., 8:315–334, 1992.

    Article  MathSciNet  Google Scholar 

  • [Mat3] J. Matoušek. Range searching with efficient hierarchical cuttings.Proc. 8th ACM Symp. on Computational Geometry, pages 276–285, 1992.

  • [Meh] K. Mehlhorn.Multidimensional Searching and Computational Geometry, Chapter 2. Springer-Verlag, Berlin, 1984.

    Google Scholar 

  • [MS] H. G. Mairson and J. Stolfi. Reporting and counting intersections between two sets of line segments. In R. A. Earnshaw, editor,Theoretical Foundations of Computer Graphics and CAD, pages 307–325. NATO ASI, volume F40. Springer-Verlag, Berlin, 1988.

    Google Scholar 

  • [Mul] K. Mulmuley. A fast planar partition algorithm, I.Proc. 29th Ann. IEEE Symp. on Foundations of Computer Science, pages 580–589, 1988.

  • [NP] J. Nievergelt and F. P. Preparata. Plane-sweep algorithms for intersecting geometric figures.Comm. ACM, 25:739–747, 1982.

    Article  MATH  Google Scholar 

  • [P1] M. Pellegrini. On collision-free placements of simplices and the closest pair of lines in 3-space.SIAM J. Comput., 23(1):133–153, 1994.

    Article  MATH  MathSciNet  Google Scholar 

  • [P2] M. Pellegrini. On point location and motion planning in arrangements of simplices.Proc. 26th ACM Symp. on Theory of Computing, pages 95–104, 1994. Journal version inSIAM J. Comput., 25(5), 1996.

  • [PS1] F. P. Preparata and M. I. Shamos.Computational Geometry: an Introduction. Springer-Verlag, New York, 1985.

    Google Scholar 

  • [PS2] J. Pach and M. Sharir. On vertical visibility in arrangements of segments and the queue size in the Bentley-Ottman line sweeping algorithm.SIAM J. Comput., 20:460–470, 1991.

    Article  MATH  MathSciNet  Google Scholar 

  • [SH] M. I. Shamos and D. Hoey. Geometric intersection problems.Proc. 17th Ann. IEEE Symp. on Foundations of Computer Science, pages 208–215, 1976.

  • [W] D. E. Willard. Polygon retrieval.SIAM J. Comput., 11:149–165, 1982.

    Article  MATH  MathSciNet  Google Scholar 

  • [YY] A. C. Yao and F. F. Yao. A general approach toD-dimensional geometric queries.Proc. 17th Ann. ACM Symp. on Theory of Computing, pages 163–168, 1985.

Download references

Author information

Authors and Affiliations

Authors

Additional information

Communicated by B. Chazelle.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Pellegrini, M. On counting pairs of intersecting segments and off-line triangle range searching. Algorithmica 17, 380–398 (1997). https://doi.org/10.1007/BF02523679

Download citation

  • Received:

  • Revised:

  • Issue Date:

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

Key Words

Navigation