Skip to content

Suffix Tree

A compressed trie of every suffix of a text, turning exact substring search into a root-path walk and occurrence reporting into a read of descendant suffix positions.

Version
v1 · 2026-10-03 · History
Domain-specific #
13653
Domain group
Applied Sciences & Engineering
Origin domain
Computer Science & Software Engineering
Subdomains
String Algorithms, Data Structures → Computer Science & Software Engineering
Aliases
Compressed suffix trie

Core Idea

A suffix tree is a compressed trie of every suffix of one text. Shared suffix prefixes follow the same path; nonbranching stretches become edges labelled by substrings of the original text. Since every substring is a prefix of some suffix, finding an exact pattern becomes a root-path walk. Leaves below the matched path give the pattern's starting positions. A distinct terminal is a standard way to make each suffix end at its own leaf.

Scope of Application

Suffix trees index strings for repeated exact searches, repeat analysis, and related sequence tasks. The same structure can index a document or a DNA sequence; the meaning of the characters changes, not the suffix-index invariant. Fast lookup requires appropriate edge access, and reporting many matches still costs time proportional to the answer size.

Clarity

The structure turns an inside-the-text question into a prefix-of-a-stored-suffix question. It differs from a generic radix tree because it stores all suffixes of one text, and from a suffix array because it explicitly represents branching common prefixes. Suffix links can help build it efficiently but are not part of its defining identity.

Manages Complexity

Preprocessing overlapping suffixes into shared paths avoids rescanning the whole text for every later query. Path compression and interval-labelled edges reduce the standard explicit tree to linear space. Under suitable alphabet and edge-access assumptions, exact existence lookup takes time proportional to pattern length rather than text length.

Abstract Reasoning

To test an index, ask whether it represents every text suffix, merges their common prefixes, and compresses nonbranching paths. To search, compare the pattern against successive edge labels from the root. If all pattern characters match, the descendant suffix positions are exactly the occurrence starts; a mismatch excludes the pattern.

Knowledge Transfer

Document search and genome-sequence search reuse the same data structure literally, with different alphabets and interpretations. Broader ideas about preprocessing or hierarchical search may inspire analogies, but the name “suffix tree” requires the specific all-suffix, compressed-prefix representation. See the staged V2 for source locators, qualified complexity claims, and boundary cases.

Relationships to Other Abstractions

Local relationship map for Suffix TreeParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Suffix TreeDOMAINDomain-specific abstraction: Radix tree — is a kind ofRadix treeDOMAIN

Current abstraction Suffix Tree Domain-specific

Parents (1) — more general patterns this builds on

  • Suffix Tree is a kind of Radix tree Domain-specific

    A suffix tree is a path-compressed trie specialized to the set of all suffixes of one text.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Suffix Tree sits in a sparse region of the domain-specific corpus (64th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Formal Sequences & Language Structure (16 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08