Approximating Dynamic Time Warping Distance Between Run-Length Encoded Strings
Abstract
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 time, and there are conditional lower bounds showing that no algorithm can do substantially better. In many applications, however, the strings and 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 and of the compressed strings. Recent work has shown how to achieve time, leaving open the question of whether a near-quadratic -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 -approximation for in time, where and are the number of runs in and . Our algorithm allows for to be computed over any metric space in which distances are -bit integers. Surprisingly, the algorithm also works even if does not induce a metric space on (e.g., need not satisfy the triangle inequality).
Cite
@article{arxiv.2207.00915,
title = {Approximating Dynamic Time Warping Distance Between Run-Length Encoded Strings},
author = {Zoe Xi and William Kuszmaul},
journal= {arXiv preprint arXiv:2207.00915},
year = {2022}
}
Comments
A shorter version of this paper will be published in ESA 2022