Dice probabilities
|
04-30-2024, 10:59 AM
Post: #13
|
|||
|
|||
RE: Dice probabilities
Instead of multiply to expand polynomial, we could also do division.
(x^2+x+1)^5 = (x^3-1)^5 / (x-1)^5 Numerator coefficients is simply 5th row of pascal triangle, with alternate sign: x^15 - 5x^12 + 10x^9 - 10x^6 + 5x^3 - 1 Synthetic Division, (x-1) 5 times, we get the expanded polynomial needed. With symmetry, we only need 2 terms. (for exponent >= 7, we don't even need last 2 columns) Code: 1> 1 0 0 -5 0 0 P(sum >= 7) = (1+5+15+30)/3^5 = 17/81 ≈ 0.2099 Or, we skip synthetic divisions, and go straight for answer P(sum >= 7) = (1+5+T5+(Te5-5))/3^5 = (1+T5+Te5)/3^5 = (1+comb(6,2)+comb(7,3))/3^5 = 17/81 https://en.wikipedia.org/wiki/Triangular_number https://en.wikipedia.org/wiki/Tetrahedral_number |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 10 Guest(s)