|
|
Line 1: |
Line 1: |
| In [[computer science]], a '''maximal pair''' is a [[tuple]] <math>(p_1, p_2, l)</math>, such that, given a string <math>S</math> of length <math>n</math>, <math>S[p_1..p_1+l-1]=S[p_2..p_2+l-1]</math>, but <math>S[p_1-1] \neq S[p_2-1]</math> and <math>S[p_1+l] \neq S[p_2+l]</math>. A '''maximal repeat''' is a string represented by such tuple. A '''supermaximal repeat''' is a maximal repeat never occurring as a proper substring of another maximal repeat. Both maximal pairs, maximal repeats and supermaximal repeats can be found in <math>\Theta(n+z)</math> time using a [[suffix tree]],<ref name="Gus97">{{cite book
| | They contact me Emilia. California is our birth place. To play baseball is the hobby he will never quit doing. Hiring is her working day occupation now and she will not alter it anytime quickly.<br><br>My blog - [http://www.ddaybeauty.com/node/14766 ddaybeauty.com] |
| | last = Gusfield
| |
| | first = Dan
| |
| | origyear = 1997
| |
| | year = 1999
| |
| | title = Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology
| |
| | page = 143
| |
| | publisher = Cambridge University Press
| |
| | location = USA
| |
| | isbn = 0-521-58519-8}}
| |
| </ref> if there are <math>z</math> such structures.
| |
| | |
| == Example ==
| |
| | |
| 12345678901234
| |
| xabcyabcwabcyz
| |
| | |
| <math>(2,6,3)</math> and <math>(6,10,3)</math> are maximal pairs, but <math>(2,10,3)</math> is not, as <code>y</code> follows both substrings. <code>abc</code> and <code>abcy</code> are maximal repeats, but only <code>abcy</code> is a supermaximal repeat.
| |
| | |
| == References ==
| |
| <references/>
| |
| | |
| == External links ==
| |
| *[http://code.google.com/p/py-rstr-max/ Project for the computation of all maximal repeats in one ore more strings in Python], using [[suffix array]].
| |
| | |
| [[Category:String (computer science)]]
| |
| [[Category:Formal languages]]
| |
| | |
| | |
| {{comp-sci-stub}}
| |
Latest revision as of 16:41, 14 May 2014
They contact me Emilia. California is our birth place. To play baseball is the hobby he will never quit doing. Hiring is her working day occupation now and she will not alter it anytime quickly.
My blog - ddaybeauty.com