| A simple way to construct NFA with fewer states and transitions |
| Full text |
Pdf
(358 KB)
|
| Source
|
ACM Southeast Regional Conference
archive
Proceedings of the 42nd annual Southeast regional conference
table of contents
Huntsville, Alabama
Pages: 214 - 218
Year of Publication: 2004
ISBN:1-58113-870-9
|
|
Author
|
|
| Sponsor |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 23, Downloads (12 Months): 109, Citation Count: 0
|
|
|
ABSTRACT
The problem of converting a regular expression to NFA is a fundamental problem that has been well studied. However, the two basic construction algorithms: (1) Thompson, (2) McNaughton-Yamada and Glushkov, does not yield the best solution in terms of the number of states and transitions. In this paper, we show: For a regular expression with l literals, we can construct an NFA with 2l states and 4l transitions in the worst case. Our algorithm runs in linear time with respect to the length of the regular expression. This improves the construction algorithm given by Chang in [5], which constructs an NFA with 5l=2 states and (10l -- 5)/2 transitions in the worst case. The method presented here is much simpler and easier to understand, as we use only naive ideas: divide and conquer.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
A. Aho. Pattern matching in strings. In Formal Language Theory(R. Book ed). Academic Press, 1980.
|
| |
2
|
|
| |
3
|
|
| |
4
|
|
| |
5
|
C. Chang. Ph.D Thesis. Department of Computer Science, Courant Institute, New York, 1992.
|
 |
6
|
|
| |
7
|
V. Glushkov. The abstract theory of automata. Russian Math. Surveys, 16:1--53, 1961.
|
| |
8
|
P. P. G. Apostolopoulos, V. Peris. L5: A self learning layer 5 switch. In Technical Report RC21461. IBM, T.J. Watson Research Center, 1999.
|
| |
9
|
R. McNaughton and H. Yamada. Regular expressions and state graphs for automata. Trans. IRS, EC(9):39--47, 1960.
|
 |
10
|
|
 |
11
|
|
|