GATE / CS ARCHIVE

GATE CSE 1995 / QUESTION 1.10

A damaged grammar classification

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

GATE 1995, Q1.10 1 mark · MCQ
Report issue

Context-Free Grammars & Languages

Question 1.10, GATE 1995: Classify the reproduced grammar as context-free, regular, context-sensitive or LR(k). Its final GFG line reads bα→bdb|b; other nonterminal labels and the alternate differ.
Question 1.10, GATE 1995: Classify the reproduced grammar as context-free, regular, context-sensitive or LR(k). Its final GFG line reads bα→bdb|b; other nonterminal labels and the alternate differ.
Tap to enlarge
Your answer
Answer & solution

Answer: No listed classification can be justified: the printed grammar has a contracting rule (no official key was published)

A context-free production must have one nonterminal on its left side; the visible bα left side has multiple symbols. A context-sensitive grammar in the usual noncontracting form cannot contain bα→b, which shortens a nonempty string. Regular and LR(k) grammars are context-free and therefore fail the same left-side condition. Moreover, the reproductions disagree on labels and contain undeclared-looking symbols, so even a valid unrestricted grammar cannot be reconstructed confidently. If the contraction or labels are typographic errors, classification might change. No option is asserted without a trustworthy correction of the source.

Original paper, page 1