English

Binary Dynamic Time Warping in Linear Time

Data Structures and Algorithms 2021-10-06 v2

Abstract

Dynamic time warping distance (DTW) is a widely used distance measure between time series x,yΣnx, y \in \Sigma^n. It was shown by Abboud, Backurs, and Williams that in the \emph{binary case}, where Σ=2|\Sigma| = 2, DTW can be computed in time O(n1.87)O(n^{1.87}). We improve this running time O(n)O(n). Moreover, if xx and yy are run-length encoded, then there is an algorithm running in time O~(k+)\tilde{O}(k + \ell), where kk and \ell are the number of runs in xx and yy, respectively. This improves on the previous best bound of O(k)O(k\ell) due to Dupont and Marteau.

Keywords

Cite

@article{arxiv.2101.01108,
  title  = {Binary Dynamic Time Warping in Linear Time},
  author = {William Kuszmaul},
  journal= {arXiv preprint arXiv:2101.01108},
  year   = {2021}
}
R2 v1 2026-06-23T21:45:52.553Z