Is it possible to design a DFA that accepts a string such that 2nd symbol from RHS is "a"? (Caution - I Know the NDFA for this question & its RHS not LHS.)

Hey guys, how about the mDFA which accepts the strings with third last symbol be 'a'. I am really confused. If someone can really help me out with this.

The easiest way is to create the NFA first and then convert it to DFA. If we directly start creating the DFA, then it would be very much difficult to decide the number of states and number of final states.

What are the input symbols ?

Oops. Sorry. (a,b)

Thanks Himanshu for pointing out the mistake.

How about "aaaab"?

Will this be accepted?

Nice catch, It needs more thought.

I have given another try. have a look.

The solution given by Himanshu Sir below is the correct one sir. Your machine won't accept "baaa" string. If i am not wrong!!!

Ohhhh a small mistake. Corrected now. Answer credit and thanks to Himanshu.

is it correct ?

Ahaa! Nicely Done. Thank you so much sir.

Nice, thanks Himanshu.

i think himanshu sir gave the right answer..

we can easily make the NFA for above and converting it into DFA will lead to the same as above.....

first desgn the nfa then convert it to dfa .

this is the best method to do,instead of directly designing dfa

if u r really good with designing dfa then u can directly design it just keep in mind the purpose of each state

Hey guys, how about the mDFA which accepts the strings with third last symbol be 'a'. I am really confused. If someone can really help me out with this.

Well the image turned out to be gigantic, but I believe it will help with your query riishii.

Thanks a lot surjeet. It definitely going to help me. How did you decide the number of states per input?

The easiest way is to create the NFA first and then convert it to DFA. If we directly start creating the DFA, then it would be very much difficult to decide the number of states and number of final states.