Skip to content

Fine-Grained Hardness of Approximating Dynamic Time Warping

Jihan Wang

cs.CC

Abstract

We prove conditional lower bounds for approximating dynamic time warping (DTW) over the uniform metric. Let N,MN,M be the lengths of the two strings and n,mn,m their numbers of runs. Under the Gap Block Disjointness Hypothesis, no deterministic algorithm O(Nε)O(N^{\varepsilon})-approximates DTW on two strings of length NN over three symbols in O~(N2−δ)\widetilde O(N^{2-δ}) time for any constants δ∈(0,1]δ\in(0,1] and ε∈[0,δ/3)\varepsilon\in[0,δ/3). In particular, no deterministic constant-factor approximation runs in strongly subquadratic time. For run-length encoded strings with n=mn=m, the Orthogonal Vectors Hypothesis rules out every constant-factor approximation in O~((nm)1−δ)\widetilde O((nm)^{1-δ}) time for every constant δ>0δ>0. It also rules out (N+M)1−η(N+M)^{1-η}-approximation in this time for every constant η∈(0,1)η\in(0,1). The bounds extend to every fixed metric with at least three points, including absolute distance on {0,1,2}\{0,1,2\}. Both reductions use long runs to force equal-symbol matches on low-cost paths. For explicit strings, Boolean gadgets encode the source predicate. A deterministic disperser-based density amplification then yields the polynomial gap. For run-length encoded strings, we encode regular-expression membership so that the gap grows without adding runs.

Create a lesson

Metadata

Categories
cs.CC, cs.DS