Skip to main content

String matching under a general matching relation

  • Conference paper
  • First Online:
Foundations of Software Technology and Theoretical Computer Science (FSTTCS 1992)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 652))

Abstract

In standard string matching, each symbol matches only itself. In other string matching problems, e.g., the string matching with “don't-cares” problem, a symbol may match several symbols. In general, an arbitrary many-to-many matching relation might hold between symbols. We consider a general string matching problem in which such a matching relation is specified and those text positions are sought at which the pattern matches under this relation.

Depending upon the existence of a simple, easily recognizable property in the given matching relation, we show that string matching either requires time linear in the text and pattern lengths or is at least as hard as boolean multiplication. Since the existence of a linear time algorithm for boolean multiplication has been a long-standing open question, designing linear time algorithms for matching relations in the latter category appears to be hard. As an application, we show that the matching relations of several independently studied string matching problems do indeed fall into the latter (hard) category.

We also initiate the study of a generic string matching algorithm that works for any matching relation. We give an algorithm that given any matching relation, pattern and text runs in O(n(sm)1/3 polylog(m)), where n and m are the sizes of the text and the pattern respectively, and s is a factor related to the size of the given matching relation. This complexity is o(nm) except for very dense matching relations.

The work of this author was initiated while visiting IBM T.J. Watson Research Center, Yorktown Heights, and supported in part by NSF/DARPA grant CCR-89-06949 and NSF grant CCR-91-03953.

The work of this author was supported in part by NSF grants CCR-8902221 and CCR-8906949.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. A. Amir. Open Problems Session, Combinatorial Pattern Matching Conference, Tucson, Arizona, 1992.

    Google Scholar 

  2. K. Abrahamson. Generalized String Matching. SIAM J. Comp., pp. 1039–1051, 1987.

    Google Scholar 

  3. A. Amir and M. Farach. Efficient 2-dimensional Approximate Matching of Non-rectangular Figures. In Proceedings of the Second Symposium on Discrete Algorithms, pp. 344–457, 1991.

    Google Scholar 

  4. R. Boyer and S. Moore. A fast string matching algorithm. CACM, 20(1977), 762–772.

    Google Scholar 

  5. I. Dinstein, G. Landau, G. Guy. Parallel (PRAM EREW) Algorithms for Contour-Based 2-D Shape Recognition. Pattern Recognition, Vol. 24, No. 10, pp. 929–942, 1991.

    Article  Google Scholar 

  6. M. Fischer and M. Paterson. String Matching and other Products. In SIAM-AMS Proceedings, Vol. 7, pp. 113–125, 1974.

    Google Scholar 

  7. Z. Galil. Open Problems in Stringology. In Combinatorial Algorithms on Words, NATO-ASI series, pp. 1–8, 1985. Editors: A. Apostolico and Z. Galil.

    Google Scholar 

  8. S.R. Kosaraju. Efficient Tree Pattern Matching. In Proceedings IEEE Symp. on FOCS, pp. 178–183, 1989.

    Google Scholar 

  9. D.E. Knuth, J. Morris, V. Pratt. Fast pattern matching in strings. SIAM Journal on Computing, 6(1973), 323–350.

    Article  Google Scholar 

  10. R.Y. Pinter. Efficient String Matching with Don't-Care Patterns. In Combinatorial Algorithms on Words, NATO-ASI series, pp. 11–29, 1985. Editors: A. Apostolico and Z. Galil.

    Google Scholar 

  11. I. Wegener. The Complexity of Boolean Functions. Wiley-Teubner Series in Computer Science, pp. 168–169, 1986.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Rudrapatna Shyamasundar

Rights and permissions

Reprints and permissions

Copyright information

© 1992 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Muthukrishnan, S., Ramesh, H. (1992). String matching under a general matching relation. In: Shyamasundar, R. (eds) Foundations of Software Technology and Theoretical Computer Science. FSTTCS 1992. Lecture Notes in Computer Science, vol 652. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-56287-7_118

Download citation

  • DOI: https://doi.org/10.1007/3-540-56287-7_118

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-56287-0

  • Online ISBN: 978-3-540-47507-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics