15-251 Great Theoretical Ideas in Computer Science.

Slides:



Advertisements
Similar presentations
Countability. The cardinality of the set A is equal to the cardinality of a set B if there exists a bijection from A to B cardinality? bijection? injection.
Advertisements

EE1J2 - Slide 1 EE1J2 – Discrete Maths Lecture 10 Cardinality Uncountability of the real numbers.
Computability and Complexity 4-1 Existence of Undecidable Problems Computability and Complexity Andrei Bulatov.
Introduction to Computability Theory
Courtesy Costas Busch - RPI1 A Universal Turing Machine.
Great Theoretical Ideas in Computer Science.
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]
Functions f( ) = A B Lecture 15: Nov 4.
Fall 2004COMP 3351 A Universal Turing Machine. Fall 2004COMP 3352 Turing Machines are “hardwired” they execute only one program A limitation of Turing.
1 Introduction to Computability Theory Lecture11: The Halting Problem Prof. Amos Israeli.
Great Theoretical Ideas in Computer Science.
Cantor’s Legacy: Infinity And Diagonalization Great Theoretical Ideas In Computer Science Steven RudichCS Spring 2004 Lecture 25Apr 13, 2004Carnegie.
Functions A B f( ) =. This Lecture We will define a function formally, and then in the next lecture we will use this concept in counting. We will also.
Cardinality of Sets Section 2.5.
Sequences and Summations
1 Lecture 3 (part 3) Functions – Cardinality Reading: Epp Chp 7.6.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 15-1 Mälardalen University 2012.
Great Theoretical Ideas in Computer Science for Some.
Copyright © Cengage Learning. All rights reserved. CHAPTER 7 FUNCTIONS.
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability Infinity Computability With Alan! (not Turing) Mind-
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1.
A Universal Turing Machine
Functions Section 2.3. Section Summary Definition of a Function. – Domain, Cdomain – Image, Preimage Injection, Surjection, Bijection Inverse Function.
Relations, Functions, and Countability
COMPSCI 102 Introduction to Discrete Mathematics.
Aim: How can the word ‘infinite’ define a collection of elements?
Great Theoretical Ideas in Computer Science.
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.
Introduction to Real Analysis Dr. Weihu Hong Clayton State University 8/27/2009.
Basic Structures: Sets, Functions, Sequences, and Sums.
Cardinality with Applications to Computability Lecture 33 Section 7.5 Wed, Apr 12, 2006.
CompSci 102 Discrete Math for Computer Science February 7, 2012 Prof. Rodger Slides modified from Rosen.
Lecture 4 Infinite Cardinals. Some Philosophy: What is “2”? Definition 1: 2 = 1+1. This actually needs the definition of “1” and the definition of the.
1 Melikyan/DM/Fall09 Discrete Mathematics Ch. 7 Functions Instructor: Hayk Melikyan Today we will review sections 7.3, 7.4 and 7.5.
Section 3.2: Sequences and Summations. Def: A sequence is a function from a subset of the set of integers (usually the set of natural numbers) to a set.
CS 285- Discrete Mathematics
Great Theoretical Ideas in Computer Science about AWESOME Some Generating Functions Probability.
To Infinity And Beyond! CS Lecture 11 The Ideal Computer: no bound on amount of memory Whenever you run out of memory, the computer contacts the.
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.
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.
Sequences Lecture 11. L62 Sequences Sequences are a way of ordering lists of objects. Java arrays are a type of sequence of finite size. Usually, mathematical.
1-1 Copyright © 2013, 2005, 2001 Pearson Education, Inc. Section 2.4, Slide 1 Chapter 2 Sets and Functions.
Great Theoretical Ideas In Computer Science
Cardinality with Applications to Computability
Cantor’s Legacy: Infinity And Diagonalization
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
Discrete Mathematics CS 2610
A Universal Turing Machine
Function Hubert Chan (Chapter 2.1, 2.2) [O1 Abstract Concepts]
2.4 Sequences and Summations
Cardinality of Sets Section 2.5.
Countable or Uncountable…That is the question!
Lecture 7 Functions.
Discrete Structures for Computer Science
Great Theoretical Ideas in Computer Science
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Discrete Mathematics and its Applications
Cantor’s Legacy: Infinity And Diagonalization
Discrete Math for CS CMPSC 360 LECTURE 43 Last time: Variance
Formal Languages, Automata and Models of Computation
Cantor’s Legacy: Infinity And Diagonalization
Module #4.5, Topic #∞: Cardinality & Infinite Sets
Functions Rosen 2.3, 2.5 f( ) = A B Lecture 5: Oct 1, 2.
Introduction to Discrete Mathematics
Cardinality Definition: The cardinality of a set A is equal to the cardinality of a set B, denoted |A| = |B|, if and only if there is a one-to-one correspondence.
Great Theoretical Ideas in Computer Science
Intro to Theory of Computation
Cantor’s Legacy: Infinity And Diagonalization
Presentation transcript:

