On 19/08/2025 03:07, dbush wrote:
<snip>
So we see that Richard Heathfield agreed that HHH can't give a correct
answer, as Linz and other have proved and as you have *explicitly*
agreed is correct.
I look at it this way.
HHH cannot reasonably abort as soon as it detects recursion. After all, there are lots of recursive algorithms around, and plenty of them
terminate. It has to dig a little deeper than that.
So by the time we're some way in, we have several levels of recursion:
DD -> HHH -> DD -> HHH -> DD -> HHH -> DD
(a) (b) (c)
Let's say (c) decides enough is enough.
So (c) stops *its* simulation of DD. THIS HAS NO IMPACT ON (a) AND (b).
(c) now returns 0 to (b)'s DD.
(b) regains control, accepts 0 from (c), assigns 0 to Halt_Status, and returns 0 to (a).
(a) regains control, accepts 0 from (b), assigns 0 to Halt_Status, and returns 0 to the original DD.
If the original DD has a caller, it gets a 0, incorrectly indicating non-halting.
Looking at it this way, I no longer see the need for memoisation. All
that is necessary is for HHH *only* to abort the simulation it's
hosting, *not* the simulation that invoked it.
There's your bug, Mr Olcott.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 150:23:29 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
439 files (115M bytes) |
Messages: | 2,410,978 |