Unsolvability and Infeasibility. Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems.

Slides:



Advertisements
Similar presentations
Turing Machines January 2003 Part 2:. 2 TM Recap We have seen how an abstract TM can be built to implement any computable algorithm TM has components:
Advertisements

Lecture Ref. handout page
CS211 Problems: unsolvable, unfeasible and unsolved Topic 2: Halting problem.
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.
Computability & Complexity. Scenario I can’t write this program because I’m too dumb.
Copyright © Cengage Learning. All rights reserved.
1 The Limits of Computation Intractable and Non-computable functions.
1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
1 Theory: Models of Computation  Readings:  Chapter 11 & Chapter 3.6 of [SG]  Content:  What is a Model  Model of Computation  Model of a Computing.
CSE115/ENGR160 Discrete Mathematics 02/28/12
1 Section 14.1 Computability Some problems cannot be solved by any machine/algorithm. To prove such statements we need to effectively describe all possible.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Undecidability. Church-Turing Thesis n A Turing machine that halts on all inputs is the precise formal notion corresponding to the intuitive notion of.
Fall 2004COMP 3351 Recursively Enumerable and Recursive Languages.
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]
Recursively Enumerable and Recursive Languages
CSE115/ENGR160 Discrete Mathematics 03/03/11 Ming-Hsuan Yang UC Merced 1.
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CHAPTER 4 Decidability Contents Decidable Languages
Analysis of Algorithms CS 477/677
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS10 The Beauty and Joy of Computing Lecture #23 : Limits of Computing Thanks to the success of the Kinect, researchers all over the world believe.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
What computers just cannot do. COS 116: 2/28/2008 Sanjeev Arora.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
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.
Algorithms. Problems, Algorithms, Programs Problem - a well defined task. –Sort a list of numbers. –Find a particular item in a list. –Find a winning.
Chapter 18 Limitations of Computing. Chapter Goals – THE BIG SLICES Limitations of Hardware Limitations of Software Limitations of Problems 2.
1 Ethics of Computing MONT 113G, Spring 2012 Session 13 Limits of Computer Science.
Analysis of Algorithms
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Halting Problem Introduction to Computing Science and Programming I.
A Universal Turing Machine
1 Theory: Models of Computation  Readings:  Chapter 11 & Chapter 3.6 of [SG]  Content:  What is a Model  Model of Computation  Model of a Computing.
©Brooks/Cole, 2003 Chapter 17 Theory of Computation.
Halting Problem and TSP Wednesday, Week 8. Background - Halting Problem Common error: Program goes into an infinite loop. Wouldn’t it be nice to have.
Beauty and Joy of Computing Limits of Computing Ivona Bezáková CS10: UC Berkeley, April 14, 2014 (Slides inspired by Dan Garcia’s slides.)
Computer Science 101 Theory of Computing. Computer Science is... The study of algorithms, with respect to –their formal properties –their linguistic realizations.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
CS10: The Beauty and Joy of Computing Lecture #22 Limits of Computing Warning sign posted at Stern Hall. Also, Apple releases new operating.
Module #7: Algorithmic Complexity Rosen 5 th ed., §2.3.
Complexity & Computability. Limitations of computer science  Major reasons useful calculations cannot be done:  execution time of program is too long.
The Beauty and Joy of Computing Lecture #23 Limits of Computing Researchers at Facebook and the University of Milan found that the avg # of “friends” separating.
Fundamentals of Informatics Lecture 13 Reduction Bas Luttik.
CompSci On the Limits of Computing  Reasons for Failure 1. Runs too long o Real time requirements o Predicting yesterday's weather 2. Non-computable.
Copyright © 2012 Pearson Education, Inc. Chapter 12: Theory of Computation Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Feasibility and Infeasibility Are all problems easy to solve?
Fundamentals of Informatics Lecture 12 The Halting Problem Bas Luttik.
Recursively Enumerable and Recursive Languages
Chapter 12 Theory of Computation Introduction to CS 1 st Semester, 2014 Sanghyun Park.
Theory of Computation Foundations of Computer Science  Cengage Learning.
1 Computability Tractable, Intractable and Non-computable functions.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
Decidability.
CSE15 Discrete Mathematics 03/06/17
Introduction to Computing Science and Programming I
Undecidable Problems Costas Busch - LSU.
Computable Problems.
Chapter 9 TURING MACHINES.
A Balanced Introduction to Computer Science David Reed, Creighton University ©2005 Pearson Prentice Hall ISBN X Chapter 13 (Reed) - Conditional.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Decidable Languages Costas Busch - LSU.
Discrete Mathematics CS 2610
Halting Problem.
A Balanced Introduction to Computer Science David Reed, Creighton University ©2005 Pearson Prentice Hall ISBN X Chapter 13 (Reed) - Conditional.
Presentation transcript:

