The Fine-Grained Complexity of Episode Matching
Abstract
Given two strings and , the Episode Matching problem is to find the shortest substring of that contains as a subsequence. The best known upper bound for this problem is by Das et al. (1997) , where are the lengths of and , respectively. Although the problem is well studied and has many applications in data mining, this bound has never been improved. In this paper we show why this is the case by proving that no algorithm (even for binary strings) exists, unless the Strong Exponential Time Hypothesis (SETH) is false. We then consider the indexing version of the problem, where is preprocessed into a data structure for answering episode matching queries . We show that for any , there is a data structure using space that answers episode matching queries for any of length in time. We complement this upper bound with an almost matching lower bound, showing that any data structure that answers episode matching queries for patterns of length in time , must use space, unless the Strong -Set Disjointness Conjecture is false. Finally, for the special case of , we present a faster construction of the data structure using fast min-plus multiplication of bounded integer matrices.
Cite
@article{arxiv.2108.08613,
title = {The Fine-Grained Complexity of Episode Matching},
author = {Philip Bille and Inge Li Gørtz and Shay Mozes and Teresa Anna Steiner and Oren Weimann},
journal= {arXiv preprint arXiv:2108.08613},
year = {2024}
}
Comments
This is the full version of a paper accepted to CPM 2022