


























Let $T=t_0 ... t_{n-1}$ be a text and $P = p_0 ... p_{m-1}$ a pattern taken from some finite alphabet set $Σ$, and let $\dist$ be a metric on $Σ$. We consider the problem of calculating the sum of distances between the symbols of $P$ and the symbols of substrings of $T$ of length $m$ for all possible offsets. We present an $ε$-approximation algorithm for this problem which runs in time $O(\frac{1}{ε^2}n\cdot \mathrm{polylog}(n,\absΣ))$
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。