1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 20 Instructor: Paul Beame.

Slides:



Advertisements
Similar presentations
David Evans cs302: Theory of Computation University of Virginia Computer Science Lecture 17: ProvingUndecidability.
Advertisements

Lecture 3 Universal TM. Code of a DTM Consider a one-tape DTM M = (Q, Σ, Γ, δ, s). It can be encoded as follows: First, encode each state, each direction,
Lecture 19. Reduction: More Undecidable problems
CS 461 – Nov. 9 Chomsky hierarchy of language classes –Review –Let’s find a language outside the TM world! –Hints: languages and TM are countable, but.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
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 Introduction to Computability Theory Lecture15: Reductions Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture12: Reductions Prof. Amos Israeli.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 21 Instructor: Paul Beame.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 19 Instructor: Paul Beame.
Lecture 18 NFA’s with -transitions –NFA- ’s Formal definition Simplifies construction –LNFA- –Showing LNFA  is a subset of LNFA and therefore a subset.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 23 Instructor: Paul Beame.
1 Lecture 7 Topics –Problems about program behavior At least problem input is a program/algorithm –Halting Problem Fundamental problem about program behavior.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 22 Instructor: Paul Beame.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
CS21 Decidability and Tractability
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
February 4, 2015CS21 Lecture 131 CS21 Decidability and Tractability Lecture 13 February 4, 2015.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 25 Instructor: Paul Beame.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
Algebra 1 Ch 1.7 – Introduction to Functions. Objective  Students will identify functions and make an input/output table for a function.
Cs3102: Theory of Computation Class 18: Proving Undecidability Spring 2010 University of Virginia David Evans.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
CSE 311 Foundations of Computing I Lecture 30 Computability: Other Undecidable Problems Autumn 2012 CSE 3111.
February 18, 2015CS21 Lecture 181 CS21 Decidability and Tractability Lecture 18 February 18, 2015.
1 Computational Complexity Classify problems according to the amount of computational resources used by the best algorithms that solve them Recall: worst-case.
Cs3102: Theory of Computation Class 24: NP-Completeness Spring 2010 University of Virginia David Evans.
Great Theoretical Ideas in Computer Science for Some.
Functions. Built-in functions You’ve used several functions already >>> len("ATGGTCA")‏ 7 >>> abs(-6)‏ 6 >>> float("3.1415")‏ >>>
A relation is an operation, or series of operations, that maps one number onto another.
CRYPTOGRAPHY. WHAT IS PUBLIC-KEY ENCRYPTION? Encryption is the key to information security The main idea- by using only public information, a sender can.
Class 24: P=NP? David Evans cs302: Theory of Computation University of Virginia Computer Science PS6 (the last one) is.
Great Theoretical Ideas in Computer Science.
CS 3813: Introduction to Formal Languages and Automata Chapter 12 Limits of Algorithmic Computation These class notes are based on material from our textbook,
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
CSE 311 Foundations of Computing I Lecture 28 Computability: Other Undecidable Problems Autumn 2011 CSE 3111.
Lecture 21 Reducibility. Many-one reducibility For two sets A c Σ* and B c Γ*, A ≤ m B if there exists a Turing-computable function f: Σ* → Γ* such that.
C SC 573 Theory of Computation Theory of Computation Lecture 05 Reduction.
1 Chapter 9 Undecidability  Turing Machines Coded as Binary Strings  Universal Turing machine  Diagonalizing over Turing Machines  Problems as Languages.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
CompSci Today’s Topics Computer Science Noncomputability Upcoming Special Topic: Enabled by Computer -- Decoding the Human Genome Reading Great.
Great Theoretical Ideas in Computer Science.
Fall 2014 Lecture 29: Turing machines and more decidability CSE 311: Foundations of Computing.
CSE 143 Lecture 13 Inheritance slides created by Ethan Apter
CSE 311: Foundations of Computing Fall 2014 Lecture 28: Undecidability.
Busch Complexity Lectures: Reductions
CSE 311 Foundations of Computing I
Undecidable Problems Costas Busch - LSU.
Reductions Costas Busch - LSU.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
CSE 105 theory of computation
I/O in C Lecture 6 Winter Quarter Engineering H192 Winter 2005
CSCE 411 Design and Analysis of Algorithms
CSE 311 Foundations of Computing I
CSCE 489- Problem Solving Programming Strategies Spring 2018
Undecidable problems:
Computability and Complexity
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Proposed in Turing’s 1936 paper
CSE 311: Foundations of Computing
More Undecidable Problems
CSE 105 theory of computation
Intro to Theory of Computation
Presentation transcript:

1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 20 Instructor: Paul Beame

2 Another undecidable problem  1’s problem: Given the code of a program M does M output 1 on input 1? If so, answer 1 else answer 0.  Claim: the 1’s problem is undecidable  Proof: by reduction from the Halting Problem

3 What we want for the reduction  Halting problem takes as input a pair  1’s problem takes as input  Given can we create an so that M outputs 1 on input 1 exactly when P halts on input x?

4 Yes  Here is all that we need to do to create M  modify the code of P so that instead of reading x, x is hard-coded as the input to P and get rid of all output statements in P  add a new statement at the end of P that outputs 1.  We can write another program T that can do this transformation from to

5 How we might do the hard- coding if the code were in C?  Include an assignment at the start that would place the characters in string x in some array A.  Replace all scanf’s in P with calls to a new function scanA that simulates scanf but gets its data from array A.  Replace all printf’s in P by printB which doesn’t actually do anything.

6 Finishing things off  Therefore we get a reduction  Halting Problem  1’s problem  Since there is no program solving the Halting Problem there must be no program solving the 1’s problem.

7 Why the name reduction?  Weird: it maps an easier problem into a harder one  Same sense as saying Maxwell reduced the problem of analyzing electricity & magnetism to solving partial differential equations  solving partial differential equations in general is a much harder problem than solving E&M problems

8 A geek joke  An engineer  is led in a kitchen with an empty kettle on the table and told to boil water; she fills the kettle with water, puts it on the stove, turns on the gas and boils water.  she is next confronted with a kettle full of water sitting on the counter and told to boil water; she puts it on the stove, turns on the gas and boils water.  A mathematician  is led in a kitchen with an empty kettle on the table and told to boil water; he fills the kettle with water, puts it on the stove, turns on the gas and boils water.  he is next confronted with a kettle full of water sitting on the counter and told to boil water: he empties the kettle in the sink, places the empty kettle on the table and says, “I’ve reduced this to an already solved problem”.

9 A general phenomenon: Can’t tell a book by its cover  Suppose you have a problem A that asks given program code, to determine some property of the input-output behavior of P, answering 1 if P has the property and 0 if P doesn’t have the property.  Rice’s Theorem: If A’s answer isn’t always the same then there is no program deciding A

10 Even harder problems  Recall that with the halting problem, we could always get at least one of the two answers correct  if it halted we could always answer 1 (and this would cover precisely all 1’s we need to do) but we can’t be sure about answering 0  There are natural problems where you can’t even do that!  e.g. Given the codes of two programs, P and Q, answer 1 if they compute the same function and 0 if they compute different functions

11 Quick lessons  Don’t rely on the idea of improved compilers and programming languages to eliminate major programming errors  truly safe languages can’t possibly do general computation  Document your code!!!!  there is no way you can expect someone else to figure out what your program does with just your code....since....in general it is provably impossible to do this!