# Determine in which class $L=\big\{\langle M_1,M_2,w\rangle\mid M_1,M_2\text{ are TM and }L(M_1)\cap L(M_2)=\{w\}\big\}$ [closed]

my solution is that $L\in co-RE$ by showing that $\overline{L}\in RE$

TM $M$ on input:$\langle M_1,M_2,w\rangle$

1. Build TM $M_1,M_2$
2. Simulate $M_1$ on $x\in\Sigma^*$, before that check if $x\neq w$
3. If $M_1$ accepts some $x$, than Simulate $M_2$ on $x$
4. If $M_2$ accepts than $M$ accepts. If $M_2$ reject, that we back at $M_1$ on the next $x$

$*$ $M_1$ and $M_2$ will run on each $x$ at the most $|x|$ steps.

Is that correct?

Thanks.

• We discourage "please check whether my answer is correct" questions, as only "yes/no" answers are possible, which won't help you or future visitors. See here and here. Can you edit your post to ask about a specific conceptual issue you're uncertain about? As a rule of thumb, a good conceptual question should be useful even to someone who isn't looking at the problem you happen to be working on. If you just need someone to check your work, you might seek out a friend, classmate, or teacher. – D.W. Aug 13 '18 at 16:55

For example, suppose that $x=0$, $w=00$, $L(M_1)\bigcap L(M_2)=\{x,w\}$. If $M_1(x)$ or $M_2(x)$ takes more than $|x|=1$ steps to answer "yes", then your proposed algorithm will failed.