suffix-array Questions

9

I need to find the longest non-overlapping repeated substring in a String. I have the suffix tree and suffix array of the string available. When overlapping is allowed, the answer is trivial (deep...
Crawford asked 30/9, 2012 at 3:57

3

Solved

I've recently been updating my knowledge of algorithms and have been reading up on suffix arrays. Every text I've read has defined them as an array of suffixes over a single search string, but some...
Jemmie asked 17/7, 2015 at 15:2

1

I am attempting to complete the Algorithm's on Strings course on Coursera and am stuck on the method to construct an LCP array described in this video: https://www.coursera.org/learn/algorithms-on...
Corkwood asked 1/9, 2019 at 19:48

9

Solved

I'm looking for an efficient data structure to do String/Pattern Matching on an really huge set of strings. I've found out about tries, suffix-trees and suffix-arrays. But I couldn't find an ready-...
Darvon asked 13/11, 2012 at 16:41

3

Solved

I'm really trying to understand an example on how to construct a good suffix table for a given pattern. The problem is, I'm unable to wrap my head around it. I've looked at numerous examples, but d...
Enyedy asked 11/12, 2014 at 17:13

1

Solved

Foreword: My question is mainly an algorithmic question, so even if you are not familiar with suffix and LCP arrays you can probably help me. In this paper it is described how to efficiently use s...
Fern asked 11/2, 2015 at 0:4

7

Solved

What would be the best approach (performance-wise) in solving this problem? I was recommended to use suffix trees. Is this the best approach?

2

Solved

I have read that the Longest Common Prefix (LCP) could be used to find the number of occurrences of a pattern in a string. Specifically, you just need to create the suffix array of the text, sort ...

0

How to find the sum of length of Longest Common Prefixes of all pairs of substrings of a given string. For eg answer for string "aba" is 8. |s|<=1e5.
Victualer asked 20/3, 2017 at 19:11

1

Can we use a factor-oracle with suffix link (paper here) to compute the longest common substring of multiple strings? Here, substring means any part of the original string. For example "abc" is the...
Touchmenot asked 14/8, 2012 at 16:20

3

I have been learning suffix arrays creation, & i understand that We first sort all suffixes according to first character, then according to first 2 characters, then first 4 characters and so on...
Acknowledgment asked 17/7, 2016 at 7:48

1

I've sucessfully implemented a BWT stage (using regular string sorting) for a compression testbed I'm writing. I can apply the BWT and then inverse BWT transform and the output matches the input. N...
Wellhead asked 6/1, 2016 at 18:10

4

Solved

Today I am trying to create suffix arrays using scala. I was able to do it with massive lines of code but then I heard that it can be created by using only few lines by using zipping and sorting. ...
Gresham asked 6/5, 2015 at 11:10

1

Solved

Can someone explain how this code for constructing the LCP from a suffix array works? suffixArr[] is an array such that suffixArr[i] holds the value of the index in the string for the suffix with r...
Emmy asked 17/10, 2014 at 15:41

1

Solved

I'm looking at the pseudo-code given in figure 3 of the original paper introducing suffix arrays "SUFFIX ARRAYS: A NEW METHOD FOR ON-LINE STRING SEARCHES". I can't figure out the logic for lines ...
Alpenglow asked 9/10, 2014 at 16:4

1

Solved

After quite a bit of reading, I have figured out what a suffix array and LCP array represents. Suffix array: Represents the _lexicographic rank of each suffix of an array. LCP array : Contains th...
Urata asked 20/7, 2013 at 11:21

4

From Section 15.2 of Programming Pearls The C codes can be viewed here: http://www.cs.bell-labs.com/cm/cs/pearls/longdup.c When I implement it in Python using suffix-array: example = open("iliad...
Pussy asked 26/11, 2012 at 6:57

3

Solved

I'm looking for a fast suffix-array construction algorithm. I'm more interested in ease of implementation and raw speed than asymptotic complexity (I know that a suffix array can be constructed by ...
Blitz asked 22/10, 2011 at 5:43

1

Solved

We need to find shortest uncommon substring between two strings i.e. if we have two strings a and b so we need to find the length of shortest substring of a that is not a substring of b. How to so...
Deutoplasm asked 26/9, 2012 at 17:49

2

I just wanna know, when a suffix tree is superior to an enhanced suffix array. After reading Replacing suffix trees with enhanced suffix arrays i don't see a reason to use suffix trees anymore. Some...

2

Solved

I'm reading the block sort algorithm from the Burrows and Wheeler paper. This a step of the algorithm: Suppose S= abracadabra Initialize an array W of N words W[0, ... , N - 1], such that W[i] co...

3

Solved

A suffix array will index all the suffixes for a given list of strings, but what if you're trying to index all the possible unique substrings? I'm a bit new at this, so here's an example of what I ...
Pleasure asked 22/2, 2012 at 5:45

4

Here's a very simple way to build an suffix array from a string in python: def sort_offsets(a, b): return cmp(content[a:], content[b:]) content = "foobar baz foo" suffix_array.sort(cmp=sort_offs...
Recalcitrate asked 17/2, 2010 at 16:47
1

© 2022 - 2024 — McMap. All rights reserved.