Skip to main content
Log in

Computing the Fréchet Gap Distance

  • Published:
Discrete & Computational Geometry Aims and scope Submit manuscript

Abstract

Measuring the similarity of two polygonal curves is a fundamental computational task. Among alternatives, the Fréchet distance is one of the most well-studied similarity measures. Informally, the Fréchet distance is described as the minimum leash length required for a man on one of the curves to walk a dog on the other curve continuously from the starting to the ending points. In this paper we study a variant called the Fréchet gap distance. In the man and dog analogy, the Fréchet gap distance minimizes the difference of the longest and smallest leash lengths used over the entire walk. This measure in some ways better captures our intuitive notions of curve similarity, for example giving distance zero to translated copies of the same curve. The Fréchet gap distance was originally introduced by Filtser and Katz [19] in the context of the discrete Fréchet distance. Here we study the continuous version, which presents a number of additional challenges not present in discrete case. In particular, the continuous nature makes bounding and searching over the critical events a rather difficult task. For this problem we give an \(O(n^5\log n)\) time exact algorithm and a more efficient \(O(n^2\log n +({n^2}/{{\varepsilon }})\log ({1}/{{\varepsilon }}))\) time \((1+{\varepsilon })\)-approximation algorithm, where n is the total number of vertices of the input curves. Note that, ignoring logarithmic factors, for any constant \({\varepsilon }\) our approximation has quadratic running time, matching the lower bound, assuming SETH [Bringmann, K.: Why walking the dog takes time: Fréchet distance has no strongly subquadratic algorithms unless SETH fails (2014)], for approximating the standard Fréchet distance for general curves.

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

Similar content being viewed by others

Notes

  1. For simplicity, from this point onwards we assume without loss of generality that \(m\le n\) and only write sizes and running times with respect to n.

  2. Technically, the endpoint case is not a hyperbola, though it is similar.

  3. Note the number of local minima per constraint and the number of times two constraints intersect is a constant, but the constant may be larger than one. Thus technically the described sampling is not truly uniform. One can make it uniform, though this distinction is irrelevant for our asymptotic analysis.

  4. Technically, here we ignore irrelevant, but possible, constraints where the horizontal line lies below \(d_o\).

