The Community for Technology Leaders
Parallel Architectures, Algorithms and Programming, International Symposium on (2010)
Dalian, Liaoning China
Dec. 18, 2010 to Dec. 20, 2010
ISBN: 978-0-7695-4312-3
pp: 169-174
ABSTRACT
Multi-pattern matching with wildcards is to find all the occurrences of a set of patterns with wildcards in a text. This problem arises in various fields, such as computational biology and network security. But the problem is not extensively studied as the single pattern case and there is no efficient algorithm for this problem. In this paper, we present efficient algorithms based on fast Fourier transforms. Let $P=\{p_1,\ldots,p_k\}$ be a set of patterns with wildcards where the total length of patterns is $|P|$, and a text $t$ of length $n$ over alphabet $a_1,\ldots,a_{\sigma}$. We present two algorithms for this problem where patterns are matched simultaneously. The first algorithm finds the matches of a small set of patterns in the text in $O(n\log |P|+nk)$ time. The words used in the algorithm are of size $k\lceil2\lg\sigma\rceil+\sum_{i=1}^k \lceil\lg|p_i|\rceil$ bits. The second one finds the matchings of patterns in the text in time $O(n\log |P|\log\sigma+nk)$ by computing the Hamming distance between the patterns and the text. The algorithm uses the words with $\sum_{i=1}^k \lceil\lg|p_i|\rceil$ bits. We also demonstrate an FFT implementation based on the modular arithmetic for machines with word size of 64 bits. Finally, we show that both algorithms can be easily parallelized and the parallelized algorithms are given as well.
INDEX TERMS
Algorithm, Multi-pattern matching, Wildcards, FFT
CITATION
Yi Zhang, Jijun Tang, Meng Zhang, "Matching a Set of Patterns with Wildcards", Parallel Architectures, Algorithms and Programming, International Symposium on, vol. 00, no. , pp. 169-174, 2010, doi:10.1109/PAAP.2010.70
87 ms
(Ver 3.3 (11022016))