In: Computer Science
Regular => Context-Free
Give a proof by induction on regular expressions that:
For any language A, if A is regular, then A is also context-free.
You may assume that the statements from the previous Closure under Context-Free Languages problem are proved.
R is a regular expression if RR is:
a for some a∈alphabet Σ,
the empty string ε,
the empty set ∅,
R1∪R2, sometimes written R1∣R2, where R1 and R2 are regular expressions,
R1∘R2, sometimes written R1R2, where R1 and R2 are regular expressions,
R1∗, where R1 is a regular expression.
Closure under Context-Free Languages
union
concatentation
Kleene star
Hi,
All regular languages are context free languages .we can prove it by induction.
A context free languge can be defined as a language that are generated by context free grammers.It have some production rule.A regular language is a language that is expressed using regular expression.We can prove that all egular languaes are ontext free by proving that for eery regular languages there is a context free grammer exist.We know that regular languages are closed under union,concatenation and kleen star.We need to prove that htey are closed under context free grammer also.Let us consider:
Hence it is proved.
Thank you....