Guest User

Untitled

a guest
Jul 25th, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. These are sufficient criteria to induce the undecidability of the halting problem of the machine class by a member of the class itself:
  2. Exists x y in S such that x != y.
  3. Exists f : S → S such that x != f(x)
  4. Exists “loop forever”
  5. Exists “halt”
  6. Closed under function composition
  7. Closed under conditional branching
  8.  
  9.  
  10. Assume H is a machine in the class which takes as input a program p and input i and decides whether p halts on input i:
  11.  
  12. H(p,i) = 1 if program p halts on input i
  13. = 0 otherwise
  14.  
  15. Since the class has a loop-forever instruction, a halt instruction, is closed under conditional branching and function composition, and H is assumed to be a machine in the class, then this diagonalization machine is also a machine in the class:
  16. K(i) = if H(i,i) then loop forever, else halt
  17.  
  18. since it’s closed under function composition, we could define K1(i) = H(i,i)
  19. since it’s closed under conditional branching, we could define K2(i) = if H(i,i) then A else B
  20. since it has a loop-forever instruction and a halting instruction, then we can set A = loop-forever, B = halt: K3(i) = if H(i,i) then loop-forever else halt
  21.  
  22. Now let’s see our diagonalization in action:
  23. H(K,K) = 1 if program K halts on input K, else 0
  24. K(K) = if H(K,K) then loop forever, else halt
  25.  
  26. assume H(K,K) = 1, then K(K) loops forever, and so H(K,K) = 0, contradiction
  27. assume H(K,K) = 0, then K(K) halts, and so H(K,K) = 1, contradiction
  28.  
  29. Paradox.
  30. No class of machines that satisfies the constraints given above can solve its own halting problem.
Advertisement
Add Comment
Please, Sign In to add comment