Abstract

The convolution between a text string SS of length NN and a pattern string PP of length mm can be computed in O(Nlog⁡m)O(N \log m) time by FFT. It is known that various types of approximate string matching problems are reducible to convolution. In this paper, we assume that the input text string is given in a compressed form, as a \emph{straight-line program (SLP)}, which is a context free grammar in the Chomsky normal form that derives a single string. Given an SLP S\mathcal{S} of size nn describing a text SS of length NN, and an uncompressed pattern PP of length mm, we present a simple O(nmlog⁡m)O(nm \log m)-time algorithm to compute the convolution between SS and PP. We then show that this can be improved to O(min⁡{nm,N−α}log⁡m)O(\min\{nm, N-α\} \log m) time, where α≥0α\geq 0 is a value that represents the amount of redundancy that the SLP captures with respect to the length-mm substrings. The key of the improvement is our new algorithm that computes the convolution between a trie of size rr and a pattern string PP of length mm in O(rlog⁡m)O(r \log m) time.

Explore this paper’s authors, topics and related work.

Building this map preview

BZPEER is loading the nearby papers, people, topics and institutions for this page.

Reviews 0

Write a reviewWrite

No reviews yet.

Discussion 0

Add a commentWrite

No comments yet.