Fast Convolutions of Packed Strings and Pattern Matching with Wildcards

作者: Meng Zhang

DOI: 10.1142/S0129054117500186

关键词: Word (group theory)String searching algorithmFast Fourier transformWildcardMathematicsConvolutionWildcard characterCombinatoricsPattern matchingBlossom algorithmAlgorithm

摘要: We give faster methods to compute discrete convolutions. assume that all the inputs are packed, is, strings packed into words such each word is with α = ⌊ ω / log⁡2|Σ| ⌋ characters, where w length of a machine and ∑ alphabet. The output our also contains more than one element result. approach based on word-level parallelism FFT. Given two m n ( ≥ ) characters ⌈ m/α ⌉ n/α respectively, convolution them can be computed in O(nuw log⁡ muw) time, u (⌈ log⁡|Σ|m + 2) by Experiments show method three times using standard trick. consider problem pattern matching wildcards strings. It finds occurrences text, both which may contain wildcards. By strings, we present algorithms previous O(n m)-time algorithm, text. algorithm runs muw nlog⁡ |Σ|w log⁡1+o(1) |Σ| mlog⁡ wlog⁡ occ) occ number input. bit-parallel wildcard for long patterns.

参考文章(16)
Andrej Brodnik, Peter Bro Miltersen, J. Ian Munro, Trans-Dichotomous Algorithms Without Multiplication - Some Upper and Lower Bounds workshop on algorithms and data structures. pp. 426- 439 ,(1997) , 10.1007/3-540-63307-3_80
M. S. Paterson, M. J. Fischer, STRING-MATCHING AND OTHER PRODUCTS Massachusetts Institute of Technology. ,(1974)
Philip Bille, Fast searching in packed strings Journal of Discrete Algorithms. ,vol. 9, pp. 49- 56 ,(2011) , 10.1016/J.JDA.2010.09.003
Ricardo Baeza-Yates, Gaston H. Gonnet, A new approach to text searching Communications of The ACM. ,vol. 35, pp. 74- 82 ,(1992) , 10.1145/135239.135243
Kimmo Fredriksson, Szymon Grabowski, Exploiting word-level parallelism for fast convolutions and their applications in approximate string matching The Journal of Combinatorics. ,vol. 34, pp. 38- 51 ,(2013) , 10.1016/J.EJC.2012.07.013
Richard Cole, Ramesh Hariharan, Verifying candidate matches in sparse and wildcard matching symposium on the theory of computing. pp. 592- 601 ,(2002) , 10.1145/509907.509992
Chaim Linhart, Ron Shamir, Faster pattern matching with character classes using prime number encoding Journal of Computer and System Sciences. ,vol. 75, pp. 155- 162 ,(2009) , 10.1016/J.JCSS.2008.08.005
Oren Ben-Kiki, Philip Bille, Dany Breslauer, Leszek Ga̧sieniec, Roberto Grossi, Oren Weimann, Towards optimal packed string matching Theoretical Computer Science. ,vol. 525, pp. 111- 129 ,(2014) , 10.1016/J.TCS.2013.06.013
Colin Percival, Rapid multiplication modulo the sum and difference of highly composite numbers Mathematics of Computation. ,vol. 72, pp. 387- 395 ,(2003) , 10.1090/S0025-5718-02-01419-9