0

My understanding:

The Halting Problem is undecidable for a Turing Machine, and yet it is decidable for a linear bounded automaton (a Turing Machine with finite tape). The reason is that the only way an LBA can loop is by entering a configuration it's already been in, which is easy to check. However, unlike an LBA, a Turing Machine can also loop by entering infinitely many new configurations, none of which accept. So it seems that what the Halting Problem's undecidability really means is that the problem of checking whether a Turing Machine will enter infinitely many new configurations without accepting is undecidable.

My question:

But real computers are LBAs, not TMs. They can't enter infinitely many new configurations. So why is the undecidability of the Halting Problem a useful result?

I've looked at the answers to this and similar questions, and invariably they go something like, "a real computer has a bazillion configurations, and so waiting until you hit a repeat one would take a bazillion years." But as I detailed above, Halting undecidability doesn't seem to tell us anything about that kind of looping; it only tells us about the infinitely-many-new-configurations kind that real computers can never engage in.

Tyler
  • 101

1 Answers1

3

Detecting whether a Turing machine loops can be arbitrarily difficult. For example, pick any problem P and consider the program:

k = 0
done = False
while not done:
  if <k encodes a solution to P>:
    k = 0
  elif <k encodes a solution to ¬P>:
    break
  else:
    k += 1  

This program either terminates or runs forever with repeating configurations, but in order to tell whether configurations repeat, we need to know whether P has a solution. Now just insert a very difficult (undecidable) P.

A real computer has a bazillion configurations. That number is closer to infinity than to any number we can actually comprehend. Turing machines are a better mathematical model of real computers than finite state automata. Something similar happens in physics: the Earth is made from finitely many molecules, but physicists use differential equations that assume matter to be continuous and smooth. That is because the extremely large finite number of molecules is better approximated with the continuum than a discrete system with bazillion states.

Andrej Bauer
  • 31,657
  • 1
  • 75
  • 121