1

I need to design an algorithm that given a T string of n length, after a process O(n), for every string P of m length and a k value between 1 to n, to checks in O(m) time, if P appears on T before k position, only using Suffix Tree.

Unfortunately there are not any good bioinformatics books with fair examples and practical methodologies. Dan Gusfield book does not offer a solution manual.

  • Please provide at least a coarse outline of the inputs and outputs as example. Every bit of mental workload which you spare your audience improves your chances to get an answer. [MCVE] – Vroomfondel May 04 '21 at 11:35
  • It's an engineering task with pseudo-code. It's like a draft, there is not an example with inputs and outputs. – George Verouchis May 04 '21 at 13:16

1 Answers1

1

Preprocessing: after constructing the suffix tree, use DFS to label each node with the minimum index of the suffixes that appear in its descendants.

Query: descend in the suffix tree on the links indicated by P, threshold the node value constructed above.

David Eisenstat
  • 64,237
  • 7
  • 60
  • 120