1,029 views

1 Answer

Best answer
1 1 vote

Since the required finite automate is NFA, we do not need to worry much about the details. It's usually much easier to create an NFA as compared to a DFA.

Here is the required NFA, with 5 states and $q_4$ as the final state.


EDIT:

Above was my previous answer. Maybe some others think of same in their first attempt. But that's wrong. As Prateek mentioned that it does not accept 00 and 000.

So I tried to correct it. Then created the following automata, which at first looked correct to me:

But this one is also wrong, consider the string 0010100.

So, I thought instead let's simplify the question a bit. Let's create an NFA for strings that start and end with a 0. I came up with this:

Now modifying this for our original question:

Hope I am correct this time. :)

• selected by
Position:
Show:

Related questions

3 3 votes
1 1 answer
2.1k
2.1k views
rahul sharma 5 asked Aug 4, 2017
2,120 views
What will be total number of final states in NFA for the given regular expression?$R=(a+b)^{*}b(a+b+\epsilon )$
1 1 vote
1 1 answer
928
928 views
1 1 vote
1 1 answer
3.0k
3.0k views
2 2 votes
2 2 answers
287
287 views
GO Classes asked Jul 10
287 views
Let $\Sigma = \{a\}$. Consider the language $L = \{a^{nk} \mid k 0,\ n$ is a positive integer constant$\}$. What is the minimum number of states in a DFA that recognises...