Post Reply 
Calculating odds of rolling a given total with a specified number of dice
06-16-2015, 12:06 AM
Post: #6
RE: Calculating odds of rolling a given total with a specified number of dice
(06-15-2015 11:52 PM)Thomas Klemm Wrote:  It's much easier to use lists:

Code:
\<< DUP
    1 5 START
        { 0 } SWAP +
        SWAP 0 +
        OVER ADD SWAP
    NEXT
    DROP
\>>

Start with this list:

{ 1 1 1 1 1 1 }

Repeat the program above 8 times.
To get the coefficient of \(x^{22}\) use:

14 GET

That's because 14 = 22 - 9 + 1 and the list is symmetric.

HTH
Thomas

Thanks Thomas, that looks like a good trick for dealing with pools of standard six-sided dice. Not sure if that can be applied to multiplication of arbitrary polynomials, i.e. pools of non-uniform, non-standard dice with any number of sides. I may end up having to use the matrix approach there and just multiply the polynomials, collect terms, etc.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Calculating odds of rolling a given total with a specified number of dice - Dave Britten - 06-16-2015 12:06 AM



User(s) browsing this thread: 1 Guest(s)