Question: A context - free grammar ( V , Sigma , R , S ) is epsi - free if: There is at most

A context-free grammar (V,\Sigma , R, S) is \epsi -free if:
There is at most one rule whose right-hand side is \epsi , and that is: S ->\epsi (here, S is the start symbol).
If the grammar contains the rule S ->\epsi , then S does not appear on the right-hand side of any rule.
Show that, for any given \epsi -free CFG G, there is a size l where if G generates a string using more than l derivation steps, then L(G) is infinite. Give an explicit formula for l in your proof (basically, l must be a computable function of the stuff in G), and prove that the formula you give is correct. Also show that this is not true for context-free grammars in general.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!