Dynamic Time Warping in Strongly Subquadratic Time: Algorithms for the Low-Distance Regime and Approximate Evaluation

04/22/2019
by   William Kuszmaul, et al.
0

Dynamic time warping distance (DTW) is a widely used distance measure between time series. The best known algorithms for computing DTW run in near quadratic time, and conditional lower bounds prohibit the existence of significantly faster algorithms. The lower bounds do not prevent a faster algorithm for the special case in which the DTW is small, however. For an arbitrary metric space Σ with distances normalized so that the smallest non-zero distance is one, we present an algorithm which computes dtw(x, y) for two strings x and y over Σ in time O(n ·dtw(x, y)). We also present an approximation algorithm which computes dtw(x, y) within a factor of O(n^ϵ) in time Õ(n^2 - ϵ) for 0 < ϵ < 1. The algorithm allows for the strings x and y to be taken over an arbitrary well-separated tree metric with logarithmic depth and at most exponential aspect ratio. Extending our techniques further, we also obtain the first approximation algorithm for edit distance to work with characters taken from an arbitrary metric space, providing an n^ϵ-approximation in time Õ(n^2 - ϵ), with high probability. Additionally, we present a simple reduction from computing edit distance to computing DTW. Applying our reduction to a conditional lower bound of Bringmann and Künnemann pertaining to edit distance over {0, 1}, we obtain a conditional lower bound for computing DTW over a three letter alphabet (with distances of zero and one). This improves on a previous result of Abboud, Backurs, and Williams. With a similar approach, we prove a reduction from computing edit distance to computing longest LCS length. This means that one can recover conditional lower bounds for LCS directly from those for edit distance, which was not previously thought to be the case.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/13/2023

Near-Optimal Dynamic Time Warping on Run-Length Encoded Strings

We give an Õ(n^2) time algorithm for computing the exact Dynamic Time Wa...
research
12/24/2021

Quantum Linear Algorithm for Edit Distance Using the Word QRAM Model

Many problems that can be solved in quadratic time have bit-parallel spe...
research
03/08/2019

The One-Way Communication Complexity of Dynamic Time Warping Distance

We resolve the randomized one-way communication complexity of Dynamic Ti...
research
07/02/2022

Approximating Dynamic Time Warping Distance Between Run-Length Encoded Strings

Dynamic Time Warping (DTW) is a widely used similarity measure for compa...
research
08/31/2022

Pattern matching under DTW distance

In this work, we consider the problem of pattern matching under the dyna...
research
12/06/2021

On Complexity of 1-Center in Various Metrics

We consider the classic 1-center problem: Given a set P of n points in a...
research
09/20/2017

Efficient Graph Edit Distance Computation and Verification via Anchor-aware Lower Bound Estimation

Graph edit distance (GED) is an important similarity measure adopted in ...

Please sign up or login with your details

Forgot password? Click here to reset