CITS2211 Discrete Structures (2017) Cardinality and Countability

Similar documents
ADVANCED CALCULUS - MTH433 LECTURE 4 - FINITE AND INFINITE SETS

MATH 3300 Test 1. Name: Student Id:

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

Section 0. Sets and Relations

SETS AND FUNCTIONS JOSHUA BALLEW

CSE 20 DISCRETE MATH. Fall

INFINITY: CARDINAL NUMBERS

One-to-one functions and onto functions

Mathematics 220 Workshop Cardinality. Some harder problems on cardinality.

Math 105A HW 1 Solutions

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

Section 7.5: Cardinality

Discrete Mathematics 2007: Lecture 5 Infinite sets

Discrete Mathematics for CS Spring 2007 Luca Trevisan Lecture 27

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

CSE 311: Foundations of Computing. Lecture 26: Cardinality

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

MATH31011/MATH41011/MATH61011: FOURIER ANALYSIS AND LEBESGUE INTEGRATION. Chapter 2: Countability and Cantor Sets

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

Math.3336: Discrete Mathematics. Cardinality of 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.

Finite and Infinite Sets

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

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

A Short Review of Cardinality

Algorithms: Lecture 2

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

5 Set Operations, Functions, and Counting

Countability. 1 Motivation. 2 Counting

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

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

POL502: Foundations. Kosuke Imai Department of Politics, Princeton University. October 10, 2005

MATH 13 FINAL EXAM SOLUTIONS

Cardinality of sets. Cardinality of sets

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

In N we can do addition, but in order to do subtraction we need to extend N to the integers

Notes on counting. James Aspnes. December 13, 2010

In N we can do addition, but in order to do subtraction we need to extend N to the integers

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

The Two Faces of Infinity Dr. Bob Gardner Great Ideas in Science (BIOL 3018)

NOTE: You have 2 hours, please plan your time. Problems are not ordered by difficulty.

A Universal Turing Machine

Most Merry and Illustrated Proof of Cantor's Theorem on the Countability of Integers (Concise Version)

Computational Models Lecture 8 1

6 Cosets & Factor Groups

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

0 Logical Background. 0.1 Sets

Selected problems from past exams

0.1 Non-enumerable Sets

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

ECS 120 Lesson 18 Decidable Problems, the Halting Problem

Lecture 3: Sizes of Infinity

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

S15 MA 274: Exam 3 Study Questions

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.

Basic set-theoretic techniques in logic Part III, Transfinite recursion and induction

Turing Machines, diagonalization, the halting problem, reducibility

Computational Models Lecture 8 1

Meta-logic derivation rules

The cardinal comparison of sets

20 Ordinals. Definition A set α is an ordinal iff: (i) α is transitive; and. (ii) α is linearly ordered by. Example 20.2.

Lecture Notes: The Halting Problem; Reductions

Discrete Structures - CM0246 Cardinality

1 Partitions and Equivalence Relations

4.2 The Halting Problem

Math 300: Final Exam Practice Solutions

Chapter 2 - Basics Structures MATH 213. Chapter 2: Basic Structures. Dr. Eric Bancroft. Fall Dr. Eric Bancroft MATH 213 Fall / 60

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

Computational Models Lecture 8 1

Chapter 2 - Basics Structures

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

Functions and cardinality (solutions) sections A and F TA: Clive Newstead 6 th May 2014

Extended Essay - Mathematics

Part IA Numbers and Sets

CSE 311: Foundations of Computing. Lecture 27: Undecidability

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

6 CARDINALITY OF SETS

Intro to Theory of Computation

ABOUT THE CLASS AND NOTES ON SET THEORY

Outside ZF - Set Cardinality, the Axiom of Choice, and the Continuum Hypothesis

Solution. 1 Solutions of Homework 1. 2 Homework 2. Sangchul Lee. February 19, Problem 1.2

1.3. The Completeness Axiom.

A function is a special kind of relation. More precisely... A function f from A to B is a relation on A B such that. f (x) = y

Solutions to Homework Assignment 2

INTRODUCTION TO CARDINAL NUMBERS

Infinite constructions in set theory

