Table of Contents
Fetching ...

On computing the (exact) Fréchet distance with a frog

Jacobus Conradi, Ivor van der Hoog, Eva Rotenberg

TL;DR

This work reexamines the frog-based framework for computing the continuous Fréchet distance, addressing exactness, convergence, and lossless simplification. It develops an exact on-demand refinement method with exact arithmetic, provides an open-source implementation, and conducts extensive empirical analysis showing that, although frog-based methods have strong theoretical appeal, a highly optimized non-frog approach (BKN) often dominates in practice. The study highlights data-dependent performance and introduces tighter bounds and a more efficient lossless simplification to improve the theoretical robustness of the frog-based technique. Together, these results offer a nuanced view of the frog-based method’s role in exact Fréchet distance computation, emphasizing theoretical guarantees alongside practical limitations.

Abstract

The continuous Frechet distance between two polygonal curves is classically computed by exploring their free space diagram. Recently, Har-Peled, Raichel, and Robson [SoCG'25] proposed a radically different approach: instead of directly traversing the continuous free space, they approximate the distance by computing paths in a discrete graph derived from the discrete free space, recursively bisecting edges until the discrete distance converges to the continuous Frechet distance. They implement this so-called frog-based technique and report substantial practical speedups over the state of the art. We revisit the frog-based approach and address three of its limitations. First, the method does not compute the Frechet distance exactly. Second, the recursive bisection procedure only introduces the monotonicity events required to realise the Frechet distance asymptotically, that is, only in the limit. Third, the applied simplification technique is heuristic. Motivated by theoretical considerations, we develop new techniques that guarantee exactness, polynomial-time convergence, and near-optimal lossless simplifications. We provide an open-source C++ implementation of our variant. Our primary contribution is an extensive empirical evaluation. As expected, exact computation introduces overhead and increases the median running time. Yet, our method is often faster in the worst case, the slowest ten percent of instances, or even on average due to its convergence guarantees. More surprisingly, in our experiments, the implementation of Bringmann, Kuennemann, and Nusser [SoCG'19] consistently outperforms all frog-based approaches in practice. This appears to contrast published claims of the efficiency of the frog-based techniques. These results thereby provide nuanced perspective on frogs: highlighting both the theoretical appeal, but also the practical limitations.

On computing the (exact) Fréchet distance with a frog

TL;DR

This work reexamines the frog-based framework for computing the continuous Fréchet distance, addressing exactness, convergence, and lossless simplification. It develops an exact on-demand refinement method with exact arithmetic, provides an open-source implementation, and conducts extensive empirical analysis showing that, although frog-based methods have strong theoretical appeal, a highly optimized non-frog approach (BKN) often dominates in practice. The study highlights data-dependent performance and introduces tighter bounds and a more efficient lossless simplification to improve the theoretical robustness of the frog-based technique. Together, these results offer a nuanced view of the frog-based method’s role in exact Fréchet distance computation, emphasizing theoretical guarantees alongside practical limitations.

Abstract

The continuous Frechet distance between two polygonal curves is classically computed by exploring their free space diagram. Recently, Har-Peled, Raichel, and Robson [SoCG'25] proposed a radically different approach: instead of directly traversing the continuous free space, they approximate the distance by computing paths in a discrete graph derived from the discrete free space, recursively bisecting edges until the discrete distance converges to the continuous Frechet distance. They implement this so-called frog-based technique and report substantial practical speedups over the state of the art. We revisit the frog-based approach and address three of its limitations. First, the method does not compute the Frechet distance exactly. Second, the recursive bisection procedure only introduces the monotonicity events required to realise the Frechet distance asymptotically, that is, only in the limit. Third, the applied simplification technique is heuristic. Motivated by theoretical considerations, we develop new techniques that guarantee exactness, polynomial-time convergence, and near-optimal lossless simplifications. We provide an open-source C++ implementation of our variant. Our primary contribution is an extensive empirical evaluation. As expected, exact computation introduces overhead and increases the median running time. Yet, our method is often faster in the worst case, the slowest ten percent of instances, or even on average due to its convergence guarantees. More surprisingly, in our experiments, the implementation of Bringmann, Kuennemann, and Nusser [SoCG'19] consistently outperforms all frog-based approaches in practice. This appears to contrast published claims of the efficiency of the frog-based techniques. These results thereby provide nuanced perspective on frogs: highlighting both the theoretical appeal, but also the practical limitations.

Paper Structure

This paper contains 36 sections, 5 theorems, 9 equations, 12 figures, 5 tables, 1 algorithm.

Key Result

Theorem 5

Let $(\pi,\sigma)$ be the original input curves with $n$ and $m$ vertices. Algorithm alg:refine can be supported by a data structure using $O(n+m+M)$ space, where $M \in O(n^{3} + m^{3})$ is the number of introduced monotonicity vertices. Each recursive call runs in $O(nm + M)$ time for Step 1 and $

Figures (12)

  • Figure 1: Two curves $(\pi, \sigma)$ with their parameter space. White space indicates that the corresponding points are within some distance $\Delta$. In each grid, we illustrate the edge events. For each monotonicity event defined by an edge $e$ and vertices $(x_1, x_2)$ we show the event on $e$ with a cross.
  • Figure 2: Two pairs of curves $(\pi, \sigma)$ and their VE-graph which is a directed and vertex-weighted graph. The minimum-cost path from $(1, 1)$ to $(n, m)$ in this graph is not a monotone traversal.
  • Figure 3: Maximum running times in seconds, log-scale, for curves from eight data sets.
  • Figure 4: (Left) A traversal between two curves where the red leash realises $\mathcal{D}_F(\pi,\sigma)$. The traversal may be 'lazy': a large Fréchet distance allows long pauses while the other curve progresses. (Right) A retractable traversal achieves progressively smaller bottleneck leash lengths.
  • Figure 5: The VE graph considers for each cell the four corners and the four eddys. We include all monotone edges between these vertices. Edges connecting the eddys between horizontal (or vertical) edges may be non-monotone. If vertices coincide, then the picture gets a bit messy.
  • ...and 7 more figures

Theorems & Definitions (11)

  • Definition 1
  • Definition 2
  • Definition 3
  • Definition 4
  • Theorem 5
  • Definition 6
  • Lemma 7
  • Theorem 7
  • Definition 8: Fréchet distance with additive weights
  • Lemma 9
  • ...and 1 more