Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Working out the sides on a die and the numerical ratio on the die

  1. Aug 23, 2011 #1
    Being a hobbiest programmer, I know enough about probability to get by. However, I've set myself an impossible (for me) calculation in my current personal project.

    I have a set of numbers. For this particular problem it is a set of four numbers {248, 184, 120, 56}, but I'll be repeating the process for many different sets of numbers (both in value and size).

    Twice, I randomly draw a number from the set. Each draw is independent of the last so each draw can be thought of as a roll of 2 identical dice. I am looking for the following probabilities occuring:

    (248.248) || (248.184) || (248.120) || (248.56) || (184.120) = 1998/2000

    (184.184) || (184.56) || (56.56) = 1/2000

    (120.120) || (120.56) || (56.56) = 1/2000

    And wondering which way I should 'load' my dice i.e. how many sides do they need and on how many sides should each number appear?

    I'm not sure of the notation mathematics uses for this, so I've stuck in logical operators as used in computing. "." = AND, "||" = OR. I guess I'm looking for this

    (A AND A) OR (A AND B) OR (A AND C) OR (A AND D) OR (B AND C) = 1998/2000

    (B AND B) OR (B AND D) OR (D AND D) = 1/2000

    (C AND C) OR (C AND D) OR (D AND D) = 1/2000

    I've gotten close, but that (D AND D) reappearing in both groups has me absolutely stumped.

    I'm more interested in the method than the answer (if there is one) as I need to repeat this for 183 more steps of different set sizes, values and probabilities and I'm calculating/feeding it all into my program by hand.
     
  2. jcsd
  3. Aug 23, 2011 #2

    Stephen Tashi

    User Avatar
    Science Advisor

    I would translate your equations to simultaneous equations in the unknowns a,b,c,d.

    [tex] a^2 + ab + ac + ad + bc = \frac{1998}{2000} [/tex]
    [tex] b^2 + bd + d^2 = \frac{1}{2000} [/tex]
    [tex] c^2 + cd + d^2 = \frac{1}{2000} [/tex]

    I can't tell whether you also want:

    [tex] a + b + c + d = 1 [/tex]

    If you do, the first equation becomes

    [tex] a + bc = \frac{1998}{2000} [/tex]

    Perhaps someone will see a simple to solve these equations. At the moment, I don't.

    If you are trying to find rational number solutions for a,b,c,d this would fall under the topic of "simultaneous polynomial diophantine equations", about which I know nothing.

    If you will accept real number solutions for a,b,c,d, this problem falls under the general topic of "simultaneous polynomial equations". Two general purpose algorithms for solving such things are "Buchberger's algorithm" and "Wu's method of elimination".

    Of course, it is possible to write simultaneous equations which have no solutions.
     
  4. Aug 24, 2011 #3

    chiro

    User Avatar
    Science Advisor

    Are all your processes discrete uniform? (That is, for each set that you talking about, does each element have the same probability of occurring as every other element in the same set)

    I'm assuming that each process (with the A,B,C,D) all come from the same set, so that the probability of anything happening will be the same. Is this right?

    If this is the case, then independence simplifies everything and using definitions for probability (like P(A OR B) = P(A) + P(B) - P(A and B), and P(A and B) = P(A)P(B)) will make things easier.
     
  5. Aug 25, 2011 #4
    To solve, write the equations as integer polynomials, then find the Groebner basis of the equations with lex ordering (uses Buchenberger's algorithm). If the equations are consistent then one of the resulting polynomials will have one variable, e.g. 'a', then solve for example by applying the rational root theorem to get a finite list of candidate solutions in terms of the integer factorization of the first and last polynomial coefficients, then for each solution substitute into the remaining equations and solve.
     
  6. Aug 27, 2011 #5
    Thank you for the replies. I'm not strong on maths, so the terms/links provided have had me scrambling about learning new things, which I what I appreciate a lot. bpet, I must admit that that every second word in your post was like a foreign language to me - I've had to do a lot of reading! Thank you everyone for your replies.

    I've realised that the 1/2000 probability was not helpful. I've changed it to 1/2025 as that was close enough for me and allowed me to begin from 2 dice with 45 sides. I also realised that probability is much like boolean algebra, which helped me a lot. The second two probability equations were the ones of interest to me, so I stuck with those.

    P(BB or BD or DD) = 1/2025 and P(CC or CD or DD) = 1/2025

    Through boolean algebra became:

    P(B or D) = 1/45
    P(C or D) = 1/45

    It was then rather apparent that:

    P(B) = 2/135
    P(C) = 2/135
    P(D) = 1/135

    And, therefore:

    P(A) = 130/135

    Thank you all for your help!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Working out the sides on a die and the numerical ratio on the die
  1. Sum of a die (Replies: 4)

Loading...