If $G$ is not a regular grammar, then $L(G)$ is infinte.
If $L^*$ is context free then $L$ is definitely context free.
If $G$ is a context free grammar that is language is $L$ (meaning $L(G) = L$),
then there exists a context free grammar $G^r$ such that $L(G^r) = L^r$
- $L^r =\{w^r \mid w \in L\}$
Regular grammar and context grammar problems
0
$\begingroup$
computer-science
context-free-grammar
formal-grammar
-
0Please make the title more descriptive. Thanks. – 2012-12-21
-
0@BabakSorouh I went ahead and changed the title a bit as part of the task of cleaning up all of the spelling mistakes. user14988, please check to see that I didn't alter the meaning of your question with my grammar tweaks. – 2012-12-21
-
0@rschwieb: Yes, and I’ve made the change. – 2012-12-21
-
0What does "definitely context free" mean? Note that for any language $L$, $(\{0,1\} \cup L)^* = \{0,1\}^*$ is context free. – 2012-12-21
1 Answers
1
This isn’t a full answer, but it’s too long for a comment.
(1) is actually false as stated. The grammar $G$ with initial symbol $S$, terminal symbols $0$ and $1$, non-terminal symbols $S,A,B,C$, and the productions below is clearly not regular, but $L(G)=\{01\}$.
$$\begin{align*} &S\to ABC\\ &A\to 0\\ &B\to 1\\ &C\to C\epsilon C\mid\epsilon \end{align*}$$
What is true is that if $L$ is a finite language, then there is a regular grammar $G$ such that $L(G)=L$; this is probably what you were really meant to prove.