Homework 6, Fri 0-8- CS 050, Intro Discrete Math for Computer Science Due Mon -7-, Note: This homework has pages and 5 problems. Problem : 0 Points What is wrong with this proof? Theorem: For every positive integer n, i i n+ ) /. Basis Case: The formula is true for n. Inductive Hypothesis: Suppose that for nk, k i k+ /. ) Inductive Step: We want to show that for nk+, k+ i k+)+ ) /. But, k+ i i k ) i i i i + k+), regrouping so as to bring in the inductive hypothesis k+ ) / + k+), using the inductive hypothesis for nk k +k+ ) calculations to rewrite the expression / + k+), as the right hand side of the inductive step k +k+ ) / + k+)/ k + k + ) + k + / k + k + ) + k + ) + ) / k + ) + k + ) ) ) + / k+)+ /, which completes the proof of the inductive step ) Answer: The formula is not true for n, thus the base case does not go through. In particular: i while + ) / 9 8 i
Problem : 0 Points a) Where n is an integer, show that the statement below is false: i+ ) n+ /, n. ) Hint: It suffices to give a single counter-example. That is, identify a single positive integer n such that n ) i+ n+ ) /. Note: Realize that, where n is an integer, the hint is formally equivalent to n : n ) i+ n+ ) /. Answer to part a): We will show that, for n, the left-hand-side and the right-handside are not equal. For n the left-hand-side is For n the right-hand-side is + ) / i+ ) 0+ ) + + ) ++. ) 3 9 8. We have thus formally shown that n : i+ ) n+ /. ) Remark: Realize that part b) establishes something stronger: This is because, part b) establishes that i+ ) n+ /, n. ) i+ ) n+) /, n. It is now trivial to check that n+) / n+ ) /, n, thus i+ ) n+) / n+ /, n. )
b) Where n is an integer, show that the statement below is true: i+ ) n+) /, n. Hint: You may either use an inductive proof, or observe that n ) i+ n i) + n ) and use known closed forms and simple calculations). Answer to part b): First Proof, by induction on n: Base Case: We have to verify that, for n, i+ ) +) /. This can be trivially verified, since, for n, the left-hand-side is: ) i+ 0+ ) + ) + ++, while for n, the right-hand-side is: +) / / /. Inductive Hypothesis: Assume that, for some n k, k i+ ) k+) /. Inductive Step: We have to show that for n k+, k+ i+ ) k+)+) /. k+ i+ ) k k+) k+) i+ ) + + k+)+ ) k+)+ ) + k+) + k+) + k+) + k+)+) Second Proof, direct using well known summation formulas:. i+ ) ) ) i + nn+) + n+) n+) n + ) n + ) /. 3
Problem 3: 0 Points Show, by induction, that for every positive integer n that is a power of, if fn) f ) n + n, for n>, and f) 0, then fn) n. Hint: Realize that if n is a positive integer and n is a power of, then n N, where N is an integer and N ) 0. Then the above statement is equivalent to: if f N ) f + N, for every positive integer N, and if f 0 ) 0, N then f N ) N, for every integer N such that N 0. Answer: ) Given the definition f N ) f N + N, for every positive integer N, and f 0 ) 0, we need to show that f N ) N, for every integer N such that N 0. The proof is inductive on N. Base Case: We need to verify that f N ) N, for N 0, is equal to f 0 ) 0 as in the definition. This is trivial to see, since f 0 ) 0 0. Inductive Hypothesis: Assume that, for some N k 0, f k ) k. Inductive Step: We have to show that for N k+, f k+ ) k+. ) f k+ k+ ) f + k+ f k) + k+ k ) + k+ k+ + k+ k+.
Problem : 0 Points Show, by induction, that for every positive integer n that is a power of, if fn) f ) n +, for n>, and f) 0, then fn) log n. Hint: Realize that if n is a positive integer and n is a power of, then n N, where N is an integer and N 0. Then proceed to form an equivalent statement, in terms of N, along the lines of the hint of Problem 3. Recall also that log n log N N.) Answer: Realize that if n is a positive integer and n is a power of, then n N, where N is an integer and N 0. Then log n log N N and the above statement is equivalent ) to: Given the definition f N ) f +, for every positive integer N, N and f 0 ) 0, we need to show that f N ) N, for every integer N such that N 0. The proof is inductive on N. Base Case: We need to verify that f N ) N, for N 0, is equal to f 0 ) 0 as in the definition. This is trivially true. Inductive Hypothesis: Assume that, for some N k 0, f k ) k. Inductive Step: We have to show that for N k+, f k+ ) k +. ) f k+ k+ ) f + f k) + k +. 5
Problem 5: 0 Points Which amounts of money can be formed using just dollar bills and 7 dollar bills? Prove your answer using induction. Answer: The question is equivalen to: which positive integers n can be written as n p + 7 q for integers p 0 and q 0? Towards identifying the range of n we note: 3 cannot be written 5 cannot be written 6 3 7 0 + 7 8 9 + 7 0 5 + 7 6 3 3 + 7 e.t.c. We thus see that integers n 6 appear to fall in the range, moreover, the pattern appears to be that each integer x is expressed using the integer x : 6 3 7 0 + 7 8 + 6 9 + 7 + 7 0 5 + 8 + 7 + 9 6 + 0 3 3 + 7 + e.t.c. We will thus establish, in the next page, that the range is n 6, using strong induction. 6
Theorem: For every integer n 6, there exist integers p 0 and q 0 such that n p + 7 q. Proof: Strong induction on n. Base Case: For n 6 and n 7 we verify that 6 3 + 7 0 and 7 0 + 7. Inductive Hypothesis: Let n k 7, and assume that, for every integer k in the range 6 k k, there exist integers p 0 and q 0 such that k p + 7 q. Inductive Step: For n k +, we need to show that there exist integers p 0 and q 0 such that k + p + 7 q. We proceed to establish the inductive step as follows: k + k + + ) + k ) + + ) k ) + k + p + 7 q + p + ) + 7 q p + 7 q for p p + and q q. 7