suffix array using manber myers algorithm -


i have tried going through theory in paper http://webglimpse.net/pubs/suffix.pdf

but kind of lost when

let ai first suffix in first bucket (i.e., pos[0] = i), , consider ai-h (if i-h < 0, ignore ai , take suffix of pos[1], , on). since ai starts smallest h-symbol string, ai-h should first in 2h-bucket.

i not able understand statement. why ai-h can ignored if i-h < 0. how position getting determined in const time when i-h > 0 in phase 1?

one sample impl http://belbesy.wordpress.com/2012/10/10/spoj-649-distinct-substrings-suffix-arrays-nlgn/

i recommend that, instead of trying understand c++ code, walk through python implementation of manbers-myers suffix array construction algorithm , hand, simple 5 character example.

because python version 15 lines of code, it's pretty easy follow.

even if don't understand python, treat pseudocode , google syntax don't understand.

personally, walked through 1 5 character string hand, , enough me understand how algorithm worked..


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -