Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

Re^5: Multiple Combinatorics

by BrowserUk (Pope)
on Apr 17, 2012 at 03:06 UTC ( #965427=note: print w/replies, xml ) Need Help??

in reply to Re^4: Multiple Combinatorics
in thread Multiple Combinatorics

The only way to deal with this efficiently is to reduce the input sets to non-overlapping sets prior to permuting them.

To do that, you need to lay out the rules for overlapping sets. You'd need to define how to deal with:

  1. One set completely overlaps another;
    1. the overlap is less than the number to be picked from the smaller group.
    2. The overlap is less than the number to be picked from the larger group.
    3. The overlap is equal to the number to picked from the smaller group.
    4. ...
  2. There is only a partial overlap between the groups:
    1. The overlap is smaller than the number to be picked ....
    2. ...

Whence you've defined how all the possibilities should be resolved into distinct groups, the rest should be relatively easy.

I'm still bugged by your lack of explanation of what the purpose of this is?

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965427]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2018-05-24 16:31 GMT
Find Nodes?
    Voting Booth?