Download presentation
Presentation is loading. Please wait.
1
Discrete Structures for Computer Science
Presented By: Andrew F. Conn Adapted from: Adam J. Lee Lecture #9: Functions and Sequences September 28th, 2016
2
Announcements Homework 2 is due next class.
3
Todayโs Topics Sequences and Summations Cardinality of Infinite Sets
Important Sequences and Summations Closed form of summations. Cardinality of Infinite Sets Countable Sets Uncountable Sets
4
Important sequences Geometric progressions are sequences of the form ๐๐๐ where ๐ and ๐ are real numbers Examples: 1, 1 2 , 1 4 , 1 8 , 1 16 , โฆ 2,โ2, 2, โ2, 2, โ2, โฆ Arithmetic progressions are sequences of the form ๐ + ๐๐ where ๐ and ๐ are real numbers. 2, 4, 6, 8, 10, โฆ โ10, โ15, โ20, โ25, โฆ ๐=1, ๐=ยฝ ๐=2, ๐=โ1 ๐=2, ๐=2 ๐=โ10, ๐=โ5
5
Important sequences Recurrence Relations are sequences of the form ๐ ๐ =๐( ๐ ๐โ1 , ๐ ๐โ2 ,โฆ) Examples: 1,2,6,24,120,720,โฆ 1,1,2,3,5,8,13,21โฆ ๐ ๐ =๐โ ๐ ๐โ1 ๐ ๐ = ๐ ๐โ1 + ๐ ๐โ2
6
Important Sums and their Closed Forms
๐=0 ๐ ๐ ๐ ๐ , ๐โ 0 ๐ ๐ ๐+1 โ๐ ๐โ1 , ๐โ 1 ๐=1 ๐ ๐ ๐ ๐+1 2 ๐=1 ๐ ๐ 2 ๐ ๐+1 2๐+1 6 ๐=1 ๐ ๐ 3 ๐ 2 ๐ ๐=1 โ ๐ฅ ๐ , ๐ฅ <1 1 1โ๐ฅ ๐=1 โ ๐ ๐ฅ ๐โ1 , ๐ฅ <1 1 1โ๐ฅ 2 `
7
Infinite Cardinality Problem: It is easy to reason about the cardinality of finite sets by just counting the elements. It is more difficult to reason about the cardinality of infinite sets. Intuition: If we can compare two sets to one another we can determine something about their respective cardinalities. One set that is very useful for comparison to is the Natural Numbers (โ).
8
Injective, Surjective, Bijective โฆ
๐ด โค ๐ต iff there exists an injection ๐:๐ดโ๐ต. Intuitively, if all the values from ๐ด can be mapped to ๐ต by ๐, then ๐ต must be at least as large as ๐ด. ๐ด โฅ ๐ต iff there exists a surjection ๐:๐ดโ๐ต Intuitively, every element of ๐ต is mapped by at least one element of ๐ด by ๐. ๐ด = ๐ต iff there exists a bijection ๐:๐ดโ๐ต. Intuitively, if all the values from ๐ต can be uniquely mapped to from all the values in ๐ด, then the sets are the same size. ๐ด < ๐ต iff there exists an injection, but not a bijection, ๐:๐ดโ๐ต Intuitively, if there exists an element in ๐ต that is not mapped to from ๐ด by ๐, then ๐ต is strictly larger than ๐ด.
9
Countable Definitions
Definition: We say that a set ๐ด is countable iff there exists a injection ๐:๐ดโโ Definition: We say that a set ๐ด is countably infinite iff there exists a bijection ๐:๐ดโโ
10
Show that the set of even natural numbers is countable
Proof #1: We have the following injective correspondence between โ and the even natural numbers: So, the even natural numbers are countable. โ Proof #2: We can define ๐:โโ2โ as ๐ ๐ =2๐. ๐ is a bijection, thus 2โ =|โ| and the even positive integers are countably infinite. โ 1 2 3 4 5 6 7 8 9 10 โฆ 2 4 6 8 10 12 14 16 18 20 โฆ
11
Show that โค is countably infinite.
Proof: We have the following bijective correspondence between โ and โค: So, โค is countably infinite. โ 1 2 3 4 5 6 7 8 9 10 โฆ -1 -2 -3 -4
12
Is the set โ + countable? Perhaps surprisingly, yes!
1 2 3 4 0 1 1 1 2 1 3 1 4 1 0 2 1 2 2 2 3 2 4 2 0 3 1 3 2 3 3 3 4 3 0 4 1 4 2 4 3 4 4 4 List p+q = 1 first, then p+q = 2, p+q =3, โฆ This yields the sequence 0 1 , 1 1 , 0 2 , 0 3 , 1 2 , 2 1 , โฆ If we remove the duplicates, we can define a function, ๐: โ + โโ using this method. Since ๐ is a bijection, โ + is countable. โ
13
Is โ countable? No, it is not. We can prove this using a proof method called diagonalization, invented by Georg Cantor. Proof: Assume that the set of real numbers is countable. Then the subset of real numbers between 0 and 1 is also countable, by definition. This implies that the real numbers can be listed in some order, say, ๐ 1 , ๐ 2 , ๐ 3 ,โฆ. Let the decimal representation these numbers be: ๐ 1 =0.๐11๐12๐13๐14โฆ ๐ 2 =0.๐21๐22๐23๐24โฆ ๐ 3 =0.๐31๐32๐33๐34โฆ โฎ = โฎ. โฎ โฎ โฎ โฎ โฑ Where ๐๐๐โ 0,1,2,3,4,5,6,7,8,9 โ๐,๐
14
Proof (continued) Now, form a new decimal number ๐=0. ๐ 1 ๐ 2 ๐3โฆ where ๐๐= 0, if ๐ ๐,๐ =9 1, if ๐ ๐,๐ =0 โฎ Example: ๐1 = โฆ ๐2 = โฆ ๐3 = โฆ โฆ ๐ = 0.242โฆ ๐ is different from all of the ๐ ๐ โs in the list, namely in the ๐th decimal place. We assumed that there was a listing and found an element missing from the listing, thus no such element exists. Therefore the assumption that โ is countably infinite is false. โ
15
Final thoughts Sets are the basis of functions, which are used throughout computer science and mathematics Sequences allow us to represent (potentially infinite) ordered lists of elements Functions allow us to compare sets and their relative sizes. Infinity is crazy! Next time: Integers and division (Section 4.1)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.