3
$\begingroup$

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:

$\endgroup$
1
  • 1
    $\begingroup$ Have you tried applying the techniques shown in our reference question? $\endgroup$
    – Raphael
    Apr 15, 2013 at 12:16

2 Answers 2

5
$\begingroup$

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

$\endgroup$
1
  • 1
    $\begingroup$ A penny just dropped in my head, thanks. $\endgroup$
    – Raphael
    Apr 15, 2013 at 14:45
1
$\begingroup$

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)^*$.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.