A suffix tree is a data structure that stores all suffixes of a string. It is the basis for many fast algorithms on strings.
Questions tagged [suffix-tree]
228 questions
0
votes
0 answers
Memory and Runtime Issues: Ukkonens Algorithm for SuffixTrees in python
I have troubles concerning both runtime and memory usage, when using python to compute a suffix tree via Ukkonens Algorithm (linear time and space).
Currently, I want to create a suffix tree for a bacterial genome, consisting of roughly 1,6 Million…

Hungry Python
- 11
- 3
0
votes
1 answer
Why the Suffix Array use less space than the Suffix Tree?
I'm researching about Suffix Array and Suffix Tree for my project.
In several papers such as :
"Suffix arrays: A new method for on-line string searches" by Manber and Myers - 1993.
"Simple Linear Work Suffix Array Construction" by Juha Karkkainen…

Tín Tr.
- 319
- 4
- 14
0
votes
1 answer
What is the advantage of Suffix tree over suffix array?
I have been studying about trie, suffix array and suffix tree.I know these data structures can be used to fast lookup and for many more applications.
Now my question is,
If suffix array is space efficient and easy to implement than what are the…

pushpendra singh
- 43
- 3
0
votes
1 answer
Generalised suffix tree traversal to find longest common substring
I'm working with suffix trees. As far as I can tell, I have Ukkonen's algorithm running correctly to build a generalised suffix tree from an arbitrary number of strings. I'm now trying to implement a find_longest_common_substring() method to do…

MSR
- 3
- 1
0
votes
1 answer
Why does translating this code snippet from C# to C++ degrade performance?
I am much more familiar with C# than C++ so I must ask for advice on this issue. I had to rewrite some code pieces to C++ and then (surprisingly) ran into performance issues.
I've narrowed the problem down to these snippets:
C#
public class…

Ilhan
- 1,309
- 10
- 24
0
votes
0 answers
Repeatable pattern within String?
I want to write a function in Python which can detect repeatable pattern within the given String.
Note: Pattern is not given as Input.
Example: "//sample prograe program"
Output: Location = 7 Pattern = "e progra"

ankitgupta
- 9
- 2
0
votes
1 answer
Is-k-Substring function with a suffix tree
How can I do the next operation, with a suffix tree of string s, who's number of vertices is bounded by O(|s|):
Is-k-Sub-string(r) - checks if string r is a k-sub-string of s, where a k-sub-string defined as follow:
A sub-string r of s defined as…

Avenger
- 41
- 4
0
votes
0 answers
Printing a Tree/Trie using C++ Standard Libraries
As part of a programming assignment, I've been asked to implement a suffix trie using C++. We are only allowed to implement this using standard C++11 libraries.
My implementation of the suffix trie consisted of a data structure Trie(string T),…

Luke Collins
- 1,433
- 3
- 18
- 36
0
votes
1 answer
Generalising Boolean Functions for more elegant code
I've always been of the belief that if you're copying and pasting code, then there's a more elegant solution. I'm currently implementing a string suffix trie in C++ and have two practically identical functions which only differ in their return…

Luke Collins
- 1,433
- 3
- 18
- 36
0
votes
1 answer
Implementing a Suffix Trie using OOP/C++
I am trying to implement a suffix trie in C++ for a programming assignment. Now I think I have the right idea, but I keep getting a segmentation fault and I haven't been able to find what's causing it.
For this assignment, we are encouraged to use…

Luke Collins
- 1,433
- 3
- 18
- 36
0
votes
0 answers
How find suffix in tree
i am trying to make basic object oriented suffix tree console program and i dont know how to make boolean suffix(String s) method. My actual suffix method doesn't work properly. Finally it should looks like :
Node is for object, SuffixTree create…

Johny.M
- 1
- 3
0
votes
2 answers
Longest repeated substring with at least k occurrences correctness
The algorithms for finding the longest repeated substring is formulated as follows
1)build the suffix tree
2)find the deepest internal node with at least k leaf children
But I cannot understand why is this works,so basically what makes this…

ro.Loon
- 11
- 3
0
votes
1 answer
how to efficiently retrieve the original string from a suffix tree?
If we have the suffix tree of a string and also that suffix tree is not an ukkonen's suffix tree i.e., we are given with a normal suffix tree where edge labels are strings. How to efficiently get back original string from that suffix tree?

sntchaitu
- 1
- 2
- 6
0
votes
1 answer
Find longest repeating substring in string?
I came across below program which looks perfect. Per me its time complexity is nlogn where n is the length of String.
n for storing different strings,nlog for sorting, n for comparison. So time complexity is nlogn.
Space complexity is n for storing…

user3198603
- 5,528
- 13
- 65
- 125
0
votes
0 answers
Suffix Array and Suffix Tree
what are the shortcomings of suffix tree over suffix array and vice versa ?
Why we need two different thing is there any instance where suffix array fails but suffix tree succeeded and vice versa

user6250837
- 458
- 2
- 21