February 6th, 2004, 11:59 pm
QuoteOriginally posted by: gjlipmanyou say to investigate the number of ways she can put coins into the phone (assuming it doesn't give change and she doesn't want to overpay). I'm therefore assuming that order is relevance - ie 10 then 20 is different to 20 then 10.let g(n) be the number of ways she can put in 10n cents. She can either put in a 10 cent piece or a 20, hence g(n) = g(n-1) + g(n-2). This is the same recurrence relation as the Fibonacci sequence, except here g(1)=1 and g(2)=2, suggesting that g(n)=f(n+1).The solution to the fibonacci sequence being f(n)= [ (1+root 5)^n - (1-root 5)^n]/[2^n x root 5]=g(n-1).how did you get the solution f(n)= [ (1+root 5)^n - (1-root 5)^n]/[2^n x root 5]=g(n-1)plugging in the values gives g(1)= -1 ang g(2)=1 into g(n)=g(n-1) + g(n-2)