Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: Multiple Combinatorics

by aartist (Scribe)
on Apr 15, 2012 at 22:01 UTC ( #965208=note: print w/replies, xml ) Need Help??


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

Yes: if Group B (1..6) is subset of Group A(0..7) and Pick(B)=2 is equal to Pick(A)=2 then we apply 'b): pick nothing from larger group';

In this case, we still have picked 2 values from larger group automatically, which holds the initial condition. Only thing that '0' and '7' won't be picked at all in any resultset. ( from the given data).

Replies are listed 'Best First'.
Re^5: Multiple Combinatorics
by BrowserUk (Pope) on Apr 17, 2012 at 03:06 UTC

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965208]
help
Chatterbox?
[Corion]: I usually expect fixed header names, but am sometimes lenient in the order of columns. But changing the report titles often sounds to me as if you are not the sole consument of the export ;)
[shmem]: perldigious: as always - if it ain't broke, don't fix it. Ther must be a very compelling reason for changing column names in a database. Those are rare.
[Corion]: If you have whitespace in the column names in the database, whap the DBAs ;)
[shmem]: It's common for some vendors to have column names such as WRSTVG or some other such whizzbang, and another table where these names are mapped to something meaningful depending on how you look at the data
[shmem]: afair in SAP that occurs all the time

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2017-05-25 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?