Abstract
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: n 1, ..., 1:n d ] of size N= n 1 ×n 2×...×n d , which we may preprocess. Then, we are given, online, an r-dimensional pattern matrix B[1:m 1,...,1:m r ] of size M= m 1×m 2×...×m r , with 1≤r≤d. We would like to know whether B *=B *[*, 1:m 1,*, ...,1: m r, *] occurs in A, where * is a dimensional wildcard such that B * is any d-dimensional matrix having size 1 × ... × m 1×...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 N 2/n max processors, where n max =max|n 1,...,n d }. The on-line search for B * can be done in O(d log M) time and optimal O(dM) work.
The work of this author is partially supported by MURST Grant “Algoritmi, Modelli di Calcolo e Strutture Informative”. This work was done while the author was with AT&T Bell Laboratories, Murray Hill, NJ. U.S.A.
Work supported by MURST of Italy, partially done while the author was visiting AT&T Bell Laboratories.
Preview
Unable to display preview. Download preview PDF.
References
A. Apostolico, C. Iliopoulos, G. Landau, B. Schieber, and U. Vishkin. Parallel construction of a suffix tree with applications. Algorithmica, 3:347–365, 1988.
M.J. Fischer and M.S. Paterson. String matching and other products. In R.M. Karp, editor, Complexity of Computation, 113–125, Providence, RI., 1974. SIAMAMS, American Mathematical Society.
R. Giancarlo. An index data structure for matrices, with applications to fast twodimensional pattern matching. In Proc. WADS, 337–348. Springer-Verlag, 1993.
R. Giancarlo and R. Grossi. Parallel construction and query of suffix trees for two-dimensional matrices. In Proc. 5th SPAA, 86–97. ACM, 1993.
R. Giancarlo and R. Grossi, Multi-dimensional pattern matching with dimensional wildcards: data structures and optimal on-line search algorithms. AT&T Bell Labs. Technical Memorandum TM-11272-941003-18, 1994.
R. Giancarlo and R. Grossi, On the construction of classes of suffix trees for square matrices: algorithms and applications. In Proc. 22nd ICALP. LNCS, 1995.
J. JáJá. An Introduction to Parallel Algorithms. Addison-Wesley, Reading, MA., 1992.
R. Karp, R. Miller, and A. Rosenberg. Rapid identification of repeated patterns in strings, arrays and trees. In Proc. 4th STOC, 125–136. ACM, 1972.
E.M. McCreight. A space economical suffix tree construction algorithm. J. of ACM, 23:262–272, 1976.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1995 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Giancarlo, R., Grossi, R. (1995). Multi-dimensional pattern matching with dimensional wildcards. In: Galil, Z., Ukkonen, E. (eds) Combinatorial Pattern Matching. CPM 1995. Lecture Notes in Computer Science, vol 937. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-60044-2_37
Download citation
DOI: https://doi.org/10.1007/3-540-60044-2_37
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-60044-2
Online ISBN: 978-3-540-49412-6
eBook Packages: Springer Book Archive