Thread Rating:

Poll

17 votes (50%)
13 votes (38.23%)
5 votes (14.7%)
2 votes (5.88%)
11 votes (32.35%)
3 votes (8.82%)
6 votes (17.64%)
5 votes (14.7%)
10 votes (29.41%)
8 votes (23.52%)

34 members have voted

gordonm888
Administrator
gordonm888
Joined: Feb 18, 2015
  • Threads: 50
  • Posts: 3262
January 31st, 2021 at 8:46:20 PM permalink
Quote: gordonm888

Quote: ssho88



I used a very basic method(and not a so straightforward way) to solve it, if we arrange the 15 dice(with sum of 53) in ascending order. you can reduce the total no of different combinations to 521 as below :-

comb1 : 1,1,1,1,1,1,1,4,6,6,6,6,6,6,6, total pemutations1 = 15!/7!/1!/7! = 51480
comb2 : 1,1,1,1,1,1,1,5,5,6,6,6,6,6,6, total pemutations2 = 15!/7!/2!/6! = 180180
comb3 : 1,1,1,1,1,1,2,3,6,6,6,6,6,6,6, total pemutations3 = 15!/6!/1!/1!/7! = 360360

.
.
.

comb519 : 3,3,3,3,3,3,3,3,3,4,4,4,4,5,5, total pemutations519 = 15!/9!/4!/2! = 75075
comb520 : 3,3,3,3,3,3,3,3,4,4,4,4,4,4,5, total pemutations520 = 15!/8!/6!/1! = 45045
comb521 : 3,3,3,3,3,3,3,4,4,4,4,4,4,4,4, total pemutations521 = 15!/7!/8! = 6435

All those 521 combinations can be obtained by combinations analysis.

Grand total permutations = pemutations1 +pemutations2 + . . . .pemutations520 + pemutations521 = 27981391815

So Prob = 27981391815/6^15 = 0.059511453






Very nice work. I had thought of this approach. but I had assumed there would be many more combinations - I am surprised there are only 521.

So 15 dice that have 1-6 as possibilities and that add to 53 have 521 distinct combinations. Could we have predicted 521 based on the numbers 15, 6 and 53?



Let me mention something about this.

When rolling a normal 6-faced die, the average number of points will be 3.5. If you roll a die 15 times, the average sum of the dice will be 3.5*15 = 52.5. Thus, a sum of 53 and 52 would be the most probable sum of 15 dice rolls and will ( I think) have the most combinations of any sum.

Thus, both 52 and 53 are the most probable sums of 15 rolls of a 6-faced die and each will have 521 distinct combinations that sum to either 52 or 53.

Therefore, let us define D(n,m) as the number of combinations for the most probable sum when rolling n dice that are m-sided. (this can probably be stated more generally without reference to dice.)

And we know that D(15,6) = 521 (which happens to be prime.)

Finding an analytical formula (or approach) for D(m,n) would be quite an achievement.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 40
  • Posts: 2252
January 31st, 2021 at 8:53:57 PM permalink
Quote: Wizard

I get it. My hunch is the answer is infinity. The paradoxical thing is it must happen eventually.

I would say that with probability one the two sums are equal infinitely often. But I have no intuition about this at all as far as it being finite or infinite. We do know that one sixth of the time they agree after the first toss.
Poetry website: www.totallydisconnected.com
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 40
  • Posts: 2252
February 1st, 2021 at 7:30:53 AM permalink
Quote: Wizard

I get it. My hunch is the answer is infinity. The paradoxical thing is it must happen eventually.



37896.6
Limit exceeded 182 times!

I didn't debug or verify this code. Just hacked it out in a couple of minutes. But it does seem to confirm your hunch.


#include <stdio.h>
#include <stdlib.h>
#include <time.h>

int main() {
int d1, d2, d1tot, d2tot;
int a;
int tr, trlim;
double trtot;

d1tot = 0;
d2tot = 0;
trlim = 0;
trtot = 0;

srand(time(NULL));

for (a = 0; a < 1000000; a++) {
if (a%10000 == 0) {
printf("%d\n",a);
fflush(stdout);
}
d1 = rand()%6 + 1;
d2 = rand()%6 + 1;
d1tot = d1;
d2tot = d2;
tr = 1;

while (d1tot != d2tot) {
if (tr == 100000000) {
trlim++;
break;
}
d1 = rand()%6 + 1;
d2 = rand()%6 + 1;
d1tot += d1;
d2tot += d2;
tr += 1;
}
trtot += tr;
}

printf("%1.1f\n", trtot/1000000.0);
printf("Limit exceeded %d times!\n", trlim);
return 0;
}
Last edited by: teliot on Feb 1, 2021
Poetry website: www.totallydisconnected.com
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 40
  • Posts: 2252
February 1st, 2021 at 8:13:57 AM permalink
I think I got it, the answer is that itís infinite.

This is just a waiting-time problem on a simple symmetric random walk on the difference x[n] = d1Total[n] Ė d2Total[n]. If x[1] != 0 (the dice donít show the same first value) then the expected waiting time until the walk returns to 0 is infinite.

Just Google "waiting-time random walk" for sources. I used this:

https://people.bath.ac.uk/ak257/36/Markov.pdf
Poetry website: www.totallydisconnected.com
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 4957
February 1st, 2021 at 8:46:50 AM permalink
Quote: teliot

I think I got it, the answer is that itís infinite.


