See: Maximal Relation, Contiguous Subsequence, Minimal Contiguous Subsequence, Maximal Repeating Substring.