Article ID | Journal | Published Year | Pages | File Type |
---|---|---|---|---|
431605 | Journal of Discrete Algorithms | 2015 | 5 Pages |
Abstract
For a partial word w the longest common compatible prefix of two positions i, j , denoted lccp(i,j)lccp(i,j), is the largest k such that w[i,i+k−1]w[i,i+k−1] and w[j,j+k−1]w[j,j+k−1] are compatible. The LCCP problem is to preprocess a partial word in such a way that any query lccp(i,j)lccp(i,j) about this word can be answered in O(1)O(1) time. We present a simple solution to this problem that works for any linearly-sortable alphabet. Our preprocessing is in time O(nμ+n)O(nμ+n), where μ is the number of blocks of holes in w.
Keywords
Related Topics
Physical Sciences and Engineering
Computer Science
Computational Theory and Mathematics
Authors
M. Crochemore, C.S. Iliopoulos, T. Kociumaka, M. Kubica, A. Langiu, J. Radoszewski, W. Rytter, B. Szreder, T. Waleń,