can any one provide formal languages and automata theory subject closure properties of CFL
Answers
Answered by
2
Context Free languages are accepted by pushdown automata but not by finite automata. Context free languages can be generated by context free grammar which has the form :
A -> ρ (where A ∈ N and ρ ∈ (T ∪ N)* and N is a non-terminal and T is a terminal)
Properties of Context Free Languages
Union : If L1 and If L2 are two context free languages, their union L1 ∪ L2 will also be context free. For example,
L1 = { anbncm | m >= 0 and n >= 0 } and L2 = { anbmcm | n >= 0 and m >= 0 }
L3 = L1 ∪ L2 = { anbncm ∪ anbmcm | n >= 0, m >= 0 } is also context free.
L1 says number of a’s should be equal to number of b’s and L2 says number of b’s should be equal to number of c’s. Their union says either of two conditions to be true. So it is also context free language.
A -> ρ (where A ∈ N and ρ ∈ (T ∪ N)* and N is a non-terminal and T is a terminal)
Properties of Context Free Languages
Union : If L1 and If L2 are two context free languages, their union L1 ∪ L2 will also be context free. For example,
L1 = { anbncm | m >= 0 and n >= 0 } and L2 = { anbmcm | n >= 0 and m >= 0 }
L3 = L1 ∪ L2 = { anbncm ∪ anbmcm | n >= 0, m >= 0 } is also context free.
L1 says number of a’s should be equal to number of b’s and L2 says number of b’s should be equal to number of c’s. Their union says either of two conditions to be true. So it is also context free language.
Similar questions