[Math] Show that Turing recognizable languages are closed under intersection.

computational complexityformal-languagesturing-machines

The question ans its answer is given in the following picture:

enter image description here
enter image description here

But it is not clear for me what if one of the machine loops and the other rejects, will the TM describing the intersection reject also? I feel that the answer is not clear in that case.

Also what if the 2 machines loop, will the given machine loop?

Best Answer

"If either of these two halts and rejects, $M'$ rejects." This answers your first question. If one of the machines loops and the other rejects, then you only simulate the looping one until the other one provides you with the rejection; after that the decision is clear (rejection) and there is no point in continuing the simulation, no matter what the other machine does (loop, accept, reject).

And yes, if both do not stop, then the new machine will not stop either but continue to simulate one step of the first, one of the second, one of the first etc. This is what alternating means. It is the most simple case of a technique called dovetailing, which is used to simulate several processes in the case where some possibly do not stop, and thus sequential simulation could possibly get stuck on the first process without ver touching the other ones.

By the way: the term "to loop" is a bit misleading here. It suggests that the machine keeps doing the same over and over. However, it can compute forever without repeating configurations and even without repetiton on a more abstract level.