Suffix Tree Revision Flashcards

1
Q

Suffix Tree resembles to

A

Search Tries or Tries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Trie

A

The tree-like data structure which have nodes and edges corresponding to a particular character.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Suffix Tree

A

Also tree like DS which have edge labels as the intervals and not the characters only. Each edge label have arbitrary length string carrying over it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Algorithm proceeds with

A

Phases or steps which constitute extension among them.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Number of phases

A

O(n) ; n: length of the string. For each character, we have a phase to go through and for each of the phases, we have the extensions corresponding to it.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Number of extensions or the individual steps in the phase

A

The upper bound is O(n) which is the worst case in which we have to go through the steps of O(n) times for completing a single phase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Edge carries

A

Intervals : [start, end] which shows how much string length we are talking about with a single edge.

Start of the string will say about the starting index of the suffix of the present phase and ending index for the ending index of the present phase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

The space complexity of the edge

A

For each edge two variables have to be maintained and not the overall string at once. Therefore two variable will constitute to O(1) complexity for each of the edge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What about end index ?

A

Usually for the better implementation we tend to label th end index by some common variable like end for all the leaves due to which it gets automatically consistent with the suffixes of the next phase as well.

ex. [1, #]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Tree is correct suffix tree upto in each step

A

Current character ofcourse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Steps in the algorithm

A

n : length of the string (number of characters)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Work at each step

A

O(1) where n is the length of the string; other than this the updating process of the suffix tree can be accomplished by using the end index updating at the same time.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

First Extensions

A

Simple Repetition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Active Point

A

Three tuples: (active_point, active_node, active_length)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Remainder

A

An integer indicating how many new suffices we need to insert.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens when the suffix do already exist in the suffix tree before hand. Ex. if abc do already have the suffix tree corresponding to them then after the abca .

A

The suffix tree is not updated, rather the additional variables are updated,

  1. Active Point
  2. Remainder

So with the upcoming suffix like abca “the last a” will be updating the active point and remainders.

17
Q

Is the tree complete in First extension when the repeating suffix is found?

A

No, it has not been updated yet since we have updated the active points but not the tree.

18
Q

Do the tree contains the all the suffixes at a point of time?

A

Yes, either implicitly or explicitly the tree do contain the suffices of the tree at a point of algorithm or phase.

19
Q

What are the ways to update the suffix tree ?

A

There are two ways to update the suffix tree:

  1. Explicit updating
  2. Implicit updating

Explicit updating comes from the updation of the tree on its own adding a new edge or updating the end index of the suffixes do chaange the tree explicitly

Implicit updating will update the tree by updating the variables namely : Active point and remainder.

20
Q

Describe remainder variable

A

Number of suffixes we need to add yet, which aren’t been added into the suffix tree presently.

Example : consider the example abcabx then after reaching x we will be having the abx, bx, and x as our remainder.

21
Q

How the active points are updated ?

A

They correspond to tuple having :

  1. Active node
  2. Active Edge
  3. Active Length