Why is B not accepted as an answer?:
- S --> 0A
- A --> 0A
- A --> 1B
- B --> 1B
- B --> e
Which ends up in the state of the automata is in the accept state.
Why is B not accepted as an answer?:
Which ends up in the state of the automata is in the accept state.
It’s not hard to see that the grammar generates the language $L=\{0^m1^n:m,n\ge 1\}$. As peter.petrov notes in his answer, the automaton B accepts $010$, which is not in $L$. It also accepts $0$, which is not in $L$. To fix it to accept $L$, you’d have to make two changes:
And when you’ve made those changes, you have the automaton C, which does indeed recognize $L$.
As an exercise you might try to see why