L is a language that consists of all the binary strings with an odd number of
(I) Write the simplest grammar for L in a Finite State Machine format.Explain how you get your answer.
(ii) Write the simplest grammar for L in a Phase Structure Grammar format. Explain how you get your answer.
(iii) Write the simplest grammar for L in a BNF notation.
Finite state machine that accepts odd number of 1’s
Let us consider q0 as initial state and when the is zero or one it moves to state q1.
Here q3 is the accepting state.
For example consider,
the string 1110.