Pumping Lemma for CFLs
For regular languages, the pumping lemma arises out of the presence of a repeated state in a DFA when the accepting string is sufficiently long. What's the analogy for CFLs? It's the occurrence of a repeating symbol in a derivation of a terminal string w from S. The preferred model for understanding and proving the CFL pumping lemma is the parse tree. The diagram in Figure 39 in the textbook tells almost the whole story:S ⇒* α_{1}Aβ_{1} ⇒+ α_{2}Aβ_{2} ⇒* wdoes not express the true idea we want to convey, because we really mean to say that the second A appears as a result of a derivation from the first A, i.e.,
S ⇒* α_{1}Aβ_{1} A ⇒+ α_{2}Aβ_{2} α_{1}α_{2}Aβ_{2}β_{1} ⇒* wParse trees present the idea much more succinctly. Given the structure in the diagram above we can understand the decomposition of the target string:
w = uvxyzas portions of the yield corresponding to sections of the parse tree. We can use this structure to "pump" the repeated portion, for example, deriving the strings
uxz and uvvxyyz
by the respective "tree surgery" procedures:
Mapping this picture to derivations, we have:
S ⇒* uAz A ⇒* vAy A ⇒* xgiving us:
S ⇒* uAz ⇒* uvAyz ⇒* uvxyz
Pumping Lemma Statement
Let G be a CFG, then there is a number N, such that if w ∈ L(G) and w > N, thenw = uvxyzwhere v ≠ ε or y ≠ ε and
uv^{i}xy^{i}z ∈ L(G), for all i ≥ 0
Proof
The first thing to determine is what N should be. The idea has to do with the socalled fanout of a grammar G. Define
f = the
largest number of symbols on the righthand side of any production.
It's a fairly simple inductive argument that any parse tree with
height h has at most f^{h} leaves.
This implies that the yield of a parse tree of height h
has length at most f^{h}.
Now let
t = V  Σ, i.e., the number of nonterminal symbols.
and let N = f^{t}.
Restating, a parse tree with height t has yield of length at most N.
Suppose we have a string w ∈ L(G) for which w > N.
Then w has a parse tree with root S and yield w
whose height is greater than t.
This means:
 there is a path from the root to a leaf of length at least t+1, and so
 there are at least t+2 nodes in the path, and so
 there are at least t+1 nonterminal symbols on this path.
So we conclude that in every parse tree of w, there is a repeating symbol as we have indicated. The remaining key point to argue is that there is some parse tree for which v and y are not both empty.
Consider all parse trees for w. Choose a parse tree T which has the smallest number of nodes. Then consider the first diagram above. If v and y were both empty, then we could generate the same string by replacing T′ by T″, getting a parse tree for w with fewer nodes and thereby contradicting the minimality of T. ■The classical nonCFL language
The classical result is to show that the language{ a^{n}b^{n}c^{n} : n ≥ 0 }is not contextfree. The proof is obvious but quite tedious. Clearly we would have to be able to pump on 3 or 0 substrings to get a string back in the language, but the lemma allows either 1 or 2 pumping substrings. Express:
a^{n}b^{n}c^{n} = uvxyzand look at one repeat
uv^{2}xy^{2}z where v ≠ ε or y ≠ ε.
No matter how it breaks down, this string cannot be in the language.
Consider some possibilities:

suppose either or both of
v and y contains more than one symbol, e.g., if v ≠ ε, then
v = rasbt, or rwhere v ≠ ε or y ≠ ε. sct, or rasct
where r,s,t ∈ {a,b,c}*, then v^{2} will have symbols out of order for L  suppose v ∈ a+, y ∈ a*, then uv^{2}xy^{2}z will have more a's than b's
 suppose v ∈ a+, y ∈ b*, then uv^{2}xy^{2}z will have more a's than c's
 suppose v ∈ b*, y ∈ c+, then uv^{2}xy^{2}z will have more c's than a's
