The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
0 votes
11 views
  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 Boss (45.8k points)
edited by | 11 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
by Active (4.1k points)

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
49,830 questions
54,807 answers
189,530 comments
80,835 users