Principles of Real Analysis I Fall I. The Real Number System

Philosophy of Religion. Notes on Infinity

Set Theory and the Foundation of Mathematics. June 19, 2018

Date: October 24, 2008, Friday Time: 10:40-12:30. Math 123 Abstract Mathematics I Midterm Exam I Solutions TOTAL

We are going to discuss what it means for a sequence to converge in three stages: First, we define what it means for a sequence to converge to zero

MATH 13 SAMPLE FINAL EXAM SOLUTIONS

Theorems. Theorem 1.11: Greatest-Lower-Bound Property. Theorem 1.20: The Archimedean property of. Theorem 1.21: -th Root of Real Numbers

Lecture Notes 1 Basic Concepts of Mathematics MATH 352

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.

Welcome to CS103! Two Handouts Today: Course Overview Introduction to Set Theory The Limits of Computation

Equivalent Forms of the Axiom of Infinity

Chapter 1 : The language of mathematics.

Countable and uncountable sets. Matrices.

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

Transcription:

CITS2211 Discrete Structures (2017) Cardinality and Countability

Highlights What is cardinality? Is it the same as size? Types of cardinality and infinite sets

Reading Sections 45 and 81 84 of Mathematics for Computer Scientists

Why We saw that counting is important related to that is determining the size of things, and cardinality is a generalization of size Infinite sets may seem to be of only theoretical interest, but they make many sorts of calculations more convenient (or give them a solid mathematical foundation) calculus, for one!

Cardinality Definition If A is a finite set, then its cardinality is defined to be the number of elements in A, and denoted A For example, and {0, 1, 2, 3} = 4 {0, 1, {0, 1}} = 3

Equal sized sets Two finite sets A and B have the same cardinality if they have the same number of elements For example, {0, 1, 2} = {a, b, c}

Disjoint sets Observation: If A and B are disjoint (that is, A B = ), then A B = A + B Exercise: Show that A B = A + B A B, when A and B are finite sets (Note this generalises the observation above)

Some observations We can use functions to compare cardinalities of two sets A B if and only if there is a surjection from A to B A A B if and only if there is an injection from A to B B A B

Some observations Thus A = B if and only if there is a bijection from A to B A B

Question But what about infinite sets?

Infinite sets why are they useful? Convenience applied sciences, engineering, calculus physics models modelling computations Limits on what s possible (even in theory)

Infinite sets can we describe their size? Cardinality arose out of the desire to be able to compare the sizes of infinite sets (Eg there seem to be more real numbers than integers, in some sense) There are multiple ways we could define the size of an infinite set but cardinality (based on the idea of pairing off members of two sets bijection) has proved most useful For finite sets, our intuitive idea of the size of a set matches up with the idea of cardinality For infinite sets, they differ

Infinite sets how can we define them? Definition A: A set A is called infinite iff there does not exist any k N such that there is a surjection: f : N k A Definition B: A set A is called infinite iff it has a proper subset with the same cardinality That is, A is infinite iff: B : (B A) ( A = B )

Infinite sets do any exist? ZFC does guarantee us the existence of certain sets In standard ZFC, there are 2 sets we re allowed to start with The axioms say: There is an empty set (We write this as )

Infinite sets do any exist? ZFC does guarantee us the existence of certain sets In standard ZFC, there are 2 sets we re allowed to start with The axioms say: There is an empty set (We write this as ) There is an infinite set (We can write it as I)

Infinite sets do any exist? (2) There are two rules about what s in the infinite set, I: The empty set is a member of the infinite set If we pick some set x which is a member of I, then the set {x} is also a member of I In first-order logic: I : ( I) (x I {x} I)

Infinite sets do any exist? (3) This means that the infinite set is the set I = {, { }, {{ }}, {{{ }}}, {{{{ }}}},, } If we re allowed to assume the existence of this set, there are ways of guaranteeing that the other infinite sets we would like to use (N, Z, R, and so on) all exist

Infinite sets Intuitively, a set B is infinite if B = k does not hold for any k We also have that B k does not hold for any k Recall that, for finite sets, B A if and only if there is a surjection from A to B Let N k denote the set {1, 2,, k}, so N k = k Definition A set B is called infinite if there does not exist any k such that there is a surjection f : N k B

