Approximating Dynamic Time Warping Distance Between Run-Length Encoded Strings

07/02/2022
by   Zoe Xi, et al.
0

Dynamic Time Warping (DTW) is a widely used similarity measure for comparing strings that encode time series data, with applications to areas including bioinformatics, signature verification, and speech recognition. The standard dynamic-programming algorithm for DTW takes O(n^2) time, and there are conditional lower bounds showing that no algorithm can do substantially better. In many applications, however, the strings x and y may contain long runs of repeated letters, meaning that they can be compressed using run-length encoding. A natural question is whether the DTW-distance between these compressed strings can be computed efficiently in terms of the lengths k and ℓ of the compressed strings. Recent work has shown how to achieve O(kℓ^2 + ℓ k^2) time, leaving open the question of whether a near-quadratic Õ(kℓ)-time algorithm might exist. We show that, if a small approximation loss is permitted, then a near-quadratic time algorithm is indeed possible: our algorithm computes a (1 + ϵ)-approximation for DTW(x, y) in Õ(kℓ / ϵ^3) time, where k and ℓ are the number of runs in x and y. Our algorithm allows for DTW to be computed over any metric space (Σ, δ) in which distances are O(log(n))-bit integers. Surprisingly, the algorithm also works even if δ does not induce a metric space on Σ (e.g., δ need not satisfy the triangle inequality).

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
08/31/2022

Pattern matching under DTW distance

In this work, we consider the problem of pattern matching under the dyna...
research
04/22/2019

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

Dynamic time warping distance (DTW) is a widely used distance measure be...
research
11/30/2022

Approximating binary longest common subsequence in almost-linear time

The Longest Common Subsequence (LCS) is a fundamental string similarity ...
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
08/29/2018

Semi-Metrification of the Dynamic Time Warping Distance

The dynamic time warping (dtw) distance fails to satisfy the triangle in...
research
05/17/2020

Towards Efficient Interactive Computation of Dynamic Time Warping Distance

The dynamic time warping (DTW) is a widely-used method that allows us to...

Please sign up or login with your details

Forgot password? Click here to reset