Week 2 - Pumping Lemma for CFL Flashcards
1
Q
What is the pumping lemma for context-free languages? Use computional terms.
A
If L is a context-free language, then there exists a number p>=1 called the pumping length such that for any string w∈L such that |w|>=p, there exists u, v, x, y, z substrings of w satifying the following conditions:
- w = uvxyz
- ∀i>=0, u(v^i)x(y^i)z∈L (v and y can be ‘pumped’)
- |vy| > 0
- |vxy| <= p
If these are true then the language is context-free.
2
Q
TRUE OR FALSE: Let C be a CFL and R a regular language. Then, R ∩ C is a CFL.
A
TRUE.
3
Q
TRUE OR FALSE: Let C1 be a CFL and C2 be another CFL. Then, C1 ∩ C2 is a CFL.
A
FALSE, this isn’t always true.