an:07002892
Zbl 1403.68373
Hooshmand, Sahar; Tavakoli, Neda; Abedin, Paniz; Thankachan, Sharma V.
On computing average common substring over run length encoded sequences
EN
Fundam. Inform. 163, No. 3, 267-273 (2018).
00424872
2018
j
68W32 68P30 68W40
string algorithms; suffix trees; RL-encoding; compression
Summary: The Average Common Substring (ACS) is a popular alignment-free distance measure for phylogeny reconstruction. The ACS of a sequence \(\mathrm X[1, x ]\) w.r.t. another sequence \(\mathrm Y[1, y ]\) is
\[
\mathrm {ACS}(\mathrm X, \mathrm Y) = \frac {1}{x} \sum \limits_{i = 1}^x \underset {j} {\max} \;\operatorname{lcp} (\mathrm X [i,x],\mathrm Y [j,y])
\]
The \(\operatorname{lcp}(\cdot,\cdot)\) of two input sequences is the length of their longest common prefix. The ACS can be computed in \(O (n)\) space and time, where \(n = x + y\) is the input size. The compressed string matching is the study of string matching problems with the following twist: the input data is in a compressed format and the underling task must be performed with little or no decompression. In this paper, we revisit the ACS problem under this paradigm where the input sequences are given in their run-length encoded format. We present an algorithm to compute \(\mathrm {ACS}(\mathrm X, \mathrm Y)\) in \(O (N \log N)\) time using \(O (N)\) space, where \(N\) is the total length of sequences after run-length encoding.