This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: COT 3100: Applications of Discrete Structures March 31, 2010 Solution to Homework 8 Lecturer: Prof. My T. Thai TA: Thang N. Dinh 1 Section 4.3 Problem 3 Solution: In each case we compute the subsequent terms by plugging into the recursive formula, using the previously given or computed values. a. f (2) = f (1)+3 f (0) = 2+3( 1) = 1; f (3) = f (2)+3 f (1) = 1+3 . 2 = 5; f (4) = f (3)+3 f (2) = 5 + 3( 1) = 2; f (5) = f (4) + 3 f (3) = 2 + 3 · 5 = 17 b. f (2) = f (1) 2 f (0) = 2 2 · ( 1) = 4; f (3) = f (2) 2 f (1) = ( 4) 2 · 2 = 32; f (4) = f (3) 2 f (2) = 32 2 · ( 4) = 4096; f (5) = f (4) 2 f (3) = ( 4096) 2 · 32 = 536 , 870 , 912 c. f (2) = 3 f (1) 2 4 f (0) 2 = 3 · 2 2 4 · ( 1) 2 = 8; f (3) = 3 f (20 2 4 f (1) 2 = 3 · 8 2 4 · 2 2 = 176; f (4) = 3 f (3) 2 4 f (2) 2 = 3 · 176 2 4 · 8 2 = 92 , 672; f (5) = 3 f (4) 2 4 f (3) 2 = 3 · 92672 2 4 · 176 2 = 25 , 764 , 174 , 174 , 848 d. f (20 = f (0) /f (1) = ( 1) / 2 = 1 / 2; f (3) = f (10 /f (0) = 2 / ( 1 2 ) = 4; f (4) = f (2) /f (3) = ( 1 / 2) / ( 4) = 1 / 8; f (5) = f (3) /f (4) = ( 4) / (1 / 8) = 32 Problem 5 Solution: a. This is not valid, since letting n = 1 we would have f (1) = 2 f ( 1), but f ( 1) is not defined. b. This is valid. The basis step tells us what f (0) is, and the recursive step tells us how each subsequent value is determined from the one before. It is not hard to look at the pattern and conjecture that f ( n ) = 1 n . We prove this by induction. The basis step is f (0) = 1 = 1 0; and if f ( k ) = 1 k , then f ( k + 1) = f ( k ) 1 = 1 k 1 = 1 ( k + 1). c. The basic conditions specify f (0) and f (1), and the recursive step gives f ( n ) in terms of f ( n 1) for n ≥ 2, so this is a valid definition. If we compute the first several values, we conjecture that f ( n ) = 4 n if n > 0, but f (0) = 2. That is our “formula.” To prove it correct by induction we need two basis steps: f (0) = 2, and f (1) = 3 = 4 1. For the inductive step (with k ≥ 1), f ( k + 1) = f ( k ) 1 = ( f k ) 1) = 4 ( k + 1). Page 11 d. The basis conditions specify f (0) and f (1), and the recursive step gives f ( n ) in terms of f ( n 2) for n ≥ 2, so this is a valid definition. The sequence of function values is 1 , 2 , 2 , 4 , 4 , 8 , 8 ,..., and we can fit a formula to this if we use the floor function: f ( n ) = 2 b ( n +1) / 2 c . For a proof, we check the base case f (0) = 1 = 2 b (0+1) / 2 c and f (1) = 2 = 2 b (1+2) / 2 c . For the inductive step: f ( k + 1) = 2 f ( k 1) = 2 · 2 b k/ 2 c = 2 b (( k +1)+1) / 2 c e. The definition tells us explicitly what f (0) is. The recursive step specifies f (1) ,f (3) ,... in terms of f (0) ,f (2) ,... ; and it also gives...
View
Full
Document
This note was uploaded on 01/22/2012 for the course COT 3100 taught by Professor Staff during the Spring '08 term at University of Florida.
 Spring '08
 Staff

Click to edit the document details