Discrete Mathematics & Mathematical Reasoning Cardinality Colin - - PowerPoint PPT Presentation

discrete mathematics mathematical reasoning cardinality
SMART_READER_LITE
LIVE PREVIEW

Discrete Mathematics & Mathematical Reasoning Cardinality Colin - - PowerPoint PPT Presentation

Discrete Mathematics & Mathematical Reasoning Cardinality Colin Stirling Informatics Some slides based on ones by Myrto Arapinis and by Richard Mayr Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 1 / 10


slide-1
SLIDE 1

Discrete Mathematics & Mathematical Reasoning Cardinality

Colin Stirling

Informatics

Some slides based on ones by Myrto Arapinis and by Richard Mayr

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 1 / 10

slide-2
SLIDE 2

Cardinality of Sets

Definition

Two sets A and B have the same cardinality, |A| = |B|, iff there exists a bijection from A to B

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 2 / 10

slide-3
SLIDE 3

Cardinality of Sets

Definition

Two sets A and B have the same cardinality, |A| = |B|, iff there exists a bijection from A to B |A| ≤ |B| iff there exists an injection from A to B

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 2 / 10

slide-4
SLIDE 4

Cardinality of Sets

Definition

Two sets A and B have the same cardinality, |A| = |B|, iff there exists a bijection from A to B |A| ≤ |B| iff there exists an injection from A to B |A| < |B| iff |A| ≤ |B| and |A| = |B| (A smaller cardinality than B)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 2 / 10

slide-5
SLIDE 5

Cardinality of Sets

Definition

Two sets A and B have the same cardinality, |A| = |B|, iff there exists a bijection from A to B |A| ≤ |B| iff there exists an injection from A to B |A| < |B| iff |A| ≤ |B| and |A| = |B| (A smaller cardinality than B) When A and B are finite |A| = |B| iff they have same size

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 2 / 10

slide-6
SLIDE 6

Cardinality of Sets

Definition

Two sets A and B have the same cardinality, |A| = |B|, iff there exists a bijection from A to B |A| ≤ |B| iff there exists an injection from A to B |A| < |B| iff |A| ≤ |B| and |A| = |B| (A smaller cardinality than B) When A and B are finite |A| = |B| iff they have same size N and its subset Even = {2n | n ∈ N} have the same cardinality, because f : N → Even where f(n) = 2n is a bijection

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 2 / 10

slide-7
SLIDE 7

Countable Sets

Definition

A set S is called countably infinite, iff it has the same cardinality as the natural numbers, |S| = |N|

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 3 / 10

slide-8
SLIDE 8

Countable Sets

Definition

A set S is called countably infinite, iff it has the same cardinality as the natural numbers, |S| = |N| A set is called countable iff it is either finite or countably infinite

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 3 / 10

slide-9
SLIDE 9

Countable Sets

Definition

A set S is called countably infinite, iff it has the same cardinality as the natural numbers, |S| = |N| A set is called countable iff it is either finite or countably infinite A set that is not countable is called uncountable

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 3 / 10

slide-10
SLIDE 10

The positive rational numbers are countable

Construct a bijection f : N → Q+

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 4 / 10

slide-11
SLIDE 11

The positive rational numbers are countable

Construct a bijection f : N → Q+ List fractions p/q with q = n in the nth row

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 4 / 10

slide-12
SLIDE 12

The positive rational numbers are countable

Construct a bijection f : N → Q+ List fractions p/q with q = n in the nth row f traverses this list in the order for m = 2, 3, 4, . . . visiting all p/q with p + q = m (and listing only new rationals)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 4 / 10

slide-13
SLIDE 13

The positive rational numbers are countable

Construct a bijection f : N → Q+ List fractions p/q with q = n in the nth row f traverses this list in the order for m = 2, 3, 4, . . . visiting all p/q with p + q = m (and listing only new rationals)

1 1 1 2 1 3 1 4 1 5 2 1 2 2 2 3 2 4 2 5 3 1 3 2 3 3 3 4 3 5 4 1 4 2 4 3 4 4 4 5 5 1 5 2 5 3 5 4 5 5

... ... ... ... ... ... ... ... ... ...

Terms not circled are not listed because they repeat previously listed terms

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 4 / 10

