Lec07 - 2/7/05 Christian C. Carroll Brian Zalk Pumping...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
2/7/05 – Christian C. Carroll – Brian Zalk Pumping Lemma for CFG’s - all strings of length p (where p is the pumping length) or longer that are in a context- free language can be expressed as S = uvxyz such that: 1) L z xy uv i i , i = 0, 1, 2, . . . 2) | vy | > 0 , either | v | > 0 or | y | > 0 3) | vxy | p Idea behind Pumping Lemma: If we force the tree to be of length n + 1 where n is the number of variables, then at least one variable will be repeated in the parse tree. note: If we have uvxyz L then uxz L What is p ? for regular languages, it is the # of states in the DFA, but for CFG’s, it is the max branching factor = b (b = the # of terminal variables you replace a single variable by) So, 2 | | + = v b p , where v is the # of variables in the grammar. Ex 1. Prove } | { N n c b a n n n is not context-free. Choose p p p c b a S = . uvxyz c b a p p p = Either |v| > 0 or |y| >0. If v or y have 2 distinct symbols, then
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 8

Lec07 - 2/7/05 Christian C. Carroll Brian Zalk Pumping...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online