• wicked@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    5 hours ago

    Most of the “undecidable” are only undecidable for a subset of the problem instances, while a vast number of instances can be even trivially decidable. For example in the undecidable halting problem, both you and a computer can trivially deduce that while(true) will not halt. In the same way a computer can deduce that many instances of two pieces of code are semantically equivalent.

    I’d like to see an instance of the problem where a human could decide it and the computer could not.

    • Farooq@realbitcoin.cash
      link
      fedilink
      arrow-up
      1
      ·
      4 hours ago

      Hey. The number of problems which can are decidable are infinite as are those which are not. But as soon as there is a backward jump in your code, a Turing machine most likely won’t be able to decide if it’ll halt or not. The while(true) is an exception. In the real world we have a great number of programs whose loops cannot be decided by a Turing machine. But the programmer who has written the code knows when the loop will terminate.

      If we see the machine code, if there is a conditional backward jump(unlike while(true) which is unconditional), in the general case it’s undecidable.