Computer Sciences > GATE 2024 Set-2 > Grammars
Consider a context-free grammar G with the following 3 rules.
S → aS,
S → aSbS,
S → c
Let w ∈ L(G). Let na(w), nb(w), nc(w) denote the number of times a, b, c occur in w, respectively. Which of the following statements is/are TRUE?
A
na(w) > nb(w)
B
na(w) > nc(w) - 2
C
nc(w) = nb(w) + 1
D
nc(w) = nb(w) * 2

Correct : a,b,c

Similar Questions

Consider the following grammar G, with S as the start symbol. The grammar G has three incomplete productions denoted by (1), (2), and (3). The set of termin...
#874 MCQ
A palindrome is a word that reads the same forwards and backwards. In a game of words, a player has the following two plates painted with letters. From...
#1 MCQ
Which number does not belong in the series below? 2, 5, 10, 17, 26, 37, 50, 64
#4 MCQ

Related Topics

No tags found

Unique Visitor Count

Total Unique Visitors

Loading......