1

Is the following language context-free?

$$ \{u\#v\in\Sigma^* \mid u\not=v \text{ and } u,v\in\{0,1\}^*\} $$

You can assume $\{0,1,\#\}\subseteq\Sigma$.

Unnecessary background information: I am grading papers, and a student cited that this language is context-free to state that it is decidable. My intuition says that the language is not context free, but if someone could confirm this for me or even point me to a proof, that would be fantastic.

J.-E. Pin
  • 6,129
  • 18
  • 36
Dylan McKay
  • 326
  • 1
  • 5
  • Actually, the background information is quite useful, thank you for that. – Robert Harvey Apr 09 '15 at 21:49
  • Have you looked at our reference questions? Have you tried any of the methods listed there, such as the pumping lemma? We expect you to make a serious effort on your own before asking and to show us in the question what you've tried. – D.W. Apr 09 '15 at 21:58
  • To answer your question: yes, it is context-free. The linked question contains a proof. The idea is pretty simple: for $\Sigma = {0,1}$, the language equals ${ \Sigma^n 0 \Sigma^* # \Sigma^n 1 \Sigma^, \Sigma^n 1 \Sigma^ # \Sigma^n 0 \Sigma^, \Sigma^n # \Sigma^{n+1} \Sigma^ , \Sigma^* \Sigma^{n+1} # \Sigma^n : n \geq 0 }$. – Yuval Filmus Apr 09 '15 at 22:16
  • Thanks! Sorry for asking a question that had already been asked! – Dylan McKay Apr 09 '15 at 22:31

0 Answers0