Tue Jan 16 16:46:58 2018 by Sharp |
I'm trying to calculated the probability of all the different ways you can make a pool of dice totalling 6 by adding values together from a larger pool. so if I rolled 6d6 I would want to count all the 6's then all the 5+1 and remove them form the pool, the 4's and 2's, remove then 4's and 2x1's etc: \ 6 \ 5+1 \ 4+2 \ 4+1+1 \ 3+3 \ 3+2+1 \ 3+1+1+1 \ 2+2+2 \ 2+2+1+1 \ 2+1+1+1+1 \ 1+1+1+1+1+1 I have tried everything I can think of for most of the day but I keep running around in circles. I think I need to do a multiset keep. :( |
Thu Jan 18 09:40:33 2018 by Torben |
As I understand your idea, you want to do this without replacement, so a pool of 3 3 2 1 will generate only one sum of 6, even though you can make this sum in two different ways. As far as I can see, the order in which you pick dice sets that add to six does not matter, so you might as well start with picking sixes, then fives and ones, and so on, as you suggest. I'm not sure you can do it much easier than simply trying the combinations that you list above in some order. This can be done in Troll like this:
You call this by call sixes(pool) , for example
|
Thu Jan 18 16:48:30 2018 by Sharp |
Thanks, I think that's really clever. |