Give a language L that is a contextfree language where L is

Give a language L that is a context-free language where L is not context-free.

Give a language L that is a context-free language and where L is also context-free.

Solution

Give a language L that is a context-free language where L is not context-free ;-

Answer :-

1) If a language L is context-free then there exists some integer p 1 is called a pumping length.

2) The pumping lemma trivially by having p equal to the maximum string length in L plus one. As there are no strings of this length the pumping lemma is not violated.

3) The set of all context-free languages is identical to the set of languages accepted by pushdown automata, which makes these languages amenable to parsing.

4) The context-free language there is a direct way to produce a pushdown automaton for the grammar though going the other way of producing a grammar given an automaton is not as direct.

Give a language L that is a context-free language and where L is also context-free :-

Answer :-

1)  The context-sensitive language but there does not exist a context-free grammar generating this language.

2) The language of all non-empty even-length strings of the entire first leavel.

3) The entire second leveal of which are b\'s , L is generated by the grammar This language is not regular. It is accepted by the pushdown automaton .

4) The given language is not context-free one of the employ the pumping lemma for context-free languages or a number of other methods .

Give a language L that is a context-free language where L is not context-free. Give a language L that is a context-free language and where L is also context-fre

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site