Dice Computation Question

I have an assortment of dice, 4-sided, 6, 8, 10, 12, 20 and a 10-sided by tens to 100, but no actual 100-sided die. Without buying the 100-sided die on Ebay, what’s the most efficient roll sequences to obtain each of the following numerical results: a number between 1-24, between 1-64, between 1-78 and between 1-81?

You’re not going to be able to do any of those in a single roll (the smallest probability outcome you can get in a single roll is 1/20, which is still larger than the largest probability outcome you’re interested in, 1/24). So you’ll have to use at least two rolls in all cases.

You can do 24 in two rolls easily, with a roll of the 4 and the 6 (4 * 6 = 24), and similarly for 64, with a roll of the 8 and then the 8 again (8^2 = 64).

You can do the 81 by pretending your 6- or 12-sided dice are actually just 3-sided, and rolling them 4 times (3^4 = 81). There may be other clever things you can do to improve either the worst-case or at least the average-case number of rolls; I’ll have to think about it.

78 is tricky. Unfortunately, it has a prime factor of 13 which none of your dice do. Still, there are things you can do. You could just roll the 4 and the 10 to simulate a 40-sided die, and re-roll whenever the result is 40, to simulate a 39-sided die [though with an infinitesimal chance of rolling and rolling and rolling forever]. Then simulate a 2-sided die with any of the even dice you have, and you’re golden (39 * 2 = 78).

I’m typing this up in a hurry as I’m on my way out, but I’ll be back to clean it up and expand on it later (in particular, with proofs or disproofs of optimality for the latter two methods).

Or just roll the 8 and 10, and reroll on a 79 or 80.

For the 81, roll a pair of 10s, and reroll if either of them hit 10.

A question for the OP, though: what counts as efficient? Total number of dice rolled? Total number of multi-rolls? The answer differs. Indistinguishable’s algorithm for 81 always works in one shot, but requires 4 dice. Mine only uses two dice, but needs a reroll 19% of the time. Is it better that 2.38 < 4 (total dice), or that 1 < 1.19 (total rolls)?

Simpler, old RPG player trick, no multiplication needed : roll the d12 and any other. If the second die rolls odd, the d12 is 1-12. If even, then d12 is 13-24.

Slight hijack: d100 are pretty much useless as dice. It’s hard to read which number is REALLY on top. They do, however, make good kitty distractions, as they roll and bounce all over the place.

Not to mention a lone 10 sided die works just as well to get a random number between 1-100 :slight_smile:

That’s much simpler than I thought. I was trying to add die rolls rather than multiply. Another number range of interest is 1-33.

That’s where I get stumped. Trying to add 10 die results, the result would be between 10 and 100, right? And you can’t just subtract 9 from the total, then it would be between 1 and 91. Or maybe you mean something else entirely.

d12 plus d6. Use the d6 as 1-3, multiply the result of the d12, reroll 12s (3*11).

I don’t mind any hijack that saves me $10 though.

It’s much simpler than that. Most 10 siders have sides numbered 0-9.
Roll the die twice. First result is the 10s, second is the 1s. So e.g. a roll of 4,5 is 45. If you get 0,0 that’s 100.

Your solution for 81 is efficient enough for me. Just two die rolls unless you keep rolling tens.

Since you put it that way, yes, that’s extremely simple. A very elegant solution. Just thought of something though. That works only if you’re happy with a result between 1 and 100, right? My desired results are narrower as noted above.

Yup.

But I think (somebody will have to fact-check this solution as I really suck at probabilities :slight_smile: ) you can use the same trick for 1-81 :

Roll a d6, d8, d10. The d10 is your 1s, the d8 is your 0-7 for the 10s, which gives you a d80. If the d6 is 1-3, keep the result of that d80. If the d6 is 4-6, add 1.
Which functionally is a toggle between rolling 1-80 and 2-81, but I believe the odds of landing any one result that way are the same as rolling a “real” 1-81.

1-78 is of course simpler - d80, reroll on 79 and 80

With that method, there is only one way to roll a 1 and only one way to roll an 81. The rest of the numbers are indeed equally likely.

Does rolling two dice simultaneously count as equally efficient to rolling just one die once, or as equally efficient to rolling one die twice in a row? That is, are we seeking to minimize time or to minimize dice usage? [My answers so far have been in terms of the latter; if we only care about the former metric, you might as well roll all the dice each time (effectively, rolling a 4 * 6 * 8 * 10 * 12 * 20 * 10 = 2^12 * 3^2 * 5^3 sided die), as there’s no harm in it.]

But I gather you aren’t really interested in tricky algorithms and proofs of optimality. You just want to play the game, and don’t want to buy a d100. Well, as noted, a d100 is very easy to emulate with your two d10s, and if you’d be happy using a d100 to simulate everything else, you’re set.

I wasn’t saying you should multiply the results from the d4 and the d6 (that wouldn’t work; for example, you’d never get a 7 or 11 or 13…). I was proposing essentially the same method you are, except using a d4 and a d6, rather than a d12 and a d2 [the d2 in your case being simulated by a dAnyEven]. That is, I was just noting that there are 24 equally likely outcomes for a d4 and d6 together, on the grounds that 4 * 6 = 24, so they would get the job done (under whatever mapping you like of those 24 results to 1, 2, …, 24), just as a d12 and a d2 get the job done because 12 * 2 = 24.

Oh, yes, I get it now ! I got an attack of the dum-dums there, sorry :).

For weird numbers like 33, you could just use cards instead (just have a deck of X cards)

Brian