• Re: Did I encode Sipser correctly? (it seemed too easy) [wrong source c

    From olcott@21:1/5 to All on Sat Jul 9 15:54:01 2022
    XPost: comp.theory, sci.logic, sci.math

    On 7/9/2022 3:14 PM, André G. Isaak wrote:
    On 2022-07-09 14:11, Richard Damon wrote:

    H is REQUIRED (to be correct) to give the answer that D will give if D
    will give an answer,

    No, H is required to answer "true" if D will give an answer, regardless
    of what that answer might be.

    André

    and 0 if D will NEVER give an answer (as recognizers are allowed to be
    non-halting for inputs they do not accept).


    typedef void (*ptr)();

    // Sipser's diagonal argument
    int D(ptr x)
    {
    if (H(x,x) == 0) // reject
    return 1;
    else // accept
    return 0;
    }

    int main()
    {
    Output("Input_Halts = ", H(D, D));
    }

    Ah that proves my H is correct. D is stuck in infinitely recursive
    emulation unable to provide any answer.

    --
    Copyright 2022 Pete Olcott

    "Talent hits a target no one else can hit;
    Genius hits a target no one else can see."
    Arthur Schopenhauer

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)