in Theory of Computation edited by
1,622 views
3 votes
3 votes

The number of states in minimal DFA for strings starting with $ab^{2}$ and ending with $b$ over the alphabet $\left \{ a,b \right \}$ is__________.

// doubt: minimal string should be $ abb $ right?

in Theory of Computation edited by
1.6k views

4 Comments

5 state = 4 for abb and 1 reject state if it start from b
0
0
0
0

 your DFA is invalid for strings like $abbaabb,abbaabbb,abbbab$.

for the final state on input, $b$ self-loop is there.

0
0

4 Answers

1 vote
1 vote
answer is 6 ,

edit: yeah the  smallest string is abb
1 vote
1 vote
RE = abb + abb(a+b) *b

Draw a DFA for above Regular Expression

(key point is : smallest string will be 'abb')
1 vote
1 vote

5 state is required

1 comment

your dfa is excepting abab,  which do not start with abb.
1
1
0 votes
0 votes
6 states required as ab2 requires 4 states and b requires one state and one dead state
by

Related questions