Every CFG G can also be converted to an equivalent grammar in - A context-free grammar G = (V, Σ, P, S) is in Greibach Normal Form iff its productions are of the form
Every CFG G can also be converted to an equivalent grammar in - A context-free grammar G = (V, Σ, P, S) is in Greibach Normal Form iff its productions are of the form
such that
ΦG(L1, . . . Lm) =
(Φ[Λ]({α1,1, . . . , α1,n1 }), . . . , Φ[Λ]({αm,1, . . . , αm,nm }))
∗ ∗
for all Λ = (L1, . . . , Lm) ∈ 2Σ × ·
· · × 2Σ.
m
One should verify that the map Φ[Λ] is well defined, but
this is easy.
194 CHAPTER 3. CONTEXT-FREE LANGUAGES AND PDA’S
Σ∗ Σ∗
Now, 2 × ·
· · × 2 is an ω-chain complete poset, and
m
the map ΦG is ω-continous.
Proof . Writing G as
A1 → α1,1 + · · · + α1,n1 ,
··· → ···
Ai → αi,1 + · · · + αi,ni ,
··· → ···
Am → αm,1 + · · · + αm,nn ,
let M = max{|αi,j |} be the maximum length of right-
hand sides of rules in P .
198 CHAPTER 3. CONTEXT-FREE LANGUAGES AND PDA’S
Let
ΦnG(∅, . . . , ∅) = (ΦnG,1(∅, . . . , ∅), . . . , ΦnG,m(∅, . . . , ∅)).
n
Claim 1: For every w ∈ Σ∗, if Ai =⇒ w, then w ∈
ΦpG,i(∅, . . . , ∅), for some p ≥ 1.
X = KY + K,
Y = HY + H,
where Y = (Yi,j ).
3.9. LEAST FIXED-POINTS AND THE GREIBACH NORMAL FORM 207