(no subject)

Dec 05, 2010 09:31

I have a solution to the last problem from my last post:  What is E(max(d4!, d6!))?  The technique is generalizable, but I have yet to reduce it to a closed form solution.

The problem that I ran into solving this problem is that using a simple 4x6 table (as I used a 6x6 table to solve the E(max(d6!,d6!)) problem) with a recursive step in the bottom right corner (the case in which both dice explode) doesn't work because the entry in that square is either 4 + E(max(d4!,d6!) or 6 + E(max(d4!,d6!) (depending on whether you roll higher at least 2 higher on the d4! than you do on the d6!, and it's quite difficult to find the probability distribution for the two outcomes to weight the square appropriately.  Expanding to additional 4x6 charts doesn't help because each is different from the previous.

The solution is to create a 12x12 chart (12 = lcm(4, 6)) with weighted probabilities for later entries:
 123456789101112+11/242/243/244/245/2407/1448/1449/14410/14411/14416.2/14422/242/243/244/245/2407/1448/1449/14410/14411/14416.2/14433/243/243/244/245/2407/1448/1449/14410/14411/14416.2/144400000000000055/965/965/965/965/9607/5768/5769/57610/57611/57616.2/57666/966/966/966/966/9607/5768/5769/57610/57611/57616.2/57677/967/967/967/967/9607/5768/5769/57610/57611/57616.2/576800000000000099/3849/3849/3849/3849/38409/23049/23049/230410/230411/230416.2/23041010/38410/38410/38410/38410/384010/230410/230410/230410/230411/230416.2/23041111/38411/38411/38411/38411/384011/230411/230411/230411/230411/230416.2/230412+15.333/38415.333/38415.333/38415.333/38415.333/384015.333/230415.333/230415.333/230415.333/230415.333/2304(12+E(max(d4!,d6!)))/2304
Along the top and left, we have the possible outcomes (up to 12) of rolling d6! and d4!.  The interior entries are the expected result of each combination of rolls divided by the probability of rolling that combination.  For example, the probability of rolling a 6 on a d4! is 1/16 - you have to roll a 4 on the first roll (probability 1/4) and a 2 on the exploding roll (1/4).  The probability of rolling a 5 on a d6! is 1/6 (roll 5 on the first roll, no exploding roll).  The outcome of rolling a 6 on a d4! and 5 on a d6! is known - 6 - and the probability of running into that situation is 1/96, so the entry in the table is 6/96.  A more complicated example:  The probability of rolling a 10 on a d4! is 1/64 (you have to roll, each with probability 1/4 a 4, a second 4, and a 2).  The probability of rolling a 12 or more (12+) on a d6! is 1/36 (you have to roll 2 6's, each with probability 1/6).  The expected outcome of this combination is 12+E(d6!) = 16.2 (see previous problems), so the entry in that square is 16.2/2304 (64*36=2304).  Also, note that P(4 on a d4!) = P(8 on a d4!) = P(6 on a d6!) = 0 since you wouldn't stop rolling in any of those cases, so there are two rows, and 1 column of 0's for those outcomes.  Finally, the probability of rolling 12+ on a d4! and 12+ on a d6! is 1/2304, and the expected outcome of that eventuality is 12 + E(max(d4!,d6!)).

Now, we can write an equation for E = E(max(d4!,d6!)):
E = sum of table entries = 182809/34560 + E/2304
So
E = (182809/34560)*(2304/2303) ~= 5.2919091

Clearly, this technique can be adapted to calculate E(max(dM!,dN!)).  For example, if you roll a d6! and a d10!, you would create a table with dimensions 30x30 since lcm(6,10) = 30.  However, I have yet to see how to sum up the entries in terms of M and N, so I can't present the reader with a closed-form solution at this time.
Previous post Next post
Up