References

  1. Agarwal, P.K., Ben Avraham, R., Kaplan, H., Sharir, M.: Computing the discrete Fréchet distance in subquadratic time. SIAM J. Comput. 43(2), 429–449 (2014)

    Article  MathSciNet  Google Scholar 

  2. Alt, H., Buchin, M.: Can we compute the similarity between surfaces? Discrete Comput. Geom. 43(1), 78–99 (2010)

    Article  MathSciNet  Google Scholar 

  3. Alt, H., Efrat, A., Rote, G., Wenk, C.: Matching planar maps. In: 14th Annual ACM-SIAM Symposium on Discrete Algorithms (Baltimore 2003), pp. 589–598. ACM, New York (2003)

  4. Alt, H., Godau, M.: Computing the Fréchet distance between two polygonal curves. Int. J. Comput. Geom. Appl. 5(1–2), 75–91 (1995)

    Article  Google Scholar 

  5. Alt, H., Knauer, Ch., Wenk, C.: Matching polygonal curves with respect to the Fréchet distance. In: Annual Symposium on Theoretical Aspects of Computer Science (Dresden 2001). Lecture Notes in Comput. Sci., vol. 2010, pp. 63–74. Springer, Berlin (2001)

  6. Ben Avraham, R., Filtser, O., Kaplan, H., Katz, M.J., Sharir, M.: The discrete and semicontinuous Fréchet distance with shortcuts via approximate distance counting and selection. ACM Trans. Algorithms 11(4), # 29 (2015)

  7. Ben Avraham, R., Kaplan, H., Sharir, M.: A faster algorithm for the discrete Fréchet distance under translation (2015). arXiv:1501.03724

  8. Bentley, J.L., Ottmann, T.A.: Algorithms for reporting and counting geometric intersections. IEEE Trans. Comput. 28(9), 643–647 (1979)

    Article  Google Scholar 

  9. Brakatsoulas, S., Pfoser, D., Salas, R., Wenk, C.: On map-matching vehicle tracking data. In: 31st VLDB Conference (Trondheim 2005), pp. 853–864 (2005)

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

  11. Bringmann, K., Künnemann, M., Nusser, A.: Fréchet distance under translation: conditional hardness and an algorithm via offline dynamic grid reachability. In: 30th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 2902–2921. SIAM, Philadelphia (2019)

  12. Buchin, K., Buchin, M., Gudmundsson, J., Löffler, M., Luo, J.: Detecting commuting patterns by clustering subtrajectories. Int. J. Comput. Geom. Appl. 21(3), 253–282 (2011)

    Article  MathSciNet  Google Scholar 

  13. Buchin, K., Buchin, M., Meulemans, W., Mulzer, W.: Four Soviets walk the dog—with an application to Alt’s conjecture. In: 25th Annual ACM-SIAM Symposium on Discrete Algorithms, pp. 1399–1413. ACM, New York (2014)

  14. Buchin, K., Buchin, M., Wenk, C.: Computing the Fréchet distance between simple polygons in polynomial time. In: 22nd Annual Symposium on Computational Geometry, pp. 80–87. ACM, New York (2006)

  15. Buchin, M., Driemel, A., Speckmann, B.: Computing the Fréchet distance with shortcuts is NP-hard. In: 30th Annual Symposium on Computational Geometry, pp. 367–376. ACM, New York (2014)

  16. 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  Google Scholar 

  17. 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  Google Scholar 

  18. Eiter, T., Mannila, H.: Computing discrete Fréchet distance. Christian Doppler Laboratory for Expert Systems, TU Vienna, Austria, CD-TR 94/64 (1994)

  19. Filtser, O., Katz, M.J.: The discrete Fréchet gap (2015). arXiv:1506.04861

  20. Filtser, O., Katz, M.J.: Algorithms for the discrete Fréchet distance under translation. In: 16th Scandinavian Symposium and Workshops on Algorithm Theory. Leibniz Int. Proc. Inform., vol. 101, # 20. Leibniz-Zent. Inform., Wadern (2018)

  21. Har-Peled, S., Raichel, B.: The Fréchet distance revisited and extended. ACM Trans. Algorithms 10(1), # 3 (2014)

  22. Jiang, M., Xu, Y., Zhu, B.: Protein structure-structure alignment with discrete Fréchet distance. J. Bioinform. Comput. Biol. 6(1), 51–64 (2008)

    Article  Google Scholar 

  23. Kim, M.-S., Kim, S.-W., Shin, M.: Optimization of subsequence matching under time warping in time-series databases. In: ACM Symposium on Applied Computing (Santa Fe 2005), pp. 581–586. ACM, New York (2005)

  24. Rote, G.: Computing the Fréchet distance between piecewise smooth curves. Comput. Geom. 37(3), 162–174 (2007)

    Article  MathSciNet  Google Scholar 

  25. Serrà, J., Gómez, E., Herrera, P., Serra, X.: Chroma binary similarity and local alignment applied to cover song identification. IEEE Trans. Audio Speech Language Process. 16(6), 1138–1151 (2008)

    Article  Google Scholar 

  26. Wenk, C., Salas, R., Pfoser, D.: Addressing the need for map-matching speed: Localizing global curve-matching algorithms. In: 18th International Conference on Scientific and Statistical Database Management (Vienna 2006), pp. 879–888. IEEE Computer Soc., Los Alamitos (2006)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Benjamin Raichel.

Additional information

Editor in Charge: Kenneth Clarkson

Publisher's Note

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

Work on this paper was partially supported by NSF CRII Award 1566137 and CAREER Award 1750780.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Fan, C., Raichel, B. Computing the Fréchet Gap Distance. Discrete Comput Geom 65, 1244–1274 (2021). https://doi.org/10.1007/s00454-020-00224-w

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00454-020-00224-w

Navigation