Abstract
We give two new algorithms for constructing small nondeterministic finite automata (NFA) from regular expressions. The first constructs NFAs with ε-moves (εNFA) which are smaller than all the other εNFAs obtained by similar constructions. Their size is at most 3/2|α| + 5/2, where α is the regular expression. The second constructs NFAs. It uses ε-elimination in the εNFAs we just introduced and builds a quotient of the well-known position automaton. Our NFA is always smaller and faster to compute than the position automaton. It uses optimally the information from the positions of a regular expression.
Research partially supported by NSERC grant R3143A01.
Research partially supported by NSERC grant OGP0041630.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Aho, A., Sethi, R., Ullman, J., Compilers: Principles, Techniques, and Tools, Addison-Wesley, MA, 1988.
Antimirov, V., Partial derivatives of regular expressions and finite automaton constructions, Theoret. Comput. Sci. 155 (1996) 291–319.
Berry, G, Sethi, R., From regular expressions to deterministic automata, Theoret. Comput. Sci. 48 (1986) 117–126.
Brüggemann-Klein, A., Regular expressions into finite automata, Theoret. Comput. Sci. 120 (1993) 197–213.
Brzozowski, J., Derivatives of regular expressions, J. ACM 11 (1964) 481–494.
Champarnaud, J.-M., Ziadi, D., New finite automaton constructions based on canonical derivatives, Proc. of CIAA 2000, LNCS 2088, Springer, 2001, 94–104.
Champarnaud, J.-M., Ziadi, D., Computing the equation automaton of a regular expression in O(s 2) space and time, Proc. of 12th Combinatorial Pattern Matching (CPM 2001), LNCS 2089, Springer, 2001, 157–168.
Chang, C.-H., Paige, R., From regular expressions to DFA’s using compressed NFA’s, Theoret. Comput. Sci 178 (1997) 1–36.
Crochemore, M., Hancart, C., Automata for pattern matching, in: G. Rozenberg, A. Salomaa, eds., Handbook of Formal Languages, Vol. II, Springer-Verlag, Berlin, 1997, 399–462.
Friedl, J., Mastering Regular Expressions, O’Reilly, 1998.
Glushkov, V. M., The abstract theory of automata, Russian Math. Surveys 16 (1961) 1–53.
Hagenah, C., Muscholl, A., Computing ε-free NFA from regular expressions in O(n log2(n)) time, Theor. Inform. Appl. 34(4) (2000) 257–277.
Hopcroft, J., An n log n algorithm for minimizing states in a finite automaton, Proc. Internat. Sympos. Theory of machines and computations, Technion, Haifa, 1971, Academic Press, New York, 1971, 189–196.
Hopcroft, J. E., Ullman, J. D., Introduction to Automata Theory, Languages, and Computation, Addison-Wesley, Reading, Mass., 1979.
Hromkovic, J., Seibert, S., Wilke, T., Translating regular expressions into small ε-free nondeterministic finite automata, J. Comput. System Sci. 62(4) (2001) 565–588.
McNaughton, R., Yamada, H., Regular expressions and state graphs for automata, IEEE Trans. on Electronic Computers 9(1) (1960) 39–47.
Sippu, S., Soisalon-Soininen, E., Parsing Theory: I Languages and Parsing, EATCS Monographs on Theoretical Computer Science, Vol. 15, Springer-Verlag, New York, 1988.
Thompson, K., Regular expression search algorithm, Comm. ACM 11(6) (1968) 419–422.
Yu, S., Regular Languages, in: G. Rozenberg, A. Salomaa, eds., Handbook of Formal Languages, Vol. I, Springer-Verlag, Berlin, 1997, 41–110.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2002 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Ilie, L., Yu, S. (2002). Constructing NFAs by Optimal Use of Positions in Regular Expressions. In: Apostolico, A., Takeda, M. (eds) Combinatorial Pattern Matching. CPM 2002. Lecture Notes in Computer Science, vol 2373. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-45452-7_23
Download citation
DOI: https://doi.org/10.1007/3-540-45452-7_23
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-43862-5
Online ISBN: 978-3-540-45452-6
eBook Packages: Springer Book Archive