1 / 53

Computable Problems

Computable Problems. Computability. What does it mean to be computable?. Computability. What does it mean to be computable? Can decide an answer using Finite number of steps Finite list of instructions. Alan Turing. Father of Computer Science. Proof By Contradiction.

eileen
Download Presentation

Computable Problems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computable Problems

  2. Computability • What does it mean to be computable?

  3. Computability • What does it mean to be computable? • Can decide an answer using • Finite number of steps • Finite list of instructions

  4. Alan Turing • Father of Computer Science

  5. Proof By Contradiction • Proof by contradiction: • Assume something is true • Show it leads to a contradiction • Conclude the opposite

  6. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11…

  7. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5, …pn

  8. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1

  9. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1

  10. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1 • Thus q must be prime… but it isn't!!!

  11. Proof By Contradiction • Assume there are a finite number of prime numbers • 2, 3, 5, 7, 11… • Call them p1, p2, p3, p4, p5 • Calculate q = (p1 * p2 * p3 * … * pn) + 1 • Dividing q by any prime gives remainder 1 • Thus q must be prime… but it isn't!!! • Conclude there are NOT a finite number of prime numbers

  12. Programs Running Programs • We can force a program to run another program as its input:

  13. Yes

  14. No

  15. Size Checker

  16. Name Size Checker

  17. Always Yes??

  18. Always Yes??

  19. Yes On Self

  20. Yes On Self

  21. Yes On Self YES: If it outputs Yes thenYes On Self is Yes

  22. Yes On Self NO: If it outputs No thenYes On Self is No

  23. Yes On Self Yes / No both valid… but has to stick with one

  24. Anti Yes On Self

  25. Anti Yes On Self

  26. Anti Yes On Self YES: If it outputs Yes thenit must have output No

  27. Anti Yes On Self YES: If it outputs Yes thenit must have output No NO: If it outputs No thenit must have output Yes

  28. Anti Yes On Self Anti Yes On Self Can'tAnswer YES or NO YES: If it outputs Yes thenit must have output No NO: If it outputs No thenit must have output Yes

  29. Chain: • If I can write Always Yes

  30. Chain: • If I can write Always Yes • Then I can write Yes On Self

  31. Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self

  32. Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self • But Anti Yes On SelfCan't Exist

  33. Chain: • If I can write Always Yes • Then I can write Yes On Self • Then I can writeAnti Yes On Self • But Anti Yes On SelfCan't Exist • I can NOT write AlwaysYes

  34. Crash Detection • What about detecting possible bugs?

  35. Crash Detection • What about detecting possible bugs?

  36. Crash Detection • What about detecting possible bugs?

  37. Crash Detection • What about detecting possible bugs?

  38. Crash Detection • What about detecting possible bugs?

  39. Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed

  40. Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed No: If it outputs No thenit must not have crashed

  41. Crash Detection • What about detecting possible bugs? • AntiCrashOnSelf runs on itself YES: If it outputs Yes thenit must have crashed No: If it outputs No thenit must not have crashed

  42. Crash Detection • What about detecting possible bugs?

  43. Crash Detection • What about detecting possible bugs? • Impossible to do perfectly • Must settle for pretty good most of the time

  44. Alan Turing • Father of Computer Science

  45. The Turing Machine • Hypothetical device • Reads and write symbols on a tape • Decides what to do based on list of rules

  46. Universal Turing Machine • Universal Turing Machine • Turing machine that can simulate other Turing machines

  47. Real Turing Machines http://www.youtube.com/watch?feature=player_embedded&v=E3keLeMwfHY

  48. Turing Machine Running • Web page simulator: http://morphett.info/turing/turing.html • Google doodle: http://www.google.com/doodles/alan-turings-100th-birthday

  49. Computers • Turing machine can computer anything a state of the art PC can

  50. Computers • Turing machine can computer anything a state of the art PC can • Anything a quantum computer can

More Related