Multi-dimensional pattern matching with dimensional wildcards

  • Raffaele Giancarlo
  • Roberto Grossi
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 937)


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.


Pattern Match Decomposition Tree String Match Suffix Tree Canonical Decomposition 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    A. Apostolico, C. Iliopoulos, G. Landau, B. Schieber, and U. Vishkin. Parallel construction of a suffix tree with applications. Algorithmica, 3:347–365, 1988.CrossRefGoogle Scholar
  2. 2.
    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.Google Scholar
  3. 3.
    R. Giancarlo. An index data structure for matrices, with applications to fast twodimensional pattern matching. In Proc. WADS, 337–348. Springer-Verlag, 1993.Google Scholar
  4. 4.
    R. Giancarlo and R. Grossi. Parallel construction and query of suffix trees for two-dimensional matrices. In Proc. 5th SPAA, 86–97. ACM, 1993.Google Scholar
  5. 5.
    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.Google Scholar
  6. 6.
    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.Google Scholar
  7. 7.
    J. JáJá. An Introduction to Parallel Algorithms. Addison-Wesley, Reading, MA., 1992.Google Scholar
  8. 8.
    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.Google Scholar
  9. 9.
    E.M. McCreight. A space economical suffix tree construction algorithm. J. of ACM, 23:262–272, 1976.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1995

Authors and Affiliations

  • Raffaele Giancarlo
    • 1
  • Roberto Grossi
    • 2
  1. 1.Dipartimento di Matematica e ApplicazioniUniversità di PalermoPalermoItaly
  2. 2.Dipartimento di Sistemi e InformaticaUniversità di FirenzeFirenzeItaly

Personalised recommendations