Home » Theory of Computation » Theory of computation miscellaneous » Question

Theory of computation miscellaneous

Theory of Computation

  1. Let L denotes the language generated by the grammar S → 0S0 / 00. Which of the following is true?
    1. L = 0+
    2. L is regular but not 0+
    3. L is context-free but not regular
    4. L is not context-free
Correct Option: B

S → 0S0 /00
S → 0S0 (type 2 production)
This is a context-free grammar as in CFG, the left hand side of the production rule has no left and right context. S → 00
means S →^ (null)* (type 3 production)
This is called the regular grammar.



Your comments will be displayed only after manual approval.