Announcements ICS 6B � Quiz schedule online * ● Will allow you to drop 1 quiz Boolean Algebra & Logic ● * Subject to change � Homework is online Lecture Notes for Summer Quarter, 2008 Michele Rousseau Set 4 – Ch. 2.2, 2.3, 8.1 2 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 Today’s Lecture � Chapter 2 �2.2 & 2.3 � ● Set Operations �2.2� Chapter 2: Section 2.2 (con’t) ● Functions �2.3� � Chapter 8 �8.1� ● Relations and their properties �8.1� Set Operations Lecture Set 4 - Chpts 2.2, 2.3, 8.1 3 Proofs Proving Equality – Using Cases There are several ways to construct proofs for sets Prove that the following is true for all sets A, B, and C: � Using Cases If A � C � B � C & A � C � B � C, then A�B. � Logical equivalences First we will show A � B ● Set builder notation Then we will show B � A � Direct Proof � Direct Proof We know that A � C � B � C & A � C � B � C � Membership tables Proof that A � B: ● check out the book for an example � When proving equality you can show that the two Let x � A. We need to show that x � B. sets are subsets of each other We will give a proof by cases, ● To prove A�B show that A � B and B � A depending on whether or not x � C. Lecture Set 4 - Chpts 2.2, 2.3, 8.1 5 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 6 1
� Case 1: x � C Proof using Logical Equivalence In this case x � A � C. Prove that A � �B � C� � �A � B� � �A � C� Because A � C � B � C, we have x � B � C, and hence x � B. Solution: We begin with A � �B � C� and show that this is � Case 2: x �C the same as �A � B� � �A � C� In this case x � A � C �because x � A�. A � �B � C� � � x | x � A � x � B � C � Because A � C � B � C, we have x � B � C. definition of intersection � � x | x � A � �x � B � x � C� � definition of union But x � C. Therefore we must have x � B. � � x | �x � A � x � B� � �x � A � x � C� � distributive law � Cases 1 and 2 show that � � x | �x � A � B� � �x � A � C� � definition of intersection If x � A, then x � B, or A � B. � �A � B� � �A � C� definition of union � A similar proof can be given to show that B � A. � Because A � B and B � A, A � B. 7 8 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 Direct Proof Generalized Unions & Intersections Prove: If A � B c , then B � A c . Solution: Suppose A � B c . We must show that B � A c . To show that B � A c , assume that x � B and show that x � A c . Suppose x � B. A � B � C A � B � C Therefore x � B c . Therefore x � A �because A � B c �. Because of the associative laws we don’t need parenthesis Therefore x � A c . Lecture Set 4 - Chpts 2.2, 2.3, 8.1 9 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 10 Generalized Unions & Intersections Homework for Section 2.2 The union of a collection of sets is the set that � 1,3,7,9,15,21,27,31,33,37 contains those elements that are members of at least one set in the collection. n � � Notation: A 1 � A 2 � … � A n � A i i� 1 The intersection of a collection of sets is the set that contains those elements that are members of all the sets in the collection. n � � Notation: A 1 � A 2 � … � A n � A i i� 1 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 11 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 12 2
What is a function? Let A & B be sets (non-empty). Chapter 2: Section 2.3 A function f from A to B is an assignment of exactly one element of B to each element of a. � Notations: F is a function from A to B or F is a function from A to B or f :A�B F maps A to B Functions Domain Codomain 14 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 More Notations Functions - Examples f :A � B If S is a subset of A then Can also be defined a s a relation from A to B. f�S� � �f�s� | s in S� f :A�B Remember: A relation is a subset of A x B where Z � f�a� � there is one order pair for every element a � A and b � B. A B � The image of d is Z b is the unique element of q � Domain of f is � Domain of f is A = {a b c d} A = {a, b, c, d} f�a��b f� � b a X X B assigned by the function f to A � The codomain is B={X, Y, Z} b � f�A� � Y {Y, Z} a is the preimage of b b Is the image of a c � The preimage of Y is B d Z � The preimages of Z are a, c and d �a,b� is the unique ordered pair � f��c,d�� � {Z} The range of f is the set of all images of points in A under f. We denote it by f�A�. 15 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 16 Definitions One to One or Injection Example � f is one‐to‐one or injective if preimages Let f be a function from A to B. �f :A�B� are unique � f is one‐to‐one or injective if preimages are unique. � Functions that never assign the same ● Note: this means that if a �b then f�a� � f�b�. value to two different domain elements ● Notation: 1‐1 � f is onto or surjective if every y in B has a preimage � f is onto or surjective if every y in B has a preimage. Which are 1‐1? A B ● Note: this means that for every y in B there must be an Domain: Z x in A such that f�x� � y. V a f�x��x � f is bijective or one‐to‐one correspondence if it is b W c surjective and injective f�x��x 2 X but not a d surgection Y ● f�‐1�� f�1� Z f�x��|x| Lecture Set 4 - Chpts 2.2, 2.3, 8.1 17 18 3
Onto or Surjection Example Bijection (one-to one and onto) � f is onto or surjective if every y in B has a � f is bijective if it is surjective and preimage. injective � Every element in the codomain is the A B image of some element in the domain. V a A B A B Which are onto? b W Domain: Z c X a f(x)=x X d b Y f(x)=x 2 Y c When does x 2 =-1? Z d Note: Whenever there is a bijection from A to B, but not an f(x)=|x| the two sets must have the same number of elements or injection the same cardinality . 19 20 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 What about this one? What about this one? A B A B not a surgection a X a X b b Y Y c c not a d function d Z Z not an injection Lecture Set 4 - Chpts 2.2, 2.3, 8.1 21 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 22 Inverse Functions Inverse Functions (Example) f ‐1 f A B Let f be a bijection from A to B. A B Then the inverse of f , is the function from B to A That assigns to an element b the unique element a a V V b Such that f(a)=b. b W W c c X � Notation: f ‐1 � Notation: f X d d d d Y Y � In other words... f ‐1 �b� � a when f�a� � b A bijection is called invertible because you can define the inverse function. To be invertible it must be a bijection. Lecture Set 4 - Chpts 2.2, 2.3, 8.1 23 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 24 4
Composition Composition Example Let g: A � B, f: B � C. g f A B C If f�x �� x 2 and The composition of the functions f and g, a V denoted f � g, is the function from A to C defined g�x��2x�1 h b By f � g (a)=f(g(a)) W Then i c X f�g�x���f �2x�1� j � Apply g�a� then f�g�a�� � Apply g�a� then f�g�a�� d Y Y ��2x�1� 2 � The range of g must be a subset of the � 2x 2 �1 f � g A C domain of f. a h b i c j d 25 26 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 Floors & Ceilings Homework for Section 2.3 The floor function assigns to the real number x � 3, 5, 11, 13, 15, 19 the largest integer that is < x. � Notation: � x � or floor�x� The ceiling function assigns to the real number x The ceiling function assigns to the real number x the smallest integer that is > x. � Notation: � x � or ceiling�x� Examples: � 3.5 � � � 3.5 � � 3, 4 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 27 Lecture Set 4 - Chpts 2.2, 2.3, 8.1 28 Binary Relations Let A and B be sets. A binary relation from A to B is a subset of A x B. Chapter 8: Section 8.1 In other words: It is the ordered pair of elements in two sets. A binary relation then from A to B Relations and their properties is a set R of ordered pairs �a,b� such that a � A and b � B . R� A x B There are no constraints on ordered pairs (like there are on functions) Lecture Set 4 - Chpts 2.2, 2.3, 8.1 30 5
Recommend
More recommend