CMPSC360hw2soln

CMPSC360hw2soln - CMPSC360 Discrete Mathematics for...

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

View Full Document Right Arrow Icon
CMPSC–360 Discrete Mathematics for Computer Science, Fall 2008 Homework 2 Solutions Note: These solutions are not necessarily model answers. Rather, they are designed to be tutorial in nature, and sometimes contain a little more explanation than an ideal solution. Also, bear in mind that there may be more than one correct solution. General comment: Neatness counts! Many people are scribbling on their homework, which makes it excessively hard to read. The readers do not have time to decipher illegible work. You run the risk of receiving zero credit for solutions that are hard to read in future. 1. Practice with induction (a) The base case , n = 2 , is the statement that 5 4 is less than 2 - 1 2 = 6 4 , which is clearly true. The inductive hypothesis (for some integer n 2 ) is that 1 + 1 4 + . . . + 1 n 2 < 2 - 1 n . In the inductive step , we need to prove that 1 + 1 4 + . . . + 1 ( n +1) 2 < 2 - 1 n +1 . We do this as follows: 1 + 1 4 + . . . + 1 ( n + 1) 2 = p 1 + 1 4 + . . . + 1 n 2 P + 1 ( n + 1) 2 < p 2 - 1 n P + 1 ( n + 1) 2 (by induction hypothesis) = 2 - p 1 n - 1 ( n + 1) 2 P = 2 - p n 2 + 2 n + 1 - n n ( n + 1) 2 P = 2 - n 2 + n n ( n + 1) 2 - 1 n ( n + 1) 2 = 2 - 1 n + 1 - 1 n ( n + 1) 2 < 2 - 1 n + 1 . Thus, by induction, the hypothesis is true for all integers n 2 . (b) For the base case , n = 1 , we simply observe that 4 1+1 + 5 2 · 1 - 1 = 16 + 5 = 21 , which is divisible by 21 . Then we assume the inductive hypothesis , that 4 n +1 + 5 2 n - 1 is divisible for 21 (for some specific n 1 ). In the inductive step we need to prove that 4 n +2 +5 2 n +1 is divisible by 21. In order to use the inductive hypothesis, we want to somehow manipulate this expression so that the expression for n appears. We have 4 n +2 + 5 2 n +1 = 4 · 4 n +1 + 25 · 5 2 n - 1 = 4 · 4 n +1 + (4 + 21) · 5 2 n - 1 = 4(4 n +1 + 5 2 n - 1 ) + 21 · 5 2 n - 1 . [36 points, each worth 12 pts]
Background image of page 1

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

View Full DocumentRight Arrow Icon
Looking at the last line, we see that the expression in parentheses is divisible by 21 by the inductive hypothesis, and obviously the second term is divisible by 21 , so the entire quantity is divisible by 21 , as desired. Therefore, the proof is complete by induction. (c) For the base cases we verify that for n = 0 (even) we have n i =0 f i 2 F = 0 = 0 2 4 , and also for n = 1 we have n i =0 f i 2 F = 0 = 1 - 1 4 . (We use two base cases because we will handle odd and even n separately.) In the induction hypothesis we assume that the equality holds for n - 2 . In the induction step we want to show that it holds for n . (Note that we are using strong induction here, because we are using P ( n - 2) rather than P ( n - 1) to prove P ( n ) .) To show this, notice that n s i =0 f i 2 F = n - 2 s i =0 f i 2 F + f n - 1 2 F + f n 2 F Thus if n is odd (so n - 1 is even), we obtain, using the induction hypothesis and f n - 1 2 F = f n 2 F = n -
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.

Page1 / 5

CMPSC360hw2soln - CMPSC360 Discrete Mathematics for...

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