Partial derivatives of regular expressions and finite automaton constructions
We introduce a notion of partial derivative of a regular expression and apply it to finite automaton constructions. The notion is a generalization of the known notion of word derivative due to Brzozowski: partial derivatives are related to non-deterministic finite automata (NFA's) in the same n...
Uloženo v:
| Vydáno v: | Theoretical computer science Ročník 155; číslo 2; s. 291 - 319 |
|---|---|
| Hlavní autor: | |
| Médium: | Journal Article |
| Jazyk: | angličtina |
| Vydáno: |
Elsevier B.V
11.03.1996
|
| ISSN: | 0304-3975, 1879-2294 |
| On-line přístup: | Získat plný text |
| Tagy: |
Přidat tag
Žádné tagy, Buďte první, kdo vytvoří štítek k tomuto záznamu!
|
| Shrnutí: | We introduce a notion of
partial derivative of a regular expression and apply it to finite automaton constructions. The notion is a generalization of the known notion of
word derivative due to Brzozowski: partial derivatives are related to non-deterministic finite automata (NFA's) in the same natural way as derivatives are related to deterministic ones (DFA's). We give a constructive definition of partial derivatives and prove several facts, in particular:
1.
(1) any derivative of a regular expression
r can be represented by a finite set of partial derivatives of
r;
2.
(2) the set of all partial derivatives of
r is finite and its cardinality is less than or equal to one plus the number of occurrences of letters from A appearing in
r;
3.
(3) any partial derivative of
r is either a regular unit, or a subterm of
r, or a concatenation of several such subterms.
These theoretical results lead us to a new algorithm for turning regular expressions into relatively small NFA's and allow us to provide certain improvements to Brzozowski's algorithm for constructing DFA's. We also report on a prototype implementation of our NFA construction and present several examples. |
|---|---|
| ISSN: | 0304-3975 1879-2294 |
| DOI: | 10.1016/0304-3975(95)00182-4 |