This might be a stupid question: why is the fact it’s a _suffix_ tree important? (as opposed to building a similar structure with prefixes)
The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
11–20 of 42 posts
Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#12Also interesting to get into are suffix arrays which you could construct from a tree. Then there is a notion of generalized suffix arrays, where you mix multiple suffix arrays into a big suffix array. Then you can give fast answers like: what is the longest common prefix between the several tokens, whereas the tokens of your individual suffix arrays could be letters from an alphabet (so you construct a suffix array f…
And then you could get into compressed indexes such as the FM-index, which represent a text in a form that is both (typically) smaller than the original, and also supports fast substring queries. Suffix trees are cool, but they’re just the entry point to a world of wonderful data structures and algorithms.
Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#13Are there some hidden constants/considerations that prevent suffix trees from being used in the real world? Every time I expect it to show up (e.g., for pattern matching in databases), I almost always see something else used instead (e.g., trigrams)
Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#14Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#15This might be a stupid question: why is the fact it’s a _suffix_ tree important? (as opposed to building a similar structure with prefixes)
The prefix tree of a string is just a linked list, though—it's the string itself. It doesn't help you do anything for a single string, unlike a suffix tree, which is used for finding substrings of a single string. Moreover, how would you even start searching for a substring using a prefix tree? You can't start at the root, because the substring wouldn't be a prefix. It doesn't help you there at all.
Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#16Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#17Ukkonen algorithm for suffix trees and Kärkkainen-Sanders for suffix array are very beautiful algorithms.
Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#18Are there some hidden constants/considerations that prevent suffix trees from being used in the real world? Every time I expect it to show up (e.g., for pattern matching in databases), I almost always see something else used instead (e.g., trigrams)
GADDAGs are different because they're more like "reversed prefix" trees, but they help with the issues of placing a new word from a dictionary onto the board using the existing letters of another word.
[1]: https://en.wikipedia.org/wiki/GADDAGRe: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#19Re: The Wonders of the Suffix Tree Through the Lens of Ukkonen’s Algorithm
#20That isn't really all that new; it's just about when red-black trees and B-trees were invented as well and I wouldn't call those "obscure".