• WraithGear@lemmy.world
    link
    fedilink
    English
    arrow-up
    63
    ·
    6 hours ago

    again that’s two loops and a successful exit.

    1. do opposite of 2.
    2. complete 3.
    3. ignore 1

    Start loop 2

    1. -ignored-
    2. do not complete 3.
    3. -not completed-

    all wishes fulfilled, genie.exe concludes

      • thebestaquaman@lemmy.world
        link
        fedilink
        arrow-up
        11
        ·
        4 hours ago

        You could argue that there is though, since the genie will grant three wishes. In that case, it operates like

        granted_wishes = 0
        while granted_wishes < 3:
            wish = receive_wish()
            granted = grant_wish(wish)  # True if wish is granted, false otherwise (invalid wish etc)
            if granted:
                granted_wishes = 0
        

        So we get

        1. Do opposite of next -> granted_wishes = 1
        2. Complete 3 -> granted_wishes = 2
        3. Enter time loop (recurse)

        -inner loop-

        1. Do opposite of next (ignored due to outer loop) -> granted_wishes = 0
        2. Ignore 3 -> granted_wishes = 1
        3. Ignore 1 -> enter time loop (recurse)

        -inner loop 2-

        1. Do opposite of next (ignored due to outer loop) -> granted_wishes = 0
        2. Ignore 3 -> granted_wishes = 1
        3. Ignore 1 -> enter time loop (recurse)

        … etc.

        We get an infinite time-loop recursion, because we never reach the third guess in the inner loops.

    • greyscaleA
      link
      fedilink
      English
      arrow-up
      7
      ·
      5 hours ago

      I think that it is more that they need to be conditionally applied simultaneously, but are contradictory conditions that cannot be met.