Infinite sets We know lots of infinite sets already: N the natural numbers, like 1, 2, 450, Z the integers, like 1, 20, 52, Q the rational numbers, like 1 2, 2 30, 22 7, R the real numbers, like π, 2,

The key concept Recall that, for finite sets, A = B if and only if there is a bijection from A to B We extend this property to infinite sets Definition We define two sets, A and B to have the same cardinality and we write A = B if and only if there is a bijection between them While this seems uncontroversial, it has some counterintuitive consequences!

Which is bigger? Recall N denotes the set of all natural numbers and N >0 denotes the set of positive natural numbers Clearly N >0 N, but what can we say about the relationship between N >0 and N?

Which is bigger? Recall N denotes the set of all natural numbers and N >0 denotes the set of positive natural numbers Clearly N >0 N, but what can we say about the relationship between N >0 and N? Let f : N N >0 be given by the formula f (n) = n + 1 Then it is easy to see that f is injective (one-to-one) and surjective (onto) and therefore N >0 = N

Which is bigger? Let E denote the set of even natural numbers, so that E = {0, 2, 4, 6, } and let N denote the set of all natural numbers Clearly E N, but what can we say about the relationship between E and N?

Which is bigger? Let E denote the set of even natural numbers, so that E = {0, 2, 4, 6, } and let N denote the set of all natural numbers Clearly E N, but what can we say about the relationship between E and N? Let f : N E be given by the formula f (n) = 2n Then it is easy to see that f is injective (one-to-one) and surjective (onto) and therefore E = N

What about the integers? What is the relationship between N >0 and Z?