I agree with this.
First of all, I am assuming that the two dice are different - for example, one is red, and the other is blue - and the rolling stops when the sum of the red die rolls equals the sum of the blue die rolls.
Let E(n) be the expected number of rolls needed until the two dice have equal sums, given that their current difference is n (it does not matter which particular die has the higher sum).
The initial value = 1 + 1/6 x 0 + 5/18 x E(1) + 2/9 x E(2) + 1/6 x E(3) + 1/9 x E(4) + 1/18 x E(5)
E(1) is a sum of E(1) through E(6) multiplied by rational numbers, but the E(1) terms can be combined, so the value is in terms of E(2) through E(6).
E(2) is a sum of E(1) through E(7) multiplied by rational numbers, but the E(1) terms can be replaced by E(2) through E(6) and the E(2) terms can be combined, so the value is in terms of E(3) through E(7).
Similarly, E(n) can be expressed in terms of E(n+1) through E(n+5), but as we cannot get to a point where E(n+5) has a value (it has an E(n+10) term, which in turn has an E(n+15) term, which in turn has an E(n+20) term, and so on), the result is infinite.
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 40
  • Posts: 2252
Thanks for this post from:
gordonm888
February 1st, 2021 at 9:05:57 AM permalink
TDG, just because each term relies on future terms does not mean the answer can't be finite. This is just an infinite series, it may converge. Proving it diverges is the key. Your way of doing this was my first thought as well, and then the issue of getting the general coefficient for the n-th term came up and that kind of blew my mind. So, I slept on it and woke up thinking about the difference between the two being a simple and symmetric random walk. I Googled "waiting time random walk" and found the theorem that answered the question in an instant. But solving it from first principles seems very hard.
Poetry website: www.totallydisconnected.com
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1390
  • Posts: 23428
February 1st, 2021 at 9:26:55 AM permalink
The reason I thought the answer was infinity is that is also the answer for the following question:

A fair coin is flipped until the count of heads equals the count of tails. What is the expected number of flips?

It seems obvious this would happen sooner than in teliot's question. So if it would take infinite coin flips, it would certainly take that with the dice.
It's not whether you win or lose; it's whether or not you had a good bet.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 4957
Thanks for this post from:
teliot
February 1st, 2021 at 9:56:09 AM permalink
I have been running a simultaion of the problem. Through 75,000 "runs," there were eight runs that required more than 1 billion rolls:

Run 6311 has length 1,897,896,779 (619,729)
Run 9454 has length 23,231,798,283 (5,128,464)
Run 13,852 has length 1,261,141,555 (2,007,408)
Run 18,352 has length 7,965,870,273 (2,324,037)
Run 18,660 has length 1,395,131,771 (2,008,340)
Run 62,289 has length 1,935,125,795 (715,661)
Run 62,729 has length 3,275,843,264 (784,303)
Run 74,935 has length 1,375,446,093 (658,213)

The numbers in parentheses are the mean number of rolls per run up to that point.
unJon
unJon
Joined: Jul 1, 2018
  • Threads: 14
  • Posts: 2931
February 1st, 2021 at 11:21:23 AM permalink
Quote: ThatDonGuy

I have been running a simultaion of the problem. Through 75,000 "runs," there were eight runs that required more than 1 billion rolls:

Run 6311 has length 1,897,896,779 (619,729)
Run 9454 has length 23,231,798,283 (5,128,464)
Run 13,852 has length 1,261,141,555 (2,007,408)
Run 18,352 has length 7,965,870,273 (2,324,037)
Run 18,660 has length 1,395,131,771 (2,008,340)
Run 62,289 has length 1,935,125,795 (715,661)
Run 62,729 has length 3,275,843,264 (784,303)
Run 74,935 has length 1,375,446,093 (658,213)

The numbers in parentheses are the mean number of rolls per run up to that point.



Don, what do your simulations show as the median number of rolls for them to be equal?
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
ThatDonGuy
ThatDonGuy
Joined: Jun 22, 2011
  • Threads: 106
  • Posts: 4957
February 1st, 2021 at 11:38:35 AM permalink
Quote: unJon

Don, what do your simulations show as the median number of rolls for them to be equal?


Through 500,000 runs, here are the medians after each set of 10,000 runs - yes, the numbers do jump around a bit, don't they?
10,000 runs has median 3
20,000 runs has median 2
30,000 runs has median 8
40,000 runs has median 48
50,000 runs has median 1
60,000 runs has median 2
70,000 runs has median 2
80,000 runs has median 126
90,000 runs has median 106
100,000 runs has median 9
110,000 runs has median 25
120,000 runs has median 25
130,000 runs has median 1
140,000 runs has median 62
150,000 runs has median 19
160,000 runs has median 27
170,000 runs has median 7
180,000 runs has median 5
190,000 runs has median 107
200,000 runs has median 1
210,000 runs has median 16
220,000 runs has median 8
230,000 runs has median 7
240,000 runs has median 25
250,000 runs has median 329
260,000 runs has median 5
270,000 runs has median 7,301
280,000 runs has median 28
290,000 runs has median 3
300,000 runs has median 763
310,000 runs has median 146
320,000 runs has median 6
330,000 runs has median 64
340,000 runs has median 65,260
350,000 runs has median 1
360,000 runs has median 34
370,000 runs has median 4
380,000 runs has median 20
390,000 runs has median 1
400,000 runs has median 1
410,000 runs has median 6
420,000 runs has median 49
430,000 runs has median 9
440,000 runs has median 12
450,000 runs has median 2
460,000 runs has median 2
470,000 runs has median 35
480,000 runs has median 1
490,000 runs has median 3
500,000 runs has median 46
Last edited by: ThatDonGuy on Feb 1, 2021

  • Jump to: