A suffix tree for a string S of length n can be built in Θ(n) time, if the alphabet is constant or integer. Otherwise, the construction time depends on the implementation. The costs below are given under the assumption that the alphabet is constant. If it is not, the cost depends on...
The concept was first introduced as aposition treeby Weiner in 1973[1]in a paper whichDonald Knuthsubsequently characterized as "Algorithm of the Year 1973". The construction was greatly simplified by McCreight in 1976[2], and also by Ukkonen in 1995[3][4]. Ukkonen provided the first line...
But differently, the newend_idxesproperty in theSTreecontains the indexes of all ending characters"$". It avoids effectively the construction bias of the suffix tree when the string contains or is filled with"$"symbols. So, back to the topic, how does this tree solve the longest common sub...
4.2 Crawling Up the Recursion Tree Since we’re recursing “backwards”, we need a way to represent SA k using SA k+1 . We’ll use the following queries to accomplish this efficiently: evensucc k (i) The “even successor” of i, defined as i if SA ...