459 views
Can someone  give me dfa of these Regular Expressions?

$0^*(1+0)^*$

$0^*(1^++0)^*$

Actually i am getting confused between both of them

Thanks

// Hey..I can't draw the DFA's but I can explain so, that you yourself can draw.
//By the way ,It will be clearer if you yourself draw it.

First one is having two states,Starting state will be final state and have a self loop on 0. It will go to other state on 1. Other state will have a self loop on 1 and on 0, come back to initial state.
// Hope you get it.

second one is simpally (0+1)*

Thanks for the ans btw I have doubt that whether for a given dfa we get same regular expression or we can get different regular expressions?
We can have many regular expressions for a given dfa.
thanks :)
Regular expression is non deterministic in nature

Thus u can have multiple regular expressions for 1 dfa

1 vote