Prove that $Y=\{w|w=t_1\#t_2\#...\#t_k\}$ is not context free

103 Views Asked by At

$Y=\{w|w=t_1\#t_2\#...\#t_k |t_i \in 1^*\wedge \forall_{i\neq j}t_i\neq t_j\wedge k\ge 0 \}$
Prove that $Y$ is not context free.
So, let's $p$ will be pumping lemma length. $s=\#1\#11\#..\#1^{p-1}\#1^p=uvxyz$
First case: When $v$ or $y$ contains $\#$ then let's consider: $v=1^k\#1^l; k,l\ge 0$
$v^3 =1^k\#1^l1^k\#1^l1^k\#1^l $. It is violenced $t_i\neq t_j$.
So, now $v$ or $y$ have to contains $1s$. Let's it will be $v\in t_i$. Now let's pump down $v$ what does mean: $(v^0)$, then $t_i = t_k$ for some $k<i$. It is again violenced constraint $t_i\neq t_j$.

Is it proper proof ?

1

There are 1 best solutions below

0
On

I confirm that your idea is the right one!, and your argument is very well constructed and the second argument works too just some slightly modifications:

"So, let's $p$ will be pumping lemma length. $s=\#1\#11\#..\#1^{p-1}\#1^p=uvxyz$

  • First case: When $v$ or $y$ contains $\#$ then let's consider: $v=1^k\#1^l; k,l\ge 0$
    $v^3 =1^k\#1^l1^k\#1^l1^k\#1^l $. It contradicts $t_i\neq t_j$.
  • Second case: $v$ or $y$ have to contains $1s$ wlog we can assume that $v=1^k$ and $t_i=1^mv1^n$ with $m+n+k=i$ with $k>0$. Now let's pump $v$ this means that we will have for any $q$ $s_q=\#t_1\#\cdots t_{i-1}\#1^n(1^{k})^q 1^m\#w$ (with $w$ is the remaining word) (where $t_i=1^i$ for all $i$ ) now if $n+m\neq 0$ then we have $t_i=1^nv^01^m=t_{n+m}$ which is a not possible because $0<n+m< i$, otherwise $n+m=0$ and in this case $v^{0}$ gives you two successive $\#$ which is impossible also!