Prove the following Closure Properties with respect to Context
Free Languages.
1. Show that Context Free Languages are Closed under union(∪),
concatenation(·), kleene star(*).
(Hint: If L1 and L2 are Context Free languages then write
Context Free grammar equivalent to L1 ∪ L2, L1 · L2, L∗ 1 )
2. Show that if L1 and L2 are Context Free Languages, then L1 ∩
L2 is not necessarily Context Free.
(Hint: Use Proof by Counter Example)
Show that Turing-decidable languages are closed under the
following operations:
union
concatenation
star
Show that Turing-recognizable languages are closed under the
following operations:
union
concatenation
star
Each answer needs only be a short informal description of a
Turing Machine (but it must still be sufficiently precise so
someone could reconstruct a formal machine if needed).
(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.
Consider two languages A and B where A is a context free
language and B is a regular language. Show that the set difference,
A-B, must also be context free.
Also show that B-A may not be context free
Prove that all regular languages are context
free.
Note: Proof must proceed by
structural induction on regular
expressions
Please prove by Structural Induction. Will Upvote for
correct answer. Thanks
Give context free grammars for the languages below. To avoid
mistakes, I recommend using scratch paper to check that your
grammars produce the right set of string. This question is
structured so that nonterminals (and associated rules) from an
earlier subquestion might be useful in a grammar for a later
sub-question. That’s why, rather than “S” as the start symbol, we
will used different start symbols for each part. If you do use a
nonterminal from an earlier sub-question, say...
Give context free grammars for the languages below. To avoid
mistakes, I recommend using scratch paper to check that your
grammars produce the right set of string. This question is
structured so that nonterminals (and associated rules) from an
earlier subquestion might be useful in a grammar for a later
sub-question. That’s why, rather than “S” as the start symbol, we
will used different start symbols for each part. If you do use a
nonterminal from an earlier sub-question, say...
Use the Pumping Lemma to show that the following languages are
not regular.
(a) {ai bj | i > j}
(b) {apaq | for all integers p and q where
q is a prime number and p is not prime}.
Let G be any context-free grammar. Show that the number of
strings that have a derivation in G of length n or less, for any n
> 0, is finite.
Could you please answer with clear explanation. The question is
from Elaine Rich's Automata, Computability and Complexity Chapter
11 Exercise 14.