Great Theoretical Ideas in Computer Science

Cantor’s Legacy: Infinity And Diagonalization Lecture 24 (April 12, 2007) 

The Theoretical Computer: no bound on amount of memory no bound on amount of time Ideal Computer is defined as a computer with infinite RAM You can run a Java program and never have any overflow, or out of memory errors

An Ideal Computer It can be programmed to print out: 2: … 1/3: …  : … e: …  : …

Printing Out An Infinite Sequence A program P prints out the infinite sequence s 0, s 1, s 2, …, s k, … if when P is executed on an ideal computer, it outputs a sequence of symbols such that - The k th symbol that it outputs is s k - For every k  , P eventually outputs the k th symbol. I.e., the delay between symbol k and symbol k+1 is not infinite

Computable Real Numbers A real number R is computable if there is a (finite) program that prints out the decimal representation of R from left to right. Thus, each digit of R will eventually be output. Are all real numbers computable?

List of questions Are all real numbers computable???

Describable Numbers A real number R is describable if it can be denoted unambiguously by a finite piece of English text 2:“Two.” :: “The area of a circle of radius one.” Are all real numbers describable?

List of questions Are all real numbers computable??? Are all real numbers describable???

Is every computable real number, also a describable real number? And what about the other way? Computable r: some program outputs r Describable r: some sentence denotes r

List of questions Are all real numbers computable??? Are all real numbers describable??? Is every computable number describable??? Is every describable number computable???

Computable  Describable Theorem: Every computable real is also describable Proof: Let R be a computable real that is output by a program P. The following is an unambiguous description of R: “The real number output by the following program:” P

List of questions Are all real numbers computable??? Are all real numbers describable??? Is every computable number describable?Yes Is every describable number computable???

Correspondence Principle If two finite sets can be placed into bijection, then they have the same size

Correspondence Definition In fact, we can use the correspondence as the definition: Two finite sets are defined to have the same size if and only if they can be placed into bijection

Georg Cantor ( )

Cantor’s Definition (1874) Two sets are defined to have the same size if and only if they can be placed into bijection Two sets are defined to have the same cardinality if and only if they can be placed into bijection.

Do N and E have the same cardinality? N = { 0, 1, 2, 3, 4, 5, 6, 7, … } E = { 0, 2, 4, 6, 8, 10, 12, … } The even, natural numbers.

How can E and N have the same cardinality? E is a proper subset of N with plenty left over. The attempted correspondence f(x) = x does not take E onto N.

E and N do have the same cardinality! N = 0, 1, 2, 3, 4, 5, … E = 0, 2, 4, 6, 8,10, … f(x) = 2x is a bijection

Lesson: Cantor’s definition only requires that some injective correspondence between the two sets is a bijection, not that all injective correspondences are bijections! This distinction never arises when the sets are finite

Do N and Z have the same cardinality? N = { 0, 1, 2, 3, 4, 5, 6, 7, … } Z = { …, -2, -1, 0, 1, 2, 3, … }

N and Z do have the same cardinality! f(x) =  x/2  if x is odd -x/2 if x is even N = 0, 1, 2, 3, 4, 5, 6 … Z = 0, 1, -1, 2, -2, 3, -3, ….

A Useful Transitivity Lemma Hence, N, E, and Z all have the same cardinality. Lemma: If f: A  B is a bijection, and g: B  C is a bijection. Then h(x) = g(f(x)) defines a function h: A  C that is a bijection

Onto the Rationals!

Do N and Q have the same cardinality? N = { 0, 1, 2, 3, 4, 5, 6, 7, …. } Q = The Rational Numbers

How could it be???? The rationals are dense: between any two there is a third. You can’t list them one by one without leaving out an infinite number of them.

How about N and N×N ? 01234… … The point (x,y) represents the ordered pair (x,y)

