Why can no procedure eventually confirm that a given job will never finish, even with unlimited time?
answer
- recognizability is not symmetric
- run both recognizers together
- exactly one must eventually answer
- that would decide halting
- so the complement is not recognizable
basics
~10 sHalting is recognizable, so if non-halting were recognizable too, running both recognizers together would decide halting. Since halting is undecidable, no procedure can eventually confirm non-termination for every job that loops.
solid answer
~40 sA problem is decidable exactly when both it and its complement are recognizable: run the two recognizers in parallel, and since every instance is a yes for one of them, one must eventually answer. Halting is recognizable by simulation. If the non-halting side were also recognizable, that parallel run would be a decider for halting - which cannot exist. So the complement is **not** recognizable: there is no procedure that, given unlimited time, eventually certifies every non-terminating job as non-terminating. Individual jobs can still be proven to loop - a counter that never advances, a repeated state, an invariant - but no single procedure finds such a proof for all of them.
go deeper
Remember the asymmetry: that a job finished is something you can observe, while that it will never finish is not something waiting can ever establish.
State the equivalence - a problem is decidable exactly when it and its complement are both recognizable - and use it to derive that the non-halting side cannot be recognizable.
Apply it to tool design: an indefinitely running loop detector cannot be an eventually-complete proof engine, so present it as measured pattern coverage and keep never finishes out of automated reports without a certificate.
Use it to judge proposals that promise eventual completeness from unbounded background analysis, and steer investment toward certificates for the cases you care about or toward restricting what submitted jobs may express.
## Three buckets, not two Decidability is usually taught as a yes/no split, which hides the structure that this question is about. Sort yes/no problems by what a procedure can promise: | Bucket | Yes-instances | No-instances | |---|---|---| | Decidable | always answered | always answered | | Recognizable only | eventually answered | never answered | | Co-recognizable only | never answered | eventually answered | | Neither | never answered | never answered | Halting sits in the second bucket, and the point of this question is that it is *only* in the second: the complement, the set of program-input pairs that run forever, is not recognizable at all. ## The parallel-search argument Suppose some problem and its complement were both recognizable, with recognizer A for the yes side and recognizer B for the no side. Then: 1. Run A and B together on the same input, interleaving their steps so both make progress. 2. Every input is a yes-instance for exactly one of the two problems, so exactly one of the recognizers is obliged to answer eventually. 3. Stop as soon as either answers, and report accordingly. This always terminates and is always correct, so it is a decider. Contrapositively, if a problem is **not** decidable but **is** recognizable, its complement cannot be recognizable - otherwise the parallel run would decide it. ## Applying it to halting The pieces are already in hand: - Halting is recognizable: simulate, and report yes the moment the job stops. - Halting is not decidable, by the self-referential diagonal construction. - Therefore the non-halting side is not recognizable. Read as an engineering statement: there is no procedure that, running for as long as you like, is guaranteed to eventually say "this job will never finish" for every job that never finishes. Confirming that a job stopped is trivial - wait for it. Confirming the opposite has no general procedure at all, at any budget. ## Why this is sharper than undecidable "Undecidable" alone would leave open the possibility of a one-sided tool that is slow but eventually right about looping jobs, and engineers do occasionally propose exactly that: let the detector run in the background indefinitely and report loops when it finds them. The stronger statement rules that architecture out as a **general** guarantee. The asymmetry is worth stating plainly, because it explains why tooling in this area always looks lopsided: - Evidence that a job finished is **finite and conclusive** - the exit happened. - Evidence that a job will never finish is **not finitely obtainable in general**, even though for many specific jobs a short proof exists. ## What still works in practice Nothing here says non-termination is unprovable case by case. Plenty of jobs carry a short certificate: - A loop whose condition cannot change because nothing in the body touches the values it reads. - A state that is observed to repeat exactly, with no external input, so the future must repeat too. - A recursion with no base case reachable from the arguments in play. - An invariant showing a counter can never cross the threshold that would end the loop. What fails is the universal quantifier. No single procedure produces such a certificate for every non-terminating job, so a background detector will always be a heuristic collection of patterns, not a guarantee. That is a perfectly good tool - it should just be described as pattern coverage rather than as a proof engine, and its coverage should be measured. ## Wording this in an operational report The distinction changes what your systems are allowed to claim: - "Job exceeded its budget" - always true when it happened, and safe to publish. - "Job matched a known non-termination pattern" - true, checkable, and honest about being pattern-based. - "Job will never finish" - not something a general tool can establish, so a system should only say it when a specific certificate is attached. The common mistake in the other direction is equally worth naming: candidates sometimes conclude that non-termination can never be proven at all. That is far too strong. The result constrains procedures that must work for every input, not the analysis of the job in front of you.
- What exactly is the statement about a problem and its complement?A problem is decidable if and only if both it and its complement are recognizable. The hard direction is the parallel run: since every instance is a yes for exactly one side, interleaving the two recognizers is guaranteed to produce an answer, which makes the combination a decider.
- If non-halting is not recognizable, how can anyone ever prove a specific job loops forever?By exhibiting a certificate for that job - an unchanging loop condition, an exactly repeated state with no external input, an invariant blocking the exit. The impossibility is about a single procedure succeeding on every non-terminating job, not about the existence of proofs for particular ones.
- Does this rule out a background detector that keeps analysing a job indefinitely?It rules out any guarantee that such a detector eventually reports every looping job. As a growing library of recognised patterns it remains useful, but it should be described and measured as pattern coverage rather than presented as an eventually-complete proof engine.
saying these in an interview costs you the question
- Believes non-termination can always be confirmed given enough runtime.
- Says no specific job can ever be proven non-terminating.
- Thinks recognizable and co-recognizable are the same guarantee.
- Assumes two semi-procedures cannot be interleaved on one machine.
- Treats a long silence from a recognizer as a negative answer.