“IN CONTEXT OF CHOMSHY CLASSIFICATION OF FORMAL LANGUAGE”
(1) L3 = {wwR | w ∈ {a, b}* }
- Language L3 is a Non-Deterministic Context Free Language, its also Unambiguous and Liner language.
(2) Lp is language of parenthesis matching. There are two terminal symbols “(” and “)”.
Grammar for Lp is:
S → SS
S → (S)
S → ()
- This language is nonlinear, deterministic and unambiguous too.
Language L that is union of Lp and L3 is unambiguous, nonlinear (due to Lp), and non-deterministic (due to L3) (Assuming language symbols for both languages are different).
This Language is an example of language in Venn-diagram for which I marked ??
.
Also the correct diagram is below:
An ambiguous context free language also be a liner context free