Overview
A suffix automaton stores equivalence classes of substrings, supporting substring queries and many string-counting tasks.
Represents all substrings of a string in a compact deterministic automaton.
Compact metadata for implementation and discovery.
A suffix automaton stores equivalence classes of substrings, supporting substring queries and many string-counting tasks.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n)
Worst
O(n)
Space
O(n)
count = sum_state (len[state] - len[link[state]])Counts substrings represented by each automaton state.
Show matched positions, dynamic-programming cells, or candidate buckets.
Suffix Automaton should be used with the assumptions and tradeoffs of string Automaton in mind.
What each reference supports for this entry.
String algorithms reference for Suffix Automaton's pattern matching, suffix indexing, alignment, or sequence-processing mechanism.
Open sourceTextbook support for Suffix Automaton's algorithm family, complexity framing, and standard implementation concepts.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
Suffix automatons can be used to solve longest common substring problems.
Suffix automatons represent all substrings with a compact automaton.