The DFA will be made as follows:
So we accept any number of {a, b} greater than 3, then we wait until we get the ‘a’. After that accept any {a, b} upto count of 5 but not more than 5. Notice q10 is a trap state.
Answer: Hence we have 6 final states.
But this is rejecting:aaaa a bbbbb.... this should be valid string OR
we are supposed to assume that
aaa a abbbbb
..since string is rejected ?
64.3k questions
77.9k answers
244k comments
80.0k users