Post Reply 
Happy New Year 2024 ... and 2023's last teaser !
01-01-2024, 01:27 PM (This post was last modified: 01-01-2024 06:46 PM by brouhaha.)
Post: #9
RE: Happy New Year 2024 ... and 2023's last teaser !
(12-31-2023 05:00 PM)Valentin Albillo Wrote:  The result is sure to surprise you ! Smile

The answer didn't surprise me at all. Sorry!
:-)

Quote:Admittedly this teaser is only for power calc users so don't feel too bad if you're not up to the task (I only needed 3 lines of code for my 4-decades old toy.) Smile

I'm not nearly clever enough to see how to solve it in three lines of code, but I did solve it using a general purpose matrix-permanent algorithm which I wrote in C++, using integer arithmetic. (It could easily use floating point if necesary, and that might actually be faster.). It computed the result in approximately 4ms on my power calc, which has an AMD Ryzen 7 3800X, 3.9+ GHz CPU.

I briefly thought about also writing a 15C program, but the algorithm takes 2^(n-1) * n^2 operations. With the algorithm I used, I think it would be faster to compute it using a 16C.

Thanks for the fun challenge! I look forward to learning about your three-line solution.
Happy new year!
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Happy New Year 2024 ... and 2023's last teaser ! - brouhaha - 01-01-2024 01:27 PM



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