Great Theoretical Ideas in Computer Science. Lecture 5: Cantor s Legacy

Similar documents
MATH 3300 Test 1. Name: Student Id:

Undecidability. Andreas Klappenecker. [based on slides by Prof. Welch]

CITS2211 Discrete Structures (2017) Cardinality and Countability

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

Functions. Definition 1 Let A and B be sets. A relation between A and B is any subset of A B.

CSE 20 DISCRETE MATH. Fall

CSE 311: Foundations of Computing. Lecture 26: Cardinality

One-to-one functions and onto functions

Countability. 1 Motivation. 2 Counting

Cardinality and ordinal numbers

1 Reals are Uncountable

Math 3361-Modern Algebra Lecture 08 9/26/ Cardinality

ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

Definition: Let S and T be sets. A binary relation on SxT is any subset of SxT. A binary relation on S is any subset of SxS.

The Different Sizes of Infinity

Today. Wrapup of Polynomials...and modular arithmetic. Coutability and Uncountability.

CSE 311: Foundations of Computing. Lecture 26: More on Limits of FSMs, Cardinality

Reed-Solomon code. P(n + 2k)

Chapter 20. Countability The rationals and the reals. This chapter covers infinite sets and countability.

Some. AWESOME Great Theoretical Ideas in Computer Science about Generating Functions Probability

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

1 Partitions and Equivalence Relations

5 Set Operations, Functions, and Counting

16.1 Countability. CS125 Lecture 16 Fall 2014

Math 300: Final Exam Practice Solutions

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

CSCI3390-Lecture 6: An Undecidable Problem

Notes on ordinals and cardinals

Prof. Ila Varma HW 8 Solutions MATH 109. A B, h(i) := g(i n) if i > n. h : Z + f((i + 1)/2) if i is odd, g(i/2) if i is even.


MAGIC Set theory. lecture 1

1.4 Cardinality. Tom Lewis. Fall Term Tom Lewis () 1.4 Cardinality Fall Term / 9

2 Exercises 1. The following represent graphs of functions from the real numbers R to R. Decide which are one-to-one, which are onto, which are neithe

Warm-Up Problem. Please fill out your Teaching Evaluation Survey! Please comment on the warm-up problems if you haven t filled in your survey yet.

Sets are one of the basic building blocks for the types of objects considered in discrete mathematics.

Section Summary. Sequences. Recurrence Relations. Summations. Examples: Geometric Progression, Arithmetic Progression. Example: Fibonacci Sequence

Math 4603: Advanced Calculus I, Summer 2016 University of Minnesota Notes on Cardinality of Sets

Understanding Computation

MATH 201 Solutions: TEST 3-A (in class)

Intro to Theory of Computation

15-251: Great Theoretical Ideas in Computer Science Lecture 7. Turing s Legacy Continues

S15 MA 274: Exam 3 Study Questions

15-251: Great Theoretical Ideas in Computer Science Fall 2016 Lecture 6 September 15, Turing & the Uncomputable

SETS AND FUNCTIONS JOSHUA BALLEW

CSE 311: Foundations of Computing. Lecture 26: Cardinality, Uncomputability

Section 7.5: Cardinality

Lecture Notes: The Halting Problem; Reductions

Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 20. To Infinity And Beyond: Countability and Computability

1 Showing Recognizability

Discrete Mathematics 2007: Lecture 5 Infinite sets

CSE 20 Discrete Math. Winter, January 24 (Day 5) Number Theory. Instructor: Neil Rhodes. Proving Quantified Statements

6 CARDINALITY OF SETS

INFINITY: CARDINAL NUMBERS

CS 125 Section #10 (Un)decidability and Probability November 1, 2016

A non-turing-recognizable language

ACS2: Decidability Decidability

Selected problems from past exams

Economics 204 Summer/Fall 2017 Lecture 1 Monday July 17, 2017

Math.3336: Discrete Mathematics. Cardinality of Sets

Discrete Mathematics: Lectures 6 and 7 Sets, Relations, Functions and Counting Instructor: Arijit Bishnu Date: August 4 and 6, 2009

MATH 13 FINAL EXAM SOLUTIONS

Algorithms: Lecture 2

ABOUT THE CLASS AND NOTES ON SET THEORY

Notes for Math 290 using Introduction to Mathematical Proofs by Charles E. Roberts, Jr.

Computational Models Lecture 8 1

A Universal Turing Machine

Turing Machines, diagonalization, the halting problem, reducibility

