19.05.2013 Views

Chapter 3 Context-Free Grammars, Context-Free Languages, Parse ...

Chapter 3 Context-Free Grammars, Context-Free Languages, Parse ...

Chapter 3 Context-Free Grammars, Context-Free Languages, Parse ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

60 CHAPTER 3. CONTEXT-FREE GRAMMARS AND LANGUAGES<br />

Lemma 3.9.1 Given any context-free grammar G =(V,Σ,P,S) with m nonterminals A1,<br />

..., Am, writingGas X = XH + K<br />

as explained earlier, if GH is the grammar defined by the system of two matrix equations<br />

X = KY + K,<br />

Y = HY + H,<br />

as explained above, then the components in X of the least-fixed points of the maps ΦG and<br />

ΦGH are equal.<br />

Proof . Let U be the least-fixed point of ΦG, andlet(V,W) be the least fixed-point of<br />

ΦGH. We shall prove that U = V . For notational simplicity, let us denote Φ[U](H) asH[U]<br />

and Φ[U](K) asK[U].<br />

Since U is the least fixed-point of X = XH + K, wehave<br />

U = UH[U]+K[U].<br />

Since H[U] andK[U] do not contain any nonterminals, by a previous remark, K[U]H ∗ [U] is<br />

the least-fixed point of X = XH[U]+K[U], and thus,<br />

K[U]H ∗ [U] ≤ U.<br />

On the other hand, by monotonicity,<br />

K[U]H ∗ <br />

[U]H K[U]H ∗ <br />

[U] + K K[U]H ∗ <br />

[U]<br />

and since U is the least fixed-point of X = XH + K,<br />

U ≤ K[U]H ∗ [U].<br />

≤ K[U]H ∗ [U]H[U]+K[U] =K[U]H ∗ [U],<br />

Therefore, U = K[U]H ∗ [U]. We can prove in a similar manner that W = H[V ] + .<br />

and<br />

Let Z = H[U] + .Wehave<br />

K[U]Z + K[U] =K[U]H[U] + + K[U] =K[U]H[U] ∗ = U,<br />

H[U]Z + H[U] =H[U]H[U] + + H[U] =H[U] + = Z,<br />

and since (V,W) is the least fixed-point of X = KY + K and Y = HY + H, wegetV≤ U<br />

and W ≤ H[U] + .<br />

We also have<br />

V = K[V ]W + K[V ]=K[V ]H[V ] + + K[V ]=K[V ]H[V ] ∗ ,

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!