CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets

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]
Reducibility Sipser 5.1 (pages ). CS 311 Fall Reducibility.
Introduction to Computability Theory
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 ).
Prof. Busch - LSU1 Decidable Languages. Prof. Busch - LSU2 Recall that: A language is Turing-Acceptable if there is a Turing machine that accepts Also.
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
CPSC 411, Fall 2008: Set 12 1 CPSC 411 Design and Analysis of Algorithms Set 12: Undecidability Prof. Jennifer Welch Fall 2008.
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]
1 Uncountable Sets continued Theorem: Let be an infinite countable set. The powerset of is uncountable.
CHAPTER 4 Decidability Contents Decidable Languages
Fall 2005Costas Busch - RPI1 Recursively Enumerable and Recursive Languages.
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.
Lecture 27UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 27.
Fall 2006Costas Busch - RPI1 Undecidable Problems (unsolvable problems)
Prof. Busch - LSU1 Undecidable Problems (unsolvable problems)
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Announcements Homework – HW8 due Tues 5/29 11am – HW5 grades are out Monday is Memorial Day; no office hours, etc. – Go see a parade, or some fireworks,
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
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
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)
Computability Universal Turing Machine. Countability. Halting Problem. Homework: Show that the integers have the same cardinality (size) as the natural.
CS 461 – Nov. 7 Decidability concepts –Countable = can number the elements  –Uncountable = numbering scheme impossible  –A TM undecidable –Language classes.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
CS 461 – Oct. 28 TM applications –Recognize a language √ –Arithmetic √ –Enumerate a set –Encode a data structure or problem to solve Two kinds of TMs –Decider:
Costas Busch - RPI1 Decidability. Costas Busch - RPI2 Another famous undecidable problem: The halting problem.
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.
Decidability.
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.
The Acceptance Problem for TMs
A Universal Turing Machine
Introduction to Computing Science and Programming I
Recursively Enumerable and Recursive 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
Theory of Computability
BCS 2143 Theory of Computer Science
Computing with Turing Machines
Reducibility The Chinese University of Hong Kong Fall 2010
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.
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Undecidable Problems (unsolvable problems)
CS154, Lecture 8: Undecidability, Mapping Reductions
CSCE 411 Design and Analysis of Algorithms
CS154, Lecture 8: Undecidability, Mapping Reductions
Decidable Languages Costas Busch - LSU.
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Formal Languages, Automata and Models of Computation
Intro to Theory of Computation
Theory of Computability
CS21 Decidability and Tractability
Theory of Computability
Subject Name: FORMAL LANGUAGES AND AUTOMATA THEORY
More undecidable languages
CSCI 2670 Introduction to Theory of Computing
Instructor: Aaron Roth
Turing Machines Everything is an Integer
Intro to Theory of Computation
Presentation transcript:

CS 461 – Nov. 2 Sets Prepare for ATM finite vs. infinite Infinite sets Countable Uncountable Prepare for ATM Proving undecidable is similar to proving a set uncountable. Please be sure you understand reasoning.

Finite/infinite Finite set – means that its elements can be numbered. Formally: its elements can be put into a 1-1 correspondence with the sequence 1, 2, 3, … n, where n is some positive integer. An infinite set is one that’s not finite.  However, there are 2 kinds of infinity!

Countable Countable set: An infinite set whose elements can be put into a 1-1 correspondence with the positive integers. Examples we can show are countable: Even numbers, all integers, rational numbers, ordered pairs. Uncountable set = ∞ set that’s not countable.  Examples we can show are uncountable: Real numbers, functions of integers, infinite-length strings

Examples The set of even numbers is countable. The set of integers is countable. 2 4 6 8 10 12 … 1 3 5 1 -1 2 -2 3 -3 4 -4 … 5 6 7 8 9

Ordered pairs j = 1 j = 2 j = 3 j = 4 i = 1 1 2 4 7 … i = 2 3 5 8 6 9 i = 4 10 The number assigned to (i , j) is (i + j – 1)*(i + j – 2)/2 + i

Real numbers Real # Value 1 2.71828… 2 3.14159… 3 0.55555… 4 -1.23456… Suppose real numbers were countable. The numbering might go something like this: The problem is that we can create a value that has no place in the correspondence! Real # Value 1 2.71828… 2 3.14159… 3 0.55555… 4 -1.23456… 5 5.676767... … X ? . 85667…

Infinite bit strings # Value 1 00000… 2 100000… 3 011010… 4 0010001… 5 11111001011… … ? 11010…

Universal TM Let’s design “U” – the Universal TM: Input consists of <M> and w: <M> is the encoding of some TM w is any (binary) string. Assume: U is a decider (i.e. ATM is decidable.) U No* means “does not accept.” Either enter reject state or loop forever. <M>,w M yes yes w no* no

ATM solution Start with U, the Universal Turing Machine Suppose U decides ATM. Let’s build new TM D. D takes in a Turing machine, and returns opposite of U’s answer. D <M> U no yes <M>,<M> no yes If M accepts its own string rep’n, D rejects <M>. If M doesn’t accept <M>, D accepts <M>. What does D do with <D> as input?

For example <M1> <M2> <M3> <M4> … <D> M1 Yes No M2 M3 M4 D Uh-oh Contradiction  The TM D can’t exist  So U is not a decider.

In other words Let U = universal TM. Create 2nd TM called D. Its input is a TM description <M> and a word <w>. Determines if M accepts w. Assume U halts for all inputs. (is a decider) Create 2nd TM called D. Its input is a TM description <M>. Gives <M> to U as the TM to run as well as the input. D returns the opposite of what U returns. What happens when the input to D is <D>? According to U, if D accepts <D>, U accepts, so D must reject! According to U, if D rejects <D>, U rejects, so D must accept! Both cases give a contradiction. Thus, U is not a decider. ATM is undecidable.