🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: sci.logic
Article #973

Re: How to make a halt decider?

#973
From: Fred. Zwarts
Date: Sat, 07 Nov 2026 10:37
76 lines
4154 bytes
Op 07.nov.2026 om 05:56 schreef Lawrence D’Oliveiro:
> On Fri, 6 Nov 2026 20:08:54 -0600, olcott wrote:
> 
>> Suppose there is a decider H that takes a finite string of source
>> code S.
> 
> Let us say “program S”. Forget the distinction between “source code”
> and “machine code” or whatever other kinds of “code” you are thinking
> of. Forget about specific machine architectures and programming
> languages and other such irrelevant details. The principles of
> computability theory are far more universal than that. If your
> reasoning depends on such specific details, then there is something
> wrong with your reasoning.
> 
>> H applies inference steps to S according to the operational
>> semantics of the language of S.
>>
>> What exactly would that entail?
> 
> Program H and program S can run on the same underlying universal
> machine. “Code” can be “data”, too. A program is simply some finite
> string of symbols in the machine language, that, given some input
> which is some other string of symbols, does something “useful” (i.e.
> what somebody wants it to do).
> 
> Of course, the string of symbols being finite is itself no guarantee
> that the execution of that program will terminate in finite time; it
> is trivially easy to construct any number of examples of programs that
> will never terminate execution.
> 
> Consider a run of a given program S(D) with some given input data D;
> can you determine in general, for any S and D, that that run will
> terminate after a finite number of steps or not?
> 
> Assume there is a program H(S, D) that can make that determination for
> any combination of S and D: it returns true if S(D) terminates, and
> false if it does not.
> 
> Now let us define a program H'(S, D) as follows:
> 
>      if H(S, D) then
>          get stuck in an endless loop
>      else
>          return true
> 
> Now the question is: what result will H(H', H') return? Substituting
> those values into the definition of H' gives:
> 
>      if H(H', H') then
>          get stuck in an endless loop
>      else
>          return true
> 
> In other words, if H says that H' will terminate with H' as input,
> then H' will not terminate; and if H says H' will *not* terminate with
> H' as input, then H' *will* terminate.

We know Olcott's answer. This example has been testen by him. Here main 
is only a stub to allow HHH to analyse itself.

>        int main() {
>          return HHH(main);
>        }
> 

Olcott confirmed that HHH correctly returns and reports that HHH does 
not halt. :-)


> 
> This is a logical contradiction. It indicates there is something wrong
> with our reasoning. And the only obvious thing wrong is the assumption
> that H exists.
> 
> Therefore no H fitting the definition can exist. QED.
Technical Details
Message-ID: <11cmv1h$1l7od$2@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11cm17m$32os9$1@dont-email.me> <11cmb15$352as$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Fred. Zwarts" <F.Zwarts@HetNet.nl>
Newsgroups: comp.theory,sci.logic
Subject: Re: How to make a halt decider?
Date: Sat, 7 Nov 2026 11:37:37 +0100
Organization: A noiseless patient Spider
Lines: 76
Message-ID: <11cmv1h$1l7od$2@dont-email.me>
References: <11cm17m$32os9$1@dont-email.me> <11cmb15$352as$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 07 Nov 2026 10:37:38 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="1744653"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+kGPl0CpLyDkUrL7m4LcMz"; posting-host="c22f5eb1b39785feb54b65bd23c1bc21"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:mgTTEm0K5eUk2O2yOQbAOqSubKY= sha256:hqFYwNQKaWdSWWE2R10smaMaXHpP8eRq0wr0lBU+mSA=
	sha1:66A5g6fu/5jkZW2EhScy181IrSo= sha256:tQ6ZN7//q2QL2DpbblWh3e1bWx1tI22eVVk6oZVYU/0=
In-Reply-To: <11cmb15$352as$1@dont-email.me>
Content-Language: nl, en-GB