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

  1. A.

    {0ⁿ1ᵐ | n = 2, m = 3}

  2. B.

    {0ⁿ1ᵐ | n = 1, m = 5}

  3. C.

    {0ⁿ1ᵐ | n should be greater than two and m should be greater than four}

  4. D.

    {0ⁿ1ᵐ | n should be less than four and m should be less than three}

  5. 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

Explore the full course: Bpsc