Happy New Year 2024 ... and 2023's last teaser !
|
01-02-2024, 10:53 AM
(This post was last modified: 01-04-2024 09:47 AM by ramon_ea1gth.)
Post: #16
|
|||
|
|||
RE: Happy New Year 2024 ... and 2023's last teaser !
I'm having fun with the challenge. After programming a cute RPL recursive program in my HP 50g to manage matrices/permanents and realise, as said in other posts, that the required calculations grow insanely, now I'll try the binary way, base-2 approach, with shifting registers, but with the usual base-10 numbers. Let's see
Edit: I'm testing this binary shifting approach to obtain the cofactors. A 5x5 matrix full of ones takes about 25 seconds to compute in my HP 50g. With zeroes, the code saves operations. Thus, I will let the calculator work overnigth and let's see if I get something in the morning (I started a TICKS command so I can measure the elapsed time). I know, I know: if I were serious I should have tried to make an estimation of the required time for the algorithm Edit 2: I got it! (after about 11 hours computing!). At least, after such a long calculation, the result is the expected I'll write my code later here, just as a curiosity, though it's not the most efficient solution. Edit 3: And this is my version of PERMANT. It takes two arguments from the stack:
Code:
Code:
And the previous code even more optimised for binary matrices: Code:
With the optimised code, computing time is 9 hours in a physical HP 50g, instead of the previous 11 hours. Ramón Valladolid, Spain TI-50, Casio fx-180P, HP48GX, HP50g, HP Prime G2 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 9 Guest(s)