2

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

0 Answers0