Undecidability

Understanding problems that cannot be solved algorithmically

What is Undecidability?

Definition:

A problem is undecidable if there is no algorithm (Turing machine) that can solve the problem for all possible inputs. No matter how clever the algorithm, it will fail on some inputs.

Undecidability represents fundamental limitations of computation. These are not limitations of current technology or programming languages, but mathematical impossibilities that apply to any conceivable computing device.

Undecidable problems exist even though they can be stated clearly and seem like they should be solvable. This was one of the most surprising discoveries in computer science.

The Acceptance Problem

The most fundamental undecidable problem is the acceptance problem for Turing machines:

A_TM:

A_TM = {⟨M, w⟩ | M is a Turing machine and M accepts string w}

This problem asks: "Given a description of a Turing machine M and an input string w, does M accept w?" This seems like it should be solvable, but it's not!

Theorem:

A_TM is undecidable.

Relationship to Recursively Enumerable Languages

Interestingly, while A_TM is undecidable, it is recursively enumerable:

Key Insight:

We can construct a Turing machine that accepts A_TM by simulating M on w. If M accepts w, our machine accepts. If M rejects w, our machine rejects. But if M loops forever on w, our machine also loops forever.

What we CAN do:

  • Recognize when M accepts w
  • Enumerate all strings in A_TM
  • Semi-decide the problem

What we CANNOT do:

  • Always determine when M rejects w
  • Guarantee termination on all inputs
  • Fully decide the problem