Last class:
Today:
Suppose there is a machine $H$ that can compute HALT.
def CANTSOLVEME(<M>):
if H(<M>, <M>) == 1:
while True:
pass
else:
return 0
What does CANTSOLVEME do on <CANTSOLVEME>?
If CANTSOLVEME(<CANTSOLVEME>) halts:
→ H(<CANTSOLVEME>, <CANTSOLVEME>) = 1
→ But, we enter an infinite loop meaning it does not halt (a contradiction).
If CANTSOLVEME(<CANTSOLVEME>) does not halt:
→ H(<CANTSOLVEME>, <CANTSOLVEME>) = 0
→ But, we enter do indeed HALT.
Hence, HALT is uncomputable.