foundations of computer science lecture 22 infinity
play

Foundations of Computer Science Lecture 22 Infinity Size versus - PowerPoint PPT Presentation

Foundations of Computer Science Lecture 22 Infinity Size versus Cardinality: Comparing Sizes Countable: Sets Which Are Not Larger Than N Is There A Set Larger Than N ? Cantors Diagonal Argument Infinity and Computing Our


  1. Foundations of Computer Science Lecture 22 Infinity Size versus Cardinality: Comparing “Sizes” Countable: Sets Which Are Not “Larger” Than N Is There A Set “Larger” Than N ? Cantor’s Diagonal Argument Infinity and Computing

  2. Our Short Stroll Through Discrete Math 1 Precise statements, proofs and logic. 2 INDUCTION . 3 Recursively defined structures and Induction. (Data structures; PL) 4 Sums and asymptotics. (Algorithm analysis) 5 Number theory. (Cryptography; probability; fun) 6 Graphs. (Relationships/conflicts; resource allocation; routing; scheduling,. . . ) 7 Counting. (Enumeration and brute force algorithms) 8 Probability. (Real world algorithms involve randomness/uncertainty) ◮ Inputs arrive in a random order; ◮ Randomized algorithms (primality testing, machine learning, routing, conflict resolution . . . ) ◮ Expected value is a summary of what happens. Variance tells you how good the summary is. Creator: Malik Magdon-Ismail Infinity: 2 / 14 Today →

  3. Today: Infinity Comparing “sizes” of sets: countable. 1 Rationals are countable. Georg Cantor Uncountable 2 Infinite binary strings. What does Infinity have to do with computing? 3 Creator: Malik Magdon-Ismail Infinity: 3 / 14 “Size” of a Set →

  4. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  5. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  6. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. All you need is a correspondence. Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  7. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. All you need is a correspondence. A B not a function Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  8. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. All you need is a correspondence. A B A B not a function 1-to-1; (injection, A inj �→ B ) implies | A | ≤ | B | Cardinality | A | (“size”), read “cardinality of A ,” is the number of elements for finite sets | A | ≤ | B | iff there is an injection (1-to-1) from A to B , i.e., f : A inj �→ B . | A | > | B | iff there is no injection from A to B . Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  9. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. All you need is a correspondence. A B A B A B not a function 1-to-1; onto; (injection, A inj (surjection, A sur �→ B ) �→ B ) implies | A | ≤ | B | implies | A | ≥ | B | Cardinality | A | (“size”), read “cardinality of A ,” is the number of elements for finite sets | A | ≤ | B | iff there is an injection (1-to-1) from A to B , i.e., f : A inj �→ B . | A | > | B | iff there is no injection from A to B . | A | ≥ | B | iff there is an surjection (onto) from A to B , i.e., f : A sur �→ B . Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  10. “Size” of a Set: Cardinality You have 5 fingers on each hand. You must know how to count. You have an equal number of fingers on each hand. All you need is a correspondence. A B A B A B A B not a function 1-to-1; onto; 1-to-1 and onto (injection, A inj (surjection, A sur (bijection, A bij �→ B ) �→ B ) �→ B ) implies | A | ≤ | B | implies | A | ≥ | B | implies | A | = | B | Cardinality | A | (“size”), read “cardinality of A ,” is the number of elements for finite sets | A | ≤ | B | iff there is an injection (1-to-1) from A to B , i.e., f : A inj �→ B . | A | > | B | iff there is no injection from A to B . | A | ≥ | B | iff there is an surjection (onto) from A to B , i.e., f : A sur �→ B . | A | = | B | iff there is an bijection (1-to-1 and onto) from A to B , i.e., f : A bij �→ B . | A | ≤ | B | and | B | ≤ | A | → | A | = | B | . (Cantor-Bernstein Theorem) Creator: Malik Magdon-Ismail Infinity: 4 / 14 Countable →

  11. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Creator: Malik Magdon-Ismail Infinity: 5 / 14 All Finite Sets are Countable →

  12. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . Creator: Malik Magdon-Ismail Infinity: 5 / 14 All Finite Sets are Countable →

  13. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . Creator: Malik Magdon-Ismail Infinity: 5 / 14 All Finite Sets are Countable →

  14. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N .

  15. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N .

  16. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N .

  17. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N .

  18. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N . Creator: Malik Magdon-Ismail Infinity: 5 / 14 All Finite Sets are Countable →

  19. A Countable Set’s Cardinality Is At Most | N | Finite sets : | A | = n if and only if there is a bijection from A to { 1 , . . . , n } . Infinite sets: The set A is countable if | A | ≤ | N | . A is “smaller than” N . To show that A is countable you must find a 1-to-1 mapping from A to N . · · · A : ➲ ✒ ❖ ✠ ✚ ✘ ♦ ✣ ❉ ▲ ❒ ◗ ❍ · · · N : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 You cannot skip over any elements of A , but you might not use every element of N . To prove that a function f : A �→ N is an injection: 1: Assume f is not an injection. (Proof by contradiction.) 2: This means there is a pair x, y ∈ A for which x � = y and f ( x ) = f ( y ). 3: Use f ( x ) = f ( y ) to prove that x = y , a contradiction. Hence, f is an injection. Creator: Malik Magdon-Ismail Infinity: 5 / 14 All Finite Sets are Countable →

  20. All Finite Sets are Countable A = { 3 , 6 , 8 } . To show | A | ≤ N , we give an injection from A to N , Creator: Malik Magdon-Ismail Infinity: 6 / 14 N 0 = { 0 , 1 , 2 , . . . } is countable →

  21. All Finite Sets are Countable A = { 3 , 6 , 8 } . To show | A | ≤ N , we give an injection from A to N , 3 �→ 1 6 �→ 2 8 �→ 3 . For an arbitrary finite set A = { a 1 , a 2 , . . . , a n } , N , a 1 �→ 1 a 2 �→ 2 a 3 �→ 3 · · · a n �→ n. Creator: Malik Magdon-Ismail Infinity: 6 / 14 N 0 = { 0 , 1 , 2 , . . . } is countable →

Recommend


More recommend