The maximum yield length of the following CNF CFG is S → AB A → CD B → e C → a…

2023

The maximum yield length of the following CNF CFG is

S → AB
A → CD
B → e
C → a
D → b

  1. A.

    8

  2. B.

    7

  3. C.

    4

  4. D.

    3

Attempted by 15 students.

Show answer & explanation

Correct answer: D

To determine the maximum yield length, derive the string from S. S → AB, A → CD, B → e, C → a, D → b. Substituting yields S ⇒ AB ⇒ CD e ⇒ abe. The string 'abe' has a length of 3.

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Mppsc Assistant Professor