In this paper, we present and study the Hamming distance oracle problem. In this problem, the task is to preprocess two strings S and T of lengths n and m, respectively, to obtain a data-structure that is able to answer queries regarding the Hamming distance between a substring of S and a substring of T. For a constant size alphabet strings, we show that for every x≤ nm there is a data structure with Õ(nm/x) preprocess time and $O(x)$ query time. We also provide a combinatorial conditional lower bound, showing that for every ε > 0 and x ≤ nm there is no data structure with query time $O(x)$ and preprocess time O((nm/x)1-ε) unless combinatorial fast matrix multiplication is possible. For strings over general alphabet, we present a data structure with Õ(nm/√x) preprocess time and $O(x)$ query time for every x ≤ nm.
No takes yet. Share an insight, caveat, or question.
Boneh et al. (2024) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: