Thread Rating:

Poll

21 votes (45.65%)
14 votes (30.43%)
6 votes (13.04%)
3 votes (6.52%)
12 votes (26.08%)
3 votes (6.52%)
6 votes (13.04%)
5 votes (10.86%)
12 votes (26.08%)
10 votes (21.73%)

46 members have voted

gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
January 29th, 2021 at 10:15:43 PM permalink
I guess I could pose this as a Math Puzzle, but I'm actually curious if there is any straightforward way to calculate the answer to this question:

What is the probability of getting a sum of 53 on a roll of 15 dice?
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
unJon
unJon
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
January 30th, 2021 at 2:41:59 AM permalink
Quote: gordonm888

I guess I could pose this as a Math Puzzle, but I'm actually curious if there is any straightforward way to calculate the answer to this question:

What is the probability of getting a sum of 53 on a roll of 15 dice?



I didn’t know the answer but had an old memory that it was related to a modified Pascal Triangle so googled and got this interesting read.

http://curiouscheetah.com/BlogMath/pascals-triangle-and-dice-rolls/
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27126
Joined: Oct 14, 2009
January 30th, 2021 at 5:36:30 AM permalink
Quote: gordonm888

What is the probability of getting a sum of 53 on a roll of 15 dice?



27,981,391,815 / 6^15 = apx. 0.059511


Exactly the Pascal's Triangle technique described in the post above.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
January 30th, 2021 at 6:28:43 AM permalink
Since 53 is very close to the expected value of 15 * 3.5 = 52.5, the answer can be approximated as :

1 / (2 * pi * 53)^.5 = 5.48 %
It’s all about making that GTA
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
January 30th, 2021 at 11:47:38 AM permalink
Thanks for answers, Wizard, Unjon, Ace2. Pascal's triangle looks very useful - I never knew all that.
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ssho88
ssho88
  • Threads: 59
  • Posts: 684
Joined: Oct 16, 2011
January 30th, 2021 at 10:27:32 PM permalink


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



gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
January 31st, 2021 at 11:23:55 AM permalink
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?
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ssho88
ssho88
  • Threads: 59
  • Posts: 684
Joined: Oct 16, 2011
January 31st, 2021 at 5:40:24 PM permalink
Very good question, but as usual, I can't answer it. Anyone ?
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
January 31st, 2021 at 6:49:56 PM permalink
I thought of a question based on the above and don't know the answer. Roll two dice over and over. Keep track of two sequences. The first sequence is the sum cumulative total of the first dice after each roll. The second sequence is the sum cumulative total of the second dice after each roll. My question is, what is the expected number of roles until these two cumulative totals are equal?

Let me know if this needs more explanation.
Climate Casino: https://climatecasino.net/climate-casino/
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27126
Joined: Oct 14, 2009
January 31st, 2021 at 7:40:50 PM permalink
I get it. My hunch is the answer is infinity. The paradoxical thing is it must happen eventually.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
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
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
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.
Climate Casino: https://climatecasino.net/climate-casino/
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
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
Climate Casino: https://climatecasino.net/climate-casino/
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
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
Climate Casino: https://climatecasino.net/climate-casino/
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
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
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
Thanked by
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.
Climate Casino: https://climatecasino.net/climate-casino/
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27126
Joined: Oct 14, 2009
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.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
Thanked by
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
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
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
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
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
unJon
unJon
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
February 1st, 2021 at 11:54:44 AM permalink
Quote: ThatDonGuy

Median? I don't know - all I know is the mean.

Update - run 75,776 is still in progress, and is approaching 200 million rolls.



Oh. I thought you were getting output of how long each trial took. And would be simple enough to take the median over the 75,000 trials.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 1st, 2021 at 12:14:15 PM permalink
Quote: unJon

Oh. I thought you were getting output of how long each trial took. And would be simple enough to take the median over the 75,000 trials.


I changed my code to count how many times each length occurs rather than trying to save each length individually, and now I pretty much constantly get a median of 10 rolls.
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 1st, 2021 at 2:09:01 PM permalink
Quote: ThatDonGuy

I changed my code to count how many times each length occurs rather than trying to save each length individually, and now I pretty much constantly get a median of 10 rolls.


Actually, a median of 10 can be calculated without simulation.
Assume one die is red and the other is blue, and let "the difference" be the red sum minus the blue sum.
After one roll, the difference is {-5, -4, ..., 4, 5} with probability {1/36, 2/36, ..., 2/36, 1/36}
For the second roll, if the difference after one roll is -5, the new difference is {-10, -9, ..., 1, 0) with probability {1/36 x 1/36, 1/36 x 2/36, ..., 1/36 x 2/36, 1/36 x 1/36};
if it is -4, the new difference is {-9, -8, ..., 0, 1} with probability with probability {2/36 x 1/36, 2/36 x 2/36, ..., 2/36 x 2/36, 2/36 x 1/36};
and so on through +5 becoming {0, 1, ..., 10}, except that you skip where the previous difference is zero as you would have stopped rolling at that point.
Repeat for the third, fourth, etc. rolls until the sum of all of the probabilities that the sum is zero > 1/2.
Here are the probabilities that you will get matching sums in N rolls or fewer for various values of N:
1: 1 / 6
2: 163 / 648
3: 1,211 / 3,888
4: 300,139 / 839,808
5: 993,427 / 2,519,424
6: 231,266,905 / 544,195,584
7: 1,472,751,395 / 3,265,173,504
8: 222,694,111,193 / 470,184,984,576
9: 4,176,367,195,507 / 8,463,329,722,368
10: 116,789,309,836,109 / 228,509,902,503,936
9 rolls has a probability < 1/2, and 10 has one > 1/2, so the median is 10.
unJon
unJon
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
February 1st, 2021 at 2:11:27 PM permalink
Quote: ThatDonGuy

Actually, a median of 10 can be calculated without simulation.
Assume one die is red and the other is blue, and let "the difference" be the red sum minus the blue sum.
After one roll, the difference is {-5, -4, ..., 4, 5} with probability {1/36, 2/36, ..., 2/36, 1/36}
For the second roll, if the difference after one roll is -5, the new difference is {-10, -9, ..., 1, 0) with probability {1/36 x 1/36, 1/36 x 2/36, ..., 1/36 x 2/36, 1/36 x 1/36};
if it is -4, the new difference is {-9, -8, ..., 0, 1} with probability with probability {2/36 x 1/36, 2/36 x 2/36, ..., 2/36 x 2/36, 2/36 x 1/36};
and so on through +5 becoming {0, 1, ..., 10}
Repeat for the third, fourth, etc. rolls until the sum of all of the probabilities that the sum is zero > 1/2.
Here are the probabilities that you will get matching sums in N rolls or fewer for various values of N:
1: 1 / 6
2: 163 / 648
3: 1,211 / 3,888
4: 300,139 / 839,808
5: 993,427 / 2,519,424
6: 231,266,905 / 544,195,584
7: 1,472,751,395 / 3,265,173,504
8: 222,694,111,193 / 470,184,984,576
9: 4,176,367,195,507 / 8,463,329,722,368
10: 116,789,309,836,109 / 228,509,902,503,936
9 rolls has a probability < 1/2, and 10 has one > 1/2, so the median is 10.



And there’s our gambling game. The house offers an even money bet that the red and blue dice are equal. Gambler can take the yes within nine rolls or the no within 10 rolls.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
Wizard
Administrator
Wizard
  • Threads: 1520
  • Posts: 27126
Joined: Oct 14, 2009
February 1st, 2021 at 2:53:15 PM permalink
This table shows the probability of equal totals after exactly a given number of rolls for the first time.

Rolls Probability
1 0.166667
2 0.112654
3 0.092850
4 0.080944
5 0.072693
6 0.066539
7 0.061722
8 0.057819
9 0.054573
10 0.051819
11 0.049443
12 0.047367
13 0.045532
14 0.043895
15 0.042423
16 0.041089


Excel shows a very close fit to this curve is y = 0.1784*x-1.011, where x = number of rolls and y = probability.
"For with much wisdom comes much sorrow." -- Ecclesiastes 1:18 (NIV)
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
February 1st, 2021 at 4:15:33 PM permalink
Quote: Wizard

This table shows the probability of equal totals after exactly a given number of rolls for the first time.

Rolls Probability
1 0.166667
2 0.112654
3 0.092850
4 0.080944
5 0.072693
6 0.066539
7 0.061722
8 0.057819
9 0.054573
10 0.051819
11 0.049443
12 0.047367
13 0.045532
14 0.043895
15 0.042423
16 0.041089


Excel shows a very close fit to this curve is y = 0.1784*x-1.011, where x = number of rolls and y = probability.

And the "average" waiting time for equality is the dot product (or sumproduct in Excel) of those two columns, if extended to the infinite Excel spreadsheet in the sky..
Climate Casino: https://climatecasino.net/climate-casino/
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
February 1st, 2021 at 4:25:23 PM permalink
I saw this integral on Twitter yesterday. The method the person gave to get the answer seemed too advanced, and I thought there must be an easier way. I believe I found an easier way.



If you think about this integral for a few minutes and what function the sin(x) function approximates near x = 0, the answer to this integral is obvious. Getting there is the hard part.
Climate Casino: https://climatecasino.net/climate-casino/
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 2nd, 2021 at 6:00:01 PM permalink
Quote: teliot

I saw this integral on Twitter yesterday. The method the person gave to get the answer seemed too advanced, and I thought there must be an easier way. I believe I found an easier way.



If you think about this integral for a few minutes and what function the sin(x) function approximates near x = 0, the answer to this integral is obvious. Getting there is the hard part.


I can't come up with an "exact" solution, but I think I have found a reasonable estimate:


Integrate by parts:

u = sin (x^n); dv = x^(-n) dx
du = n x^(n-1) cos (x^n) dx; v = x^(1-n) / (1-n)

INTEGRAL{sin (x^n) / x^n dx) = x^(1-n) sin (x^n) / (1-n) - INTEGRAL{n / (1-n) * x^(n-1) x^(1-n) cos (x^n) dx)
= x^(1-n) sin (x^n) / (1-n) - n / (1-n) * INTEGRAL{cos (x^n) dx)
= x^(1-n) sin (x^n) / (1-n) + n / (n-1) * INTEGRAL{cos (x^n) dx)

On the left half of the plus sign, x = 1 has a value of sin 1 / (1-n), and x = 0 has a value of 0, so, as n approaches +INF, the value approaches 0.
On the right side, note that, for 0 < x < 1, as n approaches +INF, x^n approaches 0, so the graph approaches a horizontal line from (0,1) to (1,1) and then a vertical line from (1,1) to (1,0), whose integral from 0 to 1 = 1.
The solution is 0 + 1 = 1.

teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
February 2nd, 2021 at 6:27:27 PM permalink
The way I did it was to plug in the Taylor series for sin(x) and pull the sum outside of the integral so that all that was left was integrating a power of x. A couple more tricks are needed after that to deal with the "discontinuity" at x=1. But yes you got the right answer even though integration by parts is never going to lead to a complete solution.
Last edited by: teliot on Feb 2, 2021
Climate Casino: https://climatecasino.net/climate-casino/
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 9th, 2021 at 8:05:20 AM permalink
For Toughie Tuesday...



I hate to just toss a sudoku on the table but, if you haven't played in a long time or only dabble, you might enjoy the cutting edge of these puzzles.

The one above--by the Dutch master Aad van der Wetering--at first glance seems impossible. However, in addition to the normal sudoku rules (which I assume you're familiar with), this puzzle has three special rules to help you solve it.

1: Both marked diagonals must contain the digits 1-9. (Just like a standard row or column.)

2: Cells that are a chess knight's move apart cannot contain the same digit. (Thus if you put a 6 in a cell and there's another 6 a knight's move away, something is wrong.)

3: The central 3x3 box (shaded gray) must form a magic square. (That is, each row, column and diagonal must add up to the same amount.)

A challenging puzzle. Good luck.
Have you tried 22 tonight? I said 22.
miplet
miplet
  • Threads: 5
  • Posts: 2146
Joined: Dec 1, 2009
February 9th, 2021 at 9:57:58 AM permalink
I did that Sudoku when it was featured on Cracking the Cryptic.
“Man Babes” #AxelFabulous
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 10th, 2021 at 4:21:03 PM permalink

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

Police have warned that the Sudoku Killer is still at large and making threats.

He will kill either 1, 4, or 9 people today.
Have you tried 22 tonight? I said 22.
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
February 11th, 2021 at 7:14:39 AM permalink
It would be useful if someone could explain the logic for how to "get the first number" in the Sudoku puzzle. I guessed the middle square must be "5" because of the "magic Square" requirement on the shaded inner grid of 9 boxes, but what then? How do you deduce the next number?
So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 11th, 2021 at 7:38:08 AM permalink
Quote: gordonm888

It would be useful if someone could explain the logic for how to "get the first number" in the Sudoku puzzle. I guessed the middle square must be "5" because of the "magic Square" requirement on the shaded inner grid of 9 boxes, but what then? How do you deduce the next number?



The possible values of a row in a Magic Square that does not include the number 5 are (1,6,8), (2,4,9), (2,6,7), and (3,4,8).
The top row of the center block cannot contain 3, 4, or 8; that leaves (2,6,7).
The 2 cannot be in the upper left because of the 2 at the bottom right of the grid and the "both main diagonals have nine unique digits" rule.

If the upper right is 7, then the upper left is 6 and the bottom left has to be 3, but then the left column has to be (6, 6, 3).
If the upper right is 6, then the upper left is 7 and the bottom left has to be 4, but then the left column has to be (6, 5, 4).
Therefore, the upper right is 2, and the lower left is 8. This means the upper left cannot be 7, as the left column would be at least 16.
The upper left is 6, so the top row is (6, 7, 2), which means the bottom row is (8, 3, 4) and the middle row is (1, 5, 9).

Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 12th, 2021 at 8:41:40 AM permalink


There are countless chess variations in the world. (Currently, 5D chess with multiverse time-travel is popular.) The game depicted above (more of a study really) is a 1D variant. That is, the board consists of a single row of 8 squares.

The rook and king pieces move as they do in regular chess although obviously restricted to only the forward/back (left/right if you prefer) directions. The knight pieces move 2 spaces in either direction. They jump over any piece on the middle space.

Because of the simplified nature of the the game and because it moves first, White can win every time. White must be careful, however, since a foolish move will result in a stalemate or even a loss.

Assuming both sides use optimal strategy, how many moves will it take White to checkmate the Black king?
Have you tried 22 tonight? I said 22.
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
February 12th, 2021 at 10:24:59 AM permalink
Quote: Gialmere

...Assuming both sides use optimal strategy, how many moves will it take White to checkmate the Black king?...

If the Rook moves first then Black can either Mate or ensure a draw.
So the (white) Knight moves.
If the (black) rook takes the Knight, then White can ensure a Mate (1) N, rxN (2) Rxr, n (3) Rxn ##
If the (black) knight moves, then White (1) N, n (2) Nxr #, k (3) Rxn, k (4) N ## (K _ R N n r _ k; K _ R _ n N k _; K _ _ _ R N _ k)
If the (black) rook moves, then White moves Knight to check (1) N, r (2) N#, rxN, Rxr results in a stalemate
If the (black) rook moves, then White moves his Rook back and only the black rook can move
(a) rook moves back (1) N, r (2) R, r (3) Nxr ##
(b) rook takes Knight (1) N, r (2) R, rxN (3) Rxr, n (4) Rxn ## (K _ R N r _ n k ; K R _ r _ _ n k; K _ _ R n _ _ k)

So I get that Black can play to delay the mating until White's fourth move.
gordonm888
Administrator
gordonm888
  • Threads: 61
  • Posts: 5376
Joined: Feb 18, 2015
February 12th, 2021 at 4:16:35 PM permalink


The white rook can take the black rook, RxR on f.

1. White: RxR Black: Only move is N jumps rook to space e. placing himself in Mate.

White wins in one move.

So many better men, a few of them friends, are dead. And a thousand thousand slimy things live on, and so do I.
unJon
unJon
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
Thanked by
gordonm888
February 12th, 2021 at 4:19:00 PM permalink
Quote: gordonm888



The white rook can take the black rook, RxR on f.

1. White: RxR Black: Only move is N jumps rook to space e. placing himself in Mate.

White wins in one move.



That would be an illegal move (placing ones one king in check) leaving black with no legal moves so a stalemate.
The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 12th, 2021 at 4:47:06 PM permalink
Quote: charliepatrick

If the Rook moves first then Black can either Mate or ensure a draw.
So the (white) Knight moves.
If the (black) rook takes the Knight, then White can ensure a Mate (1) N, rxN (2) Rxr, n (3) Rxn ##
If the (black) knight moves, then White (1) N, n (2) Nxr #, k (3) Rxn, k (4) N ## (K _ R N n r _ k; K _ R _ n N k _; K _ _ _ R N _ k)
If the (black) rook moves, then White moves Knight to check (1) N, r (2) N#, rxN, Rxr results in a stalemate
If the (black) rook moves, then White moves his Rook back and only the black rook can move
(a) rook moves back (1) N, r (2) R, r (3) Nxr ##
(b) rook takes Knight (1) N, r (2) R, rxN (3) Rxr, n (4) Rxn ## (K _ R N r _ n k ; K R _ r _ _ n k; K _ _ R n _ _ k)

So I get that Black can play to delay the mating until White's fourth move.


Quote: gordonm888



The white rook can take the black rook, RxR on f.

1. White: RxR Black: Only move is N jumps rook to space e. placing himself in Mate.

White wins in one move.



Sorry. All incorrect.
Have you tried 22 tonight? I said 22.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
February 13th, 2021 at 6:36:25 AM permalink
Quote: Gialmere


Mate is not possible for white with optimal black strategy, unless I'm missing a rule.

1. Rxr is stalemate.
1. Re1, rxR is stalemate.
1. Rd1, rxR is stalemate.
1. Nd1, rxN, 2. Rxr is stalemate.
1. Nd1, rxN, 2. Rb1, rxR is a draw.
1. Nd1, rxN, 2. Kb1, rxR is a draw.
Climate Casino: https://climatecasino.net/climate-casino/
Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 13th, 2021 at 6:56:52 AM permalink
Quote: teliot

Quote: Gialmere


Mate is not possible for white with optimal black strategy, unless I'm missing a rule.



1. Rxr is stalemate.
1. Re1, rxR is stalemate.
1. Rd1, rxR is stalemate.
1. Nd1, rxN, 2. Rxr is stalemate.
1. Nd1, rxN, 2. Rb1, rxR is a draw.
1. Nd1, rxN, 2. Kb1, rxR is a draw.



If,
1) Nd1 ... RxN

