Skip to main content
Log in

Sampling and sparsification for approximating the packedness of trajectories and detecting gatherings

  • Regular Paper
  • Published:
International Journal of Data Science and Analytics Aims and scope Submit manuscript

Abstract

Packedness is a measure defined for curves as the ratio of maximum curve length inside any disk divided by its radius. Sparsification allows us to reduce the number of candidate disks for maximum packedness to a polynomial amount in terms of the number of vertices of the polygonal curve. This gives an exact algorithm for computing packedness. We prove that using a fat shape, such as a square, instead of a disk gives a constant factor approximation for packedness. Further sparsification using well-separated pair decomposition improves the time complexity at the cost of losing some accuracy. By adjusting the ratio of the separation factor and the size of the query, we improve the approximation factor of the existing algorithm for packedness using square queries. Our experiments show that uniform sampling works well for finding the average packedness of trajectories with almost constant speed. The empirical results confirm that the sparsification method approximates the maximum packedness for arbitrary polygonal curves. In big data models such as massively parallel computations, both sampling and sparsification are efficient and take a constant number of rounds. Most existing algorithms use line-sweeping which is sequential in nature. Also, we design two data-structures for computing the length of the curve inside a query shape: an exact data-structure for disks called hierarchical aggregated queries and an approximate data-structure for a given set of square queries. Using our modified segment tree, we achieve a near-linear time approximation algorithm.

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

Availability of data and material

Publicly available.

