2
$\begingroup$

I have a list:

lis={{a,b},{b,b},{a,a}}

This could be a list of types of something, 3 types: the type {a,b}, the type {b,b} and the type {a,a}.Then, I have ten individuals that could be of wherever of this three types. How many permutations could I have of the distribution of this 3 types in ten individuals.

AllPossibleStates= {{8,1,1},{7,2,1},{5,3,2}...{...}}

That means: {8,1,1}: 8 individuals of type {a,b}, 1 of type {b,b}, and 1 {a,a} and so on

I can make some with IntegerPartitions but this doesn´t take into account some permutations like:

 {{10,0,0},{0,10,0},{0,0,10}}
$\endgroup$
3
  • $\begingroup$ VERY unclear question. "Distribution" has a very specific meaning, which does not apply here. Do you mean "permutations" or "combinations" or... what? $\endgroup$ – David G. Stork Mar 16 '18 at 15:57
  • $\begingroup$ If you have problems describing what you want, please give an example where StrategiesCopMap is the input and AllStatesPossible is the expected output. $\endgroup$ – halirutan Mar 16 '18 at 17:20
  • $\begingroup$ Try Flatten[Permutations /@ IntegerPartitions[10, {3}, Range[0, 10]], 1]. $\endgroup$ – bbgodfrey Mar 21 '18 at 0:41