Skip to main content
Log in

Windowing queries using Minkowski sum and their extension to MapReduce

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Given a set of n segments and a query shape Q, the windowing length query asks for finding the sum of the lengths of the parts of the segments that lie inside Q. The popular places problem of a set of curves asks for the subset of the plane where each query shape centered at a point of that region intersects with at least f distinct curves. For square queries, an optimal \(O(n^2)\) time algorithm and a matching lower bound exist. We solve the length query problem for convex polygons and disks as query shapes, with \(O(\log n+k)\) query time and polynomial preprocessing time that depends on the complexity of the query shape. We define a new version of the problem of finding popular places in a set of trajectories where the center of a query is a popular place if the length of the curves inside that query is at least f and use our data structure to solve the original problem as well as this new version. Other than length queries, we solve reporting queries that return the set of intersected segments. For disk queries, we design a point-location data structure for congruent disks with \(O(\log n)\) query time and \(O(n^3\log n)\) preprocessing. We also give algorithms for computing the length query for c-packed curves, which are a class of curves for which the length of the curve inside a disk of radius r is upper-bounded by cr, where c is a constant. Also, we use length queries for polygons to approximate the minimum value c for which a curve is c-packed, if such a c exists. Our results extend to MRC and MPC models for MapReduce, where we address these problems on a set of x-monotone curves. The round complexities of our MapReduce algorithms are constant. In addition, we also implemented our popular places algorithms on trajectories on inputs as big as 15K points to evaluate the efficiency of our algorithms in practice.

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.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17
Fig. 18

Similar content being viewed by others

References

  1. Agarwal PK, Har-Peled S, Varadarajan KR (2004) Approximating extent measures of points. J ACM 51(4):606–635

    Article  MathSciNet  MATH  Google Scholar 

  2. Arya S, Malamatos T, Mount DM (2007) A simple entropy-based algorithm for planar point location. ACM Trans Algorithms 3(2):17

    Article  MathSciNet  MATH  Google Scholar 

  3. Barequet G, Dickerson M, Pau P (1997) Translating a convex polygon to contain a maximum number of points. Comput Geom 8(4):167–179

    Article  MathSciNet  MATH  Google Scholar 

  4. Beame P, Koutris P, Suciu D (2013) Communication steps for parallel query processing. In: Proceedings of the 32nd ACM SIGMOD-SIGACT-SIGAI Symposium on Principles of Database Systems, ACM, pp 273–284

  5. Benkert M, Djordjevic B, Gudmundsson J, Wolle T (2010) Finding popular places. Int J Comput Geom Appl 20(01):19–42

    Article  MathSciNet  MATH  Google Scholar 

  6. Benson RV (1966) Euclidean geometry and convexity. McGraw-Hill, New York

    MATH  Google Scholar 

  7. Bringmann K (2014) Why walking the dog takes time: Fréchet distance has no strongly subquadratic algorithms unless SETH fails. In: 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, IEEE, pp 661–670

  8. Chazelle BM, Lee DT (1986) On a circle placement problem. Computing 36(1–2):1–16

    Article  MathSciNet  MATH  Google Scholar 

  9. De Berg M, Van Kreveld M, Overmars M, Schwarzkopf O (1997) Computational geometry. Springer, Berlin, pp 1–17

    Book  MATH  Google Scholar 

  10. Driemel A, Har-Peled S, Wenk C (2012) Approximating the Fréchet distance for realistic curves in near linear time. Discrete Comput Geom 48(1):94–127

    Article  MathSciNet  MATH  Google Scholar 

  11. Edelsbrunner H, Guibas LJ, Stolfi J (1986) Optimal point location in a monotone subdivision. SIAM J Comput 15(2):317–340

    Article  MathSciNet  MATH  Google Scholar 

  12. Edelsbrunner H, Guibas L, Pach J, Pollack R, Seidel R, Sharir M (1992) Arrangements of curves in the plane—topology, combinatorics, and algorithms. Theor Comput Sci 92(2):319–336

    Article  MathSciNet  MATH  Google Scholar 

  13. Fogel E, Halperin D, Wein R (2012) CGAL arrangements and their applications: a step-by-step guide, vol 7. Springer, Berlin

    Book  MATH  Google Scholar 

  14. Fort M, Sellarès JA, Valladares N (2014) Computing and visualizing popular places. Knowl Inf Syst 40(2):411–437

    Article  Google Scholar 

  15. Gilbert JR, Miller GL, Teng SH (1998) Geometric mesh partitioning: implementation and experiments. SIAM J Sci Comput 19(6):2091–2110

    Article  MathSciNet  MATH  Google Scholar 

  16. Goodrich MT (1991) Intersecting line segments in parallel with an output-sensitive number of processors. SIAM J Comput 20(4):737–755

    Article  MathSciNet  MATH  Google Scholar 

  17. Goodrich MT (1993) Constructing arrangements optimally in parallel. Discrete Comput Geom 9(4):371–385

    Article  MathSciNet  MATH  Google Scholar 

  18. Goodrich MT, Sitchinava N, Zhang Q (2011) Sorting, searching, and simulation in the MapReduce framework. arXiv:11011902

  19. Haran I (2006) Efficient point location in general planar subdivisions using landmarks. Tel Aviv University, Tel Aviv

    Google Scholar 

  20. Karloff H, Suri S, Vassilvitskii S (2010) A model of computation for MapReduce. In: Proceedings of the Twenty-First Annual ACM-SIAM Symposium on Discrete Algorithms, SIAM, pp 938–948

  21. Kaul A, Farouki RT (1995) Computing Minkowski sums of plane curves. Int J Comput Geom Appl 5(04):413–432

    Article  MathSciNet  MATH  Google Scholar 

  22. Kedem K, Livne R, Pach J, Sharir M (1986) On the union of Jordan regions and collision-free translational motion amidst polygonal obstacles. Discrete Comput Geom 1(1):59–71

    Article  MathSciNet  MATH  Google Scholar 

  23. Laube P, Imfeld S, Weibel R (2005) Discovering relative motion patterns in groups of moving point objects. Int J Geogr Inf Sci 19(6):639–668

    Article  Google Scholar 

  24. Laube P, van Kreveld M, Imfeld S (2005) Finding REMO—detecting relative motion patterns in geospatial lifelines. Developments in spatial data handling. Springer, Berlin, pp 201–215

    Chapter  Google Scholar 

  25. Leighton FT (2014) Introduction to parallel algorithms and architectures: arrays\(\cdot\) trees\(\cdot\) hypercubes. Elsevier, Amsterdam

    Google Scholar 

  26. Oks E, Sharir M (2006) Minkowski sums of monotone and general simple polygons. Discrete Comput Geom 35(2):223–240

    Article  MathSciNet  MATH  Google Scholar 

  27. Overmars MH, Yap CK (1991) New upper bounds in Klee’s measure problem. SIAM J Comput 20(6):1034–1045

    Article  MathSciNet  MATH  Google Scholar 

  28. Pollack R, Sharir M, Sifrony S (1988) Separating two simple polygons by a sequence of translations. Discrete Comput Geom 3(2):123–136

    Article  MathSciNet  MATH  Google Scholar 

  29. Sarnak N, Tarjan RE (1986) Planar point location using persistent search trees. Commun ACM 29(7):669–679

    Article  MathSciNet  MATH  Google Scholar 

  30. Shakhnarovich G, Darrell T, Indyk P (2006) Theory. The MIT Press, Cambridge

    Google Scholar 

  31. Sharir M (1987) Efficient algorithms for planning purely translational collision-free motion in two and three dimensions. In: Proceedings. 1987 IEEE International Conference on Robotics and Automation, Citeseer, vol 4, pp 1326–1331

  32. Toth CD, O’Rourke J, Goodman JE (2017) Handbook of discrete and computational geometry (Chapter 28). Chapman and Hall/CRC, Boca Raton

    MATH  Google Scholar 

  33. Zheng K, Zheng Y, Yuan NJ, Shang S, Zhou X (2013) Online discovery of gathering patterns over trajectories. IEEE Trans Knowl Data Eng 26(8):1974–1988

    Article  Google Scholar 

  34. Zheng Y, Li Q, Chen Y, Xie X, Ma WY (2008) Understanding mobility based on GPS data. In: Proceedings of the 10th International Conference on Ubiquitous Computing, pp 312–321

  35. Zheng Y, Zhang L, Xie X, Ma WY (2009) Mining interesting locations and travel sequences from GPS trajectories. In: Proceedings of the 18th International Conference on World Wide Web, pp 791–800

  36. Zheng Y, Xie X, Ma WY et al (2010) Geolife: a collaborative social networking service among user, location and trajectory. IEEE Data Eng Bull 33(2):32–39

    Google Scholar 

Download references

Acknowledgements

The length query problem was an open problem in the Winter School on Computational Geometry 2014 at Amirkabir University of Technology.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Sepideh Aghamolaei.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Aghamolaei, S., Keikha, V., Ghodsi, M. et al. Windowing queries using Minkowski sum and their extension to MapReduce. J Supercomput 77, 936–972 (2021). https://doi.org/10.1007/s11227-020-03299-7

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-020-03299-7

Keywords

Navigation