Unsolvability and Infeasibility

Computability (Solvable) A problem is computable if it is possible to write a computer program to solve it. Can all problems be computed? This question concerned mathematicians even before digital computers were developed. They looked for an algorithm (a finite set of instructions to carry out a task).

Turing Alan Turing developed the concept of a computing machine in the 1930s A Turing machine, as his model became known, consists of a control unit with a read/write head that can read and write symbols on an infinite tape.

Church-Turing Thesis Any function that can be computed can be computed by a simple Turing Machine. The Turing Machine is as powerful as any algorithm. Cannot prove thesis

Is there an unsolvable problem? YES A proof that there is a problem for which there is no algorithm is not I can’t come up with an algorithm. Therefore there is no algorithm that solves the problem. I can’t develop a program. Therefore there is no algorithm that solves the problem. We need some background:

Paradox There is a small town with only one barber. The barber shaves only those people who do not shave themselves. All people are shaved. Who shaves the barber? If… Assuming that such a barber exists, leads to a contradiction. Thus he can’t exist.

Loop A loop is a set of instructions that is executed repeatedly. x=0 10 times: add 1 to x What will be the value of x when the loop ends?

Loop x=5 while x > 0 subtract 1 from x What will be the value of x when the loop ends? How many times will the loop be executed?

Loop x=-5 while x ≠ 0 add 1 to x What will be the value of x when the loop ends? How many times will the loop be executed?

Loop x=0 while x ≠ 0 add 1 to x What will be the value of x when the loop ends? How many times will the loop be executed?

Loop x=5 while x ≠ 0 add 1 to x What will be the value of x when the loop ends? How many times will the loop be executed?

Infinite loop Executes “forever”

Halt? Given the initial value of x, we can predict whether this loop will end or halt. Given a clock, can you predict whether it will halt? How long will you have to watch it? Given an arbitrary program, can we predict whether it will end.? Can we write a program to do this?

The Halting problem Given a program and an input to the program, determine if the program will eventually stop with this input Running the program is not a solution. Suppose we tried to run the program corresponding to the infinite loop to see if it ends. We would get tired of waiting for the answer, and stop the program. Thus we would still not have a prediction.

The Halting problem Theorem: The Halting Problem is not Computable. The Halting Problem is important because it proves the existence of an uncomputable/unsolvable problem.

Proof of Theorem See the diagram Recall that both programs and data are stored in binary. There is no difference in the representation. Assume there is an algorithm A that solves the Halting Problem. Write a new program N as follows:

N Given a binary representation of program P Use algorithm A to determine if P halts on input P If A says HALTS, N goes into an infinite loop. If A says LOOPS, then N says HALTS.

N Imagine giving N to itself as data. If A says that N HALTS, then N LOOPS. If A says that N LOOPS, then N HALTS. We have a paradox. A cannot exist. Our only assumption was that there is an algorithm A that solves the halting problem. It was wrong. The Halting Problem is not computable. It is unsolvable/uncomputable.

Complexity linear time –proportional to the size of the data Recall Finding the maximum value in a list of n elements by looking at each element in turn is linear. Sequential search is linear

Complexity logarithmic time --algorithms that successively cut the amount of data to be processed in half at each step are logarithmic Finding max by comparing pairs Finding a value in a list of n sorted elements using the binary search algorithm

Complexity exponential time Processing all subsets of a set Trying all moves in chess factorial time Processing all permutations Traveling Salesperson Problem

Feasible A problem is feasible if it can be solved in a reasonable amount of time. Must consider all algorithms. If at least one is able to do it, the problem is feasible. A function can be computable, but yet infeasible.

Growth nn2n2 2n2n n!

Sort a set of n elements (I) The selection sort algorithm find the largest of the n elements. find the largest of the remaining n-1 elements. find the largest of the remaining n-2 elements. … the smallest element is remaining. Time: n+ n = n(n+ 1)/2 units quadratic

Sort a set of n elements (II) Exhaustive listing and search List all permutations (orderings) of the data Pick the one that is sorted. Time: n(n-1)(n-2)... (3)(2)(1) = n! units factorial. Not very efficient!

Feasible Sorting is feasible because there exists a reasonable algorithm. quadratic Linear Search Binary Search. logarithmic Finding maximum. both linear and logarithmic.

Infeasible Playing chess by considering every possible move is not. exponential Considering every possible seating arrangement for a large group is not. factorial Checking all possible subsets of a set is not. exponential

Feasibility Logarithmic and linear algorithms are feasible Exponential and factorial algorithms are infeasible. An approximate solution may be adequate for an infeasible problem.