8 - Non-context-free Grammar
ucla | CS 181 | 2024-05-13 14:09
Table of Contents
Pumping Lemma for CFL
- similar to one for reg languages but:
- where
Proof with CFG
- given a CFG, we define the branching factor
as the max length of the RHS in (considering vars + terminals) sps. $p=b^{ V +1}$ is a string in s.t. $s \ge p$ - so we an create a parse tree for the minimal parse tree of the longest path, here we can now visually represent pumping up and down
Examples