Download presentation
Presentation is loading. Please wait.
Published byAbraham Gilmore Modified over 8 years ago
1
Basic Structures: Sets, Functions, Sequences, and Sums CSC-2259 Discrete Structures Konstantin Busch - LSU1
2
Sets Konstantin Busch - LSU2 A set is an unordered collection of objects English alphabet vowels: Odd positive integers less than 10: elements of set members of set
3
Konstantin Busch - LSU3 Other set representations Set of positive integers less than 100: Odd positive integers less than 10: omitted elements
4
Konstantin Busch - LSU4 Venn Diagram 1 3 5 7 9 2 4 6 8 Universe
5
Konstantin Busch - LSU5 Useful sets Natural numbers Integers Positive integers Rational numbers Real numbers
6
Konstantin Busch - LSU6 Empty set
7
Konstantin Busch - LSU7 Cardinality (size) of set Number of elements infinite size Finite sets Infinite set
8
Konstantin Busch - LSU8 Equal sets Examples:
9
Konstantin Busch - LSU9 Subset Examples: For any set :
10
Konstantin Busch - LSU10 Proper Subset Examples:
11
Konstantin Busch - LSU11 is equivalent to
12
Konstantin Busch - LSU12 Power set The power set of contains all possible subsets of (and the empty set) Size of power set Power set Special cases
13
Konstantin Busch - LSU13 Ordered tuples (relations) Ordered n-tuple ordered list of elements iff Example:
14
Konstantin Busch - LSU14 Cartesian product Cartesian product of two sets Example: For this case: Size:
15
Konstantin Busch - LSU15 Cartesian product of sets Example: Size:
16
Konstantin Busch - LSU16 Sets and propositions shorthand for Truth set of proposition all elements of the domain which satisfy
17
Set operations Konstantin Busch - LSU17 Union
18
Konstantin Busch - LSU18 Intersection
19
Konstantin Busch - LSU19 Disjoint sets
20
Konstantin Busch - LSU20 Set difference
21
Konstantin Busch - LSU21 Complement
22
Konstantin Busch - LSU22 Size of union
23
Konstantin Busch - LSU23 De Morgan’s laws
24
Show that and Konstantin Busch - LSU24 Theorem: Proof: Part 1: De Morgan’s law from logic
25
Konstantin Busch - LSU25 Part 2: End of Proof De Morgan’s law from logic
26
Konstantin Busch - LSU26 Set identities Identity lawsDomination laws Idempotent laws Complementation law Complement laws De Morgan’s laws
27
Konstantin Busch - LSU27 Commutative lawsAssociative laws Absorption laws Distributive laws
28
Konstantin Busch - LSU28 Generalized unions and intersections
29
Konstantin Busch - LSU29 Example:
30
Konstantin Busch - LSU30 Computer representation of sets Represent sets as binary strings
31
Konstantin Busch - LSU31 Set operations become binary string operations Bitwise OR Bitwise AND
32
Konstantin Busch - LSU32 Powerset of
33
Functions Konstantin Busch - LSU33 Adams Chou Goodfriend Rodriguez Stevens A B C D F NamesGrades
34
Konstantin Busch - LSU34 DomainCodomain Image of Every element of domain has exactly one image maps to
35
Konstantin Busch - LSU35 Adams Chou Goodfriend Rodriguez Stevens A B C D F set of all images Domain Codomain
36
Konstantin Busch - LSU36
37
Konstantin Busch - LSU37 Equal functions same domain same codomain same mapping
38
Konstantin Busch - LSU38 In some programming languages, domain and codomain are explicitly defined int f(int a) { return a*a; }
39
Konstantin Busch - LSU39 Add and multiply functions Real numbers Example:
40
Konstantin Busch - LSU40 Image of set Example: Set
41
Konstantin Busch - LSU41 One-to-one (injection) function implies For every in domain Examples:is one-to-one is not one-to-one: a 1 2 b c d 3 4 5 Each element of range is image of one element of domain
42
Konstantin Busch - LSU42 Increasing function: Strictly increasing: Strictly increasing functions are one-to-one
43
Konstantin Busch - LSU43 Onto (surjection) function For every there is such that Examples:is onto is not onto: a 1 2 b c d 3 Range = Codomain
44
Konstantin Busch - LSU44 One-to-one correspondence (bijection) function Examples:is bijection is not bijection a 1 2 b c d 3 a function which is one-to-one and onto 4 is bijectionIdentity function
45
Konstantin Busch - LSU45 a 1 2 b c 3 4 one-to-one not onto a 1 2 b c 3 not one-to-one onto d a 1 2 b c d 3 4 one-to-one onto a 1 2 b c d 3 4 not one-to-one not onto a 1 2 b c 3 4 not a function
46
Konstantin Busch - LSU46 Inverse of a bijection function when a 1 2 b c d 3 4 domaincodomain a 1 2 b c d 3 4 domain is invertible function Example:
47
Konstantin Busch - LSU47
48
Konstantin Busch - LSU48 Composition of functions Example:
49
Konstantin Busch - LSU49 identity function Suppose
50
Konstantin Busch - LSU50 Floor and Ceiling Floor function: Let be real largest integer less or equal to Ceiling function: smallest integer greater or equal to Examples:
51
Konstantin Busch - LSU51 Factorial function Stirling’s formula:
52
Sequences Konstantin Busch - LSU52 2, 4, 6, 8, 10 1,3,9,27,81,… Finite sequence Infinite sequence function from a subset of integers to a set Sequence: Alternate representation
53
Konstantin Busch - LSU53 Length of string: finite sequence: Empty string (null): String: all elements of sequence concatenated
54
Konstantin Busch - LSU54 Arithmetic progression Initial term Common difference Example:start with
55
Konstantin Busch - LSU55 Geometric progression Initial term Common ratio Example:start with
56
Konstantin Busch - LSU56 Summations Sum: Sequence: Example:
57
Konstantin Busch - LSU57 Theorem: Proof: End of Proof
58
Konstantin Busch - LSU58 Theorem:If are real numbers and, then Proof:Let
59
Konstantin Busch - LSU59 End of Proof
60
Konstantin Busch - LSU60 Useful Summation Formulas
61
Countable Sets Konstantin Busch - LSU61 Any finite set is countable by default An infinite set is countable if there is a one-to-one correspondence from to Countable finite set: Countable infinite set: Positive integers
62
Konstantin Busch - LSU62 Even positive integers: Positive integers: One-to-one Correspondence: corresponds to Theorem:Even positive integers are countable End of Proof Proof:
63
Konstantin Busch - LSU63 The set of rational numbers is countable all rational numbers: Theorem: Proof: We need to find a method to list
64
Konstantin Busch - LSU64 Naïve Approach Rational numbers: Positive integers: One-to-one correspondence: Doesn’t work: we will never list numbers with nominator 2: Start with nominator=1
65
Konstantin Busch - LSU65 Better Approach: scan diagonals Nomin.=1 Nomin.=2 Nomin.=3 Nomin.=4
66
Konstantin Busch - LSU66 first diagonal
67
Konstantin Busch - LSU67 second diagonal
68
Konstantin Busch - LSU68 third diagonal
69
Konstantin Busch - LSU69 Every element will be eventually scanned fourth diagonal…
70
Konstantin Busch - LSU70 Rational Numbers: One-to-one correspondence: Positive Integers: End of Proof Diagonal listing
71
Konstantin Busch - LSU71 Theorem:Set is uncountable Proof:Assume that is countable, then we can list its elements Elements of
72
Konstantin Busch - LSU72 List the elements of
73
Konstantin Busch - LSU73 Create new element based on diagonal
74
Konstantin Busch - LSU74 If diagonal element is 0 then set digit to 1
75
Konstantin Busch - LSU75 If diagonal element is not 0 then set digit to 0
76
Konstantin Busch - LSU76 If diagonal element is 0 then set digit to 1
77
Konstantin Busch - LSU77 If diagonal element is 0 then set digit to 1
78
Konstantin Busch - LSU78 If diagonal element is not 0 then set digit to 0
79
Konstantin Busch - LSU79 By repeating process we obtain new number
80
Konstantin Busch - LSU80 (differ on first digit)Observation:
81
Konstantin Busch - LSU81 (differ on second digit)Observation:
82
Konstantin Busch - LSU82 (differ on third digit)Observation:
83
Konstantin Busch - LSU83 (differ on digit)Observation: for every Contradiction! End of Proof
84
Konstantin Busch - LSU84 It follows that the set of real numbers is uncountable We have proven: It can be proven: Every subset of a countable set is countable
85
Konstantin Busch - LSU85 The previous proof technique is known as: Cantor diagonalization argument The same technique can be used in other proofs
86
Konstantin Busch - LSU86 Theorem:If is an infinite countable set, then the power set is uncountable Proof: Since is countable, we can list its elements Elements of
87
Konstantin Busch - LSU87 Elements of the power set have the form:
88
Konstantin Busch - LSU88 We encode each element of the powerset with a binary string of 0’s and 1’s Powerset elements Binary encoding (in arbitrary order)
89
Konstantin Busch - LSU89 Observation: Every infinite binary string corresponds to an element of the power set Example: Corresponds to:
90
Konstantin Busch - LSU90 Let’s assume (for contradiction) that the power set is countable Then: we can enumerate the elements of the powerset
91
Konstantin Busch - LSU91 Power set element Binary encoding suppose that this is the respective
92
Konstantin Busch - LSU92 Binary string: Complement of diagonal Take the binary string whose bits are the complement of the diagonal 0011
93
Konstantin Busch - LSU93 The binary string corresponds to an element of the power set :
94
Konstantin Busch - LSU94 Thus, must be equal to some : However, the i-th bit in the binary string of is different than the bit of, thus: Contradiction!!! i-th End of Proof
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.