References

  1. GPS Trajectories. UCI Machine Learning Repository (2016)

  2. Afshar, R., Goodrich, M.T., Matias, P., Osegueda, M.C.: Reconstructing biological and digital phylogenetic trees in parallel. In: 28th Annual European Symposium on Algorithms (ESA 2020). Schloss Dagstuhl-Leibniz-Zentrum für Informatik (2020)

  3. Agarwal, P.K.: Partitioning arrangements of lines ii: applications. Discrete Comput. Geom. 5(6), 533–573 (1990)

    Article  MathSciNet  MATH  Google Scholar 

  4. Agarwal, P.K., Har-Peled, S., Varadarajan, K.R.: Approximating extent measures of points. J. ACM (JACM) 51(4), 606–635 (2004)

    Article  MathSciNet  MATH  Google Scholar 

  5. Agarwal, P.K., Katz, M.J., Sharir, M.: Computing depth orders for fat objects and related problems. Comput. Geom. 5(4), 187–206 (1995)

    Article  MathSciNet  MATH  Google Scholar 

  6. Aghamolaei, S., Baharifard, F., Ghodsi, M.: Geometric spanners in the MapReduce model. In International Computing and Combinatorics Conference, pp. 675–687. Springer, Berlin (2018)

  7. Aghamolaei, S., Keikha, V., Ghodsi, M., Mohades, A.: Windowing queries using Minkowski sum and their extension to MapReduce. J. Supercomput. (2020)

  8. Beame, P., Koutris, P., Suciu, D.: Communication steps for parallel query processing. J. ACM (JACM) 64(6), 1–58 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  9. Bringmann, K., Künnemann, M.: Improved approximation for Fréchet distance on c-packed curves matching conditional lower bounds. In International Symposium on Algorithms and Computation, pp. 517–528. Springer, Berlin (2015)

  10. Browning, E., Bolton, M., Owen, E., Shoji, A., Guilford, T., Freeman, R.: Predicting animal behaviour using deep learning: Gps data alone accurately predict diving in seabirds. Methods Ecol. Evol. (2017). https://doi.org/10.5061/dryad.t7ck5

    Article  Google Scholar 

  11. Callahan, P.B.: Dealing with higher dimensions: the well-separated pair decomposition and its applications. Ph.D. thesis, Johns Hopkins University (1995)

  12. Chen, D., Driemel, A., Guibas, L.J., Nguyen, A., Wenk, C.: Approximate map matching with respect to the Fréchet distance. In 2011 Proceedings of the Thirteenth Workshop on Algorithm Engineering and Experiments (ALENEX), pp. 75–83. SIAM (2011)

  13. Cruz, M.O., Macedo, H., Guimaraes, A.: Grouping similar trajectories for carpooling purposes. In 2015 Brazilian Conference on Intelligent Systems (BRACIS), pp. 234–239. IEEE (2015)

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

  15. Driemel, A., Har-Peled, S.: Jaywalking your dog: computing the Fréchet distance with shortcuts. SIAM J. Comput. 42(5), 1830–1866 (2013)

    Article  MathSciNet  MATH  Google Scholar 

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

    Article  MathSciNet  MATH  Google Scholar 

  17. Driemel, A., Krivošija, A.: Probabilistic embeddings of the Fréchet distance. In International Workshop on Approximation and Online Algorithms, pp. 218–237. Springer, Berlin (2018)

  18. Gerbessiotis, A.V.: An architecture independent study of parallel segment trees. J. Discrete Algorithms 4(1), 1–24 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  19. Goodrich, M.T., Sitchinava, N., Zhang, Q.: Sorting, searching, and simulation in the MapReduce framework. In International Symposium on Algorithms and Computation, pp. 374–383. Springer, Berlin (2011)

  20. Goodrich, M.T., Sitchinava, N., Zhang, Q., IT-Parken, A.: Sorting, searching, and simulation in the MapReduce framework. arXiv preprint arXiv:1101.1902 (2011)

  21. Gudmundsson, J., van Kreveld, M., Staals, F.: Algorithms for hotspot computation on trajectory data. In Proceedings of the 21st ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, pp. 134–143 (2013)

  22. Gudmundsson, J., Sha, Y., Wong, S.: Approximating the packedness of polygonal curves. In Cao, Y., Cheng, S.W., Li, M. (eds.) 31st International Symposium on Algorithms and Computation (ISAAC 2020), Leibniz International Proceedings in Informatics (LIPIcs), vol. 181, pp. 9:1–9:15. Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany (2020). 10.4230/LIPIcs.ISAAC.2020.9. https://drops.dagstuhl.de/opus/volltexte/2020/13353

  23. Gudmundsson, J., Smid, M.: Fast algorithms for approximate Fréchet matching queries in geometric trees. Comput. Geom. 48(6), 479–494 (2015)

    Article  MathSciNet  MATH  Google Scholar 

  24. Har-Peled, S., Raichel, B.: The Fréchet distance revisited and extended. ACM Trans. Algorithms (TALG) 10(1), 1–22 (2014)

    Article  MATH  Google Scholar 

  25. Har-Peled, S., Zhou, T.: How packed is it, really? CoRR (2021). arXiv:2105.10776

  26. Leighton, F.T.: Introduction to parallel algorithms and architectures: Arrays \(\cdot \) trees \(\cdot \) hypercubes. Elsevier, Amsterdam (2014)

    Google Scholar 

  27. Narasimhan, G., Smid, M.: Geometric Spanner Networks. Cambridge University Press, Cambridge (2007)

    Book  MATH  Google Scholar 

  28. Parhami, B.: Introduction to Parallel Processing: Algorithms and Architectures. Springer Science and Business Media, Berlin (2006)

    Google Scholar 

  29. Williams, V.V., Williams, R.R.: Subcubic equivalences between path, matrix, and triangle problems. J. ACM (JACM) 65(5), 1–38 (2018)

    Article  MathSciNet  MATH  Google Scholar 

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

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

    Google Scholar 

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

Download references

Funding

V. Keikha was Supported by the Czech Science Foundation, Grant No. GJ19-06792Y, and with institutional support RVO:67985807.

Author information

Authors and Affiliations

Authors

Contributions

Sepideh Aghamolaei, Vahideh Keikha, Mohammad Ghodsi, and Ali Mohades contributed to writing, review, and editing. Sepideh Aghamolaei contributed to implementation. Mohammad Ghodsi and Ali Mohades contributed to supervision.

Corresponding author

Correspondence to Sepideh Aghamolaei.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Code availability

Publicly available at https://github.com/saghamolaei/Packedness.

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. Sampling and sparsification for approximating the packedness of trajectories and detecting gatherings. Int J Data Sci Anal 15, 201–216 (2023). https://doi.org/10.1007/s41060-021-00301-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s41060-021-00301-0

Keywords

Navigation