Prove that the set of Turing-decidable languages are closed under union.

1.4k Views Asked by At

I.e., prove if both $L_1$ and $L_2$ are Turing-decidable, then $L_1∪L_2$ is Turing-decidable. I know that the statement is true, but struggling with how to prove it formally.

1

There are 1 best solutions below

0
On BEST ANSWER

Create a Turing machine which simulates the machine for $L_1$ except that if the simulation enters the REJECT state, it then simulates the machine for $L_2$.

A more interesting approach is to simulate both machines interlaced. (That is, do one step on machine 1 and then one step on machine 2, repeatedly.) If one machine enters the REJECT state, continue by just simulating yhe other machine. If one machine enters the ACCEPT state or the second machine enters REJECT, that's where you end up. The interlaced machine show that Turing recognisability is closed under union.

The interesting part is showing that these machine transformations are possible, but that's not too hard.