Tutorial 07

# Tutorial 07 - 000 Find a recurrence relation and initial...

This preview shows page 1. Sign up to view the full content.

p q r s t COMP2781, COMP8781, Sem. 1, 2011, Flinders University Tutorial 7 Question 1. (a) There are n stairs to the Flinders Uni library. In how many ways a student can get to the library if at each step only one or two steps can be climbed? (b) (Fibonacci problem, a.d. 1170) Find the number of pairs of adult rabbits descending from one pair in the course of a year if it is known that each adult pair of rabbits gives birth to a new pair every month, the newborn becoming fully adult in a month. Let u 1 be the number of adult pairs at the initial moment, in a month u 2 , in two months u 3 , after n months u n +1 . prove that u n +2 = u n - 1 + u n - 2 . ( u n is called a Fibonacci sequence.) Question 2. Let a n be the number of n -bit strings that do not contain the pattern
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 000 . Find a recurrence relation and initial conditions for the sequence a 1 , a 2 , . . . . Question 3. A recursive algorithm loops through the input to eliminate (or pick up) one item. A recur-rence relation for number of runs for input of size n is (Why?) a n = a n-1 + n, n ≥ 2 , a 1 = 1 . Find an explicit formula for the sequence using the method of iteration. Question 4. Solve the recurrence relations (that is, ±nd an explicit formula for the sequence a n ) a n = 2 a n-1 + 3 a n-2 , n ≥ 3 , a 1 = 5 , a 2 = 13 a n =-6 a n-1-9 a n-2 , n ≥ 2 , a = 1 , a 1 =-9 Page 1 Last updated April 29, 2011 by M. Bajger...
View Full Document

## This note was uploaded on 06/12/2011 for the course MATH 103 taught by Professor Wouters during the Spring '08 term at Wisc Oshkosh.

Ask a homework question - tutors are online