0
$\begingroup$

i am looking to convert regular expression 0* 1* to deterministic finite automaton (DFA)

enter image description here

I have tried creating the NFA for the regular expression as given in the above image,

From the regular expression, the strings that can be created are {€, 0, 1, 001, 011, 0011, ………}

My doubt is how do you even create DFA That can have only single 0’s or single 1’s , meaning that the number of 0’s is one when number of 1’s is zero

You have to accept a single input symbol to go the next state

When I placed the regular expression in an DFA online generator I got the below automaton

enter image description to

I ask this because the main question to solve is this image, from an exam

enter image description here

From the above question in the image I got the regular expression

0* 1* 2*

Which was the same as the above example, thus the reason I ask the above one first

Thank you for the online free community effort you put into

Btw the site to generate automaton or final state machine is this

final state machine generator website link

$\endgroup$
2
  • 1
    $\begingroup$ The DFA produced by your online generator is certainly correct. It accepts the empty string because the start state is accepting. What is it which confusesyou? $\endgroup$
    – rici
    Commented Mar 14, 2022 at 0:20
  • 1
    $\begingroup$ What exactly is your question? Methods to convert from regexp to DFA are described in cs.stackexchange.com/q/40819/755. $\endgroup$
    – D.W.
    Commented Mar 14, 2022 at 2:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.