2

I'm working on suffix tree algorithm in bioinformatics. I want know this , is suffix tree unique ?

for example ,

String str = "xabaxe"

This string or another example strings have alternative suffix tree?

seniorc
  • 69
  • 1
  • 2
  • 6

1 Answers1

3

It is always unique. Each path from the root to a leaf corresponds to a suffix. A tree is uniquely determined by all paths from the root to leaves because the degree of any interior node is at least 2(by the definition of a suffix tree). But suffices are uniquely determined by a string. Thus, there is one and only one suffix tree for any string.

kraskevich
  • 18,368
  • 4
  • 33
  • 45
  • what if the end of the substring that we are looking is in a leaf. More specifically on a prefix of a leaf. In this example for example if we are looking for ab, which is suffix of the string str would the search suffix tree algorithm return a match?Since ab would end at the leaf abaxe – curious Jan 14 '16 at 22:22