Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • python itertools does all this out of the box. Commented Apr 21, 2016 at 21:25
  • 1
    What do you need this for? It's very likely better to state and then try to solve your original problem. Commented Apr 22, 2016 at 8:27
  • @gnasher729 I'm trying to find an optimal set of groups of letters. I want to take each set and run it through a function to give it a score. I'm trying to find the set that has the 'best score', but I want to do the minimum iterations possible. Commented Apr 23, 2016 at 5:54
  • Do you really need them all? Your calculation is only off by a factor of 24, there will still be 1.1x10^14 partitions meeting your specifications. Commented Apr 23, 2016 at 19:03
  • 1
    There are four sets of five. There are 24 ways to order them. You counted every ordering of the same four sets, so that you counted both [abcde], [fghij], [klmno], [pqrst] and [fghij], [abcde], [klmno], [pqrst]. Since the sets are not ordered, I just divided your number by 24. Commented Apr 25, 2016 at 18:21