Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the answer is you can solve the halting problem if you have finite memory. You just need to consider every possible memory value. Eventually no new memory values can be introduced, so the next state must be one of the already inspected memory values.

Of course all this takes at least exponential time and so is outside our normal computability assumptions.



Wouldn't the halting problem take at most exponential time?

We know that a program with n bits of memory has at most 2^n states, so we can maintain an n bit counter that is incremented once on each program iteration. If this counter reaches (2^n)-1, then the program does not terminate. (Depending on how you define things, there is an off-by-one error here; just run the program a few times before you start counting).


The general halting problem takes a potentially unbounded input.

That's why it's impossible to solve.

If it were finite (bounded), then you could do an enumeration of the possible programs of that bounded size, and you could make a program that simply looks up that list. (Sure, maybe the making of the list would be a bit problematic, because it'd take ... multiple eons, lesser gods would die, rise and die again during that time, but it's still finite.)


That's the point, yes. A real machine has finite memory, while a proper Turing machine can always advance the tape to get more memory. You can solve the former in ridiculous but non-infinite time, but not the latter.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: