GATE / CS ARCHIVE

GATE CSE 2000 / QUESTION 1.5

Language generated by symmetric zero insertion

Theory of Computation · Context-Free Grammars & Languages · Full GATE CSE 2000 paper

GATE 2000, Q1.5 1 mark · MCQ
Report issue

Context-Free Grammars & Languages

Question 1.5, GATE 2000: For grammar S→0S0|00, decide whether L is 0+, regular but not 0+, context-free but not regular, or not context-free.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: The base production yields two zeros. Each use of 0S0 adds exactly two more, so every generated word has positive even length. Conversely, applying the recursive rule k times generates 02k+2.

Step 2: Therefore L={02m:m≥1}=00(00)*, a regular language. It excludes the one-symbol string 0, which belongs to 0+.

Thus B. A recursive-looking grammar does not imply a nonregular language.

Original paper, page 1