A *very* didactic little quiz: Some comments



#12

Hi, all:

A comment and two additional interesting questions.

First of all, I'm truly glad that so many of you did like my didactic quiz and posted your answers and comments. Of course, as I clearly stated in my original post, it's all a didactic, ideal, theoretical example, not concerned with being physically possible (for one thing, such a mass, if it could exist, would implode into a black hole at once), nor financially sound (inflation, bankrupts, accidents, etc).

It was simply kind of a gedankenexperiment to show my daughter just how exponential functions, however initially slowly growing, will ultimately overcome any linear (or polynomic for that matter) function, however steep its initial growing. After some calculations, she took the hint and, as I said, was amazed no end.

I wonder if any of you did try to actually imagine the situation. On the one hand, a simple, silent, boring account in a bank, sitting there doing nothing at all for 2,000 years, except silently grow, a mere figure in a paper. This is anything but exciting to watch.

On the other hand, a titanic (for lack of a better word) cylinder of solid, glowing gold, which extends from horizon to horizon in width, and farther than your sight can follow in depth, an ultra-colossal metallic wall if ever was one, which instantly surges from the ground up at such speed that before you can even realize it, it's higher than the Moon ! If done with some kind of CGI, it would be an absolutely awesome, cataclismic, mind-breaking sight ! And this goes on, at undiminished speed, for 2,000 years !! ... yet the humble account with its $1.00 at 5.00% ultimately wins. I think this pretty much makes the point, in spades. Try to impress this imagery in your children/students/colleages !

As for a final comment, I'll submit a couple of additional questions to your consideration, specially dedicated to the many Star Trek fans out there, and still firmly within the realm of the ideal, non-physically realizable model (please no inflation, cashing after one second, etc):

  1. Let's suppose that the cylinder has been fitted with a new technology akin to the warp drives of Intrepid-class starships (e.g.: Voyager) and can grow at warp 8 (i.e.: 1024 times the speed of light, so it would reach to Alpha Centaury in 34 hours) instead of at merely warp 1 (the speed of light). How much would you need to increase the original interest rate of 5.00% to overcome it ? 10% ? 40% ? 1024*5 = 5120% ?

  2. What if the cylinder was fitted with Star-Trek's interstellar radio speed, i.e: warp 9.9999 (= 199516 times the speed of light, so it would reach to Alpha Centaury in 10 min.) ? What then should the interest rate be? 10% ? 40% ? 199516*5 = aprox. 1,000,000 % ?

I hope the answer to both questions will still surprise you
(and any trekkies you might pose the question to).

[Data for ST Voyager's warp speeds taken from here]

Best regards from V.

Edited: 19 July 2004, 5:15 a.m.


#13

Hi, thanks for the upgraded quiz.

The following come from an HP86b:

list
10 DEF FNg(n) = PI *6350^2*1024*300000*3600*24*365*19*1.E15*10*n
20 DEF FNd(n) = k^n
30 k=1.05 @ dk=.01 @ n=2000
100 IF k+dk=k THEN 300
110 IF FNd(n)<FNg(n) THEN 200
120 dk=dk/2 @ k=k-dk @ GOTO 100
200 k=k+dk @ GOTO 100
300 DISP k
301 DISP FNd(n)
302 DISP FNg(n)
310 END
649217
run

1.05277206943
4.66346525519E44
4.66346517742E44
list
10 DEF FNg(n) = PI *6350^2*199516*300000*3600*24*365*19*1.E15*10*n
20 DEF FNd(n) = k^n
30 k=1.05 @ dk=.01 @ n=2000
100 IF k+dk=k THEN 300
110 IF FNd(n)<FNg(n) THEN 200
120 dk=dk/2 @ k=k-dk @ GOTO 100
200 k=k+dk @ GOTO 100
300 DISP k
301 DISP FNd(n)
302 DISP FNg(n)
310 END
649217
run

1.0555509313
9.08628829361E46
9.086288265E46

For warp 8 : 5.277206943 % is enough

For warp 9.9999 : 5.55509313 % is enough

Olivier

Edited: 19 July 2004, 6:14 a.m.


#14

Oliver,

How long did it take the HP-86 to solve this? I used your code and translated it to Visual Basic and ran it on my computer. After 10 minutes, it still had not spit out an answer.


#15

Olivier's code works perfectly in a number of plain-vanilla BASICs. You should suspect the line:

   100 IF k+dk=k THEN 300
perhaps the condition is never met in your particular implementation. In general, testing reals for strict equality is a big no-no in programming and should never be done. There's much less risk in a BCD implementation (like HP-86's) than in a binary implementation (like in VB), but nevertheless it's better to never do this.

Best regards from V.


#16

Valentin is right. The trick is the line 100. With the HP86 it works perfectly (in 40 sec or so). But in other basic it should work. There is always a numerical epsilon such that any value added by epsilon is equal to the value. But perhaps your basic make some optimisation and transform:

k + dk == k as dk == 0 wich is right mathematically but break the used algorithm. Perhaps change line 100 with

100 e = k + dk @ if e == k then 300

or

