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 条
  • [31] (s|qu)eries: Visual Regular Expressions for Querying and Exploring Event Sequences
    Zgraggen, Emanuel
    Drucker, Steven M.
    Fisher, Danyel
    DeLine, Robert
    CHI 2015: PROCEEDINGS OF THE 33RD ANNUAL CHI CONFERENCE ON HUMAN FACTORS IN COMPUTING SYSTEMS, 2015, : 2683 - 2692
  • [32] A COINDUCTIVE REFORMULATION OF MILNER'S PROOF SYSTEM FOR REGULAR EXPRESSIONS MODULO BISIMILARITY
    Grabmayer, Clemens
    LOGICAL METHODS IN COMPUTER SCIENCE, 2023, 19 (02) : 1 - 17
  • [33] Biological sequence analysis using regular expressions
    Horton, RM
    BIOTECHNIQUES, 1999, 27 (01) : 76 - +
  • [34] Validating Software Security using Regular Expressions
    Abahussain, Omar
    Hammad, Mustafa
    2019 INTERNATIONAL CONFERENCE ON INNOVATION AND INTELLIGENCE FOR INFORMATICS, COMPUTING, AND TECHNOLOGIES (3ICT), 2019,
  • [35] Deterministic blow-ups of minimal NFA's
    Jiraskova, Galina
    RAIRO-THEORETICAL INFORMATICS AND APPLICATIONS, 2006, 40 (03): : 485 - 499
  • [36] Manipulation of Regular Expressions Using Derivatives: An Overview
    Moreira, Nelma
    Reis, Rogerio
    IMPLEMENTATION AND APPLICATION OF AUTOMATA (CIAA 2022), 2022, 13266 : 19 - 33
  • [37] Analyzing Matching Time Behavior of Backtracking Regular Expression Matchers by Using Ambiguity of NFA
    Weideman, Nicolaas
    van der Merwe, Brink
    Berglund, Martin
    Watson, Bruce
    IMPLEMENTATION AND APPLICATION OF AUTOMATA, 2016, 9705 : 322 - 334
  • [38] On NAO’s predictability through the DFA method
    R. Caldeira
    I. Fernández
    J. M. Pacheco
    Meteorology and Atmospheric Physics, 2007, 96 : 221 - 227
  • [39] On NAO's predictability through the DFA method
    Caldeira, R.
    Fernandez, I.
    Pacheco, J. M.
    METEOROLOGY AND ATMOSPHERIC PHYSICS, 2007, 96 (3-4) : 221 - 227
  • [40] Lexical Analysis Using Regular Expressions for Information Retrieval from a Legal Corpus
    Mario Spositto, Osvaldo
    Cesar Bossero, Julio
    Javier Moreno, Edgardo
    Alejandra Ledesma, Viviana
    Romina Matteo, Lorena
    COMPUTER SCIENCE, CACIC 2021, 2022, 1584 : 312 - 324