Link to home
Start Free TrialLog in
Avatar of kuntilanak
kuntilanakFlag for United States of America

asked on

regular expression to DFA

How do you draw this in a DFA?

w | each 1 in w is immediately preceded and immediately followed by a 0
ASKER CERTIFIED SOLUTION
Avatar of yans
yans

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kuntilanak

ASKER

how does :

 b* + b*a(ba)*

satisfies my question, please explain
Avatar of yans
yans

The question deals with regular expression. b* + b*a(ba)* is a regular expression representation and the solution demostrates how to draw it.

If you may check some reference on reading regular expression syntax.

http://en.wikipedia.org/wiki/Regular_expression
I don't understand how b* + b*a(ba)* represents each 1 in w is immediately preceded and immediately followed by a 0
if 1 is equal to b here, then one possibility that regex gives me is 1* which can be an empty string and it is not followed immediately by a 0.
Avatar of ozo
0* (0 1 0 0*)*
ozo can you please explain that a bit

on the picture below, the start state is when given an input b, what if the input at the start state is a? It doesn't covers that..
dfa.png