Regular grammar and context grammar problems

181 Views Asked by At
  1. If $G$ is not a regular grammar, then $L(G)$ is infinte.

  2. If $L^*$ is context free then $L$ is definitely context free.

  3. 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\}$
1

There are 1 best solutions below

0
On

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.