Then,
2) RxR ... Ne1
3) RxN++

Not optimal for Black.
Have you tried 22 tonight? I said 22.
unJon
unJon
  • Threads: 16
  • Posts: 4809
Joined: Jul 1, 2018
February 13th, 2021 at 7:04:08 AM permalink
Quote: teliot

Quote: Gialmere


Mate is not possible for white with optimal black strategy, unless I'm missing a rule.

1. Rxr is stalemate.
1. Re1, rxR is stalemate.
1. Rd1, rxR is stalemate.
1. Nd1, rxN, 2. Rxr is stalemate.
1. Nd1, rxN, 2. Rb1, rxR is a draw.
1. Nd1, rxN, 2. Kb1, rxR is a draw.



I think one of those is wrong. But doing in my head which is always risky.


1. Nd1
2. rxN
3. Rxr
4. Ne1
5. Rxk mate

Alternatively:
1. Nd1
2. re1
3. Rb1
4. rf1
5. Nxr
6. ne1
7. Rxn
8. Kg1
9. Nh1 mate

The race is not always to the swift, nor the battle to the strong; but that is the way to bet.
teliot
teliot
  • Threads: 43
  • Posts: 2871
Joined: Oct 19, 2009
February 13th, 2021 at 7:07:36 AM permalink
Quote:


If,
1) Nd1 ... RxN

Then,
2) RxR ... Ne1
3) RxN++

Not optimal for Black.


Thanks -- hard to get ordinary chess out of my head.
Climate Casino: https://climatecasino.net/climate-casino/
charliepatrick
charliepatrick
  • Threads: 39
  • Posts: 3017
Joined: Jun 17, 2011
February 13th, 2021 at 8:32:09 AM permalink
Quote: unJon


1. Nd1
2. rxN
3. Rxr
4. Ne1
5. Rxk mate

Alternatively:
1. Nd1
2. re1
3. Rb1
4. rf1
5. Nxr
6. ne1
7. Rxn
8. Kg1
9. Nh1 mate

1. Nd1
2. re1
3. Rb1
4. rf1
5. Nxr
K R _ _ _ N n k
This is mate as the N puts the black KIng in check and the n can't take N nor the king move.
ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 13th, 2021 at 9:14:09 AM permalink

The longest match is 7 moves:
1. Nd
2. Ne
3. Nxf+
4. Kg
5 Rd
6. Nc
7. Nh mate

Alternatives:
The only first moves are Rd, Re, Rxf, and Nd
Rxf is stalemate (the only black move is Ne, but that puts the king in check)
Re Rxe / Nd Rxd mate for black
Rd Rxd / Nxd Ne leads to White King, space, space, White Knight, Black Knight, space, space, Black King; I am pretty sure this ends up in a draw
Rd Re / Rxe Nxe / Nd gets to the same position

