Another mathemathical riddle

A spot for all things TestTube
Post Reply
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Another mathemathical riddle

Post by robly18 »

This is a question I asked my teacher but he couldn't give me an answer. I figured I might as well ask you guys!
If you roll N dice, what are the odds that the sums of the numbers on their faces equal A?
Convincing people that 0.9999... = 1 since 2012
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Another mathemathical riddle

Post by testtubegames »

This one is harder than it sounds at first.

I'd been mulling it over. I know that I've seen similar problems before. (It's very similar to what you deal with a lot in Entropy. A bunch of molecules with different energies, but all you care about is the total... and so you have to sum a bunch of probabilities)

An easier question, of course, is to do this with coins instead. What is the chance you'll get A heads in flipping a coin N times.

With dice though, and six outcomes per toss instead of two, it gets tougher. I started writing it out, then went off to look for some resources. So if you're looking for a google-sourced answer...: http://mathforum.org/library/drmath/view/52207.html

I'm interested to read more about this person's method. Going through the first time, I've gotta say I didn't quite get why he was doing all the steps he did.
User avatar
robly18
Posts: 413
Joined: Tue Jun 04, 2013 2:03 pm

Re: Another mathemathical riddle

Post by robly18 »

Hm, interesting. I'll let my teacher know! Thanks for the help, I'll try to figure it out myself.
Convincing people that 0.9999... = 1 since 2012
User avatar
testtubegames
Site Admin
Posts: 1148
Joined: Mon Nov 19, 2012 7:54 pm

Re: Another mathemathical riddle

Post by testtubegames »

Yeah, and as a further note -- after looking at that link a bit more -- it seems like it still (basically) requires a bunch of grunt work. It seems there's no easy formula for arbitrary values of N and A.

Much of what I've read on the subject treats this as an exercise in coding. Namely, make a program that figures out the probabilities by exhausting all the possible states (got N dice? Let's investigate all the 6^N possible states!) Fine for a computer. Not fine to do by hand -- for big numbers!
exfret
Posts: 585
Joined: Sun Jul 28, 2013 8:40 pm

Re: Another mathemathical riddle

Post by exfret »

Sorry that it's been so long. I thought of an answer a while back, but I didn't have time to post it. Here's my answer:
So, Pascal's triangle tells you the total number of ways to get N with X 2-sided dice, so we just need to make a simple change so it'll apply to six-sided dice. That simple change is to add 6 numbers at a time instead of 2. Here's what I mean:

N. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
X
0. 1.
1. 1. 1. 1. 1. 1. 1.
2. 1. 2. 3. 4. 5. 6. 5. 4. 3. 2. 1.
3. 1. 3. 6. 10'15'21'25'27'27'25'21'15'10. 6. 3. 1.
I know, this still looks confusing, but it's actually quite simple. Each number is just the number directly above it added to the 5 closest numbers to the left of it, substituting 0's in for empty spaces, just like in Pascal's triangle, except you sum up 5 numbers to the right instead of just 1. Please excuse the apostrophes I used when I was running out of space. How you read this is you just say "what is the number of ways that the sum of X 6-sided dice can be N," then you run your finger across like it's a table, which it is, and you find the number you need. I'm sure there's a way to find it with combinations, because you can find the numbers in Pascal's triangle with the combination formula, but tweaking a formula is less concrete than tweaking a triangle, so I don't know how you'd tweak it. Oh, and one vital last thing I forgot to mention: When you do probability, you usually start at zero, but since six-sided dice don't have zeroes, the triangle's rows get shifted right by the number of dice you're rolling. In other words, each number would be the sum of the 6 numbers immediately above leftward of that number, so the triangle will look like this:

N. 0. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.
X
0. 1.
1. 1. 1. 1. 1. 1. 1.
2. 1. 2. 3. 4. 5. 6. 5. 4. 3. 2. 1.
3. 1. 3. 6. 10'15'21'25'27'27'25'21'15'10. 6. 3. 1
Nobody ever notices my signature. ):
Post Reply