Solutions to Tutorial for Week 4

Math 105A HW 1 Solutions

Introduction to the Theory of Computing

Announcements. CS243: Discrete Structures. Sequences, Summations, and Cardinality of Infinite Sets. More on Midterm. Midterm.

CSE 4111/5111/6111 Computability Jeff Edmonds Assignment 3: Diagonalization & Halting Problem Due: One week after shown in slides

The cardinal comparison of sets

Math 455 Some notes on Cardinality and Transfinite Induction

Lecture 3: Sizes of Infinity

Week Some Warm-up Questions

CS103 Handout 08 Spring 2012 April 20, 2012 Problem Set 3

What is proof? Lesson 1

Finite and Infinite Sets

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

CMU , Spring 2018 Great Ideas in Theoretical Computer Science. Course Notes: Condensed 2

Cardinality of Sets. P. Danziger

CSCE 551: Chin-Tser Huang. University of South Carolina

Notes on counting. James Aspnes. December 13, 2010

Computational Models Lecture 8 1

Logic and Mathematics:

Discrete Structures - CM0246 Cardinality

A Short Review of Cardinality

Basic set-theoretic techniques in logic Part II, Counting beyond infinity: Ordinal numbers

CSE 311: Foundations of Computing. Lecture 27: Undecidability

Discrete Structures for Computer Science

CSE 105 THEORY OF COMPUTATION

Sets and Functions. (As we will see, in describing a set the order in which elements are listed is irrelevant).

3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.

CS 121, Section 2. Week of September 16, 2013

CSE 322, Fall 2010 Nonregular Languages

MATH 220 (all sections) Homework #12 not to be turned in posted Friday, November 24, 2017

Assignments. Math 215. Fall 2009.

Math 127 Homework. Mary Radcliffe. Due 29 March Complete the following problems. Fully justify each response.

Basic counting techniques. Periklis A. Papakonstantinou Rutgers Business School

Transcription:

15-251 Great Theoretical Ideas in Computer Science Lecture 5: Cantor s Legacy September 15th, 2015

Poll Select the ones that apply to you: - I know what an uncountable set means. - I know Cantor s diagonalization argument. - I used to know what uncountable meant, I forgot. - I used to know the diagonalization argument, I forgot. - I ve never learned about uncountable sets. - I ve never learned about the diagonalization argument.

This Week All languages? Decidable languages Factoring Regular languages EvenLength. 0 n 1 n Primality.

Our heroes for this week father of set theory father of computer science 1845-1918 1912-1954 Uncountability Uncomputability

Infinity in mathematics Pre-Cantor: Infinity is nothing more than a figure of speech which helps us talk about limits. The notion of a completed infinity doesn't belong in mathematics - Carl Friedrich Gauss Post-Cantor: Infinite sets are mathematical objects just like finite sets.

Some of Cantor s contributions > The study of infinite sets > Explicit definition and use of 1-to-1 correspondence - This is the right way to compare the cardinality of sets > There are different levels of infinity. - There are infinitely many infinities. > N < R even though they are both infinite. > N = Z even though N(Z. > The diagonal argument.

Reaction to Cantor s ideas at the time Most of the ideas of Cantorian set theory should be banished from mathematics once and for all! - Henri Poincaré

Reaction to Cantor s ideas at the time I don t know what predominates in Cantor s theory - philosophy or theology. - Leopold Kronecker

Reaction to Cantor s ideas at the time Scientific charlatan. - Leopold Kronecker

Reaction to Cantor s ideas at the time Corrupter of youth. - Leopold Kronecker

Reaction to Cantor s ideas at the time Wrong. - Ludwig Wittgenstein

Reaction to Cantor s ideas at the time Utter non-sense. - Ludwig Wittgenstein

Reaction to Cantor s ideas at the time Laughable. - Ludwig Wittgenstein

Reaction to Cantor s ideas at the time No one should expel us from the Paradise that Cantor has created. - David Hilbert

Reaction to Cantor s ideas at the time If one person can see it as a paradise, why should not another see it as a joke? - Ludwig Wittgenstein

First we start with finite sets

How do we count a finite set? A = {apple, orange, banana, melon} What does A =4 mean? There is a 1-to-1 correspondence (bijection) between A and {1, 2, 3, 4} apple orange banana melon 1 2 3 4

How do we compare the sizes of finite sets? A = {apple, orange, banana, melon} B = {200, 300, 400, 500} What does A = B mean? apple orange banana melon 1 2 3 4 500 200 300 400

How do we compare the sizes of finite sets? A = {apple, orange, banana, melon} B = {200, 300, 400, 500} What does apple orange banana melon A = B mean? 500 200 300 400 A = B iff there is a 1-to-1 correspondence (bijection) between A and B.

How do we compare the sizes of finite sets? A = {apple, orange, banana} B = {200, 300, 400, 500} What does A apple B mean? apple orange banana 1 2 3 4 500 200 300 400

How do we compare the sizes of finite sets? A = {apple, orange, banana} B = {200, 300, 400, 500} What does apple orange banana A apple B mean? 500 200 300 400 A apple B iff there is an injection from A to B.

How do we compare the sizes of finite sets? A = {apple, orange, banana} B = {200, 300, 400, 500} What does apple orange banana A apple B mean? 500 200 300 400 A apple B iff there is a surjection from B to A.

3 important types of functions injective, 1-to-1 f : A! B is injective if A,! B A B a 6= a 0 =) f(a) 6= f(a 0 ) surjective, onto f : A! B is surjective if 8b 2 B,9a 2 A s.t. f(a) =b A B A B bijective, 1-to-1 correspondence f : A! B is bijective if A $ B f is injective and surjective A B

