Lune

SODA2026Top-tier venue

Space-Efficient k-Mismatch Text Indexes

Tomasz Kociumaka, Jakub Radoszewski

Abstract

A central task in string processing is text indexing, where the goal is to preprocess a text (a string of length n) into an efficient index (a data structure) supporting queries about the text. While the most fundamental exact pattern matching queries ask to find all the occurrences of a pattern (a string of length m) as substrings of the text, many applications call for approximate pattern matching queries, where the pattern may differ slightly from the matching substrings. A breakthrough in the extensive study of approximate text indexing came from Cole, Gottlieb, and Lewenstein (STOC 2004), who proposed k-errata trees -a family of text indexes supporting several closely related flavors of approximate pattern matching queries. In particular, k-errata trees yield an elegant solution to k-mismatch queries, where the similarity is quantified using an upper bound k ≥ 1 on the Hamming distance between the pattern and its approximate occurrences. The resulting k-mismatch index uses O(n log k n) space and answers a query for a length-m pattern in O(log k n log log n + m + occ) time, where occ is the number of approximate occurrences.

In retrospect, k-errata trees appear very well optimized: even though a large body of work has adapted k-errata trees to various settings throughout the past two decades, the original time-space trade-off for k-mismatch indexing has not been improved in the general case. We present the first such improvement, a k-mismatch index with O(n log k-1 n) space and the same query time as k-errata trees.

Previously, due to a result of Chan, Lam, Sung, Tam, and Wong (Algorithmica 2010), such an O(n log k-1 n)-size index has been known only for texts over alphabets of constant size σ = O(1). In this setting, however, we obtain an even smaller k-mismatch index of size only O(n log k-2+ε+ 2 k+2-(k mod 2) n) ⊆ O(n log k-1.5+ε n) for 2 ≤ k ≤ O(1) and any constant ε > 0. Along the way, we also develop improved indexes for short patterns, offering better trade-offs in this practically relevant special case.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

1 top-tier paper has cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers1

  1. Space-Efficient Text Indexing with Mismatches using Function InversionJackson Bibbens, Levi Borevitz, Samuel McCauleySTOC 2026 · 2 citations

Builds on2

  1. Breaking the 𝒪(n)-Barrier in the Construction of Compressed Suffix Arrays and Suffix TreesDominik Kempa, Tomasz KociumakaSODA 2023 · 10 citations
  2. On the String Matching with k Differences in DNA DatabasesYangjun Chen, Hoang Hai NguyenVLDB 2021 · 3 citations

Related papers

  1. Approximating text-to-pattern Hamming distancesTimothy M. Chan, Shay Golan, Tomasz Kociumaka, Tsvi Kopelowitz et al.STOC 2020 · 2 citations
  2. Near-Optimal-Time Quantum Algorithms for Approximate Pattern MatchingTomasz Kociumaka, Jakob Nogler, Philip WellnitzSODA 2025 · 1 citation
  3. Faster Approximate Pattern Matching: A Unified ApproachPanagiotis Charalampopoulos, Tomasz Kociumaka, Philip WellnitzFOCS 2020 · 2 citations
  4. Near-Optimal Property Testers for Pattern MatchingCe Jin, Tomasz KociumakaFOCS 2025 · 1 citation
  5. Faster two-dimensional pattern matching with k mismatchesJonas Ellert, Pawel Gawrychowski, Adam Górkiewicz, Tatiana StarikovskayaSODA 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines