Reducing the Size of NFAs by Using Equivalences and Preorders

  • Lucian Ilie
  • Roberto Solis-Oba
  • Sheng Yu
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3537)


The efficiency of regular expression matching algorithms depends very much on the size of the nondeterministic finite automata (NFA) obtained from regular expressions. Reducing the size of these automata by using equivalences has been shown to reduce significantly the search time. We consider the problem of reducing the size of arbitrary NFAs using equivalences and preorders. For equivalences, we give an algorithm to optimally combine equivalent states for reducing the size of the automata. We also show that the problem of optimally using preorders to reduce the size of an automaton is NP-hard.


regular expression matching finite automata state complexity equivalences preorders 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Bar-Yehuda, R., Even, S.: A linear-time approximation algorithm for the weighted vertex cover problem. Journal of Algorithms 2, 198–203 (1981)zbMATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Champarnaud, J.-M., Coulon, F.: NFA reduction algorithms by means of regular inequalities. In: Ésik, Z., Fülöp, Z. (eds.) DLT 2003. LNCS, vol. 2710, pp. 194–205. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Champarnaud, J.-M., Coulon, F.: NFA reduction algorithms by means of regular inequalities. Theoret. Comput. Sci. 327(3), 241–253Google Scholar
  4. 4.
    Champarnaud, J.-M., Coulon, F.: NFA reduction algorithms by means of regular inequalities – correction. Theoret. Comput. Sci. (to appear)Google Scholar
  5. 5.
    Garey, M.R., Johnson, D.S.: Computers and intractability: a guide to the theory of NP-completeness. W.H. Freeman and Company, New York (1979)zbMATHGoogle Scholar
  6. 6.
    Hagenah, C., Muscholl, A.: Computing ε-free NFA from regular expressions in O(n log2(n)) time. Theor. Inform. Appl. 34(4), 257–277 (2000)zbMATHCrossRefMathSciNetGoogle Scholar
  7. 7.
    Hopcroft, J.: An n log n algorithm for minimizing states in a finite automaton. In: Proc. Internat. Sympos. Theory of machines and computations, Technion, Haifa, pp. 189–196. Academic Press, New York (1971)Google Scholar
  8. 8.
    Hopcroft, J.E., Karp, R.: An n 5/2 algorithm for maximum matchings in bipartite graphs. SIAM Journal on Computing 2(4), 225–231 (1973)zbMATHCrossRefMathSciNetGoogle Scholar
  9. 9.
    Hopcroft, J.E., Ullman, J.D.: Introduction to Automata Theory, Languages, and Computation. Addison-Wesley, Reading (1979)zbMATHGoogle Scholar
  10. 10.
    Hromkovic, J., Seibert, S., Wilke, T.: Translating regular expressions into small ε-free nondeterministic finite automata. J. Comput. System Sci. 62(4), 565–588 (2001)zbMATHCrossRefMathSciNetGoogle Scholar
  11. 11.
    Ilie, L., Navarro, G., Yu, S.: On NFA reductions. In: Karhumäki, J., Maurer, H., Păun, G., Rozenberg, G. (eds.) Theory Is Forever. LNCS, vol. 3113, pp. 112–124. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  12. 12.
    Ilie, L., Yu, S.: Algorithms for computing small NFAs. In: Diks, K., Rytter, W. (eds.) MFCS 2002. LNCS, vol. 2420, pp. 328–340. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  13. 13.
    Ilie, L., Yu, S.: Reducing NFAs by invariant equivalences. Theoret. Comput. Sci. 306, 373–390 (2003)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Jiang, T., Ravikumar, B.: Minimal NFA problems are hard. SIAM J. Comput. 22(6), 1117–1141 (1993)zbMATHCrossRefMathSciNetGoogle Scholar
  15. 15.
    Kameda, T., Weiner, P.: On the state minimization of nondeterministic finite automata. IEEE Trans. Computers C-19(7), 617–627 (1970)zbMATHCrossRefMathSciNetGoogle Scholar
  16. 16.
    Melnikov, B.F.: A new algorithm of the state-minimization for the nondeterministic finite automata. Korean J. Comput. Appl. Math. 6(2), 277–290 (1999)zbMATHMathSciNetGoogle Scholar
  17. 17.
    Melnikov, B.F.: Once more about the state-minimization of the nondeterministic finite automata. Korean J. Comput. Appl. Math. 7(3), 655–662 (2000)zbMATHMathSciNetGoogle Scholar
  18. 18.
    Navarro, G., Raffinot, M.: Compact DFA Representation for Fast Regular Expression Search. In: Brodal, G.S., Frigioni, D., Marchetti-Spaccamela, A. (eds.) WAE 2001. LNCS, vol. 2141, pp. 1–12. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  19. 19.
    Navarro, G., Raffinot, M.: Flexible Pattern Matching in Strings. Practical On- Line Search Algorithms for Texts and Biological Sequences. Cambridge University Press, Cambridge (2002)zbMATHGoogle Scholar
  20. 20.
    Paige, R., Tarjan, R.E.: Three Partition Refinement Algorithms. SIAM J. Comput. 16(6), 973–989 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Yu, S.: Regular Languages. In: Rozenberg, G., Salomaa, A. (eds.) Handbook of Formal Languages, vol. I, pp. 41–110. Springer, Berlin (1997)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Lucian Ilie
    • 1
  • Roberto Solis-Oba
    • 1
  • Sheng Yu
    • 1
  1. 1.Department of Computer ScienceUniversity of Western OntarioLondonCanada

Personalised recommendations