Universality of Computation

Slides:



Advertisements
Similar presentations
CS 345: Chapter 9 Algorithmic Universality and Its Robustness
Advertisements

Hoare’s Correctness Triplets Dijkstra’s Predicate Transformers
Class 39: Universality cs1120 Fall 2009 David Evans University of Virginia.
Copyright © Cengage Learning. All rights reserved.
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.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
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.
Slide 1 of No. Insert Unit Name Here Lecture L: Computability Unit L1: What is Computation?
Theory of Computing Lecture 20 MAS 714 Hartmut Klauck.
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora.
Algorithms: Selected Exercises Goals Introduce the concept & basic properties of an algorithm.
Introduction to the Theory of Computation
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
1 CO Games Development 2 Week 21 Turing Machines & Computability Gareth Bellaby.
Great Theoretical Ideas in Computer Science for Some.
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.
Turing Machines and the Halting Problem This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To.
Great Theoretical Ideas in Computer Science.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
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.
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
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.
Capabilities of computing systems Numeric and symbolic Computations A look at Computability theory Turing Machines.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
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.
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:
David Evans CS200: Computer Science University of Virginia Computer Science Class 26: Halting Problem It is plain at any.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
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.
The Acceptance Problem for TMs
Introduction to Computing Science and Programming I
Self-Reference And Undecidability
Discrete Mathematics for Computer Science
Busch Complexity Lectures: Reductions
CSE 311 Foundations of Computing I
CS154, Lecture 7: Turing Machines.
CS154, Lecture 11: Self Reference, Foundation of Mathematics
Great Theoretical Ideas in Computer Science
Homework: Friday Read Section 4.1. In particular, you must understand the proofs of Theorems 4.1, 4.2, 4.3, and 4.4, so you can do this homework. Exercises.
Andreas Klappenecker [based on slides by Prof. Welch]
CSCE 411 Design and Analysis of Algorithms
CS154, Lecture 10: Rice’s Theorem, Oracle Machines
Halting Problem.
CS154, Lecture 12: Time Complexity
Recall last lecture and Nondeterministic TMs
Great Theoretical Ideas in Computer Science
Class 24: Computability Halting Problems Hockey Team Logo
CS21 Decidability and Tractability
Instructor: Aaron Roth
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
Information Retrieval
Lecture 23: Computability CS200: Computer Science
Presentation transcript:

Universality of Computation What is computing?

Physical Computation

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 def is_prime(n): for i in range(2,n): if n%i == 0: return False return True

Turing Machines a 0, R, b 1, L, g b 1, L, b 0, L, a z 1, R, x 0, L, a Symbol read b 1 state a 0, R, b 1, L, g b 1, L, b 0, L, a e z z 1, R, x 0, L, a Symbol written | Head Movement | New State

Turing Machine for adding 1 Start (with head on least significant bit) a 1, _, b 0, L, a b Halt 0, _, b 1, _, b

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 def simulate(program, input): “”” Accepts a string that holds a python function definition and an input string, and simulates the function when it is given the input string as its parameter, returning the value that the function returns””” ...

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 Python program All “good enough” computers are equivalent

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

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? “Quantum CTH version”: .. By a quantum Turing Machine

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

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

AI Why can’t we program computers to do what humans easily do? Recognize faces social situations Understand human language (well) Processing power? Software? Scruffy vs. Neat debate Big data

The Turing Test

The Brain vs. Google Cloud There are 109 -- 1010 neurons in the brain Each neuron receives input from 103 -- 104 synapses Each neuron can fire about 100 -- 102 times/sec Total computing power of brain is 1012 -- 1016 ops/sec Google cloud has 107--109 cores Each core can compute 108--1010 ops/sec Total computing power of Google cloud is 1015 -- 1019 ops/sec

When Computers are Smarter than us? Can do “intelligent” things that we care about better than humans. Scientific/Medical Discoveries, Winning/Avoiding Wars, Running Companies/Commerce, Creating Movies/Books/Games, Educating, Designing Computers/Programs/Systems/Robots… Will never happen? Quite useful, but no big deal? Singularity? Augmented-men vs. Huddled masses? Robot Uprising?

The limits of computation and mathematics

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 def simulate(program, input): “”” Accepts a string that holds a python function definition and an input string, and simulates the function when it is given the input string as its parameter, returning the value that the function returns”””

The Halting problem def halt(program, input): “”” Accepts a string that holds a python function definition and an input string, and simulates the function when it is given the input string as its parameter, returning True if the program ever returns and returning False if the program never terminates and never returns(e.g. goes into an infinite loop)”””

Diagonalization def auto_halt(program): “”” returns true if the given program halts when given itself as an input””” return halt(program, program) def paradox(program): if autoHalt(program): while(True): pass else return True;

The halting problem can not be solved! Assume: There is a program for computing halt There are also programs for self_halt and paradox Question: Will paradox halt when given its own code as its parameter? Yes?  auto_halt should return True when given paradox’s code as input  paradox will go into an infinite loop  paradox will not halt  contradiction No?  auto_halt should return False when given paradox’s code as input  paradox will return immediately contradiction Contradiction to the assumption! Theorem: the halt method can not be written.

Diophantine Equations cannot be Solved def compile_to_equations(program, input): “”” Accepts a string that holds a python function definition and an input string, and returns a set of Diophantine equations that have a solution if and only if the program halts on the given input.””” Fact: It is possible to write compile_to_equations Proof idea: a number can encode the complete history of the computation. Theorem: There does not exist any program that can solve diophantine equations

Formal Proofs Theorem: dfiecnmOWD Proof: dklmejd inedejde 8hdl9jlS … DJWUIMDKOPP dfiecnmOWD QED Axiom Follows from previous lines

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 mathematical statements

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

Proof Checking def is_zfc_proof(theorem, proof): “”” Accepts a string that holds a supposed theorem and a string that holds a supposed zfc proof of the theorem, and returns True if this is indeed a valid zfc proof of the theorem.”””

Computation theory is part of mathematics def compile_to_halt_thm(program, input): “”” Accepts a string that holds a python function definition and an input string, and returns a string of a supposed theorem that states that the program halts on the given input.””” def compile_to_nohalt_thm(program, input): “”” Accepts a string that holds a python function definition and an input string, and returns a string of a supposed theorem that states that the program does not halt on the given input.”””

Godel’s incompleteness theorem def halt(prog, inp): thm_y = compile_to_halt_thm(prog, inp) thm_n = compile_to_nohalt_thm(prog, inp) for p in all_possible_strings: if is_zfc_proof(thm_y, p): return True if is_zfc_proof(thm_n, p): return False  if all true mathematical statements have ZFC proofs then halt can be solved! Theorem: ZFC is not complete (and neither is anything else)