Re: a problem on building a regular expression
- From: Helmut Richter <hhr-m@xxxxxx>
- Date: Fri, 9 Mar 2007 19:20:00 +0100
On Fri, 9 Mar 2007, Michael wrote:
I agree - the DFA is quite simple. I couldn't remember how to convert
that to a regular expression, even though I know it should be
possible. Could you point me to a reference?
Indeed I do not know a *practical* reference, so I have written my own
recipe. Unfortunately, it is in German:
http://www.lrz-muenchen.de/services/schulung/unterlagen/regul/regul-13.html#publish4.2.1.0.0.0
It is a part of longer paper. In the cited subpage, there are two DFAs.
The first one transforms quite obviously to a regular expression, the
steps are explained in points 1 to 3 in the text. I guess I need not
explain that.
For the DFA in the second sketch, there is no obvious transformation. The
trick is then to split a state, C, into an entry-only state, C0, and an
exit-only state, C1. Then one considers separately the paths from the
initial state, A, to the final state, E, that do not pass by C, then the
paths from A to C1 (these are the paths in the original DFA from A to C
that do not pass by C), the paths from C0 to E, and the paths from C0 to
C1. Then the results are combined into a single regular expression.
There is one more example, to wit the decimal numbers divisible by 3,
which require more than one such state-split:
http://www.lrz-muenchen.de/services/schulung/unterlagen/regul/regul-14.html#publish4.3.2.0.0.0
It has quite some similarity with the problem at hand.
--
Helmut Richter
.
- Follow-Ups:
- Re: a problem on building a regular expression
- From: hamperhd@xxxxxxxxx
- Re: a problem on building a regular expression
- References:
- a problem on building a regular expression
- From: hamperhd@xxxxxxxxx
- Re: a problem on building a regular expression
- From: Helmut Richter
- Re: a problem on building a regular expression
- From: Michael
- a problem on building a regular expression
- Prev by Date: Re: Review of Mueckenheims book.
- Next by Date: Re: Cantor Confusion
- Previous by thread: Re: a problem on building a regular expression
- Next by thread: Re: a problem on building a regular expression
- Index(es):
Relevant Pages
|