All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info
Discussion Forums
Login: Password:Remember me: Sign up! | Forgot password

Forums > Commons
A place to come and discuss the features of this site, as well as suggest/request additions and modifications. Oh yeah, and Bug reports too.
tomarken
2006-04-23 21:53:48
Help Me Find This Puzzle Please!

Hi all,

I'm looking for a puzzle that I am certain I saw on this site. It went something like this (I hope this doesn't count as posting a problem in the forum):

"You start with a number K. Each day, you multiply K by 3 and then add 6. Find a formula that will determine the value of K on the nth day, without knowing what it was on any previous day."

I can't seem to find this puzzle, I have no idea what the title is or any specific text to search for. I'm hoping someone recognizes it and can help me out.

Actually, now that I think of it, even if you haven't seen it before, can you solve it? I really only need the solution, it's actually related to something I have to do at work (isn't it great when these puzzles actually show up in real life?) Anyway, I don't really have time to figure it out right now, so I was hoping someone would remember where I could find this puzzle.

Thanks!

Federico Kereki
2006-04-23 22:13:28
How to solve this

You probably mean that each day you multiply the previous day number by 3, and add 6. This is a recurrence, which can be stated as: T(0)=K, and T(n+1)=3.T(n)+6 for n>0.


There are many ways for solving such equations, and one of the simplest is "guessing"! If you multiply each day by 3, it seems the answer should be exponential on 3, so we guess the solution could be something like a.3^n+b. Substituting, a.3^(n+1)+b should equal 3.(a.3^n+b)+6, so b=3b+6, and thus b=-3. Since T(0)=k, then a-3=K, so a=(K+3). The solution is thus (K+3).3^n-3.


Of course, you might be wondering things like "How should I know what to guess?" or "What if my guess had been wrong?", and those are pretty good questions! ;-)

tomarken
2006-04-23 23:22:56
Re: Help Me Find This Puzzle Please!

Hmm...I am wondering things like "How should I know what to guess?" and "What if my guess had been wrong?" (I understand those are pretty good questions!)

My problem is similar to the one I described, but I'll be more specific. What I need to do works essentially like a credit card balance or something, where you start with a balance, and then each month it is multiplied by a rate (like interest) and then the amount that you pay is deducted. For example, if you started with a $1000 balance, with 2% interest added each month, then you make a payment of $50, what would your balance be in month n?

month 1 = 1000
month 2 = 1.02(1000) - 50
month 3 = 1.02[1.02(1000) - 50] - 50
etc.

I tried using the method you described, but I'm tired and I'm just confusing myself. Can you run through it again with, for example, the numbers above, or maybe explain another one of the "many ways" for solving it?

Also, if I wanted to adjust the numbers involved, will I have to recalculate the equation all over again? For example, if we find a solution for the one above, but then I want to change the rate to 3% interest instead of 2%, can I just plug in the new number somewhere or will I have to do the whole guessing thing again?

Thanks so much for your help!

Gamer
2006-04-24 01:15:47
Re: Help Me Find This Puzzle Please!

You probably couldn't find it because the conversion from a recursive formula wasn't Explicitly Stated. Check http://perplexus.info/show.php?pid=2163

You can check out the comments there but I haven't fixed the official solution yet. The easiest way to solve it to me is to express it without parentheses, which gives 1000*1.02^n-1 - 50 - 50*1.02 - 50*1.02^2 - ... 50*1.02^n-2, and then simplify the geometric series summation to -50(1.02^(n-1)-1)/(1.02-1) to give (1000)1.02^n-1 - 2500(1.02^n-2) + 2500

To get it for different numbers, simply replace those numbers in the original formula (A*(1+B)^(n-1)+(C/A)*((1+B)^(n-2)-1)) where A is the original balance, B is the interest rate (in decimal form, like .06 for 6%, and C is the amount added in (negative for withdrawls)

tomarken
2006-04-24 11:14:39
Re: Help Me Find This Puzzle Please!

Thanks Gamer and Federico, you've been very helpful. I tried plugging different numbers into your formula Gamer, but it didn't work exactly (although I was probably doing something wrong). I worked on it and came up with the following formula (again using the credit card analogy):

B: Starting balance
r: 1 + monthly interest rate (I'm adding the 1 here so the formula looks less cluttered.)
p: Amount of monthly payments

The balance at the end of month n would be:

Br^n - p(1-r^n)/(1-r)

I had to look up how to sum a geometric series, because it basically works out like this

F(0) = B
F(1) = Br - p
F(2) = Brr - pr - p
F(3) = Brrr - prr - pr - p

Which works out to Br^n - p*(r^(n-1) + r^(n-2) + r^(n-3) ... r^(n-n))

The sum of r^n, for n = 0 to n-1, is (1-r^n)/(1-r).

Gamer
2006-04-24 18:21:57
Re: Help Me Find This Puzzle Please!

I just tried to figure it out on the spot so I may have made a mistake, but you look like you got it.

Vernon Lewis
2006-04-24 19:41:03
Re: Help Me Find This Puzzle Please!

Is Brr - prr a cat too cold to purr?
Great to see a couple of members of the Perplexus community cooperating to solve a practical puzzle. Perplexus is much more than just "who can be first to solve the maths problem"

Gamer
2006-04-25 00:52:53
Re: Help Me Find This Puzzle Please!

I'll probably stick with r though instead of just 1+r in the formula, and stick with n=0 (0 years after year 1) I put n-2 on the right side when it should be n-1.

A*B^n + C/(B-1) * (B^n-1) uses these two assumptions

Jer
2006-04-25 19:36:18
Re: Help Me Find This Puzzle Please!

Vernon - how'd you like that cooperative effort solving your latest? Losta posts/reposts commenting on other solutions. That's perplexus at its best.

Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information