A Polynomial Time Match Test for Large Classes of Extended Regular Expressions

  • Daniel Reidenbach
  • Markus L. Schmid
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6482)


In the present paper, we study the match test for extended regular expressions. We approach this NP-complete problem by introducing a novel variant of two-way multihead automata, which reveals that the complexity of the match test is determined by a hidden combinatorial property of extended regular expressions, and it shows that a restriction of the corresponding parameter leads to rich classes with a polynomial time match test. For presentational reasons, we use the concept of pattern languages in order to specify extended regular expressions. While this decision, formally, slightly narrows the scope of our results, an extension of our concepts and results to more general notions of extended regular expressions is straightforward.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aho, A.: Algorithms for finding patterns in strings. In: van Leeuwen, J. (ed.) Handbook of Theoretical Computer Science. Algorithms and Complexity, vol. A, pp. 255–300. MIT Press, Cambridge (1990)Google Scholar
  2. 2.
    Angluin, D.: Finding patterns common to a set of strings. Journal of Computer and System Sciences 21, 46–62 (1980)MathSciNetCrossRefzbMATHGoogle Scholar
  3. 3.
    Câmpeanu, C., Salomaa, K., Yu, S.: A formal study of practical regular expressions. International Journal of Foundations of Computer Science 14, 1007–1018 (2003)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Ehrenfeucht, A., Rozenberg, G.: Finding a homomorphism between two words is NP-complete. Information Processing Letters 9, 86–88 (1979)MathSciNetCrossRefzbMATHGoogle Scholar
  5. 5.
    Friedl, J.E.F.: Mastering Regular Expressions, 3rd edn. O’Reilly, Sebastopol (2006)zbMATHGoogle Scholar
  6. 6.
    Guy, R.K.: The money changing problem. In: Unsolved Problems in Number Theory, 3rd edn., ch. C7, pp. 171–173. Springer, New York (2004)CrossRefGoogle Scholar
  7. 7.
    Ibarra, O.: On two-way multihead automata. Journal of Computer and System Sciences 7, 28–36 (1973)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Ibarra, O.: Reversal-bounded multicounter machines and their decision problems. Journal of the ACM 25, 116–133 (1978)MathSciNetCrossRefzbMATHGoogle Scholar
  9. 9.
    Ibarra, O., Pong, T.-C., Sohn, S.: A note on parsing pattern languages. Pattern Recognition Letters 16, 179–182 (1995)CrossRefGoogle Scholar
  10. 10.
    Jiang, T., Kinber, E., Salomaa, A., Salomaa, K., Yu, S.: Pattern languages with and without erasing. International Journal of Computer Mathematics 50, 147–163 (1994)CrossRefzbMATHGoogle Scholar
  11. 11.
    Shinohara, T.: Polynomial time inference of extended regular pattern languages. In: Goto, E., Furukawa, K., Nakajima, R., Nakata, I., Yonezawa, A. (eds.) RIMS 1982. LNCS, vol. 147, pp. 115–127. Springer, Heidelberg (1983)CrossRefGoogle Scholar
  12. 12.
    Shinohara, T.: Polynomial time inference of pattern languages and its application. In: Proc. 7th IBM MFCS, pp. 191–209 (1982)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Daniel Reidenbach
    • 1
  • Markus L. Schmid
    • 1
  1. 1.Department of Computer ScienceLoughborough UniversityLoughboroughUnited Kingdom

Personalised recommendations