Given a string
of length
, a
maximal pair is a tuple
, such that
, but
and
. 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
time using a
suffix tree , if there are
such structures.
Example
12345678901234
xabcyabcwabcyz
and are maximal pairs, but is not, as y follows both substrings. abc and abcy are maximal repeats, but only abcy is a supermaximal repeat.
References