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
1 answer
Pattern searching by suffix tree
The pattern searching in the given suffix tree takes O(m) time, where m is the length of the pattern. What about getting all the occurrences of the pattern in the text? I've read that if there are k occurrences of a pattern, then time complexity of…

Tanu Saxena
- 779
- 6
- 15
0
votes
1 answer
Traversing in a suffix tree
I have created a suffix tree in java language. We know that the one of the applications of suffix tree is to search a string from a tree. So my question is, how can I traverse each node of suffix tree in order to find, if a search string exists in…

Learner11
- 81
- 1
- 1
- 4
0
votes
1 answer
Suffix tree vs Suffix array for LCS
I'm working on a program to find the longest common substring between multiple strings. I've lowered my approach down to either using suffix array's or a suffix tree. I want to see which is the better approach (if there is one) and why. Also for…

zeus_masta_funk
- 1,388
- 2
- 11
- 34
0
votes
1 answer
Devel::CheckLib syntax errors when trying to install Tree::Suffix
I'm trying to install the Tree::Suffix module from CPAN on a Debian testing system, with Perl 5.18.1 installed.
During compliation, I get a bunch of syntax errors and warnings, related to Devel::CheckLib.
CPAN.pm: Building…

enricoferrero
- 2,249
- 1
- 23
- 28
0
votes
1 answer
cocos2d-iphone. Spritesheet depending on a screen resolution?
cocos2d adds suffixes to resources by the similar way as "@2x" works for usual iOS apps. I also want to place these pictures into a spritesheet.
The problem is a default cocos2d spritesheet is represented as one png and one plist file with sprite…

Gargo
- 1,135
- 1
- 10
- 21
0
votes
1 answer
Ukkonen's Algorithm Generalized Suffix Trees
I understand the ukkonen's algorithm. I am only curious how to extend it to have more than one string in it (ending with a special character say "$").
I read somewhere that Given strings s1(say "abcddefx$") and s2(say "abddefgh$"), I should insert…

Fluvid
- 268
- 3
- 13
0
votes
1 answer
Suffix tree in Matlab
I am finding longest substring in text T, such that it is a prefix of string S. I have made algorithm using suffix tree which provides less complex solution, but since Matlab doesn't use pointers or any other reference, I am stuck at the…

Mangat Rai Modi
- 5,397
- 8
- 45
- 75
0
votes
2 answers
How can we use a linked lists for the parent-child relationships in a suffix tree?
According to Wikipedia, an important choice when making a suffix tree implementation is the parent-child relationships between nodes. The most common one is using linked lists called sibling lists.
How does this work in Java?
user1819636
-1
votes
1 answer
Data Structures for Indexing
I was just reading about indexing and discovered that there are two main data structures which can be used for indexing namely
1) Inverted Indexes
2) Suffix Tree
So to me it appears that Suffix Tree naturally due to its structures has no need to…

Apoorv Jain
- 125
- 6
-1
votes
1 answer
Discover every pattern in arbitrary string and counting duplicates
I am wondering what is the best way to find patterns in an arbitrary string and count them to get the most common ones.
Basically, I have a time series that I translated into letters of a finite alphabet (lets assume 20 letters), creating a huge…

d0pe
- 573
- 4
- 9
- 23
-1
votes
1 answer
Suffix Trie and Suffix Tree
I understand the difference between (Prefix) Trie, a Suffix Trie and a Suffix Tree and I am trying to write Java code for both. What is the Java representation/structure of the SuffixTrieNode and SuffixTreeNode class?
SuffixTrie…

Dev Dev
- 31
- 4
-1
votes
1 answer
Minimal Hamming distance subvector
Let U small alphabet 0, 1 or A, C, G, T, k <= n.
I want to find minimum Hamming distance between
u = (u_1,...,u_k) and the contiguous subsequences of v = (v_1,...,v_n) of length k
in time O(n log n).
Is it possible?
Thank you for any help!

G H
- 147
- 10
-1
votes
1 answer
Dividng a word into smaller segments
I'm trying to implement a suffix tree.
int _tmain(int argc, _TCHAR* argv[])
{
std::string text;
cin >> text;
int n = text.size();
std::string first_array[sizeof(text) / sizeof(text[0])];
for (int i = 0; i < text.size();i++)
…
-1
votes
3 answers
Unable to identify a particular reference in a Java program
public CompactSuffixTree(SimpleSuffixTree simpleSuffixTree)
{
super(simpleSuffixTree.text);
super.root = compactNodes(simpleSuffixTree.root, 0);
}
The above code is a part of a java implementation of the suffix tree.
Here the…

arpansen
- 205
- 1
- 13
-1
votes
1 answer
How to print the string in a suffix tree
I am having difficulty in printing the longest common substring in a suffix tree.I can easily calculate the length of the longest common substring but having problems in actually finding the substring.Below is the code for Longest Common Substring…

user3318603
- 221
- 3
- 12