What about the integers? What is the relationship between N >0 and Z? If we define f : N >0 Z by { (n 1)/2 n is odd, f (n) = n/2 n is even then we see that f (1) = 0, f (2) = 1, f (3) = 1, f (4) = 2, f (5) = 2, and so this is a bijection and therefore N >0 = Z

N A Countability Definition A set A is called countable if either it is finite or if there is a bijection f : N >0 A So we ve demonstrated that the sets E and Z are both countable Intuitively, a set A is countable if you can list its elements in (some) order {a 1, a 2, a 3, } 1 2 3 4 a 1 a 2 a 3 a 4

Z is countable We can visualise the ordering on Z as follows: 3 2 1 0 1 2 3

Z is countable We can visualise the ordering on Z as follows: 3 2 1 0 1 2 3

Z is countable We can visualise the ordering on Z as follows: 3 2 1 0 1 2 3

Z is countable We can visualise the ordering on Z as follows: 3 2 1 0 1 2 3

Z is countable We can visualise the ordering on Z as follows: 3 2 1 0 1 2 3 We get the list {0, 1, 1, 2, 2, 3, 3, }

N >0 N >0 Consider the set N >0 N >0, whose elements are (p, q) where p, q N >0, and arrange them in the following infinite array (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

N >0 N >0 Consider the set N >0 N >0, whose elements are (p, q) where p, q N >0, and arrange them in the following infinite array (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

N >0 N >0 Consider the set N >0 N >0, whose elements are (p, q) where p, q N >0, and arrange them in the following infinite array (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

N >0 N >0 Consider the set N >0 N >0, whose elements are (p, q) where p, q N >0, and arrange them in the following infinite array (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

N >0 N >0 Consider the set N >0 N >0, whose elements are (p, q) where p, q N >0, and arrange them in the following infinite array (1, 1) (2, 1) (3, 1) (4, 1) (5, 1) (6, 1) (1, 2) (2, 2) (3, 2) (4, 2) (5, 2) (6, 2) (1, 3) (2, 3) (3, 3) (4, 3) (5, 3) (6, 3) (1, 4) (2, 4) (3, 4) (4, 4) (5, 4) (6, 4) (1, 5) (2, 5) (3, 5) (4, 5) (5, 5) (6, 5) (1, 6) (2, 6) (3, 6) (4, 6) (5, 6) (6, 6)

N N and the positive rationals So N >0 N >0 is countable, that is N >0 N >0 = N >0! Now we can define a surjection g : N >0 N >0 Q + (the positive rationals) by g(p, q) = p/q Hence Q + N >0 N >0 = N >0 Clearly N >0 Q + since N Q + Thus Q + = N >0 In other words the positive rationals are countable too

Countable rationals The positive rationals are countable, so clearly the negative rationals are countable Exercise: find a bijection between the positive rationals and the negative rationals Thus the rationals in their entirety are countable! Positive rationals a 1 a 2 a 3 a 4 a 5 a 6 a 7 a 8 a 9 a 10 0 b 1 b 2 b 3 b 4 b 5 b 6 b 7 b 8 b 9 b 10 Negative rationals

What else is countable? We can use these ideas to show that The set of vectors (a, b) with a, b Z is countable (these are often called lattice points ) The set of binary strings of finite length (eg 0001010101) is countable The set of all legitimate Java programs is countable The set of all Turing machines is countable

What isn t countable? Cantor s famous diagonal argument shows that there exist sets which are not countable Consider the set of infinite sequences of the numbers 0 and 1 Is it countable? If it is, we can make a list of all those sequences

Cantor s Diagonal Argument Let s assume we have such a list 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1

Cantor s Diagonal Argument We will prove that there is always a sequence of 0 s and 1 s that isn t in the list 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1

Cantor s Diagonal Argument 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1

Cantor s Diagonal Argument 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 d = 0 0 1 0 1 1 0 1 0 1

Cantor s Diagonal Argument 0 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 0 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 d = 0 0 1 0 1 1 0 1 0 1 d = 1 1 0 1 0 0 1 0 1 0

Cantor s Diagonal Argument Now d the 1st sequence because they differ in the 1st number d the 2nd sequence because they differ in the 2nd number d the 3rd sequence because they differ in the 3rd number d the 4th sequence because they differ in the 4th number d the kth sequence because they differ in the kth number We assumed nothing about the list, except that it could be constructed; we ve reached a contradiction; so our assumption must be false Therefore, any listing must be incomplete the set of all 0-1-sequences is uncountable

Some obvious facts Two obvious facts If S T and T is countable, then so is S Any subset of a countable set is itself countable If S T and S is uncountable, then so is T Any superset of an uncountable set is itself uncountable

Cardinality of a countable set What is the common cardinality of N >0, N, Z, E, etc?

Cardinality of a countable set What is the common cardinality of N >0, N, Z, E, etc? There is a special symbol ℵ 0, pronounced aleph-null to refer to the size of a countably infinite set, so N >0 = ℵ 0, Q = ℵ 0 and Z = ℵ 0 However the real numbers are not countable and so R > ℵ 0

Larger and larger There is no limit to making larger and larger sets, even within the class of uncountable sets Theorem For any set A (finite or infinite, countable or uncountable), there is no function f : A P(A) that is a surjection Therefore A < P(A) < P(P(A)) < P(P(P(A))) and there is an infinite number of differently-sized infinities (See http://wwwscientificamericancom/article/ strange-but-true-infinity-comes-in-different-sizes/)

Cardinality of infinite sets consequences There are properties of finite sets that don t extend to infinite sets: Adding a finite set to an infinite set doesn t increase the size of the infinite set Eg N >0 = N {0} and N >0 = N

How many functions? How many functions from the set {a, b, c} to the set {T, F }?

How many functions? How many functions from the set {a, b, c} to the set {T, F }? Answer: 2 2 2 = 2 3 = 8

How many functions? (2) How many functions from the set {0, 1} to the set N >0? Is the set of those functions countable?

How many functions? (2) How many functions from the set {0, 1} to the set N >0? Is the set of those functions countable?

How many functions? (3) How many functions from the set N to the set {0, 1}?

How many functions? (3) How many functions from the set N to the set {0, 1}? Answer: 2 2 2 2 2 = 2 N = 2 ℵ 0

Impossible things be careful when doing them We ve seen, the number of functions from N to {T, F } is uncountable How many legal Java programs are there? What does these mean for functions from J, the set of all possible Java programs, to the set {T, F }?