Presentation is loading. Please wait.

Presentation is loading. Please wait.

Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used.

Similar presentations


Presentation on theme: "Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used."— Presentation transcript:

1 Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used to encompass members of a set A = {a, b, c}a  Ad  A sets may be finite or infinite  is the empty set,  = {}  is a finite set U is the universal set, it contains all possible elements U may be finite or infinite

2 Describing Sets Two Ways: 1)Enumeration – list all elements 2)Generation – general expression and condition Example: The set of all integers between 5 and 13 {5,6,7,8,9,10,11,12,13} {x | 5  x  13 and is integral} {y | 4 < y < 14 and is integral}

3 Subsets When all elements in A are also elements of B : A is a “subset” of B A  B B “contains” or “covers” A  Otherwise, A  B  Any set is a subset of U   is a subset of any set If A  B and B  A, then A = B If A  B and A  B then A is a “proper subset” of B A  B The set of subsets of A is the “power set” of A, P(A)   P(A) and A  P(A) NOTE: A  A and A  A and   A and A  U

4 Some Common Operations The “Union” of A and B is A  B A  B contains elements that are in set A or in set B or in both sets A and B A  B ={x | x  A or x  B} The “Intersection” of A and B is A  B A  B contains the common elements that are in both sets A and B A  B ={x | x  A and x  B} The “Complement” of set A is A C or A A C contains all elements in U that are not in A A = A C = U - A A C ={x | x  A and x  U}

5 Properties of Sets Idempotence Laws: A  A =A, A  A = A Commutative Laws: A  B = B  A, A  B = B  A Associative Laws: A  (B  C) = (A  B)  C, A  (B  C) = (A  B)  C Absorption Laws: A  (A  B) = A, A  ( A  B)= A Distributive Laws: A  (B  C) = (A  B)  (A  C), A  (B  C) = (A  B)  (A  C) Involution Law: A = A Complement Laws: U = ,  = U A  A = U, A  A =  Identity Laws: A   = A, A  U = A A  U = U, A   =  DeMorgan’s Laws: (A  B) = A  B, (A  B) = A  B

6 Venn’s Diagram A B C U

7 Difference Operation A B U A = {1,3,5,6,7,8}B = {1,2,3,4,5} A – B = {6,7,8} B – A = {2,4} A  B = {1,3,5}

8 Cartesian Product 2 elements in a fixed order is a “pair” or “ordered pair” (a,b) n elements in a fixed order is an “ n -tuple” (a 1, a 2, …., a n ) (a 1, a 2, …., a n ) = (b 1, b 2, …., b n ) iff a i =b i  i where 1  i  n The “cartesian product” or “direct product” of 2 sets A and B the set of all ordered pairs of A and B A  B EXAMPLE: A={0, 1} B ={0, 1, 2} A  B = {(0,0),(0,1),(1,0),(0,2),(1,1),(1,2)} “Cardinality” or “size” of set A is | A |=n A | A  B | = n A  n B = 2  3 = 6

9 Propositional Functions A Propositional Function, F(x,y), is Defined on A  B Ordered Pair (a,b) Substituted for (x,y)(a,b)  A  B F(x,y) Can be a Proposition (F(x,y ) is either true or false, but not both) EXAMPLE: x is less than y x weighs y pounds x divides y x is the spouse of y A Relation, R, is Defined Over: 1)a set A 2)a set B 3)a proposition F(x,y) R = (A, B, F(x,y)) if F(a,b) is true then aRb if F(a,b) is false then aRb

10 Set Relations If R  A  B, then R is a “binary relation” EXAMPLE: R  A  B a i  A b i  B if (a i,b i )  R then a i R b i and “relation R holds” if (a i,b i )  R then a i R b i “relation R does not hold” Inverse Relation, R -1, is all pairs in R with reverse order R -1 = {(b j,a i )|(a i,b j )  R } R =(A, A, F(x,y)) is an “equivalence relation” on set A if: 1)aRa (reflectivity) 2)If aRb then bRa (symmetry) 3)If aRb and bRc then aRc (transitivity) a, b, c  A

11 Equivalence Relation Consider R = (Z, Z, F(x,y)) where Z is the set of all positive integers and F(x,y) is the Proposition that x = y R  Z  Z = {(1,1), (2,2), (3,3) ….} For any z i  Z it is true that z i R z i Reflectivity is Satisfied For any z i, z j  Z, if F(z i,z j ) is true then F(z j,z i ) is true Symmetry is Satisfied For any z i, z j,z k  Z, if F(z i,z j ) and F(z j,z k ) then F(z j,z k ) Transitivity is Satisfied R is an Equivalence Relation over Z

12 Set Partitions A Partition of A denoted by [a] satisfies: [a]  A Consider a Set of Subsets of A {A 1, A 2, …, A n } The A i are Partitions of A if: 1)A = A 1  A 2  …  A n 2)Either A i = A j or A i  A j =  (disjoint subsets) EXAMPLE Consider A={1,2,3,…,9,10}, B 1 ={1,3}, B 2 ={7,8,10}, B 3 ={2,5,6} and B 4 ={4,9} 1)A = B 1  B 2  B 3  B 4 2)B i  B j =   i  j {B 1, B 2, B 3, B 4 } are Partitions of A

13 Equivalence Class R is a “binary relation” over set A Partition A into “blocks” such that [a]={x | a R x, x  A} Set [a] is an “equivalence class” of A over R An arbitrary element of A is a member of exactly one equivalence class Set of all equivalence classes over R on A is the “quotient set” of A wrt R A / R The number of equivalence classes “rank” of R

14 Equivalence Class Example R = (A, A, F(x,y)) F(x, y) is Proposition that K=x (mod 3), K is a Constant NOTE: F(x, y)= F(x) in this case, a unary proposition A ={0,1,2,3,4,5,6,7,8,9,10} [a 1 ]={0,3,6,9}, [a 2 ]={1,4,7,10}, [a 3 ]={2,5,8} Each Partition is an Equivalence Class A / R ={{0,3,6,9},{1,4,7,10},{2,5,8}} Rank of R is 3

15 Logic Notation “proposition” is a sentence with a clear meaning allowing its’ evaluation of true or false Fire is cold -FALSE Let P and Q be propositions P  Q means that if P holds then Q holds P  Q means that P is true iff Q is true, or, P is a “necessary” and “sufficient” condition for Q If P  Q : P is a “sufficient condition” of Q Q is a “necessary condition” of P P  Q does not necessarily mean that Q  P Q  P is the “converse” of P  Q If P  Q then Q  P Q  P is the “contraposition” of P  Q

16 Refinement R 1 and R 2 are Equivalence Relations over A if xR 1 y  xR 2 y for x, y  A then R 1 is a “refinement” of R 2 R 1  R 2 EXAMPLE: A={011, 100, 110, 111} R 0 =(A,A, F 0 )R 1 =(A, A,F 1 ) R 0 and R 1 are Equivalence Relations F 0 proposition that all corresponding bits are same F 1 is proposition that right two bits are same R 0 ={(011,011),(100,100),(110,110),(111,111)} R 1 ={(011,011),(011,111),(100,100),(110,110),(111,011),(111,111)} R 0 is a refinement of R 1 R 0  R 1

17 Definition of a Function A and B are sets, f is a function that maps a i  A to b j  B f: A  B f(a i )=b j a i f b j A is the “domain” of f b j is the “value” of function f b j = f(a i )  B is an “image” of a i  A A Relation R f may be Defined from f f : A  B, f(a i )= b j iff (a i, b j )  R f f -1 is the “inverse relation” of function f: A  B f -1 is NOT, in general, a function f -1 (b j ) IS an “inverse image” of b j f -1 (b j )  A

18 Operation “unary” operation is a function, f : A  A “binary” operation is a function, f : A  A  A (e.g. a i * a j = a k, (a i,a j )  a k ) EXAMPLE B = {0,1}a,b  B a = 1 - a (unary-complement) a  b = a b (binary-conjunction) a  b = a + b - (a b) (binary-disjunction) a  b = a + b - (2 a b) (binary-exclusive OR)

19 Ordered Relations R is a Binary Relation on A For a,b,c  A if the following hold: 1)aRa (Reflexive Law) 2)If aRb and bRa then a=b (Anti-Symmetric Law) 3)If aRb and bRc then aRc (Transitive Law) R is said to be a “Partially Ordered Relation” Also, if  a,b  A, aRb or bRa then R is said to be a “Total Order Relation” Such ordered relations are denoted as a  R b rather than aRb

20 Ordered Sets R is a binary Relation on A For a,b,c  A if the following hold: 1) aRa (Reflexive Law) 2)If aRb and bRa then a=b (Anti-Symmetric Law) 3)If aRb and bRc then aRc (Transitive Law) R is said to be a “Partially Ordered Relation” Also, if  a,b  A, aRb or bRa then R is said to be a “Total Order Relation” Such ordered relations are denoted as a  R b rather than aRb An ordered set consists of an order relation and the set over which it is defined  A,  R 

21 Hasse Diagrams R is a binary Relation on A For a,b,c  A such that a  R b and a  b if there is no element c such that a  R c, c  R b where a  b  c then b “covers” a Hasse Diagrams are useful for visualizing cover characteristics Covering elements appear ABOVE Covered elements and are connected by a line “Maximal Elements” are those which are NOT Covered “Minimal Elements” are those which do NOT cover any other Elements

22 Hasse Diagram Examples 1 is the maximal element 0 is the minimal element 1 0 ab e f d c (1,1) (0,0) (0,1) (1,0) (1,1) is the maximal element (0,0) is the minimal element a and b are the maximal elements c is the greatest lower bound of { a, b } e and f are the minimal elements d is the least upper bound of { e, f }

23 Least Upper Bound, Greatest Lower Bound Let  A,  R  be an ordered set and let B  A a  A is Upper Bound of B if b  R a,  b  B a  A is Lower Bound of B if a  R b,  b  B If there is a minimum element in the set of the upper bounds of B, then it is the Least Upper Bound of B (denoted by a  b ) If there is a maximum element in the set of the lower bounds of B, then it is the Greatest Upper Bound of B (denoted by a b )


Download ppt "Set Theory Concepts Set – A collection of “elements” (objects, members) denoted by upper case letters A, B, etc. elements are lower case brackets are used."

Similar presentations


Ads by Google