Comparing the cardinality of finite sets A B A apple B A,! B A B A B A B A B A = B A $ B

Sanity checks A apple B i B A A,! B i B A A = B i A apple B and A B A $ B i A,! B and A B A $ B i A,! B and B,! A If A apple B and B apple C then A apple C If A,! B and B,! C then A,! C

One more definition A < B not A B There is no surjection from A to B. There is no injection from B to A. There is an injection from A to B, but there is no bijection between A and B.

So what is the big deal? This way of comparing the size of sets generalizes to infinite sets! These are the right definitions for infinite sets as well!

Comparing the cardinality of infinite sets A apple B A,! B A B A B A = B A $ B

Sanity checks for infinite sets A apple B i B A A,! B i B A A = B i A apple B and B apple A A $ B i A,! B and A B A $ B i A,! B and B,! A Cantor Schröder Bernstein If A apple B and B apple C then A apple C If A,! B and B,! C then A,! C

So what is the big deal? Let me show you some interesting consequences.

Examples of equal size sets N = Z N = {0, 1, 2, 3, 4,...} Z = {..., 4, 3, 2, 1, 0, 1, 2, 3, 4,...} 0 1 2 3 4 5 6 7 8... 0, 1, 1, 2, 2, 3, 3, 4, 4,... f(n) =( 1) n+1 l n 2 m

Examples of equal size sets N = Z Does this make any sense? A ( B =) A < B? N(Z Shouldn t N < Z? Does renaming the elements of a set change its size? No. Z Let s rename the elements of : {...,banana, apple, melon, orange, mango,...} Let s call this set F. How can you justify saying N < F? Bijection is nothing more than renaming.

Examples of equal size sets N = {0, 1, 2, 3, 4,...} S = {0, 1, 4, 9, 16,...} N = S f(n) =n 2

Examples of equal size sets N = {0, 1, 2, 3, 4,...} P = {2, 3, 5, 7, 11,...} N = P f(n) =n th prime number.

Definition: countable and uncountable sets Definition: A set A is called countable if A apple N. A set A is called countably infinite if it is infinite and countable. A set A is called uncountable if it is not countable. (so A > N )

How to think about countable sets A set A is called countable if A apple N. So why is it called countable? A apple N means there is an injection f : A! N. you could count the elements of A (but could go on forever) A 1 2 3. 1 2 3 4 5 N

How to think about countable sets A set is called countable if. A A apple N Perhaps a better name would have been listable: can list the elements of A so that every element appears in the list eventually. a 1 a 2 a 3 a 4 a 5 (this is equivalent to being countable)

How to think about countable sets A set A is called countable if A apple N. This seems to imply that if A is infinite, then A = N. Is it possible that A is infinite, but A < N? Theorem: A set A is countably infinite if and only if A = N. So if A is countable, there are two options: 1. A is finite 2. A = N Exercise: prove the theorem

Countable? N = Z Z?. (0, 0) (1, 0) (1, 1) (0, 1) ( 1, 1) ( 1, 0) ( 1, 1) (0, 1) (0, 0) (1, 1) (2, 1) (2, 0) (2, 1) (2, 2) (1, 2). (0, 2).

Countable? N = Q? -4-3 -2-1 0 1 2 3 4 Can we list them in the order they appear on the line? Between any two rational numbers, there is another one. a Any rational number can be written as a fraction. a b Z Z Q ( map (a, b) to ) b =) Q apple Z Z = N

