The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
[VA] SRC #012a - Then and Now: Probability
10-05-2022, 08:38 PM
Post: #1
[VA] SRC #012a - Then and Now: Probability
.
Hi, all,

After a 7-month hiatus here's my brand-new multi-part SRC #012 - Then an Now, where I'll convincingly demonstrate that some advanced vintage HP calcs which were great problem-solvers back THEN in the 80's (some 40 years ago !), are NOW still perfectly capable of solving recently-proposed non-trivial problems intended to be tackled using modern 2020-era personal computers, not ancient pocket calcs.

To that effect, in the following weeks I'll be proposing a number of such hard problems for you to try and solve using EXCLUSIVELY VINTAGE HP CALCULATORS (physical or virtual,) coding in either RPN, RPL or HP-71B language AND NOTHING ELSE: NO CAS/XCAS, MATHEMATICA, EXCEL, C/C++, PYTHON, etc. Besides, you must post actual code, not just LENGTHY THEORY SESSIONS/EXPOSITIONS (A. C., I'm looking at you ! Smile ).

Finally, NO CODE PANELS at all, just post your RPN/RPL/71B code as-is or formatted however your prefer. Please consider that I`m taking the trouble to use a lot of time and effort to carefully format and solve these problems for your entertainment and potential benefit so please be fair to me and respect those simple rules: only vintage HP calcs, only RPN/RPL/71B code, no math sessions/expositions, no CODE panels. That's it !

'Nuff said, let's begin with one of the easiest problems from the lot, namely:

Problem 1: Probability
    A man starts at the top of an equilateral triangular grid having R rows of points and then takes random steps from point to point. Write a program to compute the probability P that after S such steps he ends up in the bottom row, and run it for the case R = 30 rows and S = 60 steps, see the figure below
    [Image: SRC-12-1-1.jpg]

    Once you've found that probability you'll find it very easy to answer any number of additional questions, e.g. What's the probability he ends up in any edge ? In any corner ? In the first 7 rows ? What's the point which has the highest probability ? The lowest ? As a quick check, adding up the probabilities for all the points should return 1 ... after all, he must end up on some point or another ! Smile.

You should strive for 10-12 correct digits (give or take a few ulps) depending on whether you're using a 10- or 12-digit HP model, and of course the faster the running time, the better. If desired, you can check the correctness of your code by running the simpler R = 5 rows, S = 4 steps case, which should return a probability P = 23/288.

If I see enough interest, in a few days I'll post my own original solution for the HP-71B, which is a short program capable of quickly solving the generic problem for any number of rows and steps. I'll also comment on accurate results and possible optimizations, as well as on some other related probabilities and statistics, and once everything is said and done I'll post the next Problem 2.

Let's see your very own clever solutions AND remember the above rules, please.

V.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
[VA] SRC #012a - Then and Now: Probability - Valentin Albillo - 10-05-2022 08:38 PM



User(s) browsing this thread: 2 Guest(s)