100 e = k + dk @ if abs(k -e) < 1.E-9 then 300

In fact I used this trick just for fun (it assure that the result given is the BEST the used basic can find ;)

Olivier

Edited: 19 July 2004, 12:29 p.m.


#17

Ok.. I guess maybe I'm confused about something in the HP program. What does @ stand for in line 30, 120, and 200?


#18

It's the equivalent of ':' in other basic :)

Olivier


#19

DUH...... Man do I feel stupid. I was trying to think back to my C64 days but just couldn't.

Also, I found a glitch in my code, fixed it and now the program runs in 1 second or so.

How would you propose to do this on a 15C or something similar (better yet... a punny little 12c)?


#20

John Nelson wrote:

Quote:
How would you propose to do this on a 15C or something similar (better yet... a punny little 12c)?
Actually the 12C handles this very well without the need for any programming at all.
Just enter: F CLEAR FIN; n=2000; i=5%; PV=1 and press FV to get the value of the investment, namely -2.39e42 (3SF, ignore the negative).

If the speed of growth of the gold tower goes up to warp 8 then you can easily type in the necessary multiplication sums and get 4.66e44 as the new value of the gold column. Press CHS to make this negative and store in FV. Press i to get the new interest rate that will make the investment match the new gold value. Easy.

Here's a variation: what if we decided to invest some more money in order to match the new gold value but at the original 5% interest rate. How much would we need to invest? Have a guess first and then calculate it - you might be surprised!


#21

I'm aware of that... but I wanted a more gutsy version of just solving for I with the built in functions. I did that too many times in my MBA and was looking more for a "sexy" way.

#22

John,

(After I wrote this, I see that Bruce Horrocks has already posted a response for the HP-12C, but I've left my response in anyway)

The HP-12C is perfect for solving this kind of problem. You know what the initial value of the money in the account is ($1.00 in this case) and you know what the value of the gold cylinder is after 2000 years ($4.663465177e44 for the first problem or $9.086288294e46 for the second problem). I don't have my HP-12C in front of me, but the procedure is more or less as follows:

CLEAR FIN
2000 ; Store the number of years
n
-1 ; Negative value indicating that $1.00 is placed in account
PV
4.663465177e44 ; key in 9.086288294e46 here for the second problem.
FV
i ; Display the interest rate

Given the large final value, it may be necessary to help the calculator and store an initial guess of 5% for i. I'll give it a try later and see what results I get.

On the HP-15C, you can write a program that uses the built-in solver to come up with a solution. I don't have a HP-15C at hand, but I do have a HP-32S for which I've written a program. It's a little different to an equivalent program for the HP-15C, but it should work equally well on the HP-32SII or HP-33S.

LBL A
INPUT I
INPUT N
INPUT A
RCL I
1
+
RCL N
y^x
RCL A
RCL x N
-
RTN

This program can solve for any of the parameters:

I (interest rate, for 5%, I=0.05)
N (the number of years)
A (the increase in value of the gold per year)

I entered this program on a HP-32S, hit FN = A, and solved for I. I set N = 2000. For the first problem, A = 2.331648e41, which results in a value of 0.052772 for I.

For the second problem, A = 4.542979e43, which results in a value of 0.0555509 for I.

Note that this exact same program can also be used to solve the problem that you posted asking when the dollar value in the account will exceed the value of the gold column. In this case, I set I = 0.05, A = 2.277e38 and solve for N, which gives N = 1965.656.

Regards,

Eamonn.


Possibly Related Threads…
Thread Author Replies Views Last Post
  HHC 2012 Programming Contests: annotations, comments ...? Peter Murphy (Livermore) 20 4,719 10-17-2012, 04:47 PM
Last Post: Gerson W. Barbosa
  HP-41 Quiz: How to pack 100k in ROM? (on-line) Ángel Martin 10 2,864 09-02-2012, 10:35 PM
Last Post: Luiz C. Vieira (Brazil)
  Found on Youtube, comments section of bill platt 3 1,404 06-19-2012, 07:04 PM
Last Post: Diego Diaz.
  HP 15C LE Owner's Manual comments Rich Messeder (US) 43 10,698 04-10-2012, 11:15 AM
Last Post: J-F Garnier
  WP 34s: comments and a suggestion Nigel J Dowrick 8 2,019 10-24-2011, 05:39 AM
Last Post: Paul Dale
  Comments on HP status Tim Wessman 14 3,605 08-21-2011, 03:02 PM
Last Post: sylvandb
  A visual quiz! What is it? Geoff Quickfall 5 1,667 04-04-2009, 05:45 AM
Last Post: Maximilian Hohmann
  Trivia quiz and mini-challenge: Classic HP35 Allen 25 5,525 10-08-2007, 06:00 PM
Last Post: Paul Dale
  My Brief Comments on 35S as shown bill platt 3 1,275 06-06-2007, 01:27 AM
Last Post: Walter B
  HP-41 Quiz (big, contains pictures) Juergen (CH) 8 1,990 02-22-2007, 01:42 PM
Last Post: Juergen (CH)

Forum Jump: