MATH 201 Solutions: TEST 3-A (in class) (revised) God created infinity, and man, unable to understand infinity, had to invent finite sets. - Gian Carlo Rota Part I [5 pts each] 1. Let X be a set. Define P(X), the power set of X. P(X) is the set of all subsets of X. 2. Let F: X Y be a mapping. Define: F is injective. F: X Y is injective if: a, b X F(a) = F(b) a = b 3. Let G: X Y be a mapping. Define: G is surjective. G: X Y is surjective if: c Y a X G(a) = c n 4. Give the combinatorial definition of --- not the means of calculating this number or any other interpretation r using factorials. n r is the number of ways that an (unordered) subset can be chosen from a set of n items. 5. Let S be a set. Define: S is countably infinite. S is countably infinite if there exists a bijection from the set of natural numbers to S. 6. Let R and S be sets. What does it mean to assert that R and S are of the same cardinality? Two sets, R and S, are of the same cardinality if there exists a bijection from R to S
2 7. If A = 9876, then P(A) = If A = 9876, then P(A) = 2 9876 8. Let X and Y be sets and let G: X Y be a bijection. Define G -1 : Y X Let y Y. Since G: X Y is a bijection, there exists one and only one element x X for which G(x) = y. We define G(y) = x. Part II [10 pts each] Answer any 11 of the following 14. You may solve more for extra credit. 1. Here is a partial proof of Cantor s theorem. Your job is to complete it. Theorem: For any set X, P(X) and X are not of the same cardinality. Proof: Let X be a set and P(X) be the power set of X. Strategy: proof by contradiction. Assume that bijection F: X P(X). Define D = {q X q F(q)} Now, since F is surjective, x X for which F(x ) = D. Next, suppose that x D. Then, by definition of D, x F(x ) = D. This is impossible. Thus x D. But, D = F(x ); so x F(x ). This means that x D. But this too is impossible. Hence our assumption that F is a bijection is false. 2. Using the Euclidean algorithm, find gcd(210, 45) 210 = 45*4 + 30 45 = 30*1 + 15 30 = 15*2 + 0
gcd = 15 3 3. Using the extended Euclidian algorithm, find integers x and y such that 56x + 22y = gcd(56, 22). 56 = 22*2 + 12 22 = 12*1 + 10 12 = 10*1 + 2 10 = 5*2 0 Hence gcd(56, 22) = 2 So 2 = 1256 10 = 12 (22 12*1) = 2*12 22 = 2(56 2*22) 22 = 2*56 4*22 22 = 2*56 5*22 Hence 56(2) 22(-5) = 2 4. Odette believes that the set of all finite sequences using the alphabet {a, b, c} is countably infinite. Give proof or counterexample. (For example: aab, cabcab, ccccccccccccccc are all finite sequences.) Odette is correct: Begin by listing all strings of length 1: a, b, c Then all 9 strings of length 2: aa, ab, ac, ba, bb, bc, ca, cb, cc Then all 27 strings of length 3, etc. 5. Swann believes that the set of all infinite sequences using the alphabet {a, b, c} is countably infinite. Give proof or counterexample. (For example: abababab, abcabccccbbaabbbbb are infinite strings.) Swann is mistaken. Just use Cantor s diagonal argument on the set of infinite strings: First string: E 11, E 12, E 13, E 14, Second string: E 21, E 22, E 23, E 24, Third string: E 31, E 32, E 33, E 34, Etc. Define the string e * as follows:
4 a if E i i = b or c e * i = { c if E i i = a Now notice that e * i cannot appear in our infinite list of strings 6. Explain briefly, using only a combinatorial interpretation, why 1776 1776 99 1677 about combinations.) (Use complete sentences. Do not use any formulas. Do not use more general results Let S be a set of 1776 objects. Then there is a bijection between the set of all subsets of S of size 99 and the set of all subsets of S of size 1677. This is true since selecting a subset of size 99 corresponds to selecting a subset of size 1776 99 = 1677. It is not difficult to see that this correspondence is a bijection. 7. Explain briefly, using only a combinatorial interpretation, why 1789 1788 25 25 1788 24 results about combinations.) (Use complete sentences. Do not use any formulas. Do not use more general Let S be a set of 1789 items. Call one of them a *. Then S = (S ~ {a * }) {a * }. Note that (S ~ {a * }) has 1788 items. Two cases (mutually exclusive): Case I: Choose 25 items from S ~ {a * }. Next, if we include {a * }). then we must choose the remaining 24 items from S. Case II: Choose all 25 items from (S ~ {a * }) Hence 1789 1788 25 25 1788 24 8. Given a group of 13 married couples. The number of ways we can choose a subset of 5 individuals from this group which contains no married couple is 13 choose 5 couples: 5 13 From each of the 5 chosen couples, choose 1 of the 2 partners. Hence the number of ways = 2 5 5
5 9. Let A, B be non-empty finite sets. Suppose that A =1789 and B = 2016. Then (a) The number of surjections from A into B is zero. Why? The range of any mapping from A into B cannot contain more than 1789 elements. (b) The number of injections from A into B is P(2016, 1789). Why? Each element of A can choose one of the remaining elements of B. In particular, the first element of A can select from 1789 elements; the second element of A can choose from 1788 elements; etc. 10. Let Q be the set of all rational numbers. Define f: Q Q as follows: (a) Is f well-defined? Justify your answer. 3 x f ( x) 0 if if x 0 x 0 Yes. For any non-zero rational number, x = p/q, we have f(x) = 3/x = 3q/p which is also rational. And, if x = 0, f(0) = 0 is also rational. (b) Is f injective? Why? Yes. Let x and y be non-zero rational numbers. Now assume that f(x) = f(y). Then 3/x = 3/y, which implies that x = y. (c) Is f surjective? Why? Yes: Let y be any non-zero rational number. Then 1/(3y) is also rational and f(1/(3y)) = y. 11. For any real numbers, c and d, let us define the binary operation as follows: c d = c 2 + d 2 1 Give either a brief justification or counterexample for each of the following assertions: (a) The set of integers is closed under the operation. Yes. Integers are closed under taking squares as well as under addition and subtraction.
(b) The set of even integers is closed under the operation. 6 number. No. For a counter-example, let c = 2 amd d = 4. Then c d = c 2 + d 2 1 = 4 + 16 1 = 19, an odd (c) The set of odd integers is closed under. Yes If c and d are odd, then c 2 and d 2 are also odd (proven earlier in class). Since the sum of two odd numbers is even, we have c 2 + d 2 is even. Now c 2 + d 2 1 is odd. (d) The set of positive integers is closed under. Yes. If c and d are positive integers, then c 2 + d 2 must be at least 2. Thus c d = c 2 + d 2 1 is at least 1. (e) The set of rational numbers is closed under. Yes. If c and d are rational, then each of c 2 and d 2 must be rational. Since the sum and difference of two rationals is rational, it follows that c d = c 2 + d 2 1 is also rational. (f) The set of irrational numbers is closed under. No. Let c = d = 2. Then c and d are irrational (as proven in class). But c d = c 2 + d 2 1 = 5, which clearly is rational. 12. Let X = {0, 2, 5, 8, 13, 15} and Y = P(X). Define T: X P(X) as follows: Find D * (as defined in Part II, problem 1) { j} if j is prime j X T( j) {0, 8, 13} if j is not prime Answer: D * = {15} 13. Give an example of three sets, X, Y, S, and two mappings, F: X Y, G: Y S such that G is not injective yet G F is injective. Let X = {a}, Y = {b, c} and S = {d}.
Define F: X Y by: F(a) = c and G: Y S by G(b) = G(c) = d. Then G is clearly not injective, yet G F is injective since the domain of G F consists of a single point. 7 14. Let S be the set of all polynomials for which odd powers of x (i.e., 1, 3, 5, 7, ) do not appear. For example, 4 + ½ x 2 x 8 S, but x 2 5 4 x81 S. (a) Is S closed under differentiation? Why? No. Counter-example. Let p(x) = x 4 ; this is a member of S but dp/dx = 3x 3 is not a member of S. (b) Is S closed under the operation of taking the second derivative? Yes. Let p be a finite sum of terms of the form k x n. where k is any real number and n is any even integer 2 Now d 2 /dx 2 p = kn(n-1) x n-2. But since n is even, n 2 must be even as well. (c) Is S closed under multiplication by x 3? No. Counter-example: Let p(x) = x 4. Then x 4 p(x) = x 7 S. (d) Is S closed under multiplication by x 4? Yes, x 4 p(x) consists of a finite sum of terms of the form x n+4. Since n is even, so is n+4. (e) Is S closed under the following operation *? For all p S p = p(1 + x 4 ) Yes. Let n be a non-negative even integer. Then one must verify that (1 + x 4 ) n consists only of even powers of x. This follows directly from the binomial theorem. (f) Is S closed under the following operation : For all p S p = p(1 + x) No. Counter-example. Let p(x) = x 2. Then p(1 + x) = (1 + x) 2 = 1 + 2x + x 2 S. Extra Credit: When 200! Is expanded, how many consecutive trailing zeroes appear at the end of the number?
200! may be written (uniquely) as the product abc where a is a power of 2, b is a power of 5 and c is neither divisible by 5 nor by 2. Now the number of occurrences of 10 is equal to the number of 5s in 2001! since the 2s are more abundant than the 5s. 8 Now we must count: There are 40 numbers in the product divisible by 5 8 numbers divisible by 25 1 number divisible by 125 Hence the number of 5s (and thus the number of terminating 0s) in 200! Is 40 + 8 + 1 = 49.