The context-free grammar S → A111 | S1 A → A0 | 00 is equivalent to
2021
The context-free grammar
S → A111 | S1
A → A0 | 00
is equivalent to
- A.
{0ⁿ1ᵐ | n = 2, m = 3}
- B.
{0ⁿ1ᵐ | n = 1, m = 5}
- C.
{0ⁿ1ᵐ | n should be greater than two and m should be greater than four}
- D.
{0ⁿ1ᵐ | n should be less than four and m should be less than three}
- E.
Question not attempted
Attempted by 27 students.
Show answer & explanation
Correct answer: C
A → A0 | 00 ⇒ generates 0ⁿ where n ≥ 2
S → A111 | S1 ⇒ minimum 3 ones, and S1 adds more ⇒ m > 4
⇒ Language: {0ⁿ1ᵐ | n ≥ 2, m > 4}
Correct Option: C