Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2024 Set 2
Questions

Q42

MSQ2 marksCompiler design

Consider a context-free grammar G\text{G} with the following 33 rules.

S→aS,S→aSbS,S→cS \rightarrow a S, S \rightarrow a S b S , S \rightarrow c

Let w∈L(G)w \in L(G). Let na(w),nb(w),nc(w)n_{a}(w), n_{b}(w), n_{c}(w) denote the number of times a,b,ca, b, c occur in ww, respectively. Which of the following statements is/are TRUE?

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.