MATH 7 ummer 06 Assignment 4 solutions Problem Let A, B, and C be some sets and suppose that f : A B and g : B C are functions Prove or disprove each of the following statements (a) If f is one-to-one then g f is one-to-one olution This statement is false Consider the functions f and g defined by the following diagrams: A f B g C Then f is clearly one-to-one, but g f is not one-to-one (b) If both f and g are one-to-one then g f is one-to-one olution This statement is true Proof Assume that f is one-to-one and g is one-to-one (We will show that g f is one-to-one) Let a, a A and assume that (g f)(a ) = (g f)(a ) (We will show that a = a ) Then g ( f(a ) ) = g ( f(a ) ) which means that f(a ) = f(a ) since g is one-to-one a = a But f is also one-to-one, which means that (c) If g f is one-to-one then f is one-to-one olution This statement is true Proof Assume that g f is one-to-one (We will show that f is one-to-one) Let a, a A ans assume that f(a ) = f(a ) (We will show that a = a ) ince f(a ) = f(a ), applying g to both sides gives us g ( f(a ) ) = g ( f(a ) ) or (g f)(a ) = (g f)(a ) But g f is one-to-one, so a = a (d) If g f is one-to-one then g is one-to-one olution This statement is false Consider the functions defined by the following diagrams: A f B g C
Then g f is clearly one-to-one, but g is not one-to-one (e) If g f is one-to-one and f is onto then g is one-to-one olution This statement is true Proof Assume that g f is one-to-one and that f is onto (We will show that g is one-to-one) Let b, b B and assume that g(b ) = g(b ) (We will show that b = b ) ince f is onto, there exists an a A so that f(a ) = b imilarly, there exists an a A so that f(a ) = b ince g(b ) = g(b ), this gives us g ( f(a ) ) = g ( f(a ) ), which means (g f)(a ) = (g f)(a ) But g f is one-to-one, which means that a = a Hence f(a ) = f(a ) and thus b = f(a ) = f(a ) = b, so b = b Problem Consider the set = {,,, 4, 5, 6, 7, 8, 9, 0} and let F denote the set of all functions from to Define a relation R on F by: for all f, g F, f R g if and only if x so that f(x) = g(x) Let α F be the function defined by α(x) = for each x Let h F be the function defined by h(x) = x+ for each x (a) Is R reflexive? ymmetric, Transitive? Prove your answers olution The relation R is reflexive and symmetric, but not transitive Proof (that R is reflexive) Let f F be arbitrary Then f() = f(), so there is at least one x so that f(x) = f(x) Hence f R f, so R is reflexive Proof (that R is symmetric) Let f, g F be arbitrary and assume that f R g Then there is at least one x so that f(x) = g(x) Hence g(x) = f(x) for that x, which means that g R f, so R is symmetric Proof (that R is not transitive) Let f, g F be the functions defined by f(x) = {, if x =,, if x and g(x) = {, if x =,, if x Function diagrams for these two functions are the following: f g Then f R α since f() = = α() and α R g since g() = = α() But f /R g since f(x) g(x) for all x Thus R is not transitive
(b) Prove or disprove the statement: f F so that g F, f R g olution This statement is false Its negation is: f F, g { so that f /R g Proof (of the negation) Let f F be arbitrary Pick g to be the function defined by {, if f(x) =, g(x) =, if f(x) It is clear that g(x) f(x) for all x Indeed, let x be an element of Then f(x) = or f(x) If f(x) =, then g(x) = If f(x), then g(x) = f(x) In either case, g(x) f(x) for all x This proves the statement (c) How many functions f F are there so that f R α? Explain olution There are 0 0 9 0 The reasoning is as follows Consider the set A = {f F f R α} We want to count A It is easier to count the complement A c = F A, which is the set of functions that are not related to α That is, A c = {f F f /R α} Note that A = F A c The recipe for counting the functions that are not related to α is as follows: Choose a value for f() It cannot be, otherwise f() = α() There are 9 other choices Choose a value for f() It cannot be, otherwise f() = α() There are 9 other choices 0 Choose a value for f(0) It cannot be, otherwise f(0) = α(0) There are 9 other choices Hence A c = 9 0 There are 0 0 total functions from to, so A = F A c = 0 0 9 0 (d) How many functions f F are there so that f R h? Explain olution There are 0 0 9 0 The reasoning is as follows Consider the set H = {f F f R h} We want to count H It is easier to count the complement H c = F H, which is the set of functions that are not related to h That is, H c = {f F f /R h} Note that H = F H c The recipe for counting the functions that are not related to h is as follows: Choose a value for f() It cannot be (since h() = ), otherwise f() = h() There are 9 other choices Choose a value for f() It cannot be (since h() = ), otherwise f() = h() There are 9 other choices Choose a value for f() It cannot be (since h() = ), otherwise f() = h() There are 9 other choices 0 Choose a value for f(0) It cannot be 6 (since h(0) = 6), otherwise f(0) = h(0) There are 9 other choices Hence H c = 9 0 There are 0 0 total functions from to, so H = F H c = 0 0 9 0
(e) How many functions f F are there so that f /R α or f /R h? Explain 4 olution The answer is 9 0 8 0 The reasoning is as follows The functions that we want to count are the functions f F such that f /R α or f /R h Note that f /R α f / A f A c imilarly, note that f /R h f / H f H c This means that we want to count the functions f so that f A c or f H c That is, we want to count the functions f in A c H c Consider the following picture: F A c H c We want to count the union of A c and H c That is, we want to count the shaeded region of the following diagram: F A c H c The number of elements in this set is A c H c = A c + H c A c H c, where A c H c is the set that is the shaded region of the following diagram: F A c H c Note that f A c H c means that f /R α and f /R h We can count the nubmer of functions that are not related to both α and h by the following recipe: Choose a value for f() It cannot be, otherwise f() = α() =, and it cannot be (since h() = ), otherwise f() = h() There are 8 other choices Choose a value for f() It cannot be, otherwise f() = α() =, and it cannot be (since h() = ), otherwise f() = h() There are 8 other choices
5 Choose a value for f() It cannot be, otherwise f() = α() =, and it cannot be (since h() = ), otherwise f() = h() There are 8 other choices 0 Choose a value for f(0) It cannot be, otherwise f(0) = α(0) =, and it cannot be 6 (since h(0) = 6), otherwise f(0) = h(0) There are 8 other choices Hence A c H c = 8 0 Now A c H c = A c + H c A c H c = 9 0 + 9 0 8 0 Problem Consider the set Z + of all positive integers Let be the relation on Z + Z + defined by for all (a, b) and (c, d) in Z + Z + (a, b) (c, d) if and only if a + b = c + d (a) Prove that is an equivalence relation on Z + Z + olution Proof We prove that is reflexive, symmetric, and transitive (Reflexive) Let (a, b) Z + Z + be an arbitrary pair of positive integers Then a + b = a + b, so (a, b) (a, b) Hence is reflexive (ymmetric) Let (a, b) Z + Z + and (c, d) Z + Z + be arbitrary pairs of positive integers Assume that (a, b) (c, d) Then a + b = c + d which means that c + d = a + b Hence (c, d) (a, b) and thus is symmetric (Transitive) Let (a, b), (c, d), (e, f) Z + Z + be arbitrary pairs of positive integers Assume that (a, b) (b, c) and (b, d) (e, f) Then a + b = c + d and c + d = e + f and thus a + b = d + f since = is transitive Hence (a, b) (e, f) and thus is transitive Thus is an equivalence relation because it is reflexive, symmetric, and transitive (b) List all elements of [(, )] and all elements of [(4, 4)] olution Note that + = 9 Then (a, b) (, ) if and only if a + b = 9 The elements of [(, )] are [(, )] = {(, 4), (, ), (5, ), (7, )} Note that 4 + 4 = Then (a, b) (4, 4) if and only if a + b = The elements of [(4, 4)] are [(4, 4)] = {(, 5), (4, 4), (6, ), (8, ), (0, )} (c) Is there an equivalence class of that has exactly 7 elements? Explain olution Yes Consider the equivalence class of (, 7) The elements are [(, 7)] = {(, 7), (, 70), (5, 69),, (54, )} = {(54 k, k) k =,,, 7}, which has 7 elements (d) How many equivalence classes of are there that contain at most 7 elements?
6 olution There are 7 = 54 equivalence classes that contain at most 7 elements Note that for each n Z +, there are two exactly equivalence classes that contain exactly n elements Indeed, we see that [(, )] = {(, )} and [(, )] = {(, )} are the only equivalence classes that contain exactly element For each n, the equivalence classes and [(, n)] = {(, n), (, n ), (5, n ),, (n, )} [(, n)] = {(, n), (4, n ), (6, n ),, (n, )} are the only classes that contain exactly n elements For each n =,,, 7 there are exactly equivalence classes containig n elements o there are a total of 7 classes that have at most 7 elements