Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
It's a branch and bound-algorithm, by early cutting unnecessary branches I avoid calculating all permutations, which is (far¹) more efficient.²
And it gave me the opportunity to check some mathematical approaches (which are more challenging for me) But you're welcome to show us your way to do it!(BTW: I saw your approach already been done in Python, if you're interested)
Cheers Rolf UPDATES: ¹) since 8! is only ~40000 it's not too obvious in this special case. ²) Furthermore branching allows to cache/memoize results for subtrees to go even faster. In reply to Re^2: Possible pairings for first knockout round of UEFA champions league
by LanX
|
|