Programming puzzles: processing lists!
|
08-16-2017, 07:57 PM
Post: #191
|
|||
|
|||
RE: Programming puzzles: processing lists!
(08-16-2017 06:58 PM)pdo Wrote: I can imagine how to do this in a language like Lisp, for example, but on the way home from work I got to thinking how I would implement this in RPL, and to be honest I'm not sure how I would go about it. Stuff to ponder... Even if you start by implementing it in Lisp and confirming the result counts (and possibly lists as well), that would be useful for helping to nail down the targets. Your formula and description certainly seem plausible. (08-16-2017 07:33 PM)pier4r Wrote: Instead if one find an order with built in "safety of no duplicates", like DavidM wants to do it, I guess it will be the most effective way. I'm still struggling to find the elusive algorithm to do that, if it even exists. Looking at the result lists I have sure makes it appear that there is a pattern, but so far I'm not coming up with the right steps to match it. The goal, of course, is ultimately to limit the inner loops to the minimum needed iterations to produce the full result set. Assuming Paul's formula is correct and a recursive solution is created that matches the described groupings, then it would probably be even more efficient. My initial recursive attempts became unwieldy because they had to cull out unneeded branches of combinations. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)