Regular Expressions with Numerical Constraints and Automata with Counters

  • Dag Hovland
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5684)


Regular expressions with numerical constraints are an extension of regular expressions, allowing to bound numerically the number of times that a subexpression should be matched. Expressions in this extension describe the same languages as the usual regular expressions, but are exponentially more succinct.

We define a class of finite automata with counters and a deterministic subclass of these. Deterministic finite automata with counters can recognize words in linear time. Furthermore, we describe a subclass of the regular expressions with numerical constraints, a polynomial-time test for this subclass, and a polynomial-time construction of deterministic finite automata with counters from expressions in the subclass.


Polynomial Time Term Tree Regular Expression Counter State Regular Language 
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.
    The Open Group: The Open Group Base Specifications Issue 6, IEEE Std 1003.1. 2 edn. (1997)Google Scholar
  2. 2.
    GNU: GNU grep manualGoogle Scholar
  3. 3.
    Fallside, D.C.: XML Schema part 0: Primer, W3C recommendation. Technical report, World Wide Web Consortium (W3C) (2001)Google Scholar
  4. 4.
    Kilpeläinen, P., Tuhkanen, R.: Regular expressions with numerical occurrence indicators - preliminary results. In: Kilpeläinen, P., Päivinen, N. (eds.) SPLST, pp. 163–173. University of Kuopio, Department of Computer Science (2003)Google Scholar
  5. 5.
    Brüggemann-Klein, A.: Regular expressions into finite automata. Theoretical Computer Science 120(2), 197–213 (1993)MathSciNetCrossRefzbMATHGoogle Scholar
  6. 6.
    Gelade, W., Martens, W., Neven, F.: Optimizing schema languages for XML: Numerical constraints and interleaving. In: Schwentick, T., Suciu, D. (eds.) ICDT 2007. LNCS, vol. 4353, pp. 269–283. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  7. 7.
    Kilpeläinen, P., Tuhkanen, R.: One-unambiguity of regular expressions with numeric occurrence indicators. Information and Computation 205(6), 890–916 (2007)MathSciNetCrossRefzbMATHGoogle Scholar
  8. 8.
    Bezem, M., Klop, J.W., de Vrijer, R. (eds.): Term Rewriting Systems. Cambridge University Press, Cambridge (2003)zbMATHGoogle Scholar
  9. 9.
    Brüggemann-Klein, A., Wood, D.: One-unambiguous regular languages. Information and Computation 140(2), 229–253 (1998)MathSciNetCrossRefzbMATHGoogle Scholar
  10. 10.
    Glushkov, V.M.: The abstract theory of automata. Russian Mathematical Surveys 16(5), 1–53 (1961)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley, Reading (1979)zbMATHGoogle Scholar
  12. 12.
    Kleene, S.C.: Representation of events in nerve sets and finite automata. Automata Studies, 3–41 (1956)Google Scholar
  13. 13.
    Kilpeläinen, P., Tuhkanen, R.: Towards efficient implementation of XML schema content models. In: Munson, E.V., Vion-Dury, J.Y. (eds.) ACM Symposium on Document Engineering, pp. 239–241. ACM, New York (2004)Google Scholar
  14. 14.
    Ghelli, G., Colazzo, D., Sartiani, C.: Linear time membership in a class of regular expressions with interleaving and counting. In: Shanahan, J.G., Amer-Yahia, S., Manolescu, I., Zhang, Y., Evans, D.A., Kolcz, A., Choi, K.S., Chowdhury, A. (eds.) CIKM, pp. 389–398. ACM, New York (2008)CrossRefGoogle Scholar
  15. 15.
    Dal-Zilio, S., Lugiez, D.: Xml schema, tree logic and sheaves automata. In: Nieuwenhuis, R. (ed.) RTA 2003. LNCS, vol. 2706, pp. 246–263. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  16. 16.
    Laurikari, V.: NFAs with tagged transitions, their conversion to deterministic automata and application to regular expressions. In: SPIRE, pp. 181–187 (2000)Google Scholar
  17. 17.
    Brüggemann-Klein, A.: Regular expressions into finite automata. In: Simon, I. (ed.) LATIN 1992. LNCS, vol. 583, pp. 87–98. Springer, Heidelberg (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Dag Hovland
    • 1
  1. 1.Department of InformaticsUniversity of BergenNorway

Personalised recommendations