A substring Q of a string S is called a shortest unique substring (SUS) for interval [s,t] in S, if Q occurs exactly once in S, this occurrence of Q contains interval [s,t], and every substring of S which contains interval [s,t] and is shorter than Q occurs at least twice in S. The SUS problem is, given a string S, to preprocess S so that for any subsequent query interval [s,t] all the SUSs for interval [s,t] can be answered quickly. When s = t, we call the SUSs for [s,t] as point SUSs, and when s t, we call the SUSs for [s,t] as interval SUSs. There exist optimal O(n)-time preprocessing scheme which answers queries in optimal O(k) time for both point and interval SUSs, where n is the length of S and k is the number of outputs for a given query. In this paper, we reveal structural, combinatorial properties underlying the SUS problem: Namely, we show that the number of intervals in S that correspond to point SUSs for all query positions in S is less than 1.5n, and show that this is a matching upper and lower bound. Also, we consider the maximum number of intervals in S that correspond to interval SUSs for all query intervals in S.
Xu @cite_3 introduced the () problem. An interval @math of a string @math is said to be an LR for interval @math if (a) the substring @math occurs at least twice in @math , (b) the occurrence @math of @math contains @math and (c) there does not exist an interval @math of @math such that @math , the substring @math occurs at least twice in @math , and the interval @math contains interval @math . The point and interval LR problems are defined analogously as the point and interval SUS problems, respectively. Xu @cite_3 presented an optimal algorithm which, after @math -time preprocessing, returns all LRs for a given interval in @math time, where @math is the number of output LRs. He claimed that although the point interval SUS problems and the point interval LR problems look alike, these problems are actually quite different, with a support from an example where an SUS and LR for the same query point seem rather unrelated.
@cite_3
2950223108
A longest repeat query on a string, motivated by its applications in many subfields including computational biology, asks for the longest repetitive substring(s) covering a particular string position (point query). In this paper, we extend the longest repeat query from point query to , allowing the search for longest repeat(s) covering any position interval, and thus significantly improve the usability of the solution. Our method for interval query takes a different approach using the insight from a recent work on [1], as the prior work's approach for point query becomes infeasible in the setting of interval query. Using the critical insight from [1], we propose an indexing structure, which can be constructed in the optimal @math time and space for a string of size @math , such that any future interval query can be answered in @math time. Further, our solution can find longest repeats covering any given interval using optimal @math time, where @math is the number of longest repeats covering that given interval, whereas the prior @math -time and space work can find only one candidate for each point query. Experiments with real-world biological data show that our proposal is competitive with prior works, both time and space wise, while providing with the new functionality of interval queries as opposed to point queries provided by prior works.