Hamming Distance Oracle
Abstract
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 O(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((nmx)1-) unless combinatorial fast matrix multiplication is possible. For strings over general alphabet, we present a data structure with O(nm/x) preprocess time and O(x) query time for every x nm.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.