Nd has three responses: Ne, Re, and Rxd
Nd Rxe / Rxd Ne / Rxe mate for white (5 moves)
Nd Re / Kb Rf / Nxf mate for white (5 moves)

Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 13th, 2021 at 9:37:10 AM permalink
Quote: ThatDonGuy


The longest match is 7 moves:
1. Nd
2. Ne
3. Nxf+
4. Kg
5 Rd
6. Nc
7. Nh mate

Alternatives:
The only first moves are Rd, Re, Rxf, and Nd
Rxf is stalemate (the only black move is Ne, but that puts the king in check)
Re Rxe / Nd Rxd mate for black
Rd Rxd / Nxd Ne leads to White King, space, space, White Knight, Black Knight, space, space, Black King; I am pretty sure this ends up in a draw
Rd Re / Rxe Nxe / Nd gets to the same position

Nd has three responses: Ne, Re, and Rxd
Nd Rxe / Rxd Ne / Rxe mate for white (5 moves)
Nd Re / Kb Rf / Nxf mate for white (5 moves)



White's fourth move (7. Nh mate) is illegal.
Have you tried 22 tonight? I said 22.
chevy
chevy
  • Threads: 3
  • Posts: 151
Joined: Apr 15, 2011
Thanked by
Gialmere
February 13th, 2021 at 10:37:55 AM permalink


If the (black) knight moves, then White (1) N, n (2) Nxr #, k (3) Rxn, k (4) N ## (K _ R N n r _ k; K _ R _ n N k _; K _ _ _ R N _ k)

If I understand your notation correctly, I "think" after (3) Rxn.....Black king can't move to h.....thus stalemate???





The longest match is 7 moves:
1. Nd
2. Ne
3. Nxf+
4. Kg
5 Rd
6. Nc<-----------------Check on White's King....so can't do move 7. Need Kb.
7. Nh mate




1.WN(d)
2.BN(e)
3.WN(f)- take rook - check on Black
4.BK(g)
5.WR(d)
6.BN(c) - check on White
7.WK(b)
8.BN(e)
9.WN(h)
10.BK(h)
11.WR(e) - take knight - checkmate

ThatDonGuy
ThatDonGuy
  • Threads: 123
  • Posts: 6747
Joined: Jun 22, 2011
February 13th, 2021 at 10:38:15 AM permalink
Quote: Gialmere

Quote: ThatDonGuy


The longest match is 7 moves:
1. Nd
2. Ne
3. Nxf+
4. Kg
5 Rd
6. Nc
7. Nh mate

Alternatives:
The only first moves are Rd, Re, Rxf, and Nd
Rxf is stalemate (the only black move is Ne, but that puts the king in check)
Re Rxe / Nd Rxd mate for black
Rd Rxd / Nxd Ne leads to White King, space, space, White Knight, Black Knight, space, space, Black King; I am pretty sure this ends up in a draw
Rd Re / Rxe Nxe / Nd gets to the same position

Nd has three responses: Ne, Re, and Rxd
Nd Rxe / Rxd Ne / Rxe mate for white (5 moves)
Nd Re / Kb Rf / Nxf mate for white (5 moves)



White's fourth move (7. Nh mate) is illegal.



I get 13:
1. Nd
2. Ne
3. Nxf+
4. Kg
5. Rd
6. Nc+
7. Kb
8. Ne
9. Ka
10. Kxg
11. Rb
12. either Nc or Kg
13. Rxc (after Nc) or (Rxe (after Kg), both mate

Gialmere
Gialmere
  • Threads: 45
  • Posts: 3050
Joined: Nov 26, 2018
February 13th, 2021 at 11:42:00 AM permalink
Quote: chevy



1.WN(d)
2.BN(e)
3.WN(f)- take rook - check on Black
4.BK(g)
5.WR(d)
6.BN(c) - check on White
7.WK(b)
8.BN(e)
9.WN(h)
10.BK(h)
11.WR(e) - take knight - checkmate



Correct!

6 moves it is.

If Black plays optimally, White has no room for error. There is, however, a path that threads its way through the minefield.


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

Have you tried 22 tonight? I said 22.
Ace2
Ace2
  • Threads: 32
  • Posts: 2706
Joined: Oct 2, 2017
February 15th, 2021 at 3:52:30 PM permalink
Suppose you roll a fair die until some face has appeared six times. For instance, your rolls could be 42132253261242 (for six 2's).

On average, how many rolls would it take?
It’s all about making that GTA
  • Jump to: