4
$\begingroup$

Do there exists permutations $\pi_1,\pi_2$ and polynomial size CFG that describe the finite language {$w \pi_1(w) \pi_2(w)$} over alphabet {0,1}?

Polynomial size in $|w|=n$

  • 0
    You mean a polysize CFG for $L_n = \{w\pi_1(w)\pi_2(w) : w \in \{0,1\}^n\}$?2011-02-16
  • 0
    Also asked on cstheory.2011-02-16
  • 0
    You really need a sequence of permutations $\pi_1^n,\pi_2^n$, one of each possible size.2011-02-16
  • 0
    The only way to describe such a language with a CFG is by enumerating its words, there is really nothing good you can do.2011-02-16
  • 0
    @Chandok: That requires proof. If $w$ appeared only twice, then there is a choice of $\pi$ that results in poly-size grammars, namely the reversing permutation, which requires only a linear size grammar.2011-02-17
  • 0
    Link in cstheory: http://cstheory.stackexchange.com/questions/4962/do-there-exists-polynomial-size-cfg-that-describe-this-finite-language.2011-02-17

1 Answers 1

3

Without loss of generality, we can assume that a grammar for $L_n$ (such a language with specific $\pi_1,\pi_2 \in S_n$) is in Chomsky Normal Form. The language $L_n$ consists of the words $w(x) = x\pi_1(x)\pi_2(x)$ for all $x \in \{0,1\}^n$.

Using the Subword Lemma (see my previous answers), for each $w(x)$ we can find a substring $s(x)$ of length $$\frac{n}{2} \leq |s(x)| < n$$ generated by some symbol $A(x)$ and occurring at position $p(x)$.

Suppose that $p(x) = p(y)$ and $A(x) = A(y)$. Since $|s(x)|

Now $s(y)$ intersects either $\pi_1(y)$ or $\pi_2(y)$ in at least $n/4$ places, and thus determines at least $n/4$ bits of $y$. Therefore at most $2^{3n/4}$ strings $y \in \{0,1\}^n$ can have $p(x) = p(y)$ and $A(x) = A(y)$. Since there are at most $3n$ possibilities for $p(y)$, we get that there are at least $$\frac{2^{n/4}}{3n}$$ different non-terminals in the grammar.

Comment: The same proof works if $\pi_1,\pi_2 \in S_{\{0,1\}^n}$, i.e. are arbitrary permutations on the set of all $n$-bit words. Given $n/4$ bits of $\pi_i(y)$, there are exactly $2^{3n/4}$ preimages $y$.

  • 0
    Also in cstheory (due to their request): http://cstheory.stackexchange.com/questions/4962/do-there-exists-polynomial-size-cfg-that-describe-this-finite-language/4969#4969.2011-02-17
  • 0
    On cstheory you mention some unrelated tractable exceptions. I suppose by the exception $N_{\geq 1}$ you mean "at least one occurrence of terminal". Would this mean you can generate all permutations by intersecting with $\Sigma^{|\Sigma|}$?2011-03-07
  • 0
    Since $\Sigma^{|\Sigma|}$ is regular, intersecting with it does not increase the descriptive power of the grammar. So the argument still shows that it's hard to generate all permutations.2011-03-07
  • 0
    Huh???? Can you generate "at least one occurrence of terminal" in (1) REGL or (2) CFL?2011-03-07
  • 0
    I mean generate poly-size (thought your exception was this).2011-03-07
  • 0
    If you want *each* terminal to appear, then the same exponential lower bound applies.2011-03-07