Countable? N = {0, 1}? {0, 1} = the set of finite length binary strings. " 0 1 00, 01, 10, 11 000, 001, 010, 011, 100, 101, 110, 111

Countable? N =? = the set of finite length words over. Same idea.

Countable? N = Q[x]? Q[x] Take = the set of polynomials with rational coefficients. e.g. x 3 1 4 x2 +6x ={0, 1,...,9,x,+, 22 7,, /,ˆ} Every polynomial can be described by a finite string over. e.g. xˆ3 1/4xˆ2 + 6x 22/7 So Q[x] i.e. Q[x] apple

The CS method for showing a set is countable CS method to show a set A is countable ( A apple N ) : Show A apple for some alphabet. i.e. A i.e. Show that you can encode the elements of using finite length words over an alphabet. A

Seems like every set is countable Nope!

Cantor s Theorem Theorem: For any non-empty set A, A < P(A). S = {1, 2, 3} P(S) ={;, {1}, {2}, {3}, {1, 2}, {2, 3}, {1, 3}, {1, 2, 3}} P(S) = 2 S P(S) ${0, 1} S S = {1, 2, 3} binary strings of length S 1 0 1! {1, 3} 0 0 0! ;

Cantor s Theorem Theorem: For any non-empty set A, A < P(A). So: N < P(N). I.e. P(N) is uncountable. N < P(N) < P(P(N)) < P(P(P(N))) < (an infinity of infinities)

Cantor s Theorem - Proof by diagonalization Assume P(A) apple A for some set A. So A P(A). Let f be such a surjection. Example 1 N P(N) 2 3 4... {3, 7, 9} {2, 5} {1, 2, 3} Define S = {a 2 A : a/2 f(a)} 2P(A). Since f is a surjection, 9s 2 A s.t. f(s) =S. But this leads to a contradiction: if s 2 S then s 62 f(s) =S if s/2 S then s 2 f(s) =S s S S = {1, 4,...} Is s 2 S? Why is this called a diagonalization argument?

Cantor s Theorem - Proof by diagonalization Example 1 {3, 7, 9} N P(N) 2 3 {2, 5} {1, 2, 3} S = {1, 4,...} 4... f(1) f(2) f(3) f(4) f(5). f(s)= S 1 2 3 4 5 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1. 1 0 0 1 0 S is defined so that S cannot equal any f(i)

Let {0, 1} 1 Uncountable sets be the set of binary strings of infinite length. {0,1,2,3,4,5,6,7,8,9, } 0000000000 1111111111 1010101010.! ;! N! {even natural numbers} {0, 1} 1 is uncountable, i.e. {0, 1} 1 > N because {0, 1} 1 $P(N). (just like {0, 1} S $P(S) ) (Recall {0, 1} is countable.)

Let {0, 1} 1 1 2 3 4 5. Uncountable sets be the set of binary strings of infinite length. {0, 1} 1 is uncountable, i.e. {0, 1} 1 > N Direct diagonal proof: Suppose {0, 1} 1 apple N 0 0 1 0 0 0 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 0 0 1 1. 1 0 0 1 0 N {0, 1} 1 > cannot appear in the list

Uncountable sets R is uncountable. In fact (0, 1) is uncountable. exercise Be careful: 0.4999999999 = 0.500000000

Appreciating the diagonalization argument If you want to appreciate something, try to break it Exercise: Why doesn t the diagonalization argument work for N, {0, 1}, a countable subset of {0, 1} 1?

Uncountable sets Let be the set of bijections from to. B N N B is uncountable. CS method to show a set A is uncountable ( A > N ) : Show A {0, 1} 1 i.e. A {0, 1} 1 i.e. Show that the elements of A encode all the elements of {0, 1} 1.

One slide guide to countability questions You are given a set A. Is it countable or uncountable? A apple N or A > N? A apple N : - show directly that A,! N or - show A apple B, where A > N : N A B 2{Z, Z Z, Q,, Q[x]} - show directly using a diagonalization argument - show A {0, 1} 1

An Interesting Question Is there a set S such that N < S < P(N)? Continuum Hypothesis: No such set exists. (Hilbert s 1st problem)

The story continues next lecture