Title: Fundamentals of Computing Continuous Dynamic Time Warping in 2D under Different Norms
Authors: Kevin Buchin (TU Dortmund), Maike Buchin (Ruhr University Bochum), Jan Erik Swiadek (Ruhr University Bochum), Sampson Wong (University of Copenhagen)
Classification: cs.CG (Computational Geometry)
Publication Time/Conference: WALCOM 2026 (preprint version, submitted November 2025)
Continuous Dynamic Time Warping (CDTW) robustly measures the similarity of polygonal curves with resilience to outliers and varying sampling rates. However, the design and analysis of CDTW algorithms face multiple challenges. This paper proves that under the Euclidean 2-norm, CDTW cannot be computed exactly using only algebraic operations, and provides exact algorithms for computing CDTW under norms approximating the 2-norm. The latter relies on technical foundations established by the authors that generalize to arbitrary norms and related metrics (such as partial Fréchet similarity).
This paper investigates how to efficiently and accurately compute the continuous dynamic time warping (CDTW) distance between polygonal curves in two-dimensional space.
Broad Practical Applications: CDTW has important applications in signature verification, map matching, trajectory clustering, and other domains
Overcoming Limitations of Discrete Methods: Traditional discrete DTW ignores the continuity of curves, producing poor results when sampling rates differ or are insufficiently high
Robustness Requirements: Compared to the Fréchet distance's sensitivity to outliers through maximum-based metrics, CDTW uses path integration and better handles outliers
Approximation and Heuristic Approaches: Many existing methods handle integrals by discretizing input curves, causing solution quality or runtime to depend on discretization resolution
Dimensional Constraints: Previous exact algorithms were primarily limited to one-dimensional cases, or only pseudo-polynomial time (1+ε)-approximation algorithms in 2D Euclidean 2-norm
Insufficient Theoretical Understanding: Fundamental properties of CDTW, particularly in 2D and under different norms, remain insufficiently understood
Local Optimality Theory (Section 2): Proves that the path integral-based CDTW definition permits locally optimal matchings advantageous from an algorithmic perspective, and establishes the existence and computation methods of valleys applicable to arbitrary norms
Non-Computability Results (Section 3): Proves that under the Euclidean 2-norm, numerical values involved in CDTW may be transcendental numbers, and therefore cannot be computed exactly using only algebraic operations (ACMQ model)
Polygonal Norm Algorithm (Section 4): Proposes an exact algorithm for computing CDTW under norms with polygonal level sets, which:
Requires no discretization of input curves
Can be used to obtain (1+ε)-approximations for the 2-norm
Uses regular polygonal norms with k ∈ O(ε^(-1/2))
Technical Properties: Establishes multiple technical properties including optimal function continuity and propagation ordering, providing foundations for complexity analysis
Parameter Space (Definition 2): 0, ‖P‖ × 0, ‖Q‖, partitioned into n×m cells
Valley Concept (Definition 4):
A valley ℓ is a line in parameter space (slope ≠ -1)
Each point z ∈ ℓ is a sink: the function along slope -1 lines achieves its minimum at z
Key Theorem (Theorem 8):
For any norm ‖·‖ and polygonal segments P, Q, there exists a valley with positive slope. This is proven through duality and geometric analysis:
Use Lemma 7 to minimize gauge functions on lines
Prove existence of maximizing point v* with positive components
For polygonal norms, compute valleys in O(1) time (Corollary 9)
Optimal Path Characterization (Theorem 5):
Given valley ℓ, the optimal (x,y)-path traces as follows:
If ℓ intersects rectangle Ξ = x₁,y₁×x₂,y₂, the path goes from x to x̂ (on ℓ) to ŷ (on ℓ) to y
Otherwise, the path goes from x to ξ to y, where ξ is the closest point in Ξ to ℓ
Main Theorem (Theorem 11):
Constructs curves with integer vertices P, Q such that:
(a) cdtw‖·‖₂(P,Q) is a transcendental number
(b) The coordinates of every turning point of each optimal path are transcendental numbers
Proof Strategy:
Construct specific two-segment curve P and three-segment curve Q
Obtain CDTW values containing logarithmic terms through integral calculation
Use Baker's theorem (from transcendental number theory, Lemma 10) to prove involved numbers are not algebraic
For (b), prove that points minimizing derivatives are also transcendental
Significance: This shows that under the 2-norm, CDTW not only cannot be expressed using radicals, but is not even an algebraic number. Therefore, no exact algorithm using algebraic operations can exist.
Algorithm Framework: Dynamic programming propagating optimal path costs through parameter space cells
Norm Setting:
Use norm Gψ(Rₖ) whose 1-sublevel set is ψ(Rₖ)
Rₖ is a regular k-gon (k even) with vertices vᵣ = (cos(θᵣ), sin(θᵣ))ᵀ, θᵣ = r·2π/k
ψ: ℝ² → ℝ² is a bijective linear map
Key Properties (Lemma 14):
(a) Gψ(Rₖ) can be evaluated in O(1) time, linear on each cone
(b) Propagation space ΣA,B can be represented by arrangement of O(k) lines, optA,B is quadratic on each face
(c) Optimal function opt₀,B is piecewise quadratic
Propagation Process (Algorithm Propagate):
Input: Curve segments P,Q, boundary B, optimal functions for adjacent and opposite edges
Output: Optimal function for B (piecewise quadratic)
1. Compute valley ℓ (O(1) time, Corollary 9)
2. For each boundary A ∈ {adj(B), opp(B)}:
- Construct arrangement of O(k) lines
- Overlay with vertical lines at breakpoints of opt₀,A
- Process intervals in appropriate order (Lemma 15)
- For each interval I:
* Collect candidate functions on edges and faces
* Compute lower envelope (O(Xᵢlog(Xᵢ)α(Xᵢ)) time)
* Update result using stack
3. Return piecewise quadratic optimal function
Propagation Ordering (Lemma 15):
Determine correct propagation order by proving non-crossing of corresponding path suffixes:
If A and B have same orientation (e.g., A = opp(B)), then s < s'
If A and B are orthogonal (e.g., A = adj(B)), then s > s'
Approximation Guarantee (Corollary 17):
Using regular k-gon norm Gψ(Rₖ) computes CDTW exactly
Obtain (1+ε)-approximation for 2-norm with k ∈ O(ε^(-1/2))
Geometric Duality Method: Uses duality properties of gauge functions and convex geometry to prove valley existence and positive slope properties
Transcendental Number Theory Application: First application of Baker's theorem to CDTW, proving stronger results than previous "cannot be expressed using radicals"
Avoiding Discretization: Directly works on continuous curves by exploiting piecewise linearity of polygonal norms, without discretization
Stack-based Dynamic Programming: Uses propagation ordering properties (Lemma 15) with stack data structure to accelerate lower envelope computation
Unified Framework: Established technical foundations apply to arbitrary norms and generalize to related metrics (such as partial Fréchet similarity)
Note: This is a theoretical paper whose main contributions are algorithms and complexity analysis, without traditional experimental sections. The paper focuses on:
De Carufel et al. 2014: Partial Fréchet similarity non-computability
Overall Assessment: This is a high-quality theoretical computational geometry paper making important contributions to CDTW computational complexity and algorithm design. The transcendence result represents breakthrough progress in the field, and the technical framework demonstrates good generality. Main weaknesses are missing experimental evaluation and incomplete complexity analysis. The paper is suitable for publication at top computational geometry conferences (such as WALCOM, SoCG) and has important reference value for both theoretical researchers and those interested in curve similarity metrics.