6533b7d3fe1ef96bd1260229

RESEARCH PRODUCT

Multi-dimensional pattern matching with dimensional wildcards

Roberto GrossiRaffaele Giancarlo

subject

business.industryGeneralizationCommentz-Walter algorithmPattern recognitionWildcard characterString searching algorithmcomputer.file_formatApproximate string matchingBinary logarithmCombinatoricsMatrix (mathematics)Artificial intelligencePattern matchingbusinesscomputerMathematics

description

We introduce a new multi-dimensional pattern matching problem, which is a natural generalization of the on-line search in string matching. We are given a text matrix A[1: n1, ..., 1:n d ] of size N= n1×n2×...×n d , which we may preprocess. Then, we are given, online, an r-dimensional pattern matrix B[1:m1,...,1:m r ] of size M= m1×m2×...×m r , with 1≤r≤d. We would like to know whether B*=B*[*, 1:m1,*, ...,1: mr, *] occurs in A, where * is a dimensional wildcard such that B* is any d-dimensional matrix having size 1 × ... × m1×...1×m r ×...1 and containing the same elements as B. Notice that there might be (d/r)≤2d occurrences of B* for each position of A. We give CRCW-PRAM algorithms for preprocessing A in O(d log N) time with N2/n max processors, where n max =max|n1,...,n d }. The on-line search for B* can be done in O(d log M) time and optimal O(dM) work.

https://doi.org/10.1007/3-540-60044-2_37