Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.

Slides:



Advertisements
Similar presentations
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.
Advertisements

1 COMP 382: Reasoning about algorithms Unit 9: Undecidability [Slides adapted from Amos Israeli’s]
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Reducibility Sipser 5.1 (pages ).
The Halting Problem Sipser 4.2 (pages ). CS 311 Mount Holyoke College 2 Taking stock All languages Turing-recognizable Turing-decidable Context-free.
The Halting Problem Sipser 4.2 (pages ).
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata are like Turing Machines with a restriction: The working space of the tape is the space of the.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Decidability. Why study un-solvability? When a problem is algorithmically unsolvable, we realize that the problem must be simplified or altered before.
Decidable and undecidable problems deciding regular languages and CFL’s Undecidable problems.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2004COMP 3351 Reducibility. Fall 2004COMP 3352 Problem is reduced to problem If we can solve problem then we can solve problem.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
CS 310 – Fall 2006 Pacific University CS310 The Halting Problem Section 4.2 November 15, 2006.
1 CSE 417: Algorithms and Computational Complexity Winter 2001 Lecture 18 Instructor: Paul Beame.
January 28, 2015CS21 Lecture 101 CS21 Decidability and Tractability Lecture 10 January 28, 2015.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
1 Reducibility. 2 Problem is reduced to problem If we can solve problem then we can solve problem.
The Halting Problem – Undecidable Languages Lecture 31 Section 4.2 Wed, Oct 31, 2007.
1 Undecidability Reading: Chapter 8 & 9. 2 Decidability vs. Undecidability There are two types of TMs (based on halting): (Recursive) TMs that always.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
A Universal Turing Machine
Midterm 2 review Jundong Liu School of EECS
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
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.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
CSE 311: Foundations of Computing Fall 2014 Lecture 27: Cardinality.
Recursively Enumerable and Recursive Languages
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
1 Undecidability Andreas Klappenecker [based on slides by Prof. Welch]
Section 2.5. Cardinality Definition: A set that is either finite or has the same cardinality as the set of positive integers (Z + ) is called countable.
Turing Machines Sections 17.6 – The Universal Turing Machine Problem: All our machines so far are hardwired. ENIAC
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Undecidable.
Recursively Enumerable and Recursive Languages. Definition: A language is recursively enumerable if some Turing machine accepts it.
1 A Universal Turing Machine. 2 Turing Machines are “hardwired” they execute only one program A limitation of Turing Machines: Real Computers are re-programmable.
Fall 2013 Lecture 27: Turing machines and decidability CSE 311: Foundations of Computing.
CSCI 2670 Introduction to Theory of Computing
The Acceptance Problem for TMs
A Universal Turing Machine
CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets
Recursively Enumerable Languages
This statement is false.
CSCI 2670 Introduction to Theory of Computing
Undecidable Problems Costas Busch - LSU.
Lecture12 The Halting Problem
CSCI 2670 Introduction to Theory of Computing
Reductions Costas Busch - LSU.
Theory of Computability
BCS 2143 Theory of Computer Science
Turing Machines Acceptors; Enumerators
Decidability and Enumerability
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Andreas Klappenecker [based on slides by Prof. Welch]
Decidable Languages Costas Busch - LSU.
Decidability and Undecidability
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
CS21 Decidability and Tractability
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
Theory of Computability
CS21 Decidability and Tractability
CSCI 2670 Introduction to Theory of Computing
Cpt S 317: Spring 2009 Reading: Chapter 8 & 9
Instructor: Aaron Roth
Intro to Theory of Computation
Presentation transcript:

Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural numbers. Postings.

Enumerator definition? Need to describe parts… Transition function Output

Universal Turing Machine … is a Turing Machine U in which the input comes in two parts: Description/encoding of a Turing Machine M and Input string w U ( ) is the same as M( ) – Accepts if M accepts w – Rejects if M rejects w – Loops (fails to halt) if M fails to halt

Claim We can build such a U. Use 3 tapes. 1.For initial information (definition of M and w) 2.Hold status info for which state of M and position in w 3.Working tape. First step is to set up tape 2 with initial state and starting position and tape 3 with w. Operation: states of U use status to simulate M operating on tape 3.

Stored program The notion of a universal [Turing] machine MAY have helped in development of stored programs. Note: calculators do not have stored programs. The notion of a program being treated as data, such as done when compiling or interpreting code, was critical in the development of computers. Topic: research idea.

Last class A tm = { |M is a TM and w is a string and M accepts w} is – Turing recognizable because U recognizes it. – May not halt because U [only] simulates M and M may not halt. But maybe another technique could be better than M... This is the halting problem

Digression: infinite sets How do we compare infinite sets? Certainly, – the counting numbers (1, 2, 3, …) are contained in – the integers( 0, 1, 2, …, -1, -2, …) are contained in – the rationals (all numbers of the form p/q, where p and q are integers) are contained in – the reals (numbers with decimals, possibly infinite)

New concept: cardinality [Note: Sipser uses size.] Georg Cantor (1873) noticed that two finite sets are the same size if the elements in each can be paired. Definition: Two sets A & B have the same cardinality (size?) if there exists a function f: A → B, that is 1 to 1 and onto 1 to 1 means: if f(a) = f(b) then a=b. onto means: if b is in B, then there is an a such that f(a) = b

Example The natural numbers N are the same cardinality as the even natural numbers! – Let f(n) = 2* n. This is 1 to 1 and onto!

Countable A set is countable if it is finite OR if it has the same cardinality as the natural numbers. My words: a set of countable if you can put all the elements in a list (describe the list in the case of an infinite set).

Rationals are countable! Construct a table. Redundant numbers will be removed. Red line represents the list…. 1/1 ½ 1/3 ¼ 1/5 … 2/1 2/2 2/3 2/4 2/5 …. 3/1 3/2 3/3 ¾ 3/5 …

Are the reals countable? Proof by contradiction. Suppose there is a list: … …… … …. Let x by a number such with whole number 1 and number at i th position from decimal point is NOT equal to the i th positionof the i th element on the list.Avoid 0 or 9. Then x is NOT on the list!

Diagonalization General technique, possible only if there is a list….

Halting Problem A tm = { |M is a TM and w is a string and M accepts w} is undecidable. Proof: assume that H is a decider for A tm. Define a new Turing Machine D as follows: D( ) : run H on (M, ). Output reject if H accepts and accept if H rejects. (Like the diagonalization). Claim: if H exists, then we can build D that calls it as a subroutine.

Proof, continued Then, what is D( )? Run H(D, ). By definition, this is D running on. If H returns accept (D running on accepts) then H rejects. If it rejects, then accept. Contradiction! Contradiction arises because H could not be built to be used by D.

Practical implications Before there were computers, mainly stored program computers, there is a result that there can't be full-proof debuggers/checkers.

Homework Produce proof that the integers are countable. Posting on practical implications of Halting problem. Posting on history / origin of stored program concepts.