Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
Discussion 5 Fall 2007 Week of February 18, 2007 Here are complete solutions to the examples used in the discussions this week: Example 1: Use mathematical induction to prove the following formula 12 + 32 + 52 + … + (2n + 1)2 = (n+1)(2n + 1)(2n + 3)/3 for n 0 Let P(n) = 12 + 32 + 52 + … + (2n + 1)2 = (n+1)(2n+1)(2n+3)/3 for n ≥ 0. Base Case: P(0): LHS: (2*0+1)2 RHS: 1*1*3/3. Hypothesis: assume 12 + 32 + 52 + … + (2k + 1)2 = (k+1)(2k+1)(2k+3)/3 for k≥ 0. Induction Step: Show P(k) P(k+1) 12 + 32 + 52 + … + (2k + 1)2 + (2(k+1)+1)2 = (k+1)(2k+1)(2k+3)/3 + (2k+3)2*3/3 = (2k+3)*[(k+1)(2k+1)/3 + (2k+3)*3/3] = (2k+3)*[2k2+k+2k+1+6k+9]/3 = (2k+3)*[2k2+9k+10]/3 = (2k+3)[(k+2)(2k+5)]/3 You may stop right here if you wish = (k+2)(2(k+1) + 1)(2(k+1) + 3)/3 Example 2: Prove the following statement in two ways—direct and by induction. n3 + 2n is divisible by 3 for all nonnegative integers n. direct: n (mod 3) can have one of three values: 0, 1, or 2 Case 0: n = 3k. (3k)3 + 2(3k) = 3(9 k3 + 2k) Therefore 3|( n3 + 2n) in this case Case 1: n = 3k+1. (3k+1)3 when divided by 3 leaves a remainder of 1, and 2(3k+1) when divided by 3 leaves a remainder of 2 If these two terms are added, the remainder is 3 mod 3 or 0 so the expression is divisible by 3. Case 2: n = 3k + 2. (3k + 2)3 has a constant term of 8 when multiplied out and 8 mod 3 = 2. 2(3k + 2) has a constant term of 4 when multiplied out and 4 mod 3 = 1. Again, if these two terms are added, the remainder is 3 mod 3 or 0 so that the expression is divisible by 3. Induction: Let P(n) = 3 |( n3+2n). Base case: P(0). 03+2*0 = 0 and 3 | 0. Hypothesis: Assume P(k) is true i.e. assume 3|(k3 + 2k) Induction step: Consider (k+1)3+ 2(k+1) = (k2+2k+1)(k+1) + 2k + 2 = k3+k2+2k2+2k+k+1+2k+2 = (k3+2k)+3k2+3k+3 = (k3+2k)+3(k2+k+1). By hypothesis (k3+2k) is divisible by 3 so the whole expression is. Example 3: Prove that (1 + x)n > 1 + xn for n > 1, x > 0 Base case: n=2, x=1. LHS: (1+1)2 = 4 RHS: 1+12 = 2. LHS > RHS. Hypothesis: P(k): Assume (1+x)k > 1+xk. (n>1, x>0) Induction step: (1 + x)k+1 = (1 + x)k(1 + x) = (1+x)k + x(1 + x)k > 1+xk + x(1 + xk) = 1 +xk + x + xk+1 = 1 + xk+1 + xk + x > 1 + xk+1 since dropping the xk + x will make the RHS of the expression smaller Example 4: Prove or disprove 22n – 1 is divisible by 3 for n 1. Counterexample: n=2. 22*2-1 = 44-1=43. 43 is not divisible by 3. Example 5: Remind them of the definition for the Fibonacci numbers (p. 126) and prove exercise 8 parts a and b on page 131 in the text. (Answers are in the back of the book.) 8.(a): Show P(n) = Fn < 2n-1, for all n 2. Base Cases: P(2): F2 = 1 and 1< 21, Hypothesis: for k>=3, Fk < 2k-1 Induction Step: Fk+1 = Fk + Fk-1 < 2k-1 + 2k-2 (Using the induction hypothesis) < 2k-1 + 2k-1 =(2k-1)(1+1) = (2k-1)21 = 2k. 8.(b): Show P(n) = F2+F4+…+F2n = F2n+1-1, for all n 1. Base case: P(1): LHS: F2*1 = 1 RHS F2*1+1-1 = F3-1 = 2-1 = 1. Hypothesis: Assume for k>=2, F2+F4+…+F2k = F2k+1-1 Induction Step: Consider F2 + F4 + …+F2k + F2k+2 = (F2k+1-1) + F2k+2 By the induction hypothesis = F2k+1 + F2k+2 - 1 =F2k+3-1 By the definition of the Fibonacci numbers 4. Using the predicates below, use quantifiers to express each of the following statements. The universe is the set of all people at KU. S(x): “x is a student” N(x): “x is a novel” R(x, y): “x has read y” a. b. c. “Judy is a student who has read some novel.” y(N(y) R(Judy, y)) “Some student has read Moby Dick.” x(S(x) R(x, Moby Dick)) “Every student has read some novel.” x (S(x) y(N(y) R(x, y))) d. “There is a novel that no student has read.” y (N(y) x(S(x) R(x, y))) e. “There is no novel that every student has read.” y(N(y) x(S(x) R(x, y))) f. “There isn’t a novel that no student has read.” y(N(y) x(S(x) R(x, y)))