Aspire's Library

A Place for Latest Exam wise Questions, Videos, Previous Year Papers,
Study Stuff for MCA Examinations - NIMCET

Previous Year Question (PYQs)



The maximum yield length of the following CNF CFG is

S → AB

A → CD

B → e

C → a

D → b





Solution

In CNF, for a finite grammar, if there are n variables, then maximum yield length can be up to:

$2^{n-1}$

Here, the variables considered are:

A, B, C, D

So,

$n = 4$

Maximum yield length:

$2^{4-1} = 2^3 = 8$


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More


Online Test Series,
Information About Examination,
Syllabus, Notification
and More.

Click Here to
View More

Ask Your Question or Put Your Review.

loading...