Hacker News new | past | comments | ask | show | jobs | submit login

Here's a sketch of a proof explaining why this is impossible (under the Church-Turing thesis).

Suppose you have written a Y-program y that takes an X-program x as input, and computes whether or not x halts (say, on no input), AND y halts every time.

If X is a Turing-complete language, then for a given Turing Machine t we write an X-program xt that simulates t and halts iff t does. Then we run y on xt. This decides whether or not t halts, and works for all TMs t; therefore y solves the halting problem for all Turing Machines. But we know from Turing's "twisted self-reference" that no Turing Machine can do this, so the language Y must be strictly more computationally powerful than the Turing Machine model. This would disprove the Church-Turing thesis, which would be pretty incredible if true, but seems highly unlikely (since modern computers, and even quantum computers, are polynomial time equivalent to TMs).

Otherwise, X is not a Turing-complete language. This is valid, I guess, but not really relevant to the problem of halting, since such a language would be very underpowered for most useful purposes. Now, regular languages are decidable, which is great for lots of computations that can be encoded using predicate logic and first-order arithmetic. Even climbing one rung up the computational complexity to context-free languages brings undecidability, though, since many problems (e.g. whether or not two context-free grammars generate the same language) are undecidable.




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

Search: