barber paradox
play

Barber paradox. Created by logician Bertrand Russell. Barber - PowerPoint PPT Presentation

Barber paradox. Created by logician Bertrand Russell. Barber paradox. Created by logician Bertrand Russell. Village with just 1 barber, all men clean-shaven. Barber paradox. Created by logician Bertrand Russell. Village with just 1 barber,


  1. Halt does not exist. HALT ( P , I ) P - program I - input.

  2. Halt does not exist. HALT ( P , I ) P - program I - input. Determines if P ( I ) ( P run on I ) halts or loops forever.

  3. Halt does not exist. HALT ( P , I ) P - program I - input. Determines if P ( I ) ( P run on I ) halts or loops forever. Theorem: There is no program HALT.

  4. Halt does not exist. HALT ( P , I ) P - program I - input. Determines if P ( I ) ( P run on I ) halts or loops forever. Theorem: There is no program HALT. Proof Idea: Proof by contradiction, use self-reference.

  5. Halt and Turing. Proof:

  6. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) .

  7. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P)

  8. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop.

  9. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately.

  10. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT.

  11. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT.

  12. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing.

  13. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing!

  14. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt?

  15. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts

  16. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts

  17. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever.

  18. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever

  19. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever = ⇒ then HALT(Turing, Turing) � = halts

  20. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever = ⇒ then HALT(Turing, Turing) � = halts = ⇒ Turing(Turing) halts.

  21. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever = ⇒ then HALT(Turing, Turing) � = halts = ⇒ Turing(Turing) halts. Contradiction.

  22. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever = ⇒ then HALT(Turing, Turing) � = halts = ⇒ Turing(Turing) halts. Contradiction. Program HALT does not exist!

  23. Halt and Turing. Proof: Assume there is a program HALT ( · , · ) . Turing(P) 1. If HALT(P ,P) =“halts”, then go into an infinite loop. 2. Otherwise, halt immediately. Assumption: there is a program HALT. There is text that “is” the program HALT. There is text that is the program Turing. Can run Turing on Turing! Does Turing(Turing) halt? Turing(Turing) halts = ⇒ then HALT(Turing, Turing) = halts = ⇒ Turing(Turing) loops forever. Turing(Turing) loops forever = ⇒ then HALT(Turing, Turing) � = halts = ⇒ Turing(Turing) halts. Contradiction. Program HALT does not exist!

  24. Another view of proof: diagonalization. Any program is a fixed length string.

  25. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable.

  26. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string.

  27. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . .

  28. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal.

  29. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt.

  30. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal.

  31. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal. Turing is not on list.

  32. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal. Turing is not on list. Turing is not a program.

  33. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal. Turing is not on list. Turing is not a program. Turing can be constructed from Halt.

  34. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal. Turing is not on list. Turing is not a program. Turing can be constructed from Halt. Halt does not exist!

  35. Another view of proof: diagonalization. Any program is a fixed length string. Fixed length strings are enumerable. Program halts or not any input, which is a string. P 1 P 2 P 3 ··· P 1 H H L ··· P 2 L L H ··· P 3 L H H ··· . . . . ... . . . . . . . . Halt(P ,P) - diagonal. Turing - is not Halt. and is different from every P i on the diagonal. Turing is not on list. Turing is not a program. Turing can be constructed from Halt. Halt does not exist!

  36. Turing machine.

  37. Turing machine. A Turing machine. – an (infinite) tape with characters

  38. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character

  39. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character.

  40. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character. Universal Turing machine

  41. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character. Universal Turing machine – an interpreter program for a Turing machine

  42. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character. Universal Turing machine – an interpreter program for a Turing machine – where the tape could be a description of a ...

  43. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character. Universal Turing machine – an interpreter program for a Turing machine – where the tape could be a description of a ... Turing machine!

  44. Turing machine. A Turing machine. – an (infinite) tape with characters – be in a state, and read a character – move left, right, and/or write a character. Universal Turing machine – an interpreter program for a Turing machine – where the tape could be a description of a ... Turing machine! Now that’s a computer!

  45. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.)

  46. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....

  47. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is...

  48. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, ....

  49. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem.

  50. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete.

  51. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete. Inconsistent: A false sentence can be proven.

  52. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete. Inconsistent: A false sentence can be proven. Incomplete: There is no proof for some sentence in the system.

  53. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete. Inconsistent: A false sentence can be proven. Incomplete: There is no proof for some sentence in the system. Along the way: “built” computers out of arithmetic.

  54. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete. Inconsistent: A false sentence can be proven. Incomplete: There is no proof for some sentence in the system. Along the way: “built” computers out of arithmetic. Showed that every mathematical statement corresponds to an

  55. Church, G¨ odel and Turing. Church proved an equivalent theorem. (Previously.) Used λ calculus....which is... a programming language!!! Just like Python, C, Javascript, .... G¨ odel: Incompleteness theorem. Any formal system either is inconsistent or incomplete. Inconsistent: A false sentence can be proven. Incomplete: There is no proof for some sentence in the system. Along the way: “built” computers out of arithmetic. Showed that every mathematical statement corresponds to an ....natural number!!!!

  56. Summary: computability. Computer Programs are interesting objects.

  57. Summary: computability. Computer Programs are interesting objects. Mathematical objects.

  58. Summary: computability. Computer Programs are interesting objects. Mathematical objects. Formal Systems.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend