160 views
0 votes
0 votes
Prove the following result. Let $G = (V, T, S, P )$ be a context-free grammar. Divide the set of productions whose left sides are some given variable (say, $A$), into two disjoint subsets

                   $A\rightarrow Ax_1|Ax_2|...|Ax_n,$

                   $A\rightarrow y_1|y_2|...|y_m,$
where $x_i,y_i$ are in $(V ∪ T)^*$, but $A$ is not a prefix of any $y_i$. Consider the grammar $\widehat{G}=(V\cup${$Z$}$,T,S,\widehat P)$, where $Z∉V$ and $\widehat P$ is obtained by replacing all productions that have $A$ on the left by

                    $A\rightarrow y_i|y_iZ,$   $i=1,2,3,…,m$

                     $Z\rightarrow x_i|x_iZ,$    $i=1,2,3,…,n.$
Then $L (G) = L ( \widehat G).$

Please log in or register to answer this question.

Related questions