regexdfanfa

Steps to draw a DFA (or NFA) from a simple statement?


I am given a simple statement: Construct a DFA over alphabet {0, 1} that accepts all the strings that end in 101?

My question is that what will be the steps to design it? Or design an NFA, because then I know the clear steps yo convert an NFA to a DFA, so I will then convert the NFA to the DFA.

Note:- It is just a minor course for me, so I have never studied anything like regular expressions, or any algorithms probably used to construct DFA's.


Solution

  • If you want more of an explanation on how I derived this, I'd be happy to explain, but for now I just drew the DFA and explained each state.

    Sorry about the screenshot...I didn't know how to convert it straight to an image.

    DFA

    TikZ DFA examples.