0
$\begingroup$

Possible Duplicate:
How to prove that a language is not context-free?

I'm having a hard time figuring this out, any help is appreciated.

Let EQUAL be the language of all words over $\Sigma = \{a,b,c\}$ that have the same number of $a$’s, $b$’s and $c$’s

$\qquad \text{EQUAL} = \{ w \in \Sigma^* \mid |w|_a = |w|_b = |w|_c \}$

The order of the letters doesn't matter. How can you prove that EQUAL is non-context-free?

$\endgroup$
  • 1
    $\begingroup$ Check the various methods given at this question $\endgroup$ – Ran G. Nov 1 '12 at 6:31
  • $\begingroup$ It's actually an example in this answer. Closing as duplicate. $\endgroup$ – Raphael Nov 1 '12 at 14:35
3
$\begingroup$

It is known that the intersection of a context-free language with a regular language is context-free. If EQUAL were context-free, so would be its intersection with $a^*b^*c^*$, which is the well-known non-context-free $\{a^nb^nc^n : n \in \mathbb{N}\}$.

$\endgroup$