What is the most efficient way to generate all the multiset, combinations, probability, dispositions and permutations of an array in PHP?
Here is code to get all permutations:
With the code to get the power set, permutations are those of maximal length, the power set should be all combinations. I have no idea what dispositions are, so if you can explain them, that would help.
You can use this class: http://pear.php.net/package/Math_Combinatorics
combination with repetitions