Slide 1 of No. Insert Unit Name Here Lecture L: Computability Unit L1: What is Computation?

Slides:



Advertisements
Similar presentations
Lecture Ref. handout page
Advertisements

CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Lecture 19. Reduction: More Undecidable problems
Limitations. Limitations of Computation Hardware precision Hardware precision Software - we’re human Software - we’re human Problems Problems –complex.
Nathan Brunelle Department of Computer Science University of Virginia Theory of Computation CS3102 – Spring 2014 A tale.
Computability and Complexity 5-1 Classifying Problems Computability and Complexity Andrei Bulatov.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Humans, Computers, and Computational Complexity J. Winters Brock Nathan Kaplan Jason Thompson.
1 Foundations of Software Design Fall 2002 Marti Hearst Lecture 29: Computability, Turing Machines, Can Computers Think?
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora.
Halting Problem. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have a tool that would warn us.
Introduction to Computer Science. A Quick Puzzle Well-Formed Formula  any formula that is structurally correct  may be meaningless Axiom  A statement.
Algorithms: Selected Exercises Goals Introduce the concept & basic properties of an algorithm.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Class 37: Computability in Theory and Practice cs1120 Fall 2011 David Evans 21 November 2011 cs1120 Fall 2011 David Evans 21 November 2011.
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Great Theoretical Ideas in Computer Science for Some.
Lecture 18. Unsolvability Before the 1930’s, mathematics was not like today. Then people believed that “everything true must be provable”. (More formally,
Course Overview and Road Map Computability and Logic.
Halting Problem Introduction to Computing Science and Programming I.
CSE 311 Foundations of Computing I Lecture 26 Computability: Turing machines, Undecidability of the Halting Problem Spring
CSE 311 Foundations of Computing I Lecture 29 Computability: Turing machines, Undecidability of the Halting Problem Autumn 2012 CSE 3111.
Umans Complexity Theory Lectures Lecture 1a: Problems and Languages.
Great Theoretical Ideas in Computer Science.
1 Computability CS 101E Spring 2007 Michele Co. 2 So Far In Class We’ve seen the following programming constructs –if, if-else, if-else-if –switch –for.
Great Theoretical Ideas in Computer Science.
SNU OOPSLA Lab. 1 Great Ideas of CS with Java Part 1 WWW & Computer programming in the language Java Ch 1: The World Wide Web Ch 2: Watch out: Here comes.
CSE 311 Foundations of Computing I Lecture 26 Cardinality, Countability & Computability Autumn 2011 CSE 3111.
Computation Motivating questions: What does “computation” mean? What are the similarities and differences between computation in computers and in natural.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
Chapter 4 Computation Chapter 4: Computation.
CSE 311: Foundations of Computing Fall 2013 Lecture 26: Pattern matching, cardinality.
Bringing Together Paradox, Counting, and Computation To Make Randomness! CS Lecture 21 
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
Thales’ Legacy: What Is A Proof? Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 27April 22, 2004Carnegie Mellon.
Overview of the theory of computation Episode 3 0 Turing machines The traditional concepts of computability, decidability and recursive enumerability.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Recall last lecture and Nondeterministic TMs Ola Svensson.
Introduction to Computer Science / Procedural – Exam Information Units
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
The Church-Turing Thesis Chapter Are We Done? FSM  PDA  Turing machine Is this the end of the line? There are still problems we cannot solve:
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis (Winter 2016, these slides were also used for Day 33)
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
MA/CSSE 474 Theory of Computation Universal Turing Machine Church-Turing Thesis Delayed due dates for HWs See updated schedule page. No class meeting.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
Introduction to Computer Science / Procedural – 67130
Discrete Mathematics for Computer Science
Universality of Computation
CSE 311 Foundations of Computing I
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Great Theoretical Ideas in Computer Science
Andreas Klappenecker [based on slides by Prof. Welch]
CSCE 411 Design and Analysis of Algorithms
Halting Problem.
The Limitations of Proofs: An Incompressible Resolution
Recall last lecture and Nondeterministic TMs
Class 24: Computability Halting Problems Hockey Team Logo
CS154, Lecture 11: Self Reference, Foundation of Mathematics
CSE 311: Foundations of Computing
Algorithms CSCI 235, Spring 2019 Lecture 37 The Halting Problem
CO Games Development 2 Week 21 Turing Machines & Computability
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

Slide 1 of No. Insert Unit Name Here Lecture L: Computability Unit L1: What is Computation?

Slide 2 of No. Insert Unit Name Here Physical Computation

Slide 3 of No. Insert Unit Name Here Mathematically defined computation f(x,0) = 1 f(x,y) = g(y,f(x,y-1)) g(z,0) = 0 g(z,w) = h(w,g(z,w-1)) h(r,0) = r h(r,s) = h(r,s-1)+1 public class PrintPrimes { public static void main(String[] args){ for(j = 2; j < 1000; j++) if (isPrime(j)) System.out.println(j); } private static boolean isPrime(int n) { for(int j=2; j < n; j++) if (n%j == 0) return false; return true; }

Slide 4 of No. Insert Unit Name Here Turing Machines a a b b z z 0, R, b 1, L, b 0, L, a 1, L, g 0, L, a 1, R, x a a b b z z e e

Slide 5 of No. Insert Unit Name Here Turing Machine for adding 1 a a b b , _, b 0, L, a 1, _, b 0, _, b start halt

Slide 6 of No. Insert Unit Name Here Universal Computers Theoretical version: there exists a single Universal Turing Machine that can simulate all other Turing machines  The input will be a coding of another machine + an input to the other machine Hardware version: stored program computer Software version: interpreter /** * Runs the first method in the Java class that is given in * “program” on the parameter given in “input”. Returns * the value returned by the method. The method must be * static, accept a single String parameter, and return a * String value. */ static String simulate(String program, String input){ … }

Slide 7 of No. Insert Unit Name Here The Church-Turing Hypothesis Everything computable is computable by a Turing machine  Physical interpretation  Conceptual interpretation  Definition of Computation  Everything computable is computable by a Java program  All “good enough” computers are equivalent

Slide 8 of No. Insert Unit Name Here CTH: The Modern Version Everything efficiently computable is computable efficiently by a randomized Turing machine  “Efficiently”: in “polynomial time”. Running time is for some constant c.  “Randomized”: allow to “flip coins” – use randomization  All “good enough” computers are equivalent -- even if you worry about efficiency

Slide 9 of No. Insert Unit Name Here CTH and Chaos The physical world is analog When we simulate it on a digital device we use a given precision  Input and output are given in finite precision  How many bits of precision do we need?  How much can error in the input affect the output?  Normally: a little  Chaotic systems: a lot When we simulate a digital device on an analog device we can encode many bits in one analog signal  Limits to precision of analog systems: atoms, quantum effects  Hard to think of a physical signal of even 64 bits of precision

Slide 10 of No. Insert Unit Name Here CTH and Quantum Physics Only known challenge to the “modern” version of CTH We do not know how to simulate quantum mechanical systems efficiently The quantum “probability amplitudes” are different from normal probabilities Maybe “quantum computers” can efficiently do more than normal randomized computers  Efficient “quantum algorithm” for factoring is known Can quantum computers be built?  Existing physics? New physical laws? Technology? Can quantum computers be simulated efficiently on a randomized Turing machines?

Slide 11 of No. Insert Unit Name Here CTH and the Brain Is the brain just a computer? Metaphysics: The mind-body problem  Monism: everything is matter -- including humans  Dualism: there is more (“soul”, “mind”, “consciousness” …) Technical differences  Parallel, complicated, analog, …  Still equivalent to a Turing Machine

Slide 12 of No. Insert Unit Name Here The Brain vs. a Pentium There are 10^ ^10 neurons in the brain Each neuron receives input from 10^ ^4 synapses Each neuron can fire about ^2 times/sec Total computing power is 10^ ^16 ops/sec Pentium III computing power = 10^8 ops/sec

Slide 13 of No. Insert Unit Name Here AI Why can’t we program computers to do what humans easily do?  Recognize faces  Understand human language Processing power? Software?  Scruffy vs. Neat debate

Slide 14 of No. Insert Unit Name Here The Turing Test

Slide 15 of No. Insert Unit Name Here Lecture L: Computability Unit L2: The limits of computation and mathematics

Slide 16 of No. Insert Unit Name Here The Halting problem program must be a Java class. The method that is run is the first one in the class and must be of the form static boolean XXXX(String input) /** * Return True if the program finishes * running when given the input as its * parameter. Return false if it gets into * an infinite loop. */ static boolean halt(String program, String input){ // fill in – can you do it? }

Slide 17 of No. Insert Unit Name Here Diagonalization static boolean autoHalt(String program){ return halt(program, program); } static boolean paradox(String program){ if autoHalt(program) while(true) ; // do nothing else return true; }

Slide 18 of No. Insert Unit Name Here The Halting problem cannot be solved Will paradox halt when running on its own code?  Yes ==> autoHalt(paradoxString) returns true ==> No  No ==> autoHalt(paradoxString) returns false ==> Yes Contradiction. Hence the assumption that halt(program, input) exists is wrong. Theorem: the halt method can not be written. String paradoxString = “class Test {\n” + “ static boolean paradox(String program){\n” + … “ static boolean halt(String program, String input){\n” + … Boolean answer = Test.paradox(paradoxString);

Slide 19 of No. Insert Unit Name Here Diophantine Equations Fact: It is possible to write compileToEquations above Theorem: There does not exist any program that can solve diophantine equations Proof: If there was, we could write the halt method. /** * Produce a set of diophantine equations that have a * solution if the given program halts on the given input. */ static String compileToEquations(String prog, String inp) { … }

Slide 20 of No. Insert Unit Name Here Formal Proofs Theorem:  Proof:         QED Axiom Follows from previous lines

Slide 21 of No. Insert Unit Name Here Axiomatic System A syntactic way to show semantic mathematical truths Axioms + Deduction rules (logic) Must be effective  trivial to determine if a proof is correct Must be sound  Anything you prove must be true Can it be complete?  Prove all true statements

Slide 22 of No. Insert Unit Name Here Zermelo-Fraenkel Set Theory The basis of all mathematics (one possibility) Effective Sound, we think Anything you prove in Math courses really uses ZFC The details are not important, yet we will prove: Theorem: ZFC is not complete

Slide 23 of No. Insert Unit Name Here Proof Checking /** * Checks whether the proof is a valid proof of the * theorem using ZFC axioms. */ Static boolean isProof(String theorem, String proof){ … // check line by line }

Slide 24 of No. Insert Unit Name Here Computation theory is part of mathematics /** * Returns a formal mathematical statement that says * that the program halts on the given input */ static String formalHalt(String program, String input){ … } /** * Returns a formal mathematical statement that says * that the program does not halt on the given input */ static String formalNoHalt(String program, String input){ … }

Slide 25 of No. Insert Unit Name Here Godel’s incompleteness theorem static boolean halt(String program, String input){ String thmYes = formalHalt(program, input); String thmNO = formalNoHalt(program, input); StringEnumerator e = new AllStringsEnumeration(); while(true) { String proof = e.getNext(); if isProof(thmYes, proof) return true; if isProof(thmNo, proof) return false; } Theorem: ZFC is not complete