Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Discrete Mathematics, Spring 2004 Homework 1 Sample Solutions Problem #1. Using induction, verify that 1(1!) + 2(2!) + . . . + n(n!) = (n + 1)! − 1 for all positive integers n. Solution: let P (n) be the statement “1(1!) + 2(2!) + . . . + n(n!) = (n + 1)! − 1.” We prove that P (n) is true for all n ≥ 1 by induction on n. Base case: 1(1!) = 1, (1 + 1)! − 1 = 2 − 1 = 1. Thus P (1) is true. Inductive step: Assume that P (n) is true. Then 1(1!) + 2(2!) + . . . + (n + 1)[(n + 1)!] = [1(1!) + 2(2!) + . . . + n(n!)] + (n + 1)[(n + 1)!] = (n + 1)! − 1 + (n + 1)[(n + 1)!] by assumption = (n + 1)![1 + (n + 1)] − 1 = (n + 2)! − 1. Therefore P (n + 1) is true, and by induction the claim is proved. Problem #2. By experimenting with small values of n, guess a formula for the sum 1 1 1 + + ··· + . 1·2 2·3 n(n + 1) Then use induction to verify your formula. Solution: Easy calculations show that the above sum equals 1/2, 2/3, 3/4 for n = 1, 2, 3 respectively. Therefore we guess that in general the sum equals n/(n + 1). Here is the formal proof. Let P (n) be the statement “1/(1 · 2) + 1/(2 · 3) + · · · + 1/[n(n + 1)] = n/(n + 1).” Clearly 1 P (1) is true, since 1/(1 · 2) = 1/2. Now assume P (n) is true; then 1 1 1 + + ··· + 1·2 2·3 (n + 1)(n + 2) 1 1 1 1 + + ··· + + 1·2 2·3 n(n + 1) (n + 1)(n + 2) 1 n + by assumption n + 1 (n + 1)(n + 2) n(n + 2) + 1 n2 + 2n + 1 = (n + 1)(n + 2) (n + 1)(n + 2) 2 n+1 (n + 1) = . (n + 1)(n + 2) n+2 = = = = Therefore P (n + 1) is true, and by induction the claim is proved. Problem #3. Show that postage of 24 cents or more can be achieved by using only 5cent and 7-cent stamps. Solution: Let P (n) be the statement “Postage of n cents can be created using only 5-cent and 7-cent stamps.” We claim that P (n) is true for all n ≥ 24. Base cases (n = 24, . . . , 28): we can explicitly verify that P (n) is true for these. That is, 24 = 2 · 7 + 2 · 5, 25 = 5 · 5, 26 = 3 · 7 + 5, 27 = 7 + 4 · 5, 28 = 4 · 7. Inductive step: For n ≥ 29, assume that P (k) is true for all 24 ≤ k < n. Then since 24 ≤ n − 5 < n, we can by assumption create n − 5 cents worth of postage using only 5-cent and 7-cent stamps. Adding a 5-cent stamp to this postage, we have created n cents of postage using only 5-cent and 7-cent stamps. Thus P (n) is true, and we have verified the claim by induction. Problem #4. Verify the inequality n (a1 a2 · · · a2n )1/2 ≤ a1 + a2 + . . . + a2n 2n when n = 1, 2, . . . and the ai are positive numbers. Solution: we prove the claim by induction on n. 2 Base case: we need to show that (ab)1/2 ≤ 12 (a + b) whenever a, b are positive numbers. First observe that (a − b)2 ≥ 0 for all such a, b; hence √ a2 − 2ab + b2 ≥ 0 ⇒ a2 + 2ab + b2 ≥ 4ab ⇒ (a + b)2 ≥ 4ab ⇒ a + b ≥ 2 ab, and this yields the desired inequality. Inductive step: assume that n (a1 a2 · · · a2n )1/2 ≤ a1 + a2 + . . . + a2n 2n for any positive numbers a1 , . . . , a2n . Then for positive numbers a1 , . . . , a2n+1 we have n+1 (a1 a2 · · · a2n+1 )1/2 n 1/2 n 1/2 · (a2n +1 a2n +2 · · · a2n+1 )1/2 (a1 a2 · · · a2n )1/2 a1 + a2 + . . . + a2n 1/2 a2n +1 + a2n +2 + . . . + a2n+1 1/2 ≤ 2n 2n = by assumption. Let a be the first term in brackets on the right hand side and b the second term, so the right hand side has the form a1/2 b1/2 , where a, b > 0. The base case shows us that (ab)1/2 ≤ 21 (a + b), and hence a1 + a2 + . . . + a2n 1/2 a2n +1 + a2n +2 + . . . + a2n+1 1/2 2n 2n a2n +1 + a2n +2 + . . . + a2n+1 1 a1 + a2 + . . . + a2n + 2 2n 2n a1 + a2 + . . . + a2n+1 . 2n+1 ≤ = Thus the claim is proved by induction. Problem #5. Prove by contradiction that if 35 coins are distributed among 11 bags so that each bag contains at least one coin, then at least three bags must contain the same number of coins. Solution: Suppose the claim is false. Then we can distribute the coins among 11 bags so that each bag contains at least one coin, and so that at most 2 bags contain any given number of coins. But then the total number of coins in the 11 bags must be at least 1+1+2+2+3+3+4+4+5+5+6 = 36, contradicting our assumption that there were 35 coins to begin with. By contradiction, the claim is proved. 3 Problem #6. Consider an 8 × 8 checkerboard with the upper left and lower right squares removed, so that 62 1 × 1 squares remain. Prove by contradiction that the remaining squares cannot be covered by a collection of 31 2 × 1 dominoes with no overlaps. (Hint: how do you color a checkerboard?) Solution: Color the checkerboard in the usual fashion (alternating black and white squares), and remove the upper left and lower right corners. These must be the same color (say white), and so of the remaining squares, 30 will be white and 32 will be black. Now suppose that the claim is false. Then we could tile this “deficient” checkerboard by 31 2 × 1 dominoes. However, since each domino covers 2 adjacent squares, the collection of dominoes would have to cover 31 black squares and 31 white squares. By contradiction, our claim is proved. 4