Your skill will accomplish what the force of many cannot 

PerlMonks 
Comment onby gods 
on Feb 11, 2000 at 00:06 UTC ( #3333=superdoc: print w/replies, xml )  Need Help?? 
I have an interesting problem that i've been thinking about. Basically we have a series of different "things" (say 4 of them). I would like to group each thing together by a given set of attributes. The way this is calculated is something like:
From the table we can see similarities and differences between the things. For example the difference between t1 and t4 is 0, and the similarity is 3. My idea is to group the "t#"s together by maximizing the average difference between them, and minimize the similarity. To do that, however I need to be able to split the "things" into multiple different subsets. For example:
etc. Then basically iterate over all different possible combinations and find the maximum average distance and/or minimum similarity resulting from a comparison of the groups. My question is: is there a module available which will return sets of subsets like this? I'm finding a lot of modules that return permutations and the like, but not subsets. I can of course write my own, but reinventing the wheel and all that. Any suggestions of a better/different way to do a grouping of this nature are of course completely appreciated. Thanks! In reply to Sets of subsets by jpearl

