understanding computation
play

Understanding Computation 1 Mathematics & Computation - PowerPoint PPT Presentation

Understanding Computation 1 Mathematics & Computation Machines have helped with calculations for a long time Can we use machines to reason too? CS 374 2 Mathematics & Computation Machines have helped with calculations for a long


  1. Understanding Computation 1

  2. Mathematics & Computation Machines have helped with calculations for a long time Can we use machines to reason too? CS 374 2

  3. Mathematics & Computation Machines have helped with calculations for a long time Can we use machines to reason too? CS 374 2

  4. Mathematics & Computation Machines have helped with calculations for a long time Can we use machines to reason too? Calculemus! CS 374 2

  5. Mathematics & Computation Machines have helped with calculations for a long time Can we use machines to reason too? Calculemus! Formal Logic: Reasoning made into a calculation CS 374 2

  6. Mathematics & Computation CS 374 3

  7. Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians CS 374 3

  8. Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians Foundational problem: How to choose one’s axioms? CS 374 3

  9. Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians Foundational problem: How to choose one’s axioms? They should not give rise to contradictions! CS 374 3

  10. Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians Foundational problem: How to choose one’s axioms? They should not give rise to contradictions! Early 1900s: Crisis in mathematical foundations CS 374 3

  11. Mathematics & Computation Formal systems based on axioms and logic: for machines & modern mathematicians Foundational problem: How to choose one’s axioms? They should not give rise to contradictions! Early 1900s: Crisis in mathematical foundations Contradictions discovered while attempting to CS 374 formalize notions involving infinite sets 3

  12. David Hilbert • 1928, Hilbert’s Program: “Mechanize” mathematics CS 374 4

  13. David Hilbert • 1928, Hilbert’s Program: “Mechanize” mathematics • Finite set of axioms and inference 
 rules. An algorithm to determine the truth of any statement Need to find a consistent & complete 
 set of axioms CS 374 4

  14. David Hilbert • 1928, Hilbert’s Program: “Mechanize” mathematics • Finite set of axioms and inference 
 rules. An algorithm to determine the truth of any statement Need to find a consistent & complete 
 set of axioms • The system should also afford a proof of its own consistency CS 374 • Based on “safe” axioms — i.e., axioms involving only finite objects — preferably 4

  15. Mathematics & Computation Mechanized math Beyond just philosophical interest! Can resolve stubborn open problems Replace mathematicians with mathe-machines! CS 374 5

  16. Goldbach’s Conjecture Every even number > 2 is 
 the sum of two primes CS 374 Letter from Goldbach to Euler dated 7 June 1742 6

  17. Collatz Conjecture Program Collatz (n:integer) while n > 1 { if Even(n) then n ≔ n/2 else n ≔ 3n+1 } CS 374 7

  18. Collatz Conjecture Program Collatz (n:integer) while n > 1 { if Even(n) then n ≔ n/2 else n ≔ 3n+1 } CS 374 7

  19. Collatz Conjecture Program Collatz (n:integer) while n > 1 { if Even(n) then n ≔ n/2 else n ≔ 3n+1 } � Conjecture : Collatz(n) halts for every n > 0 CS 374 7

  20. Kurt Gödel • German logician, at age 25 (1931) proved: “No matter what (consistent) set of axioms are used, a rich system will have true statements that can’t be proved” CS 374 8

  21. “This statement can’t be proved” Kurt Gödel • German logician, at age 25 (1931) proved: “No matter what (consistent) set of axioms are used, a rich system will have true statements that can’t be proved” CS 374 8

  22. “This statement can’t be proved” Kurt Gödel “The axioms are consistent” • German logician, at age 25 (1931) proved: “No matter what (consistent) set of axioms are used, a rich system will have true statements that can’t be proved” CS 374 8

  23. “This statement can’t be proved” Kurt Gödel “The axioms are consistent” • German logician, at age 25 (1931) proved: “No matter what (consistent) set of axioms are used, a rich system will have true statements that can’t be proved” • Hilbert’s Program can’t work! CS 374 8

  24. “This statement can’t be proved” Kurt Gödel “The axioms are consistent” • German logician, at age 25 (1931) proved: “No matter what (consistent) set of axioms are used, a rich system will have true statements that can’t be proved” • Hilbert’s Program can’t work! • Shook the foundations of – mathematics – philosophy – science CS 374 – everything 8

  25. Alan Turing • British mathematician – cryptanalysis during WWII – arguably, father of AI, CS Theory – several books, movies CS 374 9

  26. Alan Turing • British mathematician – cryptanalysis during WWII – arguably, father of AI, CS Theory – several books, movies • Mathematically defined computation – and proved (1936) that The Halting Problem CS 374 has no general algorithm 9

  27. Halting Problem • Given program P , input w : w P CS 374 10

  28. Halting Problem • Given program P , input w : w P Will P(w) halt? CS 374 10

  29. Why would we care about 
 the Halting Problem? • Suppose halting problem had an algorithm... CS 374 11

  30. Why would we care about 
 the Halting Problem? • Suppose halting problem had an algorithm... Program P() n ≔ 4 forever : if found-two-primes-that-sum-to(n) then n ≔ n + 2 else halt CS 374 11

  31. Why would we care about 
 the Halting Problem? • Suppose halting problem had an algorithm... Program P() n ≔ 4 forever : if found-two-primes-that-sum-to(n) then n ≔ n + 2 else halt CS 374 Does P halt ? 11

  32. Why would we care about 
 the Halting Problem? • Suppose halting problem had an algorithm... Program P() n ≔ 4 forever : if found-two-primes-that-sum-to(n) then n ≔ n + 2 else halt CS 374 Does P halt ? ← Solves Goldbach conjecture! 11

  33. Why would we care about 
 the Halting Problem? Does Find-proof halt on w ? ≡ Is w a provable theorem? w Program Find-proof(w) � p ≔ empty-string forever p ≔ successor(p) if Verify-proof(w,p) CS 374 then halt 12

  34. Alas! CS 374 13

  35. Alas! There is no program that solves the Halting Problem! 
 No use trying to find one! CS 374 13

  36. Alas! There is no program that solves the Halting Problem! 
 No use trying to find one! How can there be problems that can’t be solved? CS 374 13

  37. Alas! There is no program that solves the Halting Problem! 
 No use trying to find one! How can there be problems that can’t be solved? What is a problem? What is a program? CS 374 13

  38. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts CS 374 14

  39. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts Too restrictive? CS 374 14

  40. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts Too restrictive? Enough to compute functions with longer outputs too: 
 P(x,i) outputs the i th bit of F(x) CS 374 14

  41. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts Too restrictive? Enough to compute functions with longer outputs too: 
 P(x,i) outputs the i th bit of F(x) CS 374 Enough to model interactive computation too: 
 P*(x,state) outputs (y,new_state) 14

  42. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts • A program is a finite bit string CS 374 15

  43. Computation Problem : 
 Program : 
 To compute a function F that A finitely described process maps each input (a string) to taking a string as input, and an output bit outputting a bit (or not halting) P solves F if for every x, P(x) outputs F(x) and halts 1 ε • A program is a finite bit string 2 0 3 1 • Programs can be enumerated — listed 4 00 5 sequentially — (say, lexicographically) so 01 6 10 that every program appears somewhere in 7 11 the list 8 000 CS 374 9 001 10 010 11 011 15 12 100

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