Theorem: N and N×N have the same cardinality 01234… … The point (x,y) represents the ordered pair (x,y)

The point at x,y represents x/y

3 2 01

Cantor’s 1877 letter to Dedekind: “I see it, but I don't believe it! ”

Countable Sets We call a set countable if it can be placed into a bijection with the natural numbers N Hence N, E, Z, Q are all countable

Do N and R have the same cardinality? I.e., is R countable? N = { 0, 1, 2, 3, 4, 5, 6, 7, … } R = The real numbers

Theorem: The set R [0,1] of reals between 0 and 1 is not countable Proof: (by contradiction) Suppose R [0,1] is countable Let f be a bijection from N to R [0,1] Make a list L as follows: 0: decimal expansion of f(0) 1: decimal expansion of f(1) … k: decimal expansion of f(k) …

L 01234… … Index Position after decimal point

L 01234… … Index Position after decimal point

L 01234… 0 d0d0 1 d1d1 2 d2d2 3 d3d3 … d4d4

L d0d0 1 d1d1 2 d2d2 3 d3d3 … … Define the following real number Confuse L = 0.C 0 C 1 C 2 C 3 C 4 C 5 … 5, if d k =6 6, otherwise Ck=Ck=

By design, Confuse L can’t be on the list L! Indeed, note that Confuse L differs from the k th element on the list L in the k th position. Diagonalized! This contradicts the assumption that the list L is complete; i.e., that the map f: N to R [0,1] is onto.

The set of reals is uncountable! (Even the reals between 0 and 1)

Why can’t the same argument be used to show that the set of rationals Q is uncountable? Note that CONFUSE L is not necessarily rational. And so there is no contradiction from the fact that it is missing from the list L Sanity Check

Back to the questions we were asking earlier

List of questions Are all real numbers computable??? Are all real numbers describable??? Is every computable number describable?Yes Is every describable number computable???

Standard Notation  = Any finite alphabet Example: {a,b,c,d,e,…,z}    = All finite strings of symbols from  including the empty string 

Theorem: Every infinite subset S of  * is countable Sort S by first by length and then alphabetically Map the first word to 0, the second to 1, and so on… Proof:

Some infinite subsets of    = The symbols on a standard keyboard For example: The set of all possible Java programs is a subset of   The set of all possible finite pieces of English text is a subset of  

Thus: The set of all possible Java programs is countable. The set of all possible finite length pieces of English text is countable.

There are countably many Java programs and uncountably many reals. Hence, most reals are not computable! But look:

There are countably many descriptions and uncountably many reals. Hence: Most real numbers are not describable!

List of questions Are all real numbers computable?No Are all real numbers describable?No Is every computable number describable?Yes Is every describable number computable??? Next lecture…

To end, here’s an important digression about infinity…

We know there are at least 2 infinities. (The number of naturals, the number of reals.) Are there more?

Definition: Power Set The power set of S is the set of all subsets of S. The power set is denoted as P(S) Proposition: If S is finite, the power set of S has cardinality 2 |S| How do sizes of S and P(S) relate if S is infinite?

Since f is onto, exists y  S such that f(y) = CONFUSE f. A B C S {B}{B}  {A}{A} {C}{C} P(S) {A, B} {B, C} {A, C} {A,B, C} Suppose f:S → P(S) is a bijection. Theorem: S can’t be put into bijection with P(S) Let CONFUSE f = { x | x  S, x  f(x) } Is y in CONFUSE f ? YES: Definition of CONFUSE f implies no NO: Definition of CONFUSE f implies yes

For any set S (finite or infinite), the cardinality of P(S) is strictly greater than the cardinality of S.

This proves that there are at least a countable number of infinities. Indeed, take any infinite set S. Then P(S) is also infinite, and its cardinality is a larger infinity than the cardinality of S.

This proves that there are at least a countable number of infinities. The first infinity is the size of all the countable sets. It is called:  0

 0,  1,  2,… Cantor wanted to show that the number of reals was  1

Cantor called his conjecture that  1 was the number of reals the “Continuum Hypothesis.” However, he was unable to prove it. This helped fuel his depression.

This has been proved! The Continuum Hypothesis can’t be proved or disproved from the standard axioms of set theory!

Here’s What You Need to Know… Cantor’s Definition: Two sets have the same cardinality if there exists a bijection between them. E, N, Z and Q all have the same cardinality Proof that there is no bijection between N and R Definition of Countable versus Uncountable