Post Reply 
Programming puzzles: processing lists!
08-15-2017, 08:29 PM
Post: #182
RE: Programming puzzles: processing lists!
(08-15-2017 07:39 PM)pier4r Wrote:  my gawk implementation on the 1.73 ghz Dothan took over 80 minutes for 16 teams, so I killed it (I do not have the results). But if I miss something, it makes no sense, so I thank you for your results, I have something to compare to now.

I also tried a completely different method and got the exact same results for 8 teams. Now of course it could simply be because the same developer created the same problems in a slightly different way, but it does at least give one more data point to consider.


(08-15-2017 07:39 PM)pier4r Wrote:  PS: I think that better environments to attack the problem are, in the RPL/HP related world: sysrpl / newRPL / hppl (maybe rpl/2 if I got to know how to fix some compilation problems) plus a bit of optimizations.

After approaching this a couple of different ways now, I'm thinking that my next attempt will be to treat this as a specialized lexicographic sequence. In doing so, the hard part then becomes determining how to step through the sequence properly. My previous attempts were actually just modified forms of full permutations that would simply discard all inappropriate results, which is why they slowed down immensely with increasing team counts.

This sequencing technique is actually the same way DOCOMB and DOPERM work internally. There's a "control mask" that designates the order/selection of list elements, and some Saturn routines manipulate the mask by stepping up (or down) in lexicographic order. So if we can determine how to "step" the sequence properly, we can then simply return each team list in the sequence. That's easier said than done, though.

The nice part about this particular challenge is that there is no need for a mask; the mask is the actual input (and output, after modification). In other words, once you "step" the team list, you just format it appropriately and move on the next one. There's no need to "apply the mask" to some other list in this case.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Programming puzzles: processing lists! - DavidM - 08-15-2017 08:29 PM



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