edited by
615 views

1 Answer

Best answer
2 votes
2 votes

Either construct NFA and then convert it into DFA. Or  If you want to construct directly then here is the Idea :

While constructing DFA, Whenever you see $a$, think of it as 2nd last symbol. So, After this $a$ you can allow $a,b$ and accept. But after this when you see $a,b$ you must make a transition to relevant state.

The DFA will look like this :

selected by

Related questions

0 votes
0 votes
1 answer
1
jayadev asked Jan 7, 2022
841 views
follow method first draw dfa for ‘a’ always followed by ‘bb’ and reverse it
0 votes
0 votes
2 answers
2
Sambhrant Maurya asked Sep 27, 2018
4,560 views
Construct a DFA over Σ=(a,b) so that it accepts all strings where 1) 2nd symbol from the right is 'a'2) 3rd symbol from the right is 'a'
1 votes
1 votes
2 answers
3
0 votes
0 votes
1 answer
4