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] My 2024's very first little teaser
01-17-2024, 02:14 AM (This post was last modified: 01-17-2024 05:30 AM by Valentin Albillo.)
Post: #1
[VA] My 2024's very first little teaser
 
Hi, all,

You may still remember my last teaser of 2023, the one which started the recent flurry of matrix-permanent-related posts. Now, it's only proper that my very first little teaser of 2024 should continue the trend, so let's get cracking ...
    You all know the matrix Determinant, aka det. Now, the matrix Permanent, aka per, is defined likewise but with all signs positive, no negative terms, i.e. like this:

            [Image: Permanent%2015b.jpg]

    and the teaser is that you should write an HP-71B program to compute the permanent of a given real 3x3 matrix like the one depicted above, subject to these three requirements:

    1. You must use an HP-71B(*) (physical/virtual,) other calcs or software simply won't do. If you're itching to post such non-HP71B code or symbolic math ramblings galore, please create another thread, don't post it to this one.
       
        (*) If desired, you may use the standard HP-71B enhancements, i.e. the Math, JPC or HP-IL ROMs.
       
    2. No arithmetic operators/operations should appear in your code, either explicitly (e.g. C=A*B) or "obfuscatedly" (e.g. C=VAL("A"&CHR$(42)&"B"). That includes +, -, *, /, ^, unary minus (e.g. C=-A), x2, DIV, MOD, ..., you get the idea.
       
    3. Also, no alpha strings/chars/operations at all.

If I see interest I'll post in a few days two different solutions: a 4-liner (158 bytes) and a 3-liner (135 bytes). Speed's mostly irrelevant but the shorter the code, the better. See what you can do ... Smile

Sample run:

      |  1  7  2 |
  M = | -3  4 -1 | , Per(M) = -36
      |  2  3  1 |


   >RUN
       ? 1,7,2,-3,4,-1,2,3,1 [END LINE]
-36

That's all. Your code/comments will be very welcome but please don't use CODE panels at all.

Best regards.
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] My 2024's very first little teaser - Valentin Albillo - 01-17-2024 02:14 AM



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