In: Computer Science
(a) How Context Free languages are different from Regular languages. (b) What are the automata accepting those languages and how they are different from DFA and NFA. (c) How the grammar of Context Free Languages looks different from those in Regular languages.
(a)Regular languages are lanuages generated by a Regular
Grammar.Regular languages can be of finite length or non-finite
length.In case of non-finite, it has a pattern which will satisfy
pumping lemma for Regular languages.
Comtext Free languages are lanuages generated by a Context free
Grammar.Context free laguages are super set of Regular
language.
It may or may not statisfy pumping lemma for Regular languages. But
it will satisfy pumping lemma for Context free languages.
(b)Regular languages accepted by Finite Automata, while context
free languages accepted by Push down Automata(PDA).
PDA needs a memory unit(stack),while DFA and NFA do not have any
memory unit.
(c)Regular grammar can be right or left linear,while context
free grammar is combination of terminals and non-terminals.
Regular grammars are non-ambiguous, there is only one production
rule for a given non-terminal, while there can be more than one in
the case of a context-free grammar.