---
title: Partial Fréchet Similarity
url: https://www.emergentmind.com/topics/partial-frechet-similarity
type: topic
---

# Partial Fréchet Similarity

Partial Fréchet similarity formalizes piecewise similarity between polygonal curves, generalizing classical curve-similarity measures by allowing curve segments to be matched under a leash-length constraint. This concept is foundational for more flexible trajectory analysis, enabling meaningful comparisons even when curves only resemble each other on certain subcurves rather than globally. The framework encompasses both integral and decision-theoretic forms, with core algorithmic constructs such as the k-Fréchet distance and weighted shortest paths in the parameter space playing a central role [1903.02353], [1512.03359].

## 1. Formal Definition and Relation to Classical Measures

Partial Fréchet similarity $\mathcal{P}_{\delta}(T_1,T_2)$ is defined for two polygonal curves $T_1,T_2:[0,n]\to\mathbb{R}^d$ of equal total length $n$, a leash length threshold $\delta\ge0$, and monotone matchings $(\alpha_1,\alpha_2)$:

\[
\mathcal{P}_{(\alpha_1,\alpha_2)}(T_1,T_2;\delta)
= 
\int_{0}^{n}
\mathbf{1}\left(d_2(T_1(\alpha_1(t)),\,T_2(\alpha_2(t))) \le \delta\right)
\left( \bigl\|(T_1\circ\alpha_1)'(t)\bigr\|_2 + \bigl\|(T_2\circ\alpha_2)'(t)\bigr\|_2 \right)
dt
\]

The curve-to-curve partial Fréchet similarity is the supremum over all monotone matchings:

\[
\mathcal{P}_\delta(T_1,T_2)
=
\sup_{\alpha_1,\alpha_2 \text{\ monotone}}
\mathcal{P}_{(\alpha_1,\alpha_2)}(T_1,T_2;\delta)
\]

For polygonal chains $P, Q : [0,1] \to \mathbb{R}^d$, the $k$-Fréchet distance introduces a partitioning using a parameter $k$ representing the number of subcurves. The $\varepsilon$-free space $F_\varepsilon(P,Q) = \{ (t_P, t_Q) \in [0,1]^2 : \|P(t_P) - Q(t_Q)\| \le \varepsilon \}$ is decomposed into components, and a set of at most $k$ components covers both parameter spaces if their projections span $[0,1]$ on both axes. The $k$-Fréchet decision problem asks whether such a cover exists, and the associated metric is:

\[
\delta_k^F(P,Q) = \inf \left\{ \varepsilon > 0 : \exists S \subset \text{Components}(F_{\varepsilon})\ \text{with}\ |S| \le k,\,\text{proj}_P(\cup S)\! =\! \text{proj}_Q(\cup S) = [0,1] \right\}
\]

This construction provides a continuum between weak Fréchet distance $(k=1)$ and Hausdorff distance $(k \rightarrow n^2)$, fulfilling $\delta_H(P,Q) \le \delta_k^F(P,Q) \le \delta_w^F(P,Q) \le \delta_F(P,Q)$ [1903.02353].

## 2. Geometric Framework and Algorithmic Realization

A matching is encoded as a monotone path $\pi(t) = (\alpha_1(t), \alpha_2(t))$ in the parameter space $P = [0,n]^2$, decomposed into $n^2$ cells, each representing a pair of curve segments. The free space within cell $C$ for threshold $\delta$ is an affine ellipse $\mathcal{E}_\delta \cap C$, with monotone free-space axis $\ell$. Weighted shortest paths over this space, using the function $w(x,y) = d_2(T_1(x),T_2(y))$, yield both integral Fréchet distances and optimal partial similarity for all leash lengths [1512.03359]:

\[
|\pi|_w = \int_\pi w\,\|d\pi\|_1
\]

Key optimality: the monotone shortest path $\pi$ simultaneously maximizes $\mathcal{P}_\delta$ for every $\delta$.

