Abstract
We give an alphabet-independent optimal parallel algorithm for the searching phase of three dimensional pattern-matching. All occurrences of a three dimensional pattern P of shape m×m×m in a text T of shape n×n×n are to be found. Our algorithm works in log m time with O(N/log(m)) processors of a CREW PRAM, where N=n 3. The searching phase in three dimensions explores classification of two-dimensional periodicities of the cubic pattern. Some new projection techniques are developed to deal with three dimensions. The periodicites of the patern with respect to its faces are investigated. The nonperiodicities imply some sparseness properties, while periodicities imply other special useful properties (i.e. monotonicity) of the set of occurrences. Both types of properties are useful in deriving an efficient algorithm.
The search phase is preceeded by the preprocessing phase (computation of the witness table). Our main results concern the searching phase, however we present shortly a new approach to the second phase also. Usefullness of the dictionaries of basic factors (DBF's), see [7], in the computation of the three dimensional witness table is presented. The DBF approach gains simplicity at the expense of a small increase in time. It gives a (nonoptimal) O(log(m)) time algorithm using m processors of a CRCW PRAM. The alphabet-independent optimal preprocessing is very complex even in the case of two dimensions, see [9]. For large alphabets the DBF's give assymptotically the same complexity as the (alphabet-dependent) suffix trees approach (but avoids suffix trees and is simpler). However the basic advantage of the DBF approach is its simplicity of dealing with three (or more) dimensions.
The algorithm can be easily adjusted to the case of unequally sided patterns.
Research supported in part by the DFG Grant KA 673/4-1, by the ESPRIT BR Grants 7097 and ECUS030, and by the Volkswagen-Stiftung.
Research supported in part by the Grant KBN 2-1190-91-01.
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
A. Amir, G. Benson. Two dimensional periodicity in rectangular arrays. SODA'92, 440–452
A. Amir, G. Benson, M. Farach. Alphabet independent two dimensional matching. STOC'92, 59–68.
A. Amir, G. Benson, M. Farach. Parallel two dimensional matching in logarithmic time. SPAA'93, 79–85.
T. J. Baker. A technique for extending rapid exact-match string matching to arrays of more than one dimension. SIAM J. Comp. 7 (1978) 533–541.
R. S. Bird. Two dimensional pattern matching. Inf. Proc. letters 6, (1977) 168–170.
R. Cole, M. Crochemore, Z. Galil, L. Gasieniec, R. Hariharan, S. Muthukrishnan, K. Park, W. Rytter. Optimally fast parallel algorithms for preprocessing and pattern matching in one and two dimensions. FOCS'93.
M. Crochemore, W. Rytter. Usefullness of the Karp-Miller-Rosenberg algorithm in parallel computations on strings and arrays. Theoretical Computer Science 88 (1991) 59–62.
Z. Galil. Optimal parallel algorithms for string matching. Information and Control 67 (1985) 144–157.
Z. Galil, K. Park. Truly alphabet independent two dimensional matching. FOCS'92, (1992) 247–256.
Z. Kedem, G. Landau, K. Palem. Optimal parallel prefix-suffix matching algorithm and application. SPAA'89 (1989) 388–398.
R. Karp, R. Miller, A. Rosenberg. Rapid identification of repeated patterns in strings, trees and arrays. STOC'72 (1972) 125–136.
R. Karp, M. O. Rabin. Efficient randomized pattern matching algorithms. IBM Journal of Res. and Dev. 31 (1987) 249–260.
U. Vishkin. Optimal pattern matching in strings. Information and Control 67 (1985) 91–113.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1994 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Karpinski, M., Rytter, W. (1994). An alphabet-independent optimal parallel search for three dimensional pattern. In: Crochemore, M., Gusfield, D. (eds) Combinatorial Pattern Matching. CPM 1994. Lecture Notes in Computer Science, vol 807. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-58094-8_11
Download citation
DOI: https://doi.org/10.1007/3-540-58094-8_11
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-58094-2
Online ISBN: 978-3-540-48450-9
eBook Packages: Springer Book Archive