Skip to main content
QUICK REVIEW

[Paper Review] Alphabet-Dependent String Searching with Wexponential Search Trees

Johannes Fischer, Paweł Gawrychowski|arXiv (Cornell University)|Feb 14, 2013
Algorithms and Data CompressionComputer Science12 references5 citations
TL;DR

This paper presents Wexponential Search Trees, a data structure that enables alphabet-dependent string searching in tries with deterministic worst-case time bounds of $O(m + \lg\lg\sigma)$ for static tries and $O(m + \frac{\lg^2\lg\sigma}{\lg\lg\lg\sigma})$ for dynamic tries. The approach combines weighted exponential search trees with virtual branching nodes and incremental updates to achieve improved logarithmic dependence on alphabet size $\sigma$, outperforming prior $O(m + \lg\sigma)$ bounds.

ABSTRACT

It is widely assumed that $O(m+\lg σ)$ is the best one can do for finding a pattern of length $m$ in a compacted trie storing strings over an alphabet of size $σ$, if one insists on linear-size data structures and deterministic worst-case running times [Cole et al., ICALP'06]. In this article, we first show that a rather straightforward combination of well-known ideas yields $O(m+\lg\lg σ)$ deterministic worst-case searching time for static tries. Then we move on to dynamic tries, where we achieve a worst-case bound of $O(m+\frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$ per query or update, which should again be compared to the previously known $O(m+\lgσ)$ deterministic worst-case bounds [Cole et al., ICALP'06], and to the alphabet \emph{in}dependent $O(m+\sqrt{\lg n/\lg\lg n})$ deterministic worst-case bounds [Andersson and Thorup, SODA'01], where $n$ is the number of nodes in the trie. The basis of our update procedure is a weighted variant of exponential search trees which, while simple, might be of independent interest. As one particular application, the above bounds (static and dynamic) apply to suffix trees. There, an update corresponds to pre- or appending a letter to the text, and an additional goal is to do the updates quicker than rematching entire suffixes. We show how to do this in $O(\lg\lg n + \frac{\lg^{2}\lgσ}{\lg\lg\lgσ})$ time, which improves the previously known $O(\lg n)$ bound [Amir et al., SPIRE'05].

Motivation & Objective

  • To overcome the $O(m + \lg\sigma)$ worst-case search time bound in deterministic linear-space tries, which was previously considered optimal.
  • To design a dynamic data structure that supports efficient updates and queries in tries with improved dependence on alphabet size $\sigma$.
  • To achieve faster suffix tree updates and pattern matching by reducing the worst-case time from $O(\lg n)$ to $O(\lg\lg n + \frac{\lg^2\lg\sigma}{\lg\lg\lg\sigma})$.
  • To introduce a weighted variant of exponential search trees that enables incremental, deterministic updates with controlled worst-case overhead.

Proposed method

  • Introduce a weighted variant of exponential search trees that maintains balance by dynamically inserting virtual branching nodes to control edge length.
  • Use a master process per edge that runs over $\frac{s}{4}$ updates to incrementally split long edges and make nodes branching, ensuring $O(\sigma)$ time per split.
  • Maintain dual pointers (old and new edge) at each node during updates and use linked lists to track soft links, enabling incremental array construction.
  • Construct arrays for new edges incrementally by iterating over letters and updating pointers in reverse order of node traversal to maintain consistency.
  • Apply the structure to suffix trees by treating text extensions as string insertions, enabling efficient on-line pattern matching after updates.
  • Use a queue-based system to detect when edge lengths exceed threshold $s$, triggering edge splitting and node branching to maintain performance bounds.

Experimental results

Research questions

  • RQ1Can we achieve $O(m + \lg\lg\sigma)$ deterministic worst-case search time in static tries with linear space?
  • RQ2Can we reduce the dynamic update time in tries from $O(m + \lg\sigma)$ to $O(m + \frac{\lg^2\lg\sigma}{\lg\lg\lg\sigma})$ while maintaining linear space?
  • RQ3Can the proposed data structure be applied to suffix trees to support faster text extensions and pattern queries?
  • RQ4Is it possible to maintain deterministic worst-case performance with incremental updates that avoid full reprocessing of suffixes?

Key findings

  • The paper achieves $O(m + \lg\lg\sigma)$ deterministic worst-case time for prefix and predecessor queries in static compacted tries, improving over the prior $O(m + \lg\sigma)$ bound.
  • For dynamic tries, the proposed structure supports updates and queries in $O(m + \frac{\lg^2\lg\sigma}{\lg\lg\lg\sigma})$ deterministic worst-case time, which is faster than the previous $O(m + \lg\sigma)$ bound.
  • The method reduces the worst-case update cost for suffix trees from $O(\lg n)$ to $O(\lg\lg n + \frac{\lg^2\lg\sigma}{\lg\lg\lg\sigma})$ when prepending a character.
  • The use of virtual branching nodes and incremental edge splitting ensures that no edge exceeds $\frac{3}{2}s$ in length, maintaining efficient search and update performance.
  • The master process mechanism ensures that each node is made branching within $\frac{s}{2}$ updates to its light subtree, guaranteeing amortized efficiency.
  • The data structure supports linear-space storage and deterministic construction in $O(n)$ time for static tries with $\sigma = n^{O(1)}$.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.