MIT6_042JS10_lec32_sol

# MIT6_042JS10_lec32_sol - Massachusetts Institute of...

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

Massachusetts Institute of Technology 6.042J/18.062J, Spring ’10 : Mathematics for Computer Science April 26 Prof. Albert R. Meyer revised April 26, 2010, 1303 minutes Solutions to In-Class Problems Week 12, Mon. Problem 1. The famous mathematician, Fibonacci, has decided to start a rabbit farm to fill up his time while he’s not making new sequences to torment future college students. Fibonacci starts his farm on month zero (being a mathematician), and at the start of month one he receives his first pair of rabbits. Each pair of rabbits takes a month to mature, and after that breeds to produce one new pair of rabbits each month. Fibonacci decides that in order never to run out of rabbits or money, every time a batch of new rabbits is born, he’ll sell a number of newborn pairs equal to the total number of pairs he had three months earlier. Fibonacci is convinced that this way he’ll never run out of stock. (a) Define the number, r n , of pairs of rabbits Fibonacci has in month n , using a recurrence rela- tion. That is, define r n in terms of various r i where i < n . Solution. According to the description above, r 0 = 0 and r 1 = 1 . Since the rabbit pair received at the first month is too young to breed, r 2 = 1 as well. After that, r n is equal to the number, r n 1 , of rabbit pairs in the previous month, plus the number of newborn pairs, minus the number, r n 3 , he sells. The number of newborn pairs equals to the number of breeding pairs from the previous month, which is precisely the total number, r n 2 , of pairs from two months before. Thus, r n = r n 1 + ( r n 2 r n 3 ) . (b) Let R ( x ) be the generating function for rabbit pairs, R ( x ) ::= r 0 + r 1 x + r 2 x 2 + · . Express R ( x ) as a quotient of polynomials. Solution. Reasoning as in the derivation of the generating function for the orginal Fibonacci num- bers, we have R ( x ) = r 0 + r 1 x + r 2 x 2 + r 3 x 3 + r 4 x 4 + · · · . xR ( x ) = r 0 x r 1 x 2 2 r 2 x 3 3 r 3 x 4 4 − · · · . x 2 R ( x ) = r 0 x r 1 x r 2 x − · · · . x 3 R ( x ) = + r 0 x 3 + r 1 x 4 + · · · . R ( x )(1 x x 2 + x 3 ) = r 0 + ( r 1 r 0 ) x + ( r 2 r 1 r 0 ) x 2 + 0 x 3 + 0 x 4 + · · · . = 0 + 1 x + 0 x 2 . Creative Commons 2010, Prof. Albert R. Meyer .

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

View Full Document
2 Solutions to In-Class Problems Week 12, Mon. so x x R ( x ) = = . (1) 1 x x 2 + x 3 (1 + x )(1 x ) 2 (c) Find a partial fraction decomposition of the generating function R ( x ) .
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern