Suffix arrays / trees

5 important questions on Suffix arrays / trees

What is the suffix of a sequence?

Substring that starts of position i --> to end of sequence

Why do we assume the extra $ at the end of a sequence?

- we make sure there is no suffix that is a prefix of another suffix --> makes sure that all nodes that represent suffix are leaf nodes so distinguish the end

What makes suffix tries compact?

You can save the substrings as intervals of the original string --> linear space neaded: O(n). Takes linear time and linear space
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

A sufix tree is a compact way of storing. Why? Explain, also with big O notation.  And with regards to time?

For sequence T with length n:
  • Edge labels are substrings of T:  represented by T intervals.
  • Exactly n+ 1 leaves and at most n internal nodes.
  • At most 2n edges.
  • Space linear in n:O(n).


Construction & time:
  • LetT be a string of length n  over a linearly-sortable alphabet.  The suffix tree of T can be constructed in O(n) time (Farachs theorem).

In bioinformatics often  sum = O(1) due to small alphabet!

For which nodes can you construct a suffix link?

All internal nodes (in O(n) time).

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo