2

Let the operation $$Perm(L) = \{ w | \exists u \in L \text{ such that } u \text{ is a permutation of } w \}$$

Prove that both regular languages and CFLs aren't closed under $Perm(L)$.

I've tried to use several well-known languages (like $\{0^n1^n\}$) and applying $Perm(L)$ and afterward manipulate them or using the pumping lemma in order to get a contradiction, but nothing worked out.

Raphael
  • 72,336
  • 29
  • 179
  • 389
Elimination
  • 389
  • 4
  • 13

1 Answers1

6

Hints:

  1. For regular languages, consider $Perm((01)^*) \cap 0^* 1^*$.

  2. For context-free languages, consider $Perm(0^n 1^n 2^m 3^m) \cap 0^* 2^* 1^* 3^*$.

Yuval Filmus
  • 276,994
  • 27
  • 311
  • 503