Math 220, Section 203 Solutions to Study Questions for Second Midterm March 17, 2003 I. Suppose that a1 , a2 , . . . are negative real numbers. Prove, using induction on n, that for all n ∈ N, the number (−1)n a1 × · · · × an is positive. The base case n = 1 is easy: given that a 1 is negative, we have (−1)1 a1 = − a1 is positive. For the inductive step, assume that (−1) n a1 × · · · × an is positive; we want to prove that (−1)n+1 a1 × · · · × an+1 is positive. We have (−1)n+1 a1 × · · · × an+1 = (−1)n (−1)1 a1 × · · · × an × an+1 = (−1)n a1 × · · · × an × (−1)an+1 . The first factor (−1)n a1 × · · · × an is positive by the induction hypothesis, while the second factor (−1) an+1 = − an+1 is positive by the assumption that an+1 is negative. Since the product of two positive numbers is positive, we conclude that (−1) n+1 a1 × · · · × an+1 is positive as desired. II. (D’Angelo and West, p. 75, #3.58(a)) Let R be a 2 k by 2k chessboard with one corner square removed. Prove that R has an L-tiling. (L-tilings are described in Solution 3.72 on pages 61–62 of D’Angelo and West.) We proceed by induction on k. In the base case k = 1, the board R is a 2 × 2 board with a corner square missing; this is exactly the same shape as a single L-tile, and therefore R definitely has an L-tiling (consisting of one L-tile). For the induction step, we assume that a 2 k × 2k board with a corner square missing has an L-tiling, and we want to prove that a 2 k+1 × 2k+1 board with a corner square missing has an L-tiling. The useful fact is that we can split a 2 k+1 × 2k+1 board into quarters, each of which will be a 2k × 2k board. If we use a single L-tile near the center of the board, then each quarter will have a single corner square missing: 1 By the induction hypothesis, there is an L-tiling of each of these four 2 k × 2k quarter boards with a corner missing. Therefore, there is an L-tiling of the entire 2 k+1 × 2k+1 board with a corner square missing III. Imagine a robot that, whenever it sees a positive integer n written down, subtracts the number of digits of n from n and writes the answer down. For instance, if the robot saw the integer 108 written down, it would subtract 3 (since 108 has three digits) and write the number 105 down. Suppose you could tell the robot to keep doing this with all the numbers it writes down. For example, after writing down 105, the robot would write down 102, then 99, then 97, and so on. Prove that no matter what positive integer n the robot first sees, eventually the robot will see the number 1 written down. Let P(n) be the statement “if the robot sees the number n, then eventually it will see the number 1”; we prove this statement for all n ∈ N by strong induction on n. Base case: n = 1. If the robot sees the number 1, then clearly it will eventually see the number 1—in fact it happens right away. This proves P(1). Induction step: Let n > 1 be a natural number, and assume (as the induction hypothesis) P(1) ∧ P(2) ∧ . . . ∧ P(n − 1); that is, assume that if the robot sees any number between 1 and n − 1, then it will eventually see the number 1. We need to prove P(n), namely, if the robot sees the number n then it will eventually see the number 1. So assume the robot sees the number n. Then the robot will immediately write down the number n − d, where d is the number of digits in n. If 1 ≤ n − d ≤ n − 1 (we haven’t proved this yet, but we will shortly), then the statement P(n − d) is part of our strong induction hypothesis; therefore the robot, having seen the number n − d, will eventually see the number 1. Now we proceed to prove the key inequalities 1 ≤ n − d ≤ n − 1. Certainly the number of digits d is at least 1, so n − d ≤ n − 1. On the other hand, we claim that if n > 1 then n > d. If d = 1, then n must be one of the one-digit numbers 2, 3, . . . , 9 (since n > 1), and so n > d in this case. If d ≥ 2, then the smallest d-digit number is a 1 followed by d − 1 0’s, which equals 10d−1 . Therefore n ≥ 10d−1 . If we can show that 10d−1 > d for every d ≥ 2, then it will follow that n > d. In both cases, n > d implies n − d ≥ 1, since they are both integers. So now we are left with proving that 10 d−1 > d for every d ≥ 2. We give a miniinduction proof of this inequality. The base case is d = 2, which we see directly: 10 2−1 = 10 > 2. For the induction step, assume that 10 d−1 > d; we need to prove that 10 d > d + 1. But then 10d = 10 · 10d−1 > 10d = d + 9d > d + 1 as desired. This finally completes the proof. IV. (D’Angelo and West, p. 268, #13.6) Find the flaw in the argument that claims to prove that the set of real numbers between 0 and 1 is countable. (See the textbook for the argument.) The list constructed in the argument does not contain a single real number whose decimal expansion is infinite. It contains real numbers whose decimal expansions are finite and really long, but that’s not the same thing. So real numbers like − 3 = 0.1415926 . . . , or even 1/3 = 0.333333 . . . , are not included in the sequence. 2 V. (D’Angelo and West, p. 268, #13.7) Prove that every infinite subset of a countably infinite set is countably infinite. Prove that every set that contains an uncountable set is uncountable. Conclude that R is uncountable if [0, 1] is uncountable. These have all been mentioned in class. Suppose T is an infinite subset of the countably infinite set S. Since S is countably infinite, it can be written as {s 1 , s2 , s3 , . . . }. In this notation, T looks something like {s3 , s7 , s8 , s15 , s192 , . . . }; in general, T can be written as {si1 , si2 , si3 , . . . } where i1 < i2 < i3 < . . . are natural numbers. Therefore T can be written as an infinite sequence, and hence T is countably infinite. The first statement can be reworded as “suppose T is an infinite subset of S; if S is countably infinite, then T is countably infinite”. The second statement, which can be reworded as “suppose T is a subset of S; if T is uncountable, then S is uncountable”, is simply the contrapositive of the first statement. (One might well quibble about the omission of the fact that T is infinite; however, this is part of the definition of T being uncountable, and so we haven’t cheated.) Therefore we really have proved the second statement as well. The third statement now follows immediately from the second, since R definitely contains the subset [0, 1] which we are supposing to be uncountable. VI. (D’Angelo and West, p. 270, #13.37) Explain why the technique of Theorem 13.27 does not prove that Q is uncountable. (See the statement of the problem in the textbook for the full statement of the question.) We can certainly list the elements of Q and create the decimal expansion for a number y that is not on the list. However, y is a real number, but there is no reason to think that y is a rational number! Since we don’t know that y ∈ Q, we can’t conclude that the original list fails to contain all rational numbers. VII. (D’Angelo and West, p. 270, #13.39) Prove that R × R has the same cardinality as R. It is tricky to write down a rigorous proof that is correct in every detail, but here is the idea: define a function f : R → R × R that “unzips” the decimal expansion of the input into two output decimal expansions. For example, f (12345.6789) = (24.68, 135.79) f (3.1415926535 . . . ) = (0.11963 . . . , 3.45255 . . . ) f (102.030403040304 . . . ) = (12.343434 . . . , 0.000 . . . ). Then f is essentially a bijection from R to R × R. (Well, almost . . . there are some technical problems due to coincedences between certain terminating and repeating decimal expansions, such as 0.129999999 · · · = 0.13. But these difficulties can be overcome.) VIII. Write down four different bijections f : N → N. Here are four examples: • The identity function f (n) = n. This should be on everybody’s list! • The function that switches 1 and 2: f (1) = 2, f (2) = 1, and f (n) = n for n ≥ 3. There are many variations on this—you could find four different bijections of this type alone. • The function that swaps the odd and even numbers: f (n) = n + 1 when n is odd, f (n) = n − 1 when n is even. 3 • All kinds of crazy bijections! For instance, let f be the function that takes the digits of n, except for any final zeros, and reverses them; for instance, f (123) = 321, f (40567000) = 76504000, f (90) = 90, and so on. This is a bijection since we can uniquely identify the input from the output; in other words, the function is invertible—in fact it is its own inverse! IX. (a) How many bijections are there from the set [3] to itself? (b) How many injections are there from the set [3] to itself? (c) How many functions are there from the set [3] to itself? (a) If f is a bijection from [3] to [3], then f (1) must be either 1, 2, or 3, giving three choices so far. Then f (2) must be one of the two values not equal to f (1), giving another two-way choice; and then the value of f (3) is forced upon us. Therefore the number of possible bijections is 3 × 2 = 6. (In general, there are n! bijections from [n] to itself.) (b) Since every injection from a finite set to itself is automatically a bijection (and vice versa), the answer here is 6 as well. (c) There are three choices for f (1), three choices for f (2), and three choices for f (3), and so there are a total of 3 × 3 × 3 = 27 functions from [3] to [3]. (In general, if | A| = a and | B| = b, then the number of functions from A to B is b a .) X. Let A be a countably infinite set, and let B be any set. Prove that A − B is either finite or countably infinite. The statement A is countably infinite ⇒ (A − B is finite) ∨ ( A − B is countably infinite) is logically equivalent to ( A is countably infinite) ∧ (A − B is infinite) ⇒ A − B is countably infinite (convert both to their or-forms to verify). But we have already proved the second statement in problem V above, since A − B is an infinite subset of the countably infinite set A. XI. Prove that all of the following sets have the same cardinality as one another: (a) R (b) (0, 1) (c) (s, t), for any real numbers s < t (d) (0, ∞) (Note that it is not enough to show that all four sets are uncountable!) A proof that R and (0, 1) have the same cardinality is given in Solution 4.46 on page 90 of D’Angelo and West. Here’s another proof: the function f : R → (0, 1) given by f ( x) = e x /(e x + 1) is a bijection (verify, perhaps by finding the inverse function). To prove that (0, 1) and (s, t) have the same cardinality, all we have to do is find a bijection between the two sets. The linear function f : (0, 1) → (s, t) defined by f ( x) = (t − s) x + s does the trick (verify that it is a bijection). To prove that R and (0, ∞) have the same cardinality, we can similarly note that g : R → (0, ∞) defined by g( x) = e x is a bijection (verify). We have now done enough to show that all the sets have 4 the same cardinality: for instance, (0, ∞) has the same cardinality as R, which has the same cardinality as (0, 1), which has the same cardinality as (s, t), and so (0, ∞) has the same cardinality as (s, t). There are other ways to show this directly—for example, look at the function ( x − s)/( x − t)—but there’s no need to do the extra work. XII. Suppose that F is a finite set with F ∩ N = ∅. Prove that F ∪ N is countably infinite, by finding a bijection from N to F ∪ N. Since F is finite, we can write F = { f 1 , . . . , f k } for some natural number k. We think of the set F ∪ N as the sequence { f 1 , . . . , f k , 1, 2, 3, . . . }. This motivates defining a function g : N → F ∪ N by ( fn , if n ≤ k, g(n) = n − k, if n > k. We first prove that g is injective. Consider two distinct elements m and n in the domain of F (so m 6= n). If both m and n are greater than k, then g(m) = m − k and g(n) = n − k are different values. If both m and n are less than or equal to k, then g(m) = f m and g(n) = f n are different as well. Finally, if one of m and n is greater than k and the other is not, then the two values are certainly different, since one value is in N and the other value is in F. Therefore g is injective. We now prove that g is surjective. Let y be an element of the target F ∪ N. Then either y ∈ F or y ∈ N. If y ∈ F, then y = f n for some n ∈ [k], and hence y = g(n). If y ∈ N, then the integer y + k is greater than k and hence g( y + k) = ( y + k) − k = y. In either case, y is in the image of g, and so g is surjective. We have constructed a bijection g from N to F ∪ N, thereby showing that F ∪ N is countably infinite. XIII. Prove the following statement: if m and n are natural numbers with m < n, and if S is a set with m elements and T is a set with n elements, then every function f : S → T is not surjective. (In other words, a function from a “small” set to a “big” set can’t attain all the possible values in the target. Hint: prove this statement by induction on m.) Let P(m) be the following statement: for any natural number n > m, and any sets S and T with m and n elements respectively, and any functon f : S → T, it is true that f is not surjective. We prove (∀m ∈ N)( P(m)) by strong induction on m. The base case m = 1 is easy; if S = {s 1 }, and T is a set with at least two distinct elements t1 6= t2 , then it is impossible for f (s1 ) = t1 and f (s1 ) = t2 . In particular, at least one of t 1 and t2 is not in the image of f , and hence f is not surjective. Now we assume that P(1), . . . , P(m − 1) are all true and prove that P(m) is true. So let S and T be sets with m and n elements, where n > m, and let f : S → T be any function. Choose any specific element t ∈ T. If t is not in the image of f , then we’re done— f is not surjective—so we may assume that t is in the image of T. Define U = {s ∈ S : f (s) = t}, the set of all elements of S that are mapped to t by f . Now define S 0 = S − U and T 0 = T − {t}. The function f can be considered as a function from S 0 to T 0 , since we have taken away t from the target and everything that is mapped to t from the domain. Now S0 has fewer elements than S (remember we are assuming that at least one element of S is mapped to t), say k elements where k ≤ m − 1. Also, T 0 has exactly n − 1 elements. Since m < n, we have k ≤ m − 1 < n − 1. Therefore the induction hypothesis P(k) tells us that this function from S0 to T 0 is not surjective, that is, there is an element of T 0 that is not a value of the function. But this element is not a value of the function even if we put U back 5 into the domain, since every element of U is mapped to t. Therefore f is not surjective, which proves P(m). XIV. Determine, with proof, the image of the function f : (−2, 2) → R defined by the formula f ( x) = | x − 1| − | x + 1| + x. We claim that the image of f is [−1, 1]. Note that | x − 1| equals x − 1 when x > 1 and 1 − x when x ≤ 1; similarly, | x + 1| equals x + 1 when x ≥ −1 and − x − 1 when x < −1. Therefore we may restate the definition of f as (1 − x) − (− x − 1) + x = x + 2, if − 2 < x < −1, f ( x) = (1 − x) − ( x + 1) + x = − x, if − 1 ≤ x ≤ 1; ( x − 1) − ( x + 1) + x = x − 2, if 1 < x < 2. First we show that the image of f is contained in [−1, 1]. Let x be in the domain (−2, 2); we must show that f ( x) ∈ [−1, 1]. We split into three cases: • Suppose −2 < x < −1. Then adding 2 to these inequalities gives 0 < x + 2 < 1. Since f ( x) = x + 2, we see that f ( x) is an element of (0, 1) ⊆ [−1, 1] in this case. • Suppose −1 ≤ x ≤ 1. Then multiplying these inequalities through by −1 gives 1 ≥ − x ≥ −1. Since f ( x) = − x, we see that f ( x) is an element of [−1, 1] in this case. • Suppose 1 < x < 2. Then subtracting 2 from these inequalities gives −1 < x − 2 < 0. Since f ( x) = x − 2, we see that f ( x) is an element of (−1, 0) ⊆ [−1, 1] in this case. Therefore the image of f is indeed contained in [−1, 1]. We must now show that [−1, 1] is contained in the image of f . Let y ∈ [−1, 1]. If we choose x = − y, then certainly x ∈ [−1, 1] ⊆ (−2, 2). We easily check (from the original definition of f or from the three-cases formula given above) that f ( x) = − x = y. Therefore y is contained in the image of f as desired. We conclude that the image of f is exactly equal to [−1, 1]. XV. Let J = (−∞, 3). For each of sup ( J ) and inf ( J ), either determine (with proof) the value or prove that the value does not exist. Note that by the definition of J, we have x ∈ J if and only if x < 3. First we show that inf ( J ) does not exist. Let w be any real number. There exists a real number x such that x < 3 and x < w, for instance x = min {2, w − 1}. Since such an x is in J, we see that w is not a lower bound for J. Therefore J has no lower bound whatsoever, hence certainly not an infimum. Next we show that sup ( J ) = 3. We have already noted that x ∈ J implies x < 3, and so 3 is an upper bound for J. (This already proves that sup ( J ) exists, by the Completeness Axiom, although it doesn’t yet tell us the exact value.) Suppose w < 3; we need to prove that w is not an upper bound for J. Set x = 3+2 w (any number between w and 3 will do). The inequalities w + w < w + 3 < 3 + 3 = 6 are both true by the assumption w < 3; dividing through by 2 yields w < x < 3. Since x < 3 we have x ∈ J, and since w < x we see that w is not a lower bound for J. This proves that sup ( J ) = 3. 6 XVI. We have seen that some sets do not have a supremum. Prove that for every finite set F, the supremum sup ( F ) does exist and is always an element of F. (Hint: one way to prove this is by induction on the number of elements in F.) Let P(n) be the following statement: for any finite set F with n elements, the supremum sup ( F ) exists and is an element of F. We prove the statement (∀n ∈ N) P(n) by induction on n. B ASE CASE : When n = 1, the set F equaly simply { f 1 } for some real number f 1 . We claim that sup ( F ) = f 1 ; proving this will verify the statement P(1). We need to show that f 1 is an upper bound for F and that no number smaller than f 1 is an upper bound for F. The first assertion is true because every element of F (there’s only one!) is less than or equal to f 1 (in fact equal!). The second assertion is true because given any w < f 1 , there is an element of F (namely f 1 ) that is greater than w, and so w cannot be an upper bound for F. I NDUCTION STEP : Suppose that n is a natural number for which P(n) is true; we need to prove that P(n + 1) is true. So let F = { f 1 , . . . , f n+1 } be a finite set with n + 1 elements; we need to prove that sup ( F ) exists and is in F. Write F 0 = { f 1 , . . . , f n }, and notice that if x ∈ F then either x = f n+1 or x ∈ F 0 . Since F 0 is an n-element set, the induction hypothesis P(n) tells us that sup ( F 0 ) exists and is in F 0 . We now split into two cases: • f n+1 ≥ sup( F 0 ). We claim that sup ( F) = f n+1 . To see that f n+1 is an upper bound for F, let x be any element of F. Then either x = f n+1 , in which case certainly x ≤ f n+1 , or else x ∈ F 0 , in which case x ≤ sup ( F 0 ) ≤ f n+1 . Therefore f n+1 is an upper bound for F. There can’t be an upper bound for F that is smaller than f n+1 either, since f n+1 itself is in F. Therefore sup ( F ) = f n+1 . • f n+1 < sup( F 0 ). We claim that sup( F) = sup ( F 0 ). To see that sup ( F 0 ) is an upper bound for F, let x be any element of F. Then either x = f n+1 , in which case x < sup ( F 0 ) by assumption, or else x ∈ F 0 , in which case x ≤ sup ( F 0 ) by definition. Moreover, the induction hypothesis says that sup ( F 0 ) is an element of F 0 , hence an element of F as well. Therefore no number smaller than sup ( F 0 ) can be an upper bound for F, since sup ( F 0 ) itself is in F. Therefore sup ( F ) = sup ( F 0 ). In either case we have shown that sup ( F ) exists and is an element of F, thus verifying P(n + 1) and completing the inductive step. (Remark: an extremely similar proof shows that inf ( F ) also exists for any finite set and is an element of that set.) 7