3

Given a context-free language $L$, define the language $p(L)$ as containing all permutations of strings in $L$ (i.e. all strings in $L$ such that the order of symbols is not important). Is $p(L)$ context-free?

I found two papers dealing with similar, but not identical, questions:

Raphael
  • 72,336
  • 29
  • 179
  • 389
Erel Segal-Halevi
  • 5,994
  • 1
  • 23
  • 59

2 Answers2

5

Start with simple context-free (or even regular) languages, and see what happens. For instance determine $p(L)$ for $L = (ab)^*$ and $L=(abc)^*$.

Hendrik Jan
  • 30,578
  • 1
  • 51
  • 105
1

No, in general not. For example the MIX language, consisting of equal numbers of $\{a,b,c\}$ in any order is not context-free but is the permutation of the regular language $(abc)^*$.