From regular expressions to DFA's using compressed NFA's

被引:28
|
作者
Chang, CH
Paige, R
机构
[1] NYU,COURANT INST MATH SCI,NEW YORK,NY 10012
[2] ACAD SINICA,INST INFORMAT SCI,TAIPEI,TAIWAN
关键词
D O I
10.1016/S0304-3975(96)00140-5
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
There are two principal methods for turning regular expressions into NFA's - one due to McNaughton and Yamada and another due to Thompson. Unfortunately, both have drawbacks. Given a regular expression R of length r and with s occurrences of alphabet symbols, Chang and Paige (1992) and Bruggemann-Klein(1993) gave Theta(m+r) time and O(r) spate algorithms to produce a Theta(m) space representation of McNaughton and Yamada's NFA with s+1 states and in transitions. The problem with this NFA is that m=Theta(s(2)) in the worst case. Thompson's method takes Theta(r) time and space to construct a Theta(r) space NFA with Theta(r) states and Theta(r) transitions. The problem with this NFA is that r can be arbitrarily larger than s. We overcome drawbacks of both methods with a Theta(r) time Theta(s) space algorithm to construct an O(s) space representation of McNaughton and Yamada's NFA. Given any set V of NFA states, our representation can be used to compute the set U of states one transition away from the states in V in optimal time O(\V\+\U\). McNaughton and Yamada's NFA requires Theta(\V\x\U\) time in the worst case. Using Thompson's NFA, the equivalent calculation requires Theta(r) time in the worst case. Comparative benchmarks show that an implementation of our method outperforms implementations of competing methods with respect to time for NFA construction, NFA accepting testing, and NFA-to-DFA conversion by subset construction. Throughout this paper program transformations are used to design algorithms and derive programs. A transformation of special importance is a form of finite differencing used previously by Douglas Smith to improve the efficiency of functional programs.
引用
收藏
页码:1 / 36
页数:36
相关论文
共 50 条
  • [1] Minimizing nfa's and regular expressions
    Gramlich, Gregor
    Schnitger, Georg
    JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2007, 73 (06) : 908 - 923
  • [2] Minimizing NFA's and regular expressions
    Gramlich, G
    Schnitger, G
    STACS 2005, PROCEEDINGS, 2005, 3404 : 399 - 411
  • [3] Implicit structures to implement NFA's from regular expressions
    Champarnaud, JM
    IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2001, 2088 : 80 - 93
  • [4] Compressed Membership for NFA (DFA) with Compressed Labels is in NP (P)
    Jez, Artur
    29TH INTERNATIONAL SYMPOSIUM ON THEORETICAL ASPECTS OF COMPUTER SCIENCE, (STACS 2012), 2012, 14 : 136 - 147
  • [5] Equivalence of SDVFA of order (s, t) with DFA, VDFA, NFA and ε-NFA
    Jain, A.
    ARS COMBINATORIA, 2014, 117 : 363 - 373
  • [6] NFA Reduction for Regular Expressions Matching Using FPGA
    Kosar, Vlastimil
    Zadnik, Martin
    Korenek, Jan
    PROCEEDINGS OF THE 2013 INTERNATIONAL CONFERENCE ON FIELD-PROGRAMMABLE TECHNOLOGY (FPT), 2013, : 338 - 341
  • [7] FROM REGULAR EXPRESSIONS TO DFAS USING COMPRESSED NFAS
    CHANG, CH
    PAIGE, R
    LECTURE NOTES IN COMPUTER SCIENCE, 1992, 644 : 90 - 110
  • [8] NFA-to-DFA Trade-Off for Regular Operations
    Jiraskova, Galina
    Krajnakova, Ivana
    DESCRIPTIONAL COMPLEXITY OF FORMAL SYSTEMS, DCFS 2019, 2019, 11612 : 184 - 196
  • [9] From Sequential Extended Regular Expressions to NFA with Symbolic Labels
    Cimatti, Alessandro
    Mover, Sergio
    Roveri, Marco
    Tonetta, Stefano
    IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2011, 6482 : 87 - 94
  • [10] Novel NFA engine construction method of regular expressions
    Jing, Mao-Hua, 1600, Editorial Board of Journal on Communications (35):