Now, we've seen the constructions of regular expressions and finite automata for the purpose of recognizing regular languages.
The following table illustrates a comparison between approaches:
Regular expression | DFA |
---|---|
Concise to express in written form | Is best expressed as a diagram, which has an involved construction |
Recognition is hard, as it requires deep inspection and mental trial / error | Recognition is systematic and fairly straightforward to construct |
Because regular expressions are easier to express in written (string) form, but harder to use directly to recognize strings, we will need some way to convert a regular expression into a finite automaton. We will subsequently show this construction and will also show that DFAs are as expressive as NFAs and ε-NFAs in terms of the languages they recognize.
GitHub Repository: https://github.com/bprollinson/ripal
Copyright © 2017 Brendan Rollinson-Lorimer