Discussion Summary 10/16/018 1 Quiz 4 1.1 Q1 Let r R and r > 1. Prove the following by induction for every n N, assuming that 0 N as in the book. r 1 + r + r 3 + + r n = rn+1 r r 1 Proof. Let S n = Σ n i=1 ri and T (n) = rn+1 r r 1. (1) Basis Step. S 1 = r. T (1) = r r r 1 = r.thus, S 1 = T (1). () Inductive Step. Assume S k = T k, k N, S k+1 = S k + r k+1 = rk+1 r r 1 + r k+1 = rk+1 r + r k+ r k+1 r 1 = rk+ r r 1 = T (k + 1) 1. Q A sequence a n for n N is defined by a 1 = 0 and a n = a n 1 + n for n > 1. Prove by induction that a n = (n 1) n for all n N. Solution 1: Proof. Let F (n) = (n 1) n. 1
(1) Basis Step. Because a 1 = 0. and F (1) = (1 1) 1 = 0. Therefore, a 1 = F (1). () Inductive Step. Assume a k = F (k). a k+1 = a k + k+1 = (k 1) k + k+1 = (k 1) k+1 + k+1 = k k+1 = F (k + 1) Solution : Proof. Notice that if divide both sides with n, then an b n = an, then n b 1 = a 1 = 0 b n = b n 1 + 1 n = an 1 n 1 + 1. Let It can be easily proved by induction that b n = n 1. Therefore, an n = n 1 and a n = (n 1) n. Relation and Functions.1 Relations R is a relation from a set A to a set B when R A B. (1) a R b (a, b) R () a R b (a, b) / R R is a relation on S if R is a relation from S to S, or R S S. Let R be a relation on S, then R is (1) reflexive if a S, (a, a) R. (e.g. R is on Z and a R b if a + b is even.) () symmetric if a, b S, (a, b) R, (b, a) R. (e.g R is on R and a R b if ab = 0.) (3) transitive if a, b, c S, (a, b) R and (b, c) R, then (a, c) R. (e.g. R is on R and a R b if a > b.)
Eg. 1. The following are relations on the set R of real numbers. Which of the properties reflexive, symmetric and transitive does each relation below possess? (a) x R 1 y if x y 1. (b) x R y if y x + 1. (c) x R 3 y if y = x. (d) x R 4 y if x + y = 9. (a) Reflexive, as a R, a a = 0 1. Symmetric, as a b = b a so if a b 1 then b a 1. Not transitive. Let a = 1, b =, c = 3, then we have a R 1 b and b R 1 c, but a R 1 c. (b) Not reflexive. Let a = then a R a. Not symmetric. Let a = 5 and b = 1, then a R b but b R a. Not transitive. Let a =, b = 5, c = 10, then a R b and b R c, but a R c. (c) Not reflexive, e.g a =. Not symmetric, e.g. a =, b = 4. Not transitive, e.g. a =, b = 4, c = 16. (d) Not reflexive, e.g. a = 1. Symmetric. Not transitive, e.g. a = 1, b =, c = 1.. Equivalence Relations R is an equivalence relation if it is reflexive, symmetric and transitive. Let R be an equivalence relation on a set A. For a A, the equivalence class [a] = {x A : x R a}. [a] = [b] if and only if a R b. Eg.. A relation R is defined on the set Z of integers by a R b if a b is a multiple of 3. (a) Prove that R is an equivalence relation. (b) Describe the distinct equivalence classes resulting from R. 3
(a) a Z, a a = 0 which is a multiple of 3, so a R a and R is reflective. a, b Z, if a R b, then a b is a multiple 3. Let a b = 3k where k Z, then b a = 3k, which is also a multiple of 3, so we have y R x as well, so R is symmetric. a, b, c Z, if a R b and b R c, then a b and b c are both multiples of 3. Let a b = 3m and b c = 3n where m, n Z. By summing up the two equations, we obtain a b + b c = 3m + 3n a c = 3(m + n). Observe that a c is also a multiple of 3, so a R c and R is transitive. Therefore, R is an equivalence relation. (b) There are 3 different equivalence classes: [0], [1], []..3 Functions Grade = f(will,effort,knowledge,environment). Function Let A and B be two nonempty sets. A function f from A to B is a relation from A to B that associates with each element of A a unique element of B. f is denoted as f : A B. Image of an element is an element. Suppose f : A B, a A, b B and f(a) = b. b is the image of a under f. Image of a set is a set. Suppose f : A B and X A. The image of X under f is the set f(x) = {f(x) : x X} Domain, Codomain, range If f : A B is a function from a set A to a set B, then A is called the domain of f and B is called the codomain of f. The range of f(a) is the set of images of elements of A, namely f(a) = {f(a) : a A} Composition of Functions Let f : A B and g : B C. The composition of g f is the function from A to C defined by (g f)(a) = g(f(a)) for a A 4
1 3 4 5 A R 1 a 1 b c d e B 3 4 5 A R f = R 3 a 1 b c d e B 3 4 5 A (a) (b) (c) Figure 1: Definition of functions. a b c d e B In Fig. 1, the relation R 1 is not a function because for the element in the domain, it has two images c and d. The relation R is not a function either because element 4 in the domain doesn t have any image. R 3 is a relation because every element in the domain A has exactly one image in the codomain B. For a set S = {1,, 3}, the image f(s) = {a, d, b}. 5
Eg. 3. (Page 167. Ex.6) Let f : A B be a function. Prove that if A 1, A A, then f(a 1 A ) f(a 1 ) f(a ). Proof. b f(a 1 A ), a A 1 A, f(a) = b. a A 1 A a A 1. Thus, b = f(a) f(a 1 ) and b = f(a) f(a 1 ) f(a ). Eg. 4. Give an example of function f such that A 1, A A, f(a 1 ) f(a ) f(a 1 A ). Consider (a special case of the mod function that return the remainder of an integer divided by )f : {1,, 3, 4} {1, 0}, f(1) = f(3) = 1, f() = f(4) = 0. LetA 1 = 1, A = 3, then A 1 A =. f(a 1 ) f(a ) = {1} {1} = {1}, while f(a 1 A ) =..4 Bijective Functions Injective. function f : A B is injective if every two distinct elements in A have distinct image in B. That is a, b A, a b, thenf(a) f(b). Surjective. function f : A B is surjective if every element in B is the image of some element in A. Bijective. Being both injective and surjective. Figure : Illustration of injective, surjective and bijective functions. Eg. 5. (Page 18. Ex.4) Prove or disprove each of the following. (a) f : A B and g : B C, such that f is not one-to-one and g f : A C is one-to-one. 6
(b) f : A B and g : B C, such that f is not onto and g f : A C is onto. (a) There does not exist such functions f and g. Proof. Prove by contradiction/counter example. Assume f : A B and g : B C, such that f is not one-to-one and g f : A C is one-to-one. f is not one-to-one, a 1, a A, a 1 a, such that f(a 1 ) = f(a ). g(f(a 1 )) = g(f(a )) and g f(a 1 ) = g f(a ), a 1 a. Thus g f : A C is not one-to-one. (b) The following figure gives such function..5 Cardinalities of Sets (a) Having the same cardinality Two nonempty sets A and B have the same cardinality, A = B if a bijective function from A to B. (b) Denumerable, Countable A set A is denumerable/countably infinite if A = N. A set is countable if it is either finite or denumerable. (c) Uncountable A set is uncountable if it is not countable. 7
Eg. 6. (Page 190. Ex.6) (a) Prove that f : R 1 R, defined by f(x) = x x 1 (b) Show that R 1 = R is bijective. (a) Proof. Let X = R 1, Y = R. x (i) prove f is one-to-one. x 1, x X such that f(x 1 ) = f(x ), 1 x = 1 1 x x. x 1 1(x 1) = x (x 1 1), x 1 x x 1 = x 1 x x. Thus, x 1 = x. Therefore f is one-to-one. x x 1 (ii) prove f is onto. y Y, y =, y(x 1) = x. x = y y. Since y y, x 1. Therefore y = f( y y ), y is always an image of some x X. (b) Obviously, by definition. Eg. 7. (Page 190. Ex.10) Prove or disprove. There is no set having more elements than the set of real numbers R. By Theorem5.86, R < P(R). 8