Table of Contents
Fetching ...

On the Discrete Fréchet Distance in a Graph

Anne Driemel, Ivor van der Hoog, Eva Rotenberg

TL;DR

A conditional lower bound is provided showing that the Fr\'{e}chet distance, or even its $1.01$-approximation, between arbitrary \emph{paths} in a weighted planar graph cannot be computed in $O((|P|\cdot|Q|)^{1-\delta})$ time for any $\delta>0$ unless the Orthogonal Vector Hypothesis fails.

Abstract

The Fréchet distance is a well-studied similarity measure between curves that is widely used throughout computer science. Motivated by applications where curves stem from paths and walks on an underlying graph (such as a road network), we define and study the Fréchet distance for paths and walks on graphs. When provided with a distance oracle of $G$ with $O(1)$ query time, the classical quadratic-time dynamic program can compute the Fréchet distance between two walks $P$ and $Q$ in a graph $G$ in $O(|P| \cdot |Q|)$ time. We show that there are situations where the graph structure helps with computing Fréchet distance: when the graph $G$ is planar, we apply existing (approximate) distance oracles to compute a $(1+\varepsilon)$-approximation of the Fréchet distance between any shortest path $P$ and any walk $Q$ in $O(|G| \log |G| / \sqrt{\varepsilon} + |P| + \frac{|Q|}{\varepsilon } )$ time. We generalise this result to near-shortest paths, i.e. $κ$-straight paths, as we show how to compute a $(1+\varepsilon)$-approximation between a $κ$-straight path $P$ and any walk $Q$ in $O(|G| \log |G| / \sqrt{\varepsilon} + |P| + \frac{κ|Q|}{\varepsilon } )$ time. Our algorithmic results hold for both the strong and the weak discrete Fréchet distance over the shortest path metric in $G$. Finally, we show that additional assumptions on the input, such as our assumption on path straightness, are indeed necessary to obtain truly subquadratic running time. We provide a conditional lower bound showing that the Fréchet distance, or even its $1.01$-approximation, between arbitrary \emph{paths} in a weighted planar graph cannot be computed in $O((|P|\cdot|Q|)^{1-δ})$ time for any $δ> 0$ unless the Orthogonal Vector Hypothesis fails. For walks, this lower bound holds even when $G$ is planar, unit-weight and has $O(1)$ vertices.

On the Discrete Fréchet Distance in a Graph

TL;DR

A conditional lower bound is provided showing that the Fr\'{e}chet distance, or even its -approximation, between arbitrary \emph{paths} in a weighted planar graph cannot be computed in time for any unless the Orthogonal Vector Hypothesis fails.

Abstract

The Fréchet distance is a well-studied similarity measure between curves that is widely used throughout computer science. Motivated by applications where curves stem from paths and walks on an underlying graph (such as a road network), we define and study the Fréchet distance for paths and walks on graphs. When provided with a distance oracle of with query time, the classical quadratic-time dynamic program can compute the Fréchet distance between two walks and in a graph in time. We show that there are situations where the graph structure helps with computing Fréchet distance: when the graph is planar, we apply existing (approximate) distance oracles to compute a -approximation of the Fréchet distance between any shortest path and any walk in time. We generalise this result to near-shortest paths, i.e. -straight paths, as we show how to compute a -approximation between a -straight path and any walk in time. Our algorithmic results hold for both the strong and the weak discrete Fréchet distance over the shortest path metric in . Finally, we show that additional assumptions on the input, such as our assumption on path straightness, are indeed necessary to obtain truly subquadratic running time. We provide a conditional lower bound showing that the Fréchet distance, or even its -approximation, between arbitrary \emph{paths} in a weighted planar graph cannot be computed in time for any unless the Orthogonal Vector Hypothesis fails. For walks, this lower bound holds even when is planar, unit-weight and has vertices.
Paper Structure (31 sections, 16 theorems, 5 equations, 11 figures, 2 tables)

This paper contains 31 sections, 16 theorems, 5 equations, 11 figures, 2 tables.

Key Result

Lemma 1

The Fréchet distance between $P$ and $Q$ is at most $\rho$, if and only if there exists a discrete ($xy$-monotone) walk $F$ from $(1, 1)$ to $(n, m)$ such that $\forall (i, j) \in F$, $M_\rho[i, j] = -1$.

Figures (11)

  • Figure 1: The Fréchet distance may be derived from the Euclidean or the shortest path metric.
  • Figure 2: (a) A road network can be represented as a graph $G$. (b) Edges in $G$ can be weighted, e.g. depending on whether traffic flows fast (grey) or slow (black). Under the graph distance metric, the Fréchet distance between blue and green may be smaller than the distance between red and blue; even though under the Euclidean metric, the red-blue Fréchet distance is smaller.
  • Figure 3: (a) Three vertices $p_a, p_b, p_c \in P$ and a vertex $q_j \in Q$ such that $M_\rho^{\kappa } [a, j] = M_\rho^{\kappa } [c, j] = -1$ and $M_\rho^{\kappa } [b, j] = 1$. (b) We show that the distance between $p_a$ and $p_b$ must be more than $\kappa \rho$. (c) However, this implies that $P$ is not $\kappa$-straight, as there is a shortcut from $p_a$ to $p_c$ through $q_j$.
  • Figure 4: Lattice points to prove Lemma \ref{['lemma:totheleft']}. Blue $\in F$. Orange $\in F'$ and Red $\not \in F$.
  • Figure 5: A planar path where the edge weights correspond to their length. (a) We greedily add vertices to $P^\beta$ such that for all vertices $p_x \in P$ with preceding vertex $p_i \in P^\beta$ the length of $P[p_i, p_x]$ is at most $\beta \rho$. (b) For every vertex in $P^\beta$, we subsequently add its preceding vertex in $P$ to $P^\beta$.
  • ...and 6 more figures

Theorems & Definitions (19)

  • Lemma 1
  • Definition 2
  • Definition 3
  • Lemma 4
  • Lemma 5
  • Theorem 6
  • Corollary 7
  • Theorem 8
  • Definition 9
  • Lemma 10
  • ...and 9 more