We give an O~(n2) time algorithm for computing the exact Dynamic Time Warping distance between two strings whose run-length encoding is of size at most n. This matches (up to log factors) the known (conditional) lower bound, and should be compared with the previous fastest O(n3) time exact algorithm and the O~(n2) time approximation algorithm.
@article{arxiv.2302.06252,
title = {Near-Optimal Dynamic Time Warping on Run-Length Encoded Strings},
author = {Itai Boneh and Shay Golan and Shay Mozes and Oren Weimann},
journal= {arXiv preprint arXiv:2302.06252},
year = {2023}
}