Serving the Quantitative Finance Community

 
User avatar
abcd
Topic Author
Posts: 0
Joined: February 6th, 2004, 6:58 pm

payphone question

February 6th, 2004, 9:12 pm

A pay phone will take only 10p, 20p, 50p and £1 coins.A woman has plenty of 10p and 20p coins. She has no other coins. She can put the coins into the pay phone in any order.Question?1. The woman is going to make a phone call costing any multiple of 10p. Investigate the number of different ways she could put 10p and 20p coins into the payphone.
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

payphone question

February 6th, 2004, 11:43 pm

you 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).
 
User avatar
abcd
Topic Author
Posts: 0
Joined: February 6th, 2004, 6:58 pm

payphone question

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)
 
User avatar
gjlipman
Posts: 5
Joined: May 20th, 2002, 9:13 pm

payphone question

February 7th, 2004, 12:31 am

plugging in the values:g(0)=f(1)=(2 root 5/2 root 5)=1g(1)=f(2)=(4 root 5/4 root 5)=1g(2)=f(3)=(16 root 5 / 8 root 5)=2 Also, it is really bad form to post the same question on several forums - it is a pain when you spend time answering a question on one forum, only to find that it has already been answered on another forum.
Last edited by gjlipman on February 6th, 2004, 11:00 pm, edited 1 time in total.
 
User avatar
noexpert
Posts: 0
Joined: April 27th, 2007, 2:20 pm

payphone question

October 16th, 2007, 4:53 am

Can anyone explain why the solution has this form???
 
User avatar
Zedr0n
Posts: 1
Joined: April 6th, 2007, 5:07 am

payphone question

October 21st, 2007, 5:56 pm

You just search for g(n) in the form of x^n(which gives quadratic equation in this case) and then the general solution is Ax_1^n + Bx_2^n where A and B can be determined from starting values
 
User avatar
Zedr0n
Posts: 1
Joined: April 6th, 2007, 5:07 am

payphone question

October 21st, 2007, 5:56 pm

sorry, double post
Last edited by Zedr0n on October 20th, 2007, 10:00 pm, edited 1 time in total.
 
User avatar
tuchong
Posts: 0
Joined: May 26th, 2007, 8:53 pm

payphone question

October 22nd, 2007, 2:09 am

This is the same question as:There are n steps, you can either make one or two steps a time, how many different ways to reach the top
 
User avatar
blondie
Posts: 0
Joined: June 11th, 2007, 1:34 pm

payphone question

November 5th, 2007, 11:52 am

 
User avatar
blondie
Posts: 0
Joined: June 11th, 2007, 1:34 pm

payphone question

November 5th, 2007, 11:54 am

 
User avatar
Alekk
Posts: 0
Joined: September 14th, 2007, 4:39 pm

payphone question

November 11th, 2007, 11:11 pm

write it as:(sum x^n)*(sum x^(2n)) = sum A_k*x^kwhere A_k is the number of different ways to obtain k*10 p ..