what if the remaining input will stand or loop within the state....................ie instead of giving b as back input let its loop there itself...............and same do for all????????

23 votes

Construct DFA's for the following languages:

- $L=\left\{w \mid w \in \{a,b\}^*, \text{ w has baab as a substring } \right\}$
- $L=\left\{w \mid w \in \{a,b\}^*, \text{ w has an odd number of a's and an odd number of b's } \right\} $

26 votes