Content deleted Content added
Removed unnecessary capitalization in section title. |
Revised the lead section somewhat |
||
Line 25:
|}
In [[computer science]], the '''longest common prefix array''' (LCP [[Array data structure|array]]) is an auxiliary [[data structure]] to the [[suffix array]]. It stores the lengths of the longest common prefixes
For example, if ''A'' := [<tt>aab</tt>, <tt>ab</tt>, <tt>abaab</tt>, <tt>b</tt>, <tt>baab</tt>] is a suffix array, the longest common prefix between ''A''[1] = <tt>aab</tt> and ''A''[2] = <tt>ab</tt> is <tt>a</tt> which has length 1, so ''H''[2] = 1 in the LCP array ''H''. Likewise, the LCP of ''A''[2] = <tt>ab</tt> and ''A''[3] = <tt>abaab</tt> is <tt>ab</tt>, so ''H''[3] = 2.
Augmenting the suffix array with the LCP array allows one to efficiently simulate top-down and bottom-up [[Tree traversal|traversals]] of the [[suffix tree]],{{sfn|Kasai|Lee|Arimura|Arikawa|2001}}{{sfn|Abouelhoda|Kurtz|Ohlebusch|2004}} speeds up pattern matching on the suffix array{{sfn|Manber|Myers|1993}} and is a prerequisite for compressed suffix trees.{{sfn|Ohlebusch|Fischer|Gog|2010}}▼
▲Augmenting the suffix array with the LCP array allows to efficiently simulate top-down and bottom-up [[Tree traversal|traversals]] of the [[suffix tree]],{{sfn|Kasai|Lee|Arimura|Arikawa|2001}}{{sfn|Abouelhoda|Kurtz|Ohlebusch|2004}} speeds up pattern matching on the suffix array{{sfn|Manber|Myers|1993}} and is a prerequisite for compressed suffix trees.{{sfn|Ohlebusch|Fischer|Gog|2010}}
== History ==
|