Consider the production rules of grammer G: S → AbB A → aAb ∣ λ B → bB ∣ λ Which of the following language L is generated by grammer G?

29 views
  • L = {anbm ∶ n ≥ 0, m > n} (Correct Answer)
  • L = {anbm ∶ n ≥ 0, m ≥ 0}
  • L = {anbm ∶ n ≥ m}
  • L = {anbm ∶ n ≥ m, m > 0}

Explanation

G=(V,T,P,S)

G is a grammar, which consists of a set of production rules. It is used to generate the strings of a language.
T is the final set of terminal symbols. It is denoted by lower case letters.
V is the final set of non-terminal symbols. It is denoted by capital letters.
P is a set of production rules, which is used for replacing non-terminal symbols
S is the start symbol used to derive the string.

Explanation:grammer G:

S → AbB

A → aAb ∣ λ

B → bB ∣ λ

language L is generated by grammer G is:

L = {anbm ∶ n ≥ 0, m > n}

String can be generated by grammer G is:

{b, bb, abb, abbb....} here an ∶ n ≥ 0 and bm ∶ m > n

Option 2: False

L = {anbm ∶ n ≥ 0, m ≥ 0}

Option 3: False

L = {anbm ∶ n ≥ m}

Option 4: False

L = {anbm ∶ n ≥ m, m > 0}

Comments (0)

No comments yet. Be the first to comment!

Want to practice more?

Explore thousands of MCQs across every exam category on Exams Nepal.

Find More MCQs