Post Reply 
Dice probabilities
04-30-2024, 09:10 PM
Post: #23
RE: Dice probabilities
(04-30-2024 07:30 PM)David Hayden Wrote:  What is x? Why do create \(x^2+x^1+x^0\)? How does it relate to the dice?

A polynomial in the variable \(x\) can be considered an encoding of vector.
You are probably more familiar using the other direction: a vector can be considered an encoding of polynomial.

If you want to solve \(x^2 - 5x + 6 = 0\) with an HP-48GX you enter:

[1 -5 6]
PROOT

[2 3]

But we have a vectors like [1 1 1] or [1 2 3] and we encode them as polynomials \(x^2+x+1\) or \(x^2+2x+3\).

How are these vectors related to a die?
The position or index marks the value of a side and the coordinate marks how many sides we have with this value.
Similarly for a polynomial the exponent marks the value of a side and the coefficient marks how many sides we have with this value.

Thus [1 1 1] should rather be [2 2 2] for a real die but we can just scale this up or down.
So we don't bother.

An ordinary 6-sided die would be encoded as: [1 1 1 1 1 1 0]

If you roll multiple dice we assume that their outcome is independent from each other.
Every possible event of one die can be combined with every possible event of the other dice.

We simulate the same behaviour with the distributive law when two polynomials are multiplied.
Every term of one polynomial is multiplied by every possible term of the other polynomials.
And that's all there is.

But multiplication of polynomials does more that just that.
Terms of \(x\) with the same exponent are collected and added.
But for the dice this means that events with the same sum are collected and added.
And that is exactly what we want.

Thus by multiplying these polynomials we can simulate throwing the dice.

If that didn't help, I suggest to take two ordinary dice, encode them as polynomials, multiply them and see what happens.
And then compare this result to what you would do with the dice.

Here comes the really cool part: multiplication of polynomials is easy.
It is implemented in many libraries or tools.
And if you check my Post #13 you notice that there is a relationship to the Fast Fourier Transform.
This allows us to do these kind of calculations very efficiently using an HP-48GX.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Dice probabilities - dm319 - 04-29-2024, 04:23 PM
RE: Dice probabilities - Thomas Klemm - 04-29-2024, 04:55 PM
RE: Dice probabilities - Allen - 04-30-2024, 11:19 AM
RE: Dice probabilities - dm319 - 04-29-2024, 05:49 PM
RE: Dice probabilities - Thomas Klemm - 04-29-2024, 06:07 PM
RE: Dice probabilities - David Hayden - 04-30-2024, 07:30 PM
RE: Dice probabilities - Albert Chan - 04-30-2024, 08:26 PM
RE: Dice probabilities - dm319 - 04-30-2024, 09:57 PM
RE: Dice probabilities - dm319 - 04-29-2024, 07:14 PM
RE: Dice probabilities - Albert Chan - 04-29-2024, 09:22 PM
RE: Dice probabilities - dm319 - 04-30-2024, 10:07 PM
RE: Dice probabilities - Albert Chan - 05-01-2024, 11:14 AM
RE: Dice probabilities - dm319 - 04-29-2024, 07:22 PM
RE: Dice probabilities - Gil - 04-29-2024, 10:36 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 12:27 AM
RE: Dice probabilities - John Keith - 04-30-2024, 10:00 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 12:40 AM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 06:43 AM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 08:06 AM
RE: Dice probabilities - Albert Chan - 04-30-2024, 10:59 AM
RE: Dice probabilities - Dave Britten - 04-30-2024, 12:00 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 05:11 PM
RE: Dice probabilities - Dave Britten - 04-30-2024, 05:58 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 06:04 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024, 06:25 PM
RE: Dice probabilities - Dave Britten - 04-30-2024, 07:24 PM
RE: Dice probabilities - Thomas Klemm - 04-30-2024 09:10 PM
RE: Dice probabilities - Thomas Klemm - 05-01-2024, 03:32 AM
RE: Dice probabilities - Thomas Klemm - 05-01-2024, 04:26 AM
RE: Dice probabilities - Thomas Klemm - 05-01-2024, 04:41 AM
RE: Dice probabilities - John Keith - 05-01-2024, 06:56 PM
RE: Dice probabilities - Thomas Klemm - 05-01-2024, 05:54 AM
RE: Dice probabilities - Thomas Klemm - 05-01-2024, 08:45 PM
RE: Dice probabilities - John Keith - 05-02-2024, 02:46 PM
RE: Dice probabilities - Albert Chan - 05-03-2024, 01:08 PM
RE: Dice probabilities - Thomas Klemm - 05-03-2024, 01:20 AM



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