Cell-level optimal subcurve similarity for threshold $\delta$ is realized via:

\[
\mathcal{P}_{\delta}(T_1[a.x, b.x], T_2[a.y, b.y]) = \left| \mathcal{E}_{\delta} \cap \pi_{ab} \right|
\]

## 3. Complexity and Algorithmic Approaches

Determining the $k$-Fréchet distance ($k \ge 1$) for given curves and threshold $\varepsilon$ is NP-complete, contrasting with the polynomial computability of classical Fréchet and Hausdorff distances. Hardness is established via reduction from the "box problem" and realization in constructed free-space diagrams (wire, clause, split, bend, color-switch, connection, and scissor gadgets) [1903.02353].

Nevertheless, several algorithmic strategies exist:

- **Exponential-Time (XP) Algorithm**: Tries all $O(n^{2k})$ k-sized subsets of components; polynomial time for $k=2$.
- **2-Approximation**: Projects free-space components to axes and applies a greedy set cover, ensuring at most twice the optimal cover size in $O(n^2 \log n)$ time.
- **FPT Algorithm in $(k, z)$**: Parameter $z$ is the "neighborhood complexity." Bounded search trees along axes yield time $O(nz + kz^{2k})$, which is fixed-parameter tractable in $k+z$.
- **Partial Decision (Free-Space Map)**: For partial Fréchet distance, the free-space map supports optimal decision in $O(nm)$ time and space, storing boundary pointers of reachable intervals and facilitating fast queries [1307.6628].

## 4. Practical Applications and Extensions

Partial Fréchet similarity and its algorithmic incarnations find application in trajectory analysis (e.g., map matching), handwriting comparison, chemical structure comparison, fragmented shape analysis, and partial shape retrieval. In GIS map-matching, using a graph for $Q$, the free-space map approach achieves $O(nm)$ time for match-promise on a DAG. Extensions include partial matching for closed curves, maximum/minimum subcurve matching, outlier-tolerant matching, and curve simplification [1307.6628], [1903.02353].

## 5. Comparative Landscape: Classical and Modern Measures

| Measure                        | Monotonicity Requirement | Matched Curve Segments      |
|-------------------------------|-------------------------|----------------------------|
| Fréchet Distance              | Yes                     | Global entire curve        |
| Weak Fréchet Distance         | Yes (non-strict)        | Permits re-entrances       |
| Hausdorff Distance            | No                      | Pointwise best matching    |
| Partial Fréchet Similarity    | Yes                     | Maximal matched subcurves  |
| Integral Fréchet Distance     | Yes                     | Robust to outliers         |
| $k$-Fréchet Distance          | Yes                     | Up to $k$-piecewise match  |

Partial Fréchet similarity bridges the gap between rigid global curve matching and highly permissive pointwise metrics, offering robustness and flexibility against outliers and local discrepancies [1512.03359], [1903.02353].

## 6. Open Problems and Research Directions

Ongoing challenges include tightening the 2-approximation for $k$-Fréchet distance, improving FPT algorithms, and exploring the "cut variant" for disjoint subcurve partitions—empirical NP-hardness and conjectured $\exists\mathbb{R}$-completeness are noted. There is continued interest in adapting the framework for high-dimensional curves and alternative metrics [1903.02353].

## 7. Illustrative Examples and Conceptual Insights

Consider handwriting the letter “k” in three strokes: the classical Fréchet distance poorly reflects piecewise similarity between two variants, but the $k$-Fréchet ($k\ge3$) correctly captures piecewise correspondence [1903.02353]. For parameter cell analysis, the monotone-axis path yields closed-form similarity measures for each leash length. In the unit segment example, the partial similarity curve is linear in $\delta$ up to saturation, exemplifying the geometric directness of these approaches [1512.03359].

Source: https://www.emergentmind.com/topics/partial-frechet-similarity