slide-14
SLIDE 14

Finite strings

Theorem

The set Σ∗ of all finite strings over a finite alphabet Σ is countably infinite

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 5 / 10

slide-15
SLIDE 15

Finite strings

Theorem

The set Σ∗ of all finite strings over a finite alphabet Σ is countably infinite

Proof.

First define an (alphabetical) ordering on the symbols in Σ Show that the strings can be listed in a sequence

◮ First single string ε of length 0 ◮ Then all strings of length 1 in lexicographic order ◮ Then all strings of length 2 in lexicographic order ◮ etc Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 5 / 10

slide-16
SLIDE 16

Finite strings

Theorem

The set Σ∗ of all finite strings over a finite alphabet Σ is countably infinite

Proof.

First define an (alphabetical) ordering on the symbols in Σ Show that the strings can be listed in a sequence

◮ First single string ε of length 0 ◮ Then all strings of length 1 in lexicographic order ◮ Then all strings of length 2 in lexicographic order ◮ etc

This implies a bijection from N to Σ∗

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 5 / 10

slide-17
SLIDE 17

Finite strings

Theorem

The set Σ∗ of all finite strings over a finite alphabet Σ is countably infinite

Proof.

First define an (alphabetical) ordering on the symbols in Σ Show that the strings can be listed in a sequence

◮ First single string ε of length 0 ◮ Then all strings of length 1 in lexicographic order ◮ Then all strings of length 2 in lexicographic order ◮ etc

This implies a bijection from N to Σ∗ The set of Java-programs is countable; a program is just a finite string

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 5 / 10

slide-18
SLIDE 18

Infinite binary strings

An infinite length string of bits 10010 . . .

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 6 / 10

slide-19
SLIDE 19

Infinite binary strings

An infinite length string of bits 10010 . . . Such a string is a function d : N → {0, 1}

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 6 / 10

slide-20
SLIDE 20

Infinite binary strings

An infinite length string of bits 10010 . . . Such a string is a function d : N → {0, 1} with the property dm = d(m) is the mth symbol (starting from 0)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 6 / 10

slide-21
SLIDE 21

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-22
SLIDE 22

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Proof.

Let X be the set of infinite binary strings. For a contradiction assume that a bijection f : N → X exists. So, f must be onto (surjective). Assume that f(i) = di for i ∈ N. So, X = {d0, d1, . . . , dm, . . .}. Define the infinite binary string d as follows: dn = (dn

n + 1) mod 2. But for

each m, d = dm because dm = dm

m . So, f is not a surjection.

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-23
SLIDE 23

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Proof.

Let X be the set of infinite binary strings. For a contradiction assume that a bijection f : N → X exists. So, f must be onto (surjective). Assume that f(i) = di for i ∈ N. So, X = {d0, d1, . . . , dm, . . .}. Define the infinite binary string d as follows: dn = (dn

n + 1) mod 2. But for

each m, d = dm because dm = dm

m . So, f is not a surjection.

The technique used here is called diagonalization

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-24
SLIDE 24

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Proof.

Let X be the set of infinite binary strings. For a contradiction assume that a bijection f : N → X exists. So, f must be onto (surjective). Assume that f(i) = di for i ∈ N. So, X = {d0, d1, . . . , dm, . . .}. Define the infinite binary string d as follows: dn = (dn

n + 1) mod 2. But for

each m, d = dm because dm = dm

m . So, f is not a surjection.

The technique used here is called diagonalization

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-25
SLIDE 25

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Proof.

Let X be the set of infinite binary strings. For a contradiction assume that a bijection f : N → X exists. So, f must be onto (surjective). Assume that f(i) = di for i ∈ N. So, X = {d0, d1, . . . , dm, . . .}. Define the infinite binary string d as follows: dn = (dn

n + 1) mod 2. But for

each m, d = dm because dm = dm

m . So, f is not a surjection.

The technique used here is called diagonalization Similar argument shows that R via [0, 1] is uncountable using infinite decimal strings (see book).

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-26
SLIDE 26

Uncountable sets

Theorem

The set of infinite binary strings is uncountable

Proof.

