paper

Space-Efficient k-Mismatch Text Indexes

arXiv:2510.26264

Abstract

A central task in string processing is text indexing, where the goal is to preprocess a text (a string of length ) into an efficient index (a data structure) supporting queries about the text. Cole, Gottlieb, and Lewenstein (STOC 2004) proposed -errata trees, a family of text indexes supporting approximate pattern matching queries of several types. In particular, -errata trees yield an elegant solution to -mismatch queries, where we are to report all substrings of the text with Hamming distance at most to the query pattern. The resulting -mismatch index uses space and answers a query for a length- pattern in time, where is the number of approximate occurrences. In retrospect, -errata trees appear very well optimized: even though a large body of work has adapted -errata trees to various settings throughout the past two decades, the original time-space trade-off for -mismatch indexing has not been improved in the general case. We present the first such improvement, a -mismatch index with space and the same query time as -errata trees. Previously, due to a result of Chan, Lam, Sung, Tam, and Wong (Algorithmica 2010), such an -size index has been known only for texts over alphabets of constant size. In this setting, however, we obtain an even smaller -mismatch index of size only for and any constant . Along the way, we also develop improved indexes for short patterns, offering better trade-offs in this practically relevant special case.

SODA 2026

Space-Efficient k-Mismatch Text Indexes · wovepaper