Home /
Expert Answers /
Computer Science /
draw-the-derivation-tree-corresponding-to-the-derivation-in-example-5-1-examples-of-context-free-lan-pa288
(Solved): Draw the derivation tree corresponding to the derivation in Example 5.1 Examples of Context-Free Lan ...
Draw the derivation tree corresponding to the derivation in Example 5.1
Examples of Context-Free Languages EXAMPLE 5.1 The grammar G=({S},{a,b},S,P), with productions S→aSaS→bSbS→λ is context-free. A typical derivation in this grammar is S⇒aSa⇒aaSaa⇒aabSbaa⇒aabbaa This, and similar derivations, make it clear that L(G)={wwR:w∈{a,b}∗} The language is context-free, but as shown in Example 4.8, it is not regular.