Let X be the set of infinite binary strings. For a contradiction assume that a bijection f : N → X exists. So, f must be onto (surjective). Assume that f(i) = di for i ∈ N. So, X = {d0, d1, . . . , dm, . . .}. Define the infinite binary string d as follows: dn = (dn

n + 1) mod 2. But for

each m, d = dm because dm = dm

m . So, f is not a surjection.

The technique used here is called diagonalization Similar argument shows that R via [0, 1] is uncountable using infinite decimal strings (see book). “Most functions” are not computable!

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 7 / 10

slide-27
SLIDE 27

Schröder-Bernstein Theorem

Theorem

If |A| ≤ |B| and |B| ≤ |A| then |A| = |B|

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 8 / 10

slide-28
SLIDE 28

Schröder-Bernstein Theorem

Theorem

If |A| ≤ |B| and |B| ≤ |A| then |A| = |B| Example |(0, 1)| = |(0, 1]|

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 8 / 10

slide-29
SLIDE 29

Schröder-Bernstein Theorem

Theorem

If |A| ≤ |B| and |B| ≤ |A| then |A| = |B| Example |(0, 1)| = |(0, 1]| |(0, 1)| ≤ |(0, 1]| using identity function

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 8 / 10

slide-30
SLIDE 30

Schröder-Bernstein Theorem

Theorem

If |A| ≤ |B| and |B| ≤ |A| then |A| = |B| Example |(0, 1)| = |(0, 1]| |(0, 1)| ≤ |(0, 1]| using identity function |(0, 1]| ≤ |(0, 1)| use f(x) = x/2 as (0, 1/2] ⊂ (0, 1)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 8 / 10

slide-31
SLIDE 31

Cantor’s theorem

Theorem

|A| < |P(A)|

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 9 / 10

slide-32
SLIDE 32

Cantor’s theorem

Theorem

|A| < |P(A)|

Proof.

Consider the injection f : A → P(A) with f(a) = {a} for any a ∈ A. Therefore, |A| ≤ |P(A)|. Next we show there is not a surjection f : A → P(A). For a contradiction, assume that a surjection f exists. We define the set B ⊆ A: B = {x ∈ A | x ∈ f(x)}. Since f is a surjection, there must exist an a ∈ A s.t. B = f(a). Now there are two cases:

1

If a ∈ B then, by definition of B, a ∈ f(a) = B. Contradiction

2

If a ∈ B then a ∈ f(a). Thus, by definition of B, a ∈ B. Contradiction

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 9 / 10

slide-33
SLIDE 33

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10

slide-34
SLIDE 34

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|) The Continuum Hypothesis claims there is no set S with |N| < |S| < |R|

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10

slide-35
SLIDE 35

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|) The Continuum Hypothesis claims there is no set S with |N| < |S| < |R| It was 1st of Hilbert’s 23 open problems presented in 1900. Shown to be independent of ZF set theory by Gödel/Cohen in 1963: cannot be proven/disproven in ZF

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10

slide-36
SLIDE 36

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|) The Continuum Hypothesis claims there is no set S with |N| < |S| < |R| It was 1st of Hilbert’s 23 open problems presented in 1900. Shown to be independent of ZF set theory by Gödel/Cohen in 1963: cannot be proven/disproven in ZF There exists an infinite hierarchy of sets of ever larger cardinality

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10

slide-37
SLIDE 37

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|) The Continuum Hypothesis claims there is no set S with |N| < |S| < |R| It was 1st of Hilbert’s 23 open problems presented in 1900. Shown to be independent of ZF set theory by Gödel/Cohen in 1963: cannot be proven/disproven in ZF There exists an infinite hierarchy of sets of ever larger cardinality S0 := N and Si+1 := P(Si)

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10

slide-38
SLIDE 38

Implications of Cantor’s theorem

P(N) is not countable (in fact, |P(N)| = |R|) The Continuum Hypothesis claims there is no set S with |N| < |S| < |R| It was 1st of Hilbert’s 23 open problems presented in 1900. Shown to be independent of ZF set theory by Gödel/Cohen in 1963: cannot be proven/disproven in ZF There exists an infinite hierarchy of sets of ever larger cardinality S0 := N and Si+1 := P(Si) |S0| < |S1| < . . . < |Si| < |Si+1| < . . .

Colin Stirling (Informatics) Discrete Mathematics (Section 2.5) Today 10 / 10