edited by
329 views
1 votes
1 votes
  1. Let $C$ be a context-free language and $R$ be a regular language$.$ Prove that the language $C\cap R$ is context-free.
  2. Let $A = \{w\mid w\in \{a, b, c\}^{*}$  $\text{and}$  $w$  $\text{contains equal numbers of}$  $a’s, b’s,$ $\text{and}$ $c’s\}.$ Use $\text{part (a)}$ to show that $A$ is not a CFL$.$
edited by

1 Answer

0 votes
0 votes
CFL $\cap$ RL $\rightarrow$ CFL

let B=a*b*c*

if A is CFL then A $\cap$ B should be CFL

A $\cap$ B=$a^nb^nc^n$ which is not CFL

hence, A is not CFL

Related questions

0 votes
0 votes
0 answers
1
admin asked May 4, 2019
339 views
Let $A/B = \{w\mid wx\in A$ $\text{for some}$ $x \in B\}.$ Show that if $A$ is context free and $B$ is regular$,$ then $A/B$ is context free$.$
0 votes
0 votes
0 answers
2
0 votes
0 votes
1 answer
3
admin asked May 4, 2019
263 views
Let $\Sigma = \{a,b\}.$ Give a $CFG$ generating the language of strings with twice as many $a’s$ as $b’s.$ Prove that your grammar is correct$.$