| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/LCP_array |
| Contents |
|---|
| Applications |
| LCP queries for arbitrary suffixes |
| References |
| LCP array | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Type | Array | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Invented by | Manber & Myers (1993) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Time complexity and space complexity in big O notation | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Suffix array with suffixes written out underneath vertically:
Then the LCP array H[i] | undefined | 0 | 1 | 3 | 0 | 0 | 2 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
So, for example, A[3]=S[4,7]=ana$ and O(nlogn) time. Kärkkäinen & Sanders (2003) show that it is also possible to modify their 13n bytes, while the original output (text, suffix array, LCP array) only occupies As of 2012, the currently fastest linear-time LCP array construction algorithm is due to Fischer (2011), which in turn is based on one of the fastest suffix array construction algorithms (SA-IS) by Nong, Zhang & Chan (2009). Fischer & Kurpicz (2017) based on Yuta Mori's DivSufSort is even faster.
As noted by Abouelhoda, Kurtz & Ohlebusch (2004) several string processing problems can be solved by the following kinds of tree traversals:
Kasai et al. (2001) show how to simulate a bottom-up traversal of the suffix tree using only the suffix array and LCP array. Abouelhoda, Kurtz & Ohlebusch (2004) enhance the suffix array with the LCP array and additional data structures and describe how this enhanced suffix array can be used to simulate all three kinds of suffix tree traversals. Fischer & Heun (2007) reduce the space requirements of the enhanced suffix array by preprocessing the LCP array for range minimum queries. Thus, every problem that can be solved by suffix tree algorithms can also be solved using the enhanced suffix array.
Deciding if a pattern S of length O(m+logn) time. Abouelhoda, Kurtz & Ohlebusch (2004) show how to improve this running time even further to achieve optimal S of length A and the LCP array. It is sufficient to perform a linear scan through the LCP array in order to find its maximum value vmax is stored. The longest substring that occurs at least twice is then given by
In order to find the number of occurrences of a given string T (length P.
The issue with using standard binary search (without the LCP information) is that in each of the O(m+logN), in the following way:
At any point during the binary search algorithm, we consider, as usual, a range (L,…,M) or in the right sub-range M. If k characters of M. Let's assume the outcome is that (M,…,R) and a new central point M and M itself has a prefix of lcp(P,M)=k. Now there are three possibilities:
Moreover, there is a straightforward recursive algorithm to compute the O(N) time and O(M+logN).
The nodes that are traversed in step v) are removed from the rightmost path, when 2n nodes will be traversed in total.
The LCP array A−1 (j in A) and constant-time range minimum queries on S[i,n] and H is preprocessed for range minimum queries.
Thus given a string i,j in the string S[i,n] and
| View original on Wikipedia | Back | FazBrowse Home |