When trying to solve a specific Euler Euler question, I ran into difficulties with a specific mathematical formula. According to this web page ( http://www.mathpages.com/home/kmath093.htm ), the formula for determining the probability of rolling the sum T by the number of bones, n, each with the number of sides, s, each with numbers from 1 to s can be set as follows:
alt text http://www.freeimagehosting.net/uploads/8294d47194.gif
After I started to get meaningless answers in my program, I started to step over and tried this for some specific values. In particular, I decided to try the formula for the sum T = 20, for n = 9 cubes, each with s = 4 sides. Since the sum of 9 4-sided cubes should give a bell-shaped curve of the results, from 4 to 36, the sum of 20 seems to be what it should be pretty (relatively speaking) probable. Throwing the values โโinto the formula, I got:
alt text http://www.freeimagehosting.net/uploads/8e7b339e32.gif
Since j works from 0 to 7, we have to add all j ... but for most of these values โโthe result is 0, since at least one result of choosing the formula is 0. The only values โโfor j that seem to return non-0 Results 3 and 4. Drop 3 and 4 into this formula, I got
alt text http://www.freeimagehosting.net/uploads/490f943fa5.gif
Which, when it was simplified, seemed as follows:
alt text http://www.freeimagehosting.net/uploads/603ca84541.gif
which ultimately simplifies to ~ 30.75. Now, as a probability, of course, 30.75 is far away ... the probability should be between 0 and 1, so something went terribly wrong. But I do not understand what it is.
Can I understand the formula? It is very possible, although I do not quite understand where the breakdown will occur. Could they have been rewritten incorrectly on the web page? It is also possible, but it was difficult for me to find another version online to check it out. Can I just make a silly math mistake? It is also possible ... although my program has similar value, so I think it is more likely that I do not understand something.
Any clues?
(I would post it on MathOverflow.com, but I donโt think itโs even close to being "postgraduate" math, which is necessary to survive there.)
Also: I definitely do not want to answer the question from Project Euler, and I suspect that other people that mine stumble on this will feel the same way. I'm just trying to figure out where my math skills are being destroyed.