1. Home
  2. Explore
  3. Computer Science
  4. Turing and Decision Problem

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Turing and Decision Problem

🧠 The Decision Problem, Halting Problem, and Turing's Innovation

At the dawn of the 20th century, mathematicians grappled with a fundamental question in logic: "Do these premises entail this conclusion?" This query, known as the decision problem for first-order logic, sought an automatic, definitive test to determine the validity of a logical argument. First-order logic is the foundational system taught in philosophy and mathematics for formal reasoning. Many mathematicians, including Alan Turing, dedicated efforts to ascertain if this type of logic was decidable—meaning, if an algorithm could universally solve the decision problem.

🚫 Undecidability of First-Order Logic

Alan Turing was among the first to conclusively demonstrate that first-order logic is not decidable. Proving this concept is inherently challenging because it requires showing that no possible program can provide the answer. It's impossible to individually test every conceivable program. Turing's ingenious solution circumvented this by introducing a conceptual framework that has profound implications for computing.

🛑 The Halting Problem: A Foundation for Undecidability

Turing's proof hinges on a related, equally fundamental problem known as the halting problem. Imagine a program as a "black box" that takes inputs and produces outputs. Some programs will eventually complete their task and give an answer (they halt), while others might get stuck in an infinite loop and never produce an output (they don't halt).

The halting problem asks: "Given a program and an input, will that program eventually halt or run forever?"

It turns out that the logical decision problem ("Do these premises entail this conclusion?") is deeply connected to the halting problem. In fact, if one could solve the decision problem, one could also solve the halting problem. Therefore, to prove the undecidability of first-order logic, Turing focused on demonstrating the impossibility of solving the halting problem.

🧠 Turing's Proof: The Contradiction

Turing's brilliant proof of the halting problem's insolvability uses a proof by contradiction. He began by assuming that a machine (or program) capable of solving the halting problem does exist.

  1. Hypothetical Halting Machine (H): Assume there's a machine, let's call it h, that takes a description of any other machine M and its input I, and correctly tells us:

    • "Yes" (M halts on I)

    • "No" (M does not halt on I)

  2. Constructing H+: Turing then showed how to construct a new machine, h+, by modifying h.

    • If h outputs "Yes" (meaning M halts), h+ is designed to enter an infinite loop (i.e., it doesn't halt).

    • If h outputs "No" (meaning M doesn't halt), h+ is designed to halt immediately.

  3. The Paradoxical Input: The crucial step is to feed h+ itself as both the machine description and the input. We ask: "Does h+ halt when given h+ as input?"

    • Scenario 1: Assume h+ halts on h+.

      • According to the definition of h+, if h+ halts, then h (its internal component) must have outputted "No" for the input (h+, h+).

      • But h outputting "No" means that h+ does not halt on h+.

      • This creates a contradiction: If h+ halts, then it doesn't halt.

    • Scenario 2: Assume h+ does not halt on h+.

      • According to the definition of h+, if h+ does not halt, then h must have outputted "Yes" for the input (h+, h+).

      • But h outputting "Yes" means that h+ does halt on h+.

      • This also creates a contradiction: If h+ doesn't halt, then it does halt.

  4. Conclusion: Since both possibilities lead to a paradox, the initial assumption that a machine h capable of solving the halting problem exists must be false. Therefore, no such machine or program can exist.


💻 The Birth of Modern Computing

The profound implication of Turing's proof is that it is universal. It doesn't matter if we're talking about an abstract algorithm or a physical computer; the impossibility holds true for any computational device.

To make his argument, Turing had to precisely define what a "machine" or "program" actually is. In doing so, he developed the concept of the Turing machine—an abstract model of computation that describes a theoretical device manipulating symbols on a strip of tape according to a set of rules. This conceptual device, born from the need to prove a point in mathematical logic, inadvertently laid the theoretical groundwork for the modern digital computer. The idea that any computation can be broken down into a series of simple, discrete instructions became the blueprint for how computers operate today.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent