in reply to Finding repeat sequences.
This smells an awful lot to me like the Longest Repeated Substring Problem, maybe with a bit of a twist. Have you looked at SuffixTree?
use SuffixTree; my $stree = create_tree('abcdabcdabceabcdabcdabceab'); print_tree($stree);
What is not clear to me from your description is whether you are looking for the longest substring with at least one repeat, or whether you are looking for the arbitrary length substring with the highest repeat count, or whether you are looking for the substring which, along with its (adjacent?) repeats comprises the longest length, or something else. Can you provide some more information and examples?
A Super Search revealed:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Finding repeat sequences.
by BrowserUk (Patriarch) on Jun 18, 2013 at 20:39 UTC | |
by rjt (Curate) on Jun 18, 2013 at 22:31 UTC |