Failure of closure under intersection
Consider the languages{a^{n}b^{n}: n ≥ 0}·c* and a*·{b^{n}c^{n}: n ≥ 0}
These are both context free, but the intersection is the language above which is not.
Failure of closure under complementation
This is an application of DeMorgan's Laws. CFLs are closed under union. If they were closed under complementation then they would consequently be closed under intersection byL_{1} ∩ L_{2} = L_{1} ∪ L_{2}
CFLs closed under intersection with a regular language
This is a direct consequence of the equivalence of CFLs and PDAs. The textbooks discusses this in section 3.5. The proof uses a version of the product construction which can be used to argue that intersection of two regular languages is regular. Suppose we have:PDA: (K_{1},Σ,Γ,Δ_{1},s_{1},F_{1}) DFA: (K_{2},Σ,δ,s_{2},F_{2})The product PDA is:
(K_{1}×K_{2}, Σ, Γ, Δ, (s_{1},s_{2}), F_{1}×F_{2})where Δ has the following transitions:
1. For σ ∈ Σ, for each transition pair
((p_{1},σ,α),(q_{1},β)) ∈ Δ_{1} δ(p_{2},σ) = q_{2}
add to Δ
( (p_{1},p_{2}),σ,α), ((q_{1},q_{2}),β) ) ∈ Δ
2. For each transition
((p_{1},ε,α),(q_{1},β)) ∈ Δ_{1}
for all p ∈ K_{2}, add to Δ
( (p_{1},p),ε,α), ((q_{1},p),β) ) ∈ Δ
Example:
{ ww^{R} : w ∈ {a,b}* } ∩ { w ∈ {a,b}*: w contains no bb }
Using the machine representations, we want to create:
∩ 
Equal a's, b's, c's not a CFL
Using the closure under intersection with a regular language, we can argue that this is not a CFL:L = { w ∈ {a,b,c}*: #a(w) = #b(w) = #c(w)}If it were, then so would be
L ∩ a*b*c* = { a^{n}b^{n}c^{n} : n ≥ 0 }
Closure Properties of DCFLs
DCFLs are defined in a totally different way from CFLs. A CFL is defined a being generated from a grammar and a DCFL is defined as being accepted by a DPDA. The link is the result of section 3.4:
Every CFL is accepted by a PDA, the language accepted by a PDA is a CFL
(i.e., generated by a grammar).
The language { w·w^{R} : w ∈ {a,b}* } is
intuitively not a DCFL, but finding a proof of this fact appears to
be very difficult.

DCFLs are CFLs.
This sounds right, but technically you have to argue about what to do when the "$" is no longer part of the picture. 
Regular Languages are DCFLs.
This is obvious because a DFA is a DPDA with no stack usage. 
DCFLs are closed complementation.
This is proved in Theorem 3.7.1 in the textbook. It is a difficult technical result which illustrates how a DPDA for a language L can be used to construct a DPDA for Σ*L.L = {w ∈ {a,b}*: #a(w) ≠ #b(w)}

DCFLs are not closed under intersection.
Assuming that {a^{n}b^{n}c^{n}: n ≥ 0} is not a CFL (argued in section 3.5), we use the argument that CFLs are not closed under intersection:{a^{n}b^{n}c^{n}: n ≥ 0} = {a^{n}b^{n}: n ≥ 0}·c* ∩ a*·{b^{n}c^{n}: n ≥ 0}
Both the component languages making up the intersection are DCFLs. It's easy to make up DPDAs for both. However the intersection is not a CFL, hence not a DCFL. 
DCFLs are not closed under union.
If they were, then, by DeMorgan's Laws, using closure under complementation, they would have to be closed under intersection. 
DCFLs, like CFLs, are closed under intersection with a regular language.
Section 3.4 illustrates the product construction proving that:The intersection of a CFL with a regular language is a CFL.This same product construction works to prove that DCFL intersected with a regular language is a DCFL, the difference is that we start with a DPDA. A key point is that the DFA used in the product construction cannot introduce nondeterminism into the constructed DPDA. 
DCFLs are not closed under concatenation.
The problem is that a string in the first language loses the presence of the "$" marker. For example, consider the concatenation of these two DCFLs:{a^{m}b^{n}: m < n} · { wcw^{R}: w ∈ {a,b}* }
This string abbb·bbbacabbb is accepted, but how would you know on which b you should "jump across" from one language to the other and stop consuming the b and start stacking it?
Example of a CFL language which is not DCFL
Refer to the classic nonCFL languageL_{0} = {a^{n}b^{n}c^{n}: n ≥ 0}We can argue that complement Σ^{*}L_{0} is a CFL. Rewrite as follows:
Σ*  L_{0} = (Σ*  a*b*c*) ∪ {a^{m}b^{n}c^{p}: m ≠ n or n ≠ p or m ≠ p}The first component of the union is regular. The second component is the union of these 6 CFLs:
{a^{m}b^{n}c^{p}: m < n} {a^{m}b^{n}c^{p}: m > n} {a^{m}b^{n}c^{p}: n < p} {a^{m}b^{n}c^{p}: n > p} {a^{m}b^{n}c^{p}: m < p} {a^{m}b^{n}c^{p}: m > p}Therefore Σ*  L_{0} is a CFL. However, it cannot be a DCFL, because if it were, then its complement, L_{0}, would be a DCFL and hence a CFL, a contradiction.