Skip to main content
Log in

Deciding Determinism of Regular Languages

  • Published:
Theory of Computing Systems Aims and scope Submit manuscript

Abstract

We investigate the problem to decide for DFAs, NFAs and regular expressions whether they describe deterministic regular languages. For DFAs with limited alphabet size we show the NL-completeness (nondeterministic logarithmic space-completeness) of the problem. Brüggemann-Klein and Wood (Inf. Comput. 142(2), 182–206, (1998)) gave an algorithm deciding for a minimal DFA whether it recognizes a deterministic regular language. Their algorithm requires polynomial time. Based on this algorithm we construct an algorithm for those DFAs which are not necessarily minimal, but limited in the size of the alphabet. We first focus on the case that the DFAs are minimal and extend to general DFAs later on. The new algorithm is substantially modified in contrast to the original one and uses structural properties of minimal DFAs and of special subautomata of the DFAs, called orbit automata. This algorithm runs in nondeterministic logarithmic space. After that we show the NL-hardness of the problem. For NFAs and regular expressions with arbitrary alphabets the problem is shown to be in PSPACE by Czerwiński et al. (2013) (and, in fact, to be PSPACE-complete). Their approach resulted in an algorithm working with space \(\mathcal {O}(x^{4})\). However, our approach for the NL-algorithm can be modified to get an algorithm for NFAs and regular expressions using just quadratic space.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4

Similar content being viewed by others

References

  1. Ahonen, H.: Disambiguation of SGML content models. In: PODP of LNCS, vol. 1293 pp. 27–37. Springer (1996)

  2. Bex, G. J., Gelade, W., Martens, W., Neven, F.: Simplifying XML schema: effortless handling of nondeterministic regular expressions. In: SIGMOD Conference. pp. 731–744. ACM (2009)

  3. Brüggemann-Klein, A.: Regular expressions into finite automata. Theor. Comput. Sci. 120(2), 197–213 (1993)

    Article  MATH  Google Scholar 

  4. Brüggemann-Klein, A., Wood, D.: One-unambiguous regular languages. Inf. Comput. 140 (2), 182–206 (1998)

    Article  MATH  Google Scholar 

  5. Caron, P., Han, Y., Mignot, L.: Generalized one-unambiguity. In: Developments in Language Theory of LNCS, vol. 6795 pp. 129–140. Springer (2011)

  6. Chen, H., Lu, P.: Assisting the design of XML schema: diagnosing nondeterministic content models. In: APWeb of LNCS, vol. 6612 pp. 301–312 Springer (2011).

  7. Chen, H., Lu, P.: Checking determinism of regular expressions with counting. In: Developments in Language Theory of LNCS, vol. 7410 pp. 332–343 Springer (2012).

  8. Czerwiński, W., David, C., Losemann, K., Martens, W.: Deciding definability by deterministic regular expressions. In: FoSSaCS, of LNCS, vol. 7794 pp. 289–304. Springer (2013)

  9. Garey, M.R., Johnson, D.S.: Computers and intractability: a guide to the theory of NP-completeness. W. H. Freeman (1979).

  10. Gelade, W., Gyssens, M., Martens, W.: regular expressions with counting: weak versus strong determinism. SIAM J. Comput. 41 (1), 160–190 (2012).

    Article  MATH  MathSciNet  Google Scholar 

  11. Glushkov, V. M.: The abstract theory of automata. Russian Math. Surveys 16(5), 1–53 (1961)

    Article  Google Scholar 

  12. Groz, B., Maneth, S., Staworko, S.: Deterministic regular expressions in linear time. In: PODS, pp. 49–60. ACM (2012)

  13. Hopcroft, J.: An n logn algorithm for minimizing states in a finite automaton. Theory of machines and Computations (1971)

  14. Hopcroft, J. E., Ullman, J. D.: Introduction to Automata Theory, Languages and Computation. Addison-Wesley (1979).

  15. Hovland, D.: The Membership problem for regular expressions with unordered concatenation and numerical constraints. In: LATA of LNCS, vol. 7183 , pp. 313–324. Springer (2012).

  16. Immerman, N.: Nondeterministic space is closed under complementation. SIAM J. Comput. 17(5), 935–938 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  17. Jones, N. D.: Space-bounded reducibility among combinatorial problems. J. Comput. Syst. Sci. 11(1), 68–85 (1975)

    Article  MATH  Google Scholar 

  18. Kilpeläinen, P.: Checking determinism of XML Schema content models in optimal time. Information Systems. 36(3), 596–617 (2011)

    Article  Google Scholar 

  19. Koch, C., Scherzinger, S.: Attribute grammars for scalable query processing on XML streams. VLDB J. 16(3), 317–342 (2007)

    Article  Google Scholar 

  20. Losemann, K., Martens, W., Niewerth, M.: Descriptional complexity of deterministic regular expressions. In: MFCS of LNCS, vol. 7464, pp. 643–654. Springer (2012)

  21. Meyer, A. R., Stockmeyer, L. J.: The equivalence problem for regular expressions with squaring requires exponential space. In: SWAT (FOCS), pp. 125–129. IEEE Computer Society (1972)

  22. Papadimitriou, C. H: Computational Complexity. Addison-Wesley (1994)

  23. Rozenberg, G., Salomaa, A., (Eds): Handbook of Formal Languages, vol. 1: Word, Language, Grammar. Springer-Verlag New York, New York (1997)

  24. Sperberg-McQueen, C. M: Notes on finite state automata with counters (2004)

Download references

Acknowledgments

We thank Wim Martens for the advice to transfer an older version of our algorithm into an NL-algorithm for minimal DFAs. We thank the reviewers of ICDT 2013, who provided the example we used in Section 3.3.5. Ping Lu and Haiming Chen acknowledge the financial support by the National Natural Science Foundation of China under grants 61472405 and 61070038. Joachim Bremer acknowledges the financial support by the German Research Foundation (DFG) under grant SCHW 837/3-3.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ping Lu.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Lu, P., Bremer, J. & Chen, H. Deciding Determinism of Regular Languages. Theory Comput Syst 57, 97–139 (2015). https://doi.org/10.1007/s00224-014-9576-2

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00224-014-9576-2

Keywords

Navigation