MATH 01 N Homework Chapter 9 February, 017 The recurrence r n+ = r n+1 + r n can be expressed with advancement operators as A A )r n = 0 The quadratic can then be factored using the quadratic formula, yielding Therefore, the general solution is A ) A + 1) = 0 r n = c 1 ) n + c 1) n Now we use the initial conditions to solve for c 1 and c equations: 1 = r 0 = c 1 + c = r = 4c 1 + c This gives the following system of linear Subtracting the first equation from the second gives = c 1 Therefore c 1 = which implies c = 1 Therefore, the closed formula for r n is r n = n + 1 1)n 4 The recurrence h n+ = 6h n+ 11h n+1 + 6h n can be rewritten with the advancement operator as follows: A 6A + 11A 6 ) h n = 0 First observe that A = 1 is a solution to the cubic because 1) 61) + 111) 6 = 0 This means that A 1) is a factor Using long division, we factor the cubic as follows: A 1) A A + 6 ) h n = 0 A 1) A ) A ) h n = 0 Therefore, the general solution is h n = c 1 + c n + c n Now we use the initial conditions to solve for the constants: = c 1 + c + c = c 1 + c + c 4 = c 1 + 9c + 4c These yield c 1 = 6, c =, and c = for a final formula of h n = 6 + n n The recurrence for the Fibonacci numbers is f n+ = f n+1 + f n Rewrite this as A A 1)f n = 0
From the quadratic formula, we can factor this and obtain the general solution 1 + ) n 1 ) n f n = c 1 + c Now use the initial conditions f 0 = 0 and f 1 = 1 to solve for the constants: 0 = c 1 + c 1 + 1 = c 1 ) + c 1 ) Substituting c 1 for c, we obtain the equation: 1 + ) 1 ) 1 = c 1 c 1 1 + 1 = c 1 1 ) 1 = c 1 1 = c 1 So the closed formula is f n = = c 1 = c 1 + ) n 1 ) n 6 c Because ± 4 = 1 ± 6, we have f n = c 1 1 + 6 ) n + 1 6 ) n e First note that A = 1 is a root Thus Therefore A + A A + = A 1)A + A ) = A 1) A + ) f Since A + A + A + 1 = A + 1), we get f n = c 1 + c n + c ) n f n = c 1 1) n + c n 1) n + c n 1) n 9 c For the recurrence A ) f n = n + 1, the homogenous solution is c 1 n + c n n + c n n For the particular solution, try d 1 n + d Here is the check: A ) d 1 n + d ) = A ) A )d 1 n + d ) = A ) d 1 n + 1) + d ) d 1 n + d )) = A ) d 1 n + d 1 d ) = A ) d 1 n + 1) + d 1 d ) 6d 1 n + d 1 6d )) = A )4d 1 n 4d 1 + 4d ) = 4d 1 n + 1) 4d 1 + 4d ) 1d 1 n 1d 1 + 1d ) = 8d 1 n + 1d 1 8d
We need 8d 1 = and 1d 1 8d = 1 Therefore, choose d 1 = 8 and d = 11 16 The general solution is f n = c 1 n + c n n + c n n 8 n 11 16 f For the recurrence A+)A )A 1)f = n, the homogenous solution is c 1 ) n +c n +c 1 n For the particular solution, we would try d n, but this is part of the homogenous solution So try dn n instead Here is the check: A + )A )A 1)[dn n ] = A + )A )[dn + 1) n+1 dn n ] = A + )A )[4dn n + d n ] = A + )[4dn + 1) n+1 + d n+1 0dn n d n ] = A + )[0d n ] = 0d n+1 + 40d n = 100d n + 40d n = 140d n Therefore, choose d = 1 140 The general solution is f n = c 1 ) n + c n + c + 1 140 nn h For the recurrence A )A + )f n = n n, the homogenous solution is c 1 n + c ) n Try the particular solution dn n A )A + )dn n = A )[dn + 1) n+1 + dn n ] = A )[dn n + d n ] = dn + 1) n+1 + d n+1 10dn n 4d n = 10d n This will not work because d must be a constant and we wanted the answer to be n n Therefore, try dn n A )A + )dn n = A )[dn + 1) n+1 + dn n ] = A )[dn n + 4dn n + d n ] = [dn + 1) n+1 + 4dn + 1) n+1 + d n+1 ] [10dn n + 8dn n + 4d n ] = [0dn n + 18d n ] This is still a problem because we will need 0d =, but the term 18d should be 0 However, if we try d 1 n n + d n n, using the above two calculations, we get: A )A + )[d 1 n n + d n n ] = A )A + )d 1 n n + A )A + )d n n = 0d 1 n n + 18d 1 n + 10d n Now we need 0d 1 = and 18d 1 + 10d = 0 So we can let d 1 = 1 4 and d = 9 0 solution of f n = c 1 n + c ) n + 1 4 n n 9 0 nn for a general 1 On #4 in the Chapter homework, you wrote a recurrence for this problem The recurrence was t n = t n 1 + 4t n + t n
Writing this with advancement operators, we obtain the equation: A A 4A )t n = 0 Now we need to factor the cubic A A 4A First, try to find a root The value 1 is a root because 1) 1) 4 1) = 0 Therefore A + 1) is a factor Using long division or sythetic division, we find A A 4A = A + 1)A A ) Now we can use the quadratic formula to factor the rest: ) ) A A 4A = A+1) A + A = A+1) A 1 + ) ) A 1 ) ) Therefore, the general solution is: t n = c 1 1) n + c 1 + ) n + c 1 n ) Now we need some initial conditions to solve for c 1, c, and c We know t 1 = 1, t = and t = 11 To make things a little simpler, let s solve for a value for t 0 that will follow the recurrence: Now solve for the constants: t = t + 4t 1 + t 0 11 = + 4 1 + t 0 1 = t 0 1 = c 1 + c + c 1) 1 = c 1 1) + c 1 + ) + c 1 ) ) = c 1 1) + c 1 + ) + c 1 ) = c 1 + 4 + )c + 4 )c ) First take equation ) and subtract times equation ) to get: = c 1 + c + c From this, subtract times equation 1) to determine c 1 = 1 By equation 1), this implies c = c Using this information in equation ), we see: 1 = 1 + c 1 + ) c 1 ) = 1 + c Therefore c = 1 = and c = c = Therefore, the closed form for t n is t n = 1) n + 1 + ) n 1 n ) 1 Perhaps you noticed that this is a pigeon hole problem Let s think backwards through this We want two people who shook the same number of hands So maybe these will be the two people that came from the same box How about let s sort people based on the number of hands they shook How many boxes would this be? Well you could shake 0 hands or 1 hand or hands or or n 1 hands Notice that you cannot shake n hands because you will not be shaking your own and there are only n 1 other people in the room From 0 to n 1, we have defined a total of n boxes However, there are n people who will be sorted into these boxes So we cannot be sure yet) that two people shook the same number of hands
Let s think a little harder about this Say Bob and Alice are in the room of n people If Bob was anti-social and shook 0 hands, is it possible that Alice shook n 1 hands? No When Alice says she shook n 1 hands, that means she shook hands with everyone else But she couldn t have shaken Bob s hand because Bob didn t shake hands with anyone So, let s break this into two cases: A) Someone shook no hands B) Everyone shook hands with at least one other person Case A): If someone was anti-social, then you cannot have a person who shook n 1 hands as explained above) So you have n people and each person shook between 0 and n hands Thus ) there n are n 1 options or pigeonholes) and n people By the pigeonhole principle, two n 1 = people must fall into the same category So these two people shook the same number of hands Case B): If everyone shook hands with at least one person, then everyone shook between 1 and n 1 hands That is n 1 options pigeonholes) for n people So, by pigeons, two people must fall into the same category, and these two must have shaken hands with the same number of people