discrete mathematics discrete mathematics
play

Discrete Mathematics Discrete Mathematics -- Chapter 3: Set Theory - PowerPoint PPT Presentation

Discrete Mathematics Discrete Mathematics -- Chapter 3: Set Theory Hung-Yu Kao ( ) Department of Computer Science and Information Engineering, N National Cheng Kung University l Ch K U Outline 3.1 Set and Subsets 3 2 Set


  1. Discrete Mathematics Discrete Mathematics -- Chapter 3: Set Theory Hung-Yu Kao ( 高宏宇 ) Department of Computer Science and Information Engineering, N National Cheng Kung University l Ch K U

  2. Outline � 3.1 Set and Subsets � 3 2 Set Operations and the Laws of Set Theory � 3.2 Set Operations and the Laws of Set Theory � 3.3 Counting and Venn Diagrams � 3.4 A First Word on Probability � 3 5 The Axioms of Probability � 3.5 The Axioms of Probability � 3.6 Conditional Probability: Independence � 3.7 Discrete Random Variables 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 2

  3. Why Set? 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 3

  4. 3.1 Set and Subsets � Set : should be a well-defined collection of objects. � Elements ( members ): These objects are called elements or members of the set members of the set. could be another set, 1 ≠ {1} ≠ {{1}} � � Capital letters represent sets: A , B , C p p lowercase letters represent elements: x , y ∈ ∉ � E.g., x A , y B � A set can be designated by listing its elements within set braces A et be de i ted b li ti it ele e t ithi et b e “ { “,” } ”. � E.g., A = {1, 2, 3, 4, 5}, B = { x | x is an integer, and 1 ≤ x ≤ 5} g { } { | g } � Cardinality ( size ): | A | denotes the number of elements in A . � for finite sets 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 4

  5. Set and Subsets � Universe ( Universe of discourse ): h denotes the range of all elements to form any set. � Definition 3.1: If C and D are sets from a universe h fi i i 3 1 f C d f i Subset : , if every element of C is an element of D . ⊆ ⊇ C D ( D C ) � ⊂ ⊂ ⊂ ⊂ Proper subset : , if, in addition, D contains an Proper subset : C C D D ( ( D D C C ) ) if in addition D contains an � � element that is not in C . ⊄ C D ( i.e., C is not a subset of D ) ⊆ ⇔ ∀ ∈ ⇒ ∈ C D x [ x C x D ] � ⇔ ⇔ ¬∀ ∀ ∈ ∈ ⇒ ⇒ ∈ ∈ x x [ [ x x C C x x D D ] ] ⇔ ∃ ¬ ∈ ⇒ ∈ x [ x C x D ] ⇔ ⇔ ∃ ¬ ¬ ∈ ∨ ∈ x x [ [ ( ( x x C C ) ) x x D ] ] ⇔ ∃ ¬¬ ∈ ∧ ¬ ∈ x [ ( x C ) ( x D )] ⇔ ∃ ∈ ∧ ∉ x [ x C x D ] 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 5

  6. Set and Subsets � Definition 3.2: The sets C and D are equal for a given universe h , = ⇔ ⊆ ∧ ⊆ C D ( C D ) ( D C ) ⊆ ⊆ ⊆ ⊆ a ) If A B and B C , then A C � Let A , B , C h , ⊂ ⊆ ⊂ b ) If A B and B C , then A C ⊆ ⊂ ⊂ c ) ) If f A B and d B C , then h A C ⊂ ⊂ ⊂ d ) If A B and B C , then A C � Let h = {1, 2, 3, 4, 5} with A = {1, 2, 3}, B = {3, 4}, and C = {1, 2, 3, 4}. Then the following subset relations hold: ⊆ ⊂ ⊂ a ) A C b ) A C c ) B C � ⊆ ⊄ ⊄ d ) A A e ) B A f ) A A A is not a proper subset of A 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 6

  7. Set and Subsets � Null set ( empty set ), ∅ or { }: is the set containing no elements. | ∅ |=0 but {0} ≠∅ � ∅ ≠ { ∅ } ∅ ≠ { ∅ } � � � Power set , P ( A ): is the collection (set) of all subsets of the set A from universe h . � Example: A = {1, 2, 3} P ( A ) = { ∅ , {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, A } � � For any finite set A with | A |= n F fi it t A ith | A | � A has 2 n subsets and | P ( A )|= 2 n ⎛ n ⎞ � There are subsets of size k, 0 ≤ k ≤ n � There are subsets of size k 0 ≤ k ≤ n ⎜ ⎜ ⎜ ⎜ ⎝ k ⎠ � Counting the subsets of A (binomial theorem) ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ n n n n n n n n ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ + + + + ⋅ ⋅ ⋅ + + = = ∑ ∑ 2 2 ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ = k 0 0 1 n k ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ ⎝ ⎠ 2009 Spring 2009 Spring Discrete Mathematics – Discrete Mathematics – CH3 CH3 7

  8. Set and Subsets � Theorem 3.2 φ φ ⊆ φ φ φ φ ⊂ φ φ { { } } ? ? { { } } ? ? T T φ ⊆ φ φ ⊂ φ ? ? F T 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 8

  9. Set and Subsets Ex 3.9: � � Gray code: There is exactly one bit that changes from one Another Gray code Another Gray code bi binary string to the next one. i h 0 Φ 00 0 Φ 000 000 000 1 { } 1 {x} 10 0 {x} 10 0 { } 100 100 010 010 001 001 (a) 11 0 {x, y} 110 011 101 01 0 {y} 01 0 {y} 010 010 001 001 100 100 0 0 Φ 0 0 Φ 01 1 {y, z} 011 101 110 1 0 {x} 11 1 {x, y, z} 111 111 010 1 1 {x, y} { y} 10 1 {x, z} 101 110 011 0 1 {y} 00 1 {z} (c) 001 (d) 100 (e) 111 (f) (b) 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 9

  10. Set and Subsets � Ex 3.12 { } = Let A x , a , a , , a and consider all subsets of A that contain r elements. L 1 2 n ⎛ + n 1 ⎞ ⎛ n ⎞ ⎛ n ⎞ ⎜ ⎜ = = ⎜ ⎜ + + ⎜ ⎜ There There are are subsets subsets. ⎜ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ − r r r 1 ⎝ ⎠ ⎝ ⎠ ⎠ 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 10

  11. Set and Subsets � Ex 3.13 E 3 13 the number of nonnegativ e integer solutions + + + < of the inequality x x x 10 L 1 2 6 ∀ ≤ ≤ + + + = k , 0 k 9 , the number of solution t o x x x k is L 1 2 6 ⎛ + + − ⎛ + ⎛ + ⎛ ⎞ ⎞ ⎞ ⎞ 6 6 k k 1 1 5 5 k k ⎜ ⎟ = ⎜ ⎟ + − ⎛ ⎞ ⎛ ⎞ 7 9 1 15 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ = ⎜ ⎟ in chapter 1, k k ⎝ ⎠ ⎝ ⎠ ⎜ ⎟ ⎜ ⎟ 9 9 ⎝ ⎠ ⎝ ⎠ 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 11

  12. Set and Subsets N + 0 , N + ⊆ Q + Z Q + ∩ = + R C R R ⊆ + Q ∩ = * Q Z Z + ∪ + = + Z R R 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 12

  13. 3.2 Set Operations and the Laws of Set p Theory � Definition 3.5: For A and B ⊆ h ∪ = ∈ ∨ ∈ a ) A B (the union of A and B ) { x | x A x B } ∩ = ∈ ∧ ∈ b ) A B (the intersecti on of A and B ) { x | x A x B } ∆ c ) A B (the symmetric difference of A and B ) = ∈ ∨ ∈ ∧ ∉ ∩ = ∈ ∪ ∧ ∉ ∩ { x | ( x A x B ) x A B } { x | x A B x A B } � Definition 3.6: The sets S , T ⊆ h , are called disjoint ∩ T ∩ T = = φ φ (mutually disjoint), when (mutually disjoint) when S S . 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 13

  14. Set Operations and the Laws of Set p Theory � Theorem 3.3: If S , T ⊆ h are disjoint if and only if ∪ = ∆ S T S T ∈ ∪ ∪ ⇒ ⇒ ∈ ∪ ∪ ∈ � Proof: � Proof: ( ( 1 1 ) ) x S S T T x S S x T T ∉ ∩ ⇒ ∈ ∆ But S and T disjoint, i.e., x S T , x S T ∴ ∪ ⊆ ∆ ∆ S S T T S S T T ∈ ∆ ⇒ ∈ ∪ ∈ ( 2 ) y S T y S y T ⇒ ∈ ∪ y S T ∴ ∆ ⊆ ∪ S T S T ∪ ⊆ ∆ ∆ ⊆ ∪ S T S T and S T S T Q ∴ ∪ = ∆ S T S T Prove the converse by the method of proof by contradiction 2009 Spring 2009 Spring Discrete Mathematics Discrete Mathematics – – CH3 CH3 14

  15. Set Operations and the Laws of Set p Theory � Definition 3.7: For a set A ⊆ h , the complement of A , denoted ∈ ∧ ∉ { x | x x A } h – A or , is given by h A � Definition 3.8: For A , B ⊆ h , the (relative) complement of A in B , ∈ ∧ ∉ denoted B – A or, is given by { x | x B x A } � Ex 3.18 : For h = R , A = [1, 2], B = [1, 3) � Ex 3 18 : For h = R A = [1 2] B = [1 3) � = ≤ ≤ ⊆ ≤ < = a ) A { x | 1 x 2 } { x | 1 x 3 } B = ≤ ≤ < < = ∪ ∪ = { { x x | | 1 1 x x 3 3 } } B B b b ) ) A A B B ? ? = ≤ ≤ = { x | 1 x 2 } A ∩ = c) A B ? = −∞ ∞ ∪ ∪ +∞ +∞ ⊆ ⊆ −∞ ∞ ∪ ∪ +∞ +∞ = d d ) ) B B ( ( , , 1 1 ) ) [ [ 3 3 , , ) ) ( ( , , 1 1 ) ) ( ( 2 2 , , ) ) A A � Theorem 3.4: The following statements are equivalent: ⊆ ⊆ ∪ ∪ = ∩ ∩ = ⊆ ⊆ (a (a ) ) A A B B (b (b ) ) A A B B B B (c) (c) A A B B A A (d) (d) B B A A 2009 Spring 2009 Spring Discrete Mathematics – Discrete Mathematics – CH3 CH3 15

Recommend


More recommend