Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re^3: Permutation of groups

by tomazos (Deacon)
on Nov 20, 2006 at 20:16 UTC ( #585133=note: print w/replies, xml ) Need Help??

in reply to Re^2: Permutation of groups
in thread Permutation of groups

Specifically for a given partitioning ever person must belong to exactly one team.

Teams do not have to be of the same size.

eg For three people: 1. A B C 2. AB C 3. A BC 4. AC B 5. ABC

Replies are listed 'Best First'.
Re^4: Permutation of groups
by Limbic~Region (Chancellor) on Nov 20, 2006 at 20:50 UTC
    Assuming it does the right thing, you are going to want to use the integer partitioning code blokhead refers to above and the binary counting I explained. You will not have a contigous range of team reference numbers but they will be guaranteed to be unique and will never be higher than 2 ** $num_of_people.

    If I find the time tonight or tomorrow, I will code this for you. If you end up coding it on your own, please post so others can benefit and I won't bother.

    Cheers - L~R

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://585133]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (10)
As of 2023-12-11 12:35 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.