[long] [images] More Dice Formulas (Help!)

Tarchon, to quote Aerosmith: "Life's a journey, not a destination."

To those of us who find this sort of stuff fascinating, it's more about the solving of the problem than the utility of the solution. There is also often the hope that the solution will, after all, have utility.

Fermat's last theorem is a good example. It's not particularly interesting in and of itself--but the implications of Andrew Wiles's proof, I understand, are fascinating to mathematicians. I couldn't understand the first paragraph of that, though, so I have to stick with slightly simpler math that is more interesting to my particular hobby.

------------

All that said, this looks rather interesting, and when I actually have some time, I'll be looking at it :)
 

log in or register to remove this ad

As a starter of a previous die-number-theory thread, I can say for certain though the formula may be long and dry and dusty, I STILL want to know it.

It's akin to climbing a mountain. Why do it, its not accomplishing anything, its not useful to anybody. Maybe so but if thats what you want to do, then its IS accomplishing something, its making you feel fulfilled.

Sadly, my mathematical knowledge is about 15 steps below Ichabod's and I could never follow the math leading up to the final solution. If I could I would be the first person posting...hey you forgot to factor in X and Y.

The prevalence of "I don't like that, therefore it's useless" posts on the internet in general is a trend that I have never understood. I don't like them, therefore they are useless.

DS
 

Sabathius42 said:
The prevalence of "I don't like that, therefore it's useless" posts on the internet in general is a trend that I have never understood. I don't like them, therefore they are useless.
For people who claim that it doesn't matter to you whether the thing is useless, you sure seem to be mightily offended by the term.

I've probably spent hundreds of hours over the years on dice problems, which are mainly useless. I accept that fact. I have no problem with stating it. It is however a fact. If I asked someone a complex question about it and they someone said to me, "Why are you bothering with this?" I wouldn't say "how dare you say that, you jerk!" I'd say something like what you just said, though without the little juvenile bit on the end. "Yeah, I know, it's just something I want to mess with."

Such posts as you complain about are indeed pretty common because it's pretty common for people who see other people doing things in very inefficient ways and then asking for help with it to mention that there could be better ways to do it, just in case the other person may happen not to be aware of effectiveness of the other ways. It's called "trying to be helpful."

If someone came up to me and said "I was reading a book on ladders, and I've been trying to change this light bulb, and I'm wondering how many people it will take to turn the ladder," I would say "well, professional bulb guys don't usually turn the ladder in most cases. They can usually kind of look at it and tell whether turning the ladder or turning the bulb would work best, and turning the ladder only works well in a few special cases. Really with that horizontal fluorescent bulb there, turning the bulb is probably going to be your best bet in any case."
Then someone would say "The ladder can be turned in same way as to remove the light bulb - I'll get to work on it when I have time."
And I'd say "Oh, yeah, of course you can do it that way, it's just that it's a very long and useless way of doing it."
And someone would say "shut up, you jerk."
And I'd tell them in more direct terms why this is a bad way to do it, just to annoy them with direct terms. Some people are really annoyed by that, you know? Yeah, I guess you do.
I'm kind of tempted to write a combinatoric solution to annoy you more, but that's probably enough for today.
 

tarchon said:
Dude, how is saying that a huge long combinatorics formula is long and useless being a jerk? Are you a huge long combinatorics formula? If not, then in what way do you take that as an insult? I guess the idea is that if someone says I'm wrong, it's OK, and if someone says you're wrong it's "being a jerk"? If you don't want input, don't post a thread asking for it.

You come in here and say that something I'm interested in is boring and useless. You want to say it once, fine, but when you keep harping on it you are being insulting. And yes, I wanted input, but you haven't given any.

OTOH, with something even remotely like (formula snipped),
you've got multiple levels (in one case 3) of iterated sums of COMB and !. It probably takes as long to calculate that formula as it would to run through every single one of the 6^4 events and test them individually. Given that the deepest operations are COMB and !, it may take even longer since neither of them is particularly efficient to calculate or well behaved.

4d6 drop 1 is one of the simplest cases you would be interested in. If you'd bothered to look at the formula rather than just ranting about how useless it is, you'd realize that in that case the formula makes 31 calculations, as opposed to the 1,296 calculations made to itterate through all the possible permutations. Now those 1,296 calculations are simple, sum-min. The factorial calculations are not as bad as you think, as they are reused, so can be calculated ahead of time with simple multiplications

If you go to 9d6 drop 6, you make 126 calculations with the formula, as opposed to the 10 million you would have to make going through all the possible permutations. And now, those are no longer simple sum-min operations, they require sorting each time. I am at a loss as to where you got the idea that 10 million sorts is going to be faster than 126 calculations each with a handful of multiplications and divides.
 


never send a mathematician to do a programmers job.

In the classic 4d6, drop the lowest scenario, if I recall, the average was 13.5 which struck me as funny when I ran it, because the PCs in my campaign at the time all had the exact same average as that.

A programmer who hates math and has a lot of CPU simply writes 4 loops that cycle 1-6 and in the inner-most loop, apply a sort of the loop counter values, followed by a sum the values, excluding the last one. If you count how many die results (well math takes care of that too) and add up those dice summations, you should be able to get an average.

I did it on my old PDA in Basic while I was waiting for my wife to get done with an errand. Took 10 minutes to write, 1 minute to run.

Here's the pseudo code:

For d1 = 1 to 6
for d2 = 1 to 6
for d3 = 1 to 6
for d4 = 1 to 6

arrD[0]=d1
arrD[1]=d2
arrD[2]=d3
arrD[3]=d4

sort(arrD)

r = arrD[0]+arrD[1]+arrD[2]
Tr = Tr + r
C = C +1
next d4
next d3
next d2
Next d1

avgResult = Tr/C

That should be right.
There ya go!

Janx
 

Janx:

Yes, but the average isn't what we're looking for. We want to know, for instance, the probability of rolling a 17 on 4d6 drop 1. Or, more correctly, we want a mathematical algorithm for determining that for any values of n, s, and d.
 

Y'know, I thought I'd done this before. I don't have thread-searching abilities, but I can search through the webspace I host my pictures in, duh. And look what I found:

drop_lowest.png


In this equation, I'm pretty sure R is the result, n is the number of dice, d is the number of sides on the dice, and k is the number of dice kept. k may be the number of dice dropped. I'm working through the figuring now.

If anyone else wants to test this one in the meantime, have at it :)


EDIT: So, having done some testing on this one, it seems that this does work, but ONLY when dropping a single die. (k is, in fact, the number of dice kept, and this equation only works for k = n - 1)

Anyone have ideas where to go from here?
 
Last edited:

tarchon & everyone else -

Obviously, feel free to disagree with other posters. But please don't be rude about it. Thanks.

- Darkness
 


Remove ads

Top