38 PS5 Solutions

38 PS5 Solutions - Handout #38 May 3, 2010 CS103 Robert...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Handout #38 CS103 May 3, 2010 Robert Plummer Problem Set #5—Solutions 1. Find a formula for: n 2 1 8 1 4 1 2 1 + + + + L by examining the values of this expression for small values of n . Prove your result using weak or strong induction. We will show the following is true for n 1 by weak induction on n: P n : n 2 1 8 1 4 1 2 1 + + + + L = n 2 1 1 BASE CASE: P 1 asserts that 2 1 1 2 1 = which is true. INDUCTIVE STEP: We will assume P k and show P k+1 P k : k 2 1 8 1 4 1 2 1 + + + + L = k 2 1 1 Adding 1 2 1 + k to both sides: 1 2 1 2 1 8 1 4 1 2 1 + + + + + + k k L = 1 2 1 2 1 1 + + k k = 1 1 2 1 2 1 2 1 + + + k k = 1 2 1 1 + k This is P k+1 , so P n is true for n 1 by the principle of mathematical induction.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
2 2. Prove by induction that if n 3, then 2n + 1 < 3n – 1. (You can prove this without induction, but here goes…) PROOF by mathematical induction. Let P n be the proposition that 2n + 1 < 3n – 1. BASE CASE: P 3 states that 2•3 + 1 < 3•3 -1, that is, 7 < 8. This is true. INDUCTIVE STEP: Assume P k : 2k + 1 < 3k -1 for some k 3. Show P k+1 : 2(k+1) + 1 < 3(k+1) – 1 Simplifying, we have P k+1 : 2k + 3 < 3k + 2 Adding 2 to each side of the I.H., we get 2k + 3 < 3k + 1 But the RHS is < 3k + 2, so 2k + 3 < 3k + 2 by the transitivity of <, and P k+1 is true. Thus by the principle of mathematical induction, P n is true for n 3. 3. Consider a game in which two players take turns removing any number of stones from one of two piles (removing all the stones in a pile is allowed). The player who removes the last stone wins the game. Use strong induction to show that if the two piles initially contain the same number of stones, then the second player can always win. PROOF: Let P n be the proposition that the second player can always win if the game begins with n stones in each pile. We wish to show n P n . BASE CASE: When there is only one stone in each pile, the first player is forced to empty one pile. Then the second player can empty the other pile, winning the game. Therefore P 1 is true. INDUCTIVE STEP: Suppose k is a positive integer, and assume that P i is true for 1 i k , i.e. the second player wins if each of the two piles initially contains i stones, where i is in the stated range. We want to show that P k + 1 is true as well. Proof of the inductive step: Suppose there are k + 1 stones in each pile at the beginning of the game. The first player can't win on the first move, since there are stones in both piles. Let F be the number of stones that the first player takes on the first move. There are two cases to consider: 1. If F = k + 1, then the first player has taken all stones from one pile. The second player can simply take all stones from the other pile, winning the game. 2. If 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 02/08/2011.

Page1 / 7

38 PS5 Solutions - Handout #38 May 3, 2010 CS103 Robert...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online