Transforming Dogs on the Line: On the Fréchet Distance Under Translation or Scaling in 1D

Lotte Blank, Jacobus Conradi, Anne Driemel, Benedikt Kolbe, André Nusser, Marena Richter

Abstract

The Fréchet distance is a standard metric for curve comparison, but its continuous version under transformation has remained computationally intensive for 1D data. This paper presents a novel algorithmic framework that reduces the continuous 1D Fréchet distance problem under translation or scaling to a discrete reachability problem. By utilizing $\delta$-signatures and efficient dynamic data structures, the authors achieve a running time of $\mathcal{O}(n^{8/3} \log^3 n)$, matching the complexity of the discrete case and significantly improving upon the previous $\tilde{\mathcal{O}}(n^4)$ state-of-the-art.

Introduction

Comparing geometric curves is a fundamental task in computational geometry, with the Fréchet distance serving as a primary metric. In the context of 1D time series—such as financial data or medical signals—it is often necessary to allow for vertical translation or scaling to identify similar trends regardless of absolute magnitude. While algorithms for the discrete Fréchet distance under these transformations have reached $\mathcal{O}(n^{8/3} \log^3 n)$, the continuous version has lagged behind, with the best known algorithms requiring $\tilde{\mathcal{O}}(n^4)$ time. This paper closes this two-decade-old gap by providing a faster continuous algorithm.

Methods

The proposed framework achieves its speedup by discretizing the continuous problem through several innovative steps:

  1. $\delta$-Signatures: The algorithm simplifies the continuous curves at a specific distance scale $\delta$. This signature captures only the essential peaks and valleys that influence the Fréchet distance at that scale, effectively converting the continuous path into a discrete sequence of critical points.
Figure 2: The $\delta$-signature process identifies key vertices $P(i_k)$ that represent the curve's structure at a given leash length.
  1. Structural Decomposition and Deadlocks: Curves are partitioned into a prefix, a central $\delta$-signature, and a suffix. To handle the matching of these parts under varying transformations, the authors introduce "deadlocks"—structural constraints that allow for $\mathcal{O}(1)$ updates to the matching status of curve boundaries as the transformation changes.
  2. Offline Dynamic Grid Reachability: The problem of determining if a distance $\delta$ is achievable is mapped to reachability in a grid graph. There are $\mathcal{O}(n^2)$ critical transformation events where the graph structure might change. The algorithm sweeps through these events, using a specialized data structure to maintain reachability information efficiently.
Figure 3: Representation of the matching between curves $P$ and $Q$ as a graph reachability problem.
  1. Parametric Search: To find the optimal distance, the decision algorithm is embedded within a parametric search framework, specifically Cole’s variant of Megiddo’s technique.

Key Insights

A primary insight of this work is that 1D continuous curves behave algorithmically like discrete sequences when viewed through the lens of $\delta$-signatures. Furthermore, the 1D nature of the problem limits the complexity of geometric events to $\mathcal{O}(n^2)$, a property not shared by higher-dimensional curves. The introduction of "deadlocks" provides a highly efficient way to manage boundary conditions during the transformation sweep, preventing costly recomputations.

Results

The authors establish that the continuous Fréchet distance under both translation and scaling can be computed in $\mathcal{O}(n^{8/3} \log^3 n)$ time. This result represents a substantial theoretical improvement and brings parity between the continuous and discrete versions of the problem in one dimension.

Limitations and Future Work

The current algorithm requires both input curves to have the same number of vertices ($n$), a constraint imposed by the underlying grid reachability data structure. Additionally, the framework is strictly optimized for 1D data; extending these techniques to 2D trajectories would involve managing significantly more complex geometric interactions and a higher number of critical events.

Summary updated

BibTeX
@inproceedings{blank2025transforming,
  author = {Lotte Blank and Jacobus Conradi and Anne Driemel and Benedikt Kolbe and André Nusser and Marena Richter},
  title = {{Transforming Dogs on the Line: On the Fréchet Distance Under Translation or Scaling in 1D}},
  booktitle = {SoCG},
  year = {2025},
  doi = {10.4230/lipics.socg.2025.22},
}
Figure