Presentation is loading. Please wait.

Presentation is loading. Please wait.

Discrete Mathematics CS 2610 August 31, 2006. 2 Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities.

Similar presentations


Presentation on theme: "Discrete Mathematics CS 2610 August 31, 2006. 2 Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities."— Presentation transcript:

1 Discrete Mathematics CS 2610 August 31, 2006

2 2 Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities Cartesian Product

3 3 Sets A set is an unordered collection of objects. Examples: { 1, 6, 7, 2, 9 } { a, d, e, 1, 2, 3} The empty set, or the set containing no elements.  = {} Note:   {  } = {6, 7, 1, 2, 9} = {a, a, d, d, e, e, 1, 2, 3} Order and repetition don’t matter Singleton is a set S that contains exactly one element

4 4 Universal Set Universal Set is the set containing all the objects under consideration. It is denoted by U

5 5 Set Builder Notation Set Builder – characterize the elements in a set by stating the properties that the elements must have to belong to the set. { x | P (x) }  reads x that satisfy P(x), x such that P(x)  x belongs to a universal set U. concise definition of a set Examples: P = { x | x is prime number} U : Z + M={ x | x is a mammal} U: All animals Q + = { x  R | x = p/q, for some positive integers p, q }

6 6 Elements of sets x  S means “x is an element of set S.” x  S means “x is not an element of set S Example: 3  S reads: “3 is an element of the set S ”. Which of the following is true: 1. 3  R 2. -3  N

7 7 Subsets A  B means “A is a subset of B” or, “B contains A” “every element of A is also in B” or,  x ((x  A)  (x  B)) A  B means “A is a subset of B” B  A means “B is a superset of A”

8 8 Subsets A  B means “A is a subset of B” For Every Set S, i)   S the empty set is a subset of every set ii) S  S every set is a subset of itself

9 9 Proper Subsets A subset A of B is said to be a proper subset if A is not equal to B. iff, A  B and A  B iff, A  B and there is x  B and x  A.  x ((x  A)  (x  B))   x ((x  B)  (x  A)) This is sometimes written A  B.

10 10 Set Equality A = B if and only if A and B have exactly the same elements. iff, A  B and B  A iff, A  B and A  B iff,  x ((x  A)  (x  B)).  To show equality of sets A and B, must prove both: A  B B  A

11 11 Set Cardinality The cardinality of a set is the number of distinct elements in the set. |S | denotes the cardinality of S. S = {1,2,3} S = {5,5,5,5,5,5} S =  S = { , {  }, { ,{  }} } A set S is said to be finite if its cardinality is a nonnegative integer. Otherwise, S is said to be infinite. Given N = {0,1,2,3,…}, |N| is infinite (natural nos.) |S| = 3 |S| = 1 |S| = 0 |S| = 3

12 12 Power Sets The power set of S is the set of all subsets of S. P(S) = { x | x  S } If S = {a}, P(S) = ? If S = {a,b}, P(S) = ? If S = , P(S)= ? Fact: if S is finite, |P(S)| = 2 |S|. { , {a}} { , {a}, {b}, {a, b}} {}{}

13 13 n-Tuples An ordered n-tuple, n  Z +, is an ordered list (a 1, a 2, …, a n ). Its first element is a 1. Its second element is a 2, etc. Enclosed between parentheses (list not set). Order and length matters: (1, 2)  (2, 1)  (2, 1, 1).

14 14 Cartesian Product The Cartesian Product of two sets A and B is: A x B = { (a, b) | a  A  b  B} Example: A= {a, b}, B= {1, 2} A  B = {(a,1), (a,2), (b,1), (b,2)} B  A = {(1,a), (1,b), (2,a), (2,b)} Not commutative! In general, A 1 x A 2 x … x A n = {(a 1, a 2,…, a n ) | a 1  A 1, a 2  A 2, …, a n  A n } |A 1 x A 2 x … x A n | = |A 1 | x |A 2 | x … x |A n |

15 15 Union Operator The union of two sets A and B is: A  B = { x | x  A v x  B } Example: A = {1,2,3}, B = {1,6} A  B = {1,2,3,6}

16 16 Intersection Operator The intersection of two sets A and B is: A  B = { x | x  A  x  B} Example: A = {1,2,3}, B = {1,6} A  B = {1} Two sets A, B are called disjoint iff their intersection is empty. A  B =  Example: A = {1,2,3}, B = {9,10}, C = {2, 9} A and B are disjoint sets, but A and C are not

17 17 Set Theory : Inclusion/Exclusion What is the cardinality of A  B ? A B ABAB Once twice |A  B| = |A| + |B| - |A  B|

18 18 Set Complement The complement of a set A is: A = { x | x  A} Example: U = N A = {x  N | x is odd } A = {x  N | x is even }  = U U =  x  A  x  A

19 19 Set Difference The set difference, A - B, is: A - B = { x | x  A  x  B } Example: A = {2,3,4,5 }, B = {3,4,7,9 } A- B = {2, 5} B – A = {7,9} It is not commutative!!


Download ppt "Discrete Mathematics CS 2610 August 31, 2006. 2 Agenda Set Theory Set Builder Notation Universal Set Power Set and Cardinality Set Operations Set Identities."

Similar presentations


Ads by Google