The Gateway to Computer Science Excellence
0 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$.$
in Theory of Computation by
edited by | 33 views

1 Answer

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

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,375 questions
60,553 answers
95,374 users