**Definition** \(A_{TM}=\{<M,w>:M\) is a TM and accepts \(w\}\).

**Theorem** \(A_{TM}\) is recognizable.

**Proof** Let \(U\) be the TM that

- simulates \(M\) on \(w\).
- accepts if \(M\) ever reaches its accepting state, rejects if \(M\) rejects.

**Definition** \(U\) is known as a universal Turing machine.

**Theorem** \(A_{TM}\) is undecidable.

**Proof** By contradiction, let \(H\) be a TM that decides \(A_{TM}\). Let \(D\) be the TM that takes as input \(<M>\) and

- simulates \(H\) on \(<M, <M> >\)
- accepts if \(H\) rejects, rejects if \(H\) accepts

\(D\) halts on every input. Does \(D\) accept or reject \(<D>\)?

- \(D(<D>)\) accepts if \(D(<D>)\) rejects.
- \(D(<D>)\) rejects if \(D(<D>)\) accepts.

\(\Rightarrow\Leftarrow\)

\(<M_1>\) | \(<M_2>\) | ... | \(<D>\) | |
---|---|---|---|---|

\(M_1\) | accepts |
rejects | ... | ... |

\(M_2\) | rejects | rejects |
... | ... |

... | ... | ... | ... | ... |

\(D\) | rejects |
accepts |
... | ? |

**Definition** \(HALT_{TM}=\{<M,w>:M\) is a TM and halts on input \(w\}\)

**Theorem** \(HALT_{TM}\) is undecidable.

**Proof** By contradiction, let \(H\) be a TM that decides \(HALT_{TM}\). Let \(T\) be the TM that

- Call \(H\) as subroutine on \(<M,w>\)
- If \(H\) rejects, \(T\) rejects also
- If \(H\) accepts, simulate \(M\) on \(w\) and return same answer.

then \(T\) decides \(A_{TM}\) \(\Rightarrow\Leftarrow\).

**Definition** \(EMPTY_{TM}=\{<M>:L(M)=\emptyset\}\)

**Definition** \(L(M)=\{w\in\Sigma^*:M\) accepts \(w\}\) (languages recognized by \(M\))

**Theorem** \(EMPTY_{TM}\) is undecidable

**Proof** By contradiction, assume \(E\) is a TM that decides \(EMPTY_{TM}\).

Let \(T\) be a Tm that takes in \(<M,w>\) as input.

- \(T\) builds \(M'\) that on input \(x\in\Sigma^*\)
- checks that \(x=w\), if not it rejects
- If \(x=w\), \(M'\) simulates \(M\) on \(x\)

- Call \(E\) on \(<M'>\)
- accepts if \(E\) rejects
- rejects if \(E\) accepts

(Observation: \(L(M')=\{w\}\) if \(M\) accepts \(w\), \(L(M')=\emptyset\) otherwise)

\(T\) decides \(A_{TM}\) \(\Rightarrow\Leftarrow\)

**Definition** \(EQ_{TM}=\{<M_1,M_2>:L(M_1)=L(M_2)\}\)

**Theorem** \(EQ_{TM}\) is undecidable.

**Proof Idea** if \(EQ_{TM}\) is decidable, then \(EMPTY_{TM}\) is too.

**Definition** A property of languages of Turing machines is a subset of those languages.

E.g.

- being empty
- including some string \(w\)
- including only strings of even length
- being regular

**Definition** A property of languages of TMs is non-trivial if \(\exists M\) such that \(L(M)\) has property \(P\) and \(\exists M\) such that \(L(M')\) does not have property \(P\)

**Theorem** For every non-trivial property \(P\) of languages of TMs \(L_p=\{<M>:L(M)\) has property \(P\}\) is undecidable.