Thread Rating:

Poll

11 votes (45.83%)
9 votes (37.5%)
5 votes (20.83%)
2 votes (8.33%)
7 votes (29.16%)
3 votes (12.5%)
4 votes (16.66%)
3 votes (12.5%)
9 votes (37.5%)
7 votes (29.16%)

24 members have voted

charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 33
  • Posts: 2341
March 3rd, 2021 at 11:20:03 AM permalink
Quote: teliot

I have a follow-up question to my follow-up question. And I don't know the answer to this.

We proved above that if N > 0 is an integer and S is the sum of the cubes of its digits, then the difference |N - S| is always divisible by 3. In my computer investigations, I've noticed that every multiple of 3 appears as the difference, at least as far up as I checked. I don't know if the following is true or false:

True or False? Let D >= 0 be divisible by 3. Then there is a positive integer N such that |N -S| = D.

Any takers?

False - try finding 651, 681, 909 etc.

The simplest method is to consider that any six-digit numbers can have a maximum sum of cubes of 6*93=4374, so the difference must exceed 95626. For longer numbers the difference just keeps getting bigger.

Thus if you haven't found all the four digit numbers by then, you never will.

Brute force shows there are several values that haven't been found (assuming my coding is correct!)
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 39
  • Posts: 2160
March 3rd, 2021 at 11:33:12 AM permalink
Quote: charliepatrick

False - try finding 651, 681, 909 etc.

The simplest method is to consider that any six-digit numbers can have a maximum sum of cubes of 6*93=4374, so the difference must exceed 95626. For longer numbers the difference just keeps getting bigger.

Thus if you haven't found all the four digit numbers by then, you never will.

Brute force shows there are several values that haven't been found (assuming my coding is correct!)

Agree ... I just came up with the following list of counterexamples up to D=3000:


651
681
909
930
933
966
1398
1410
1422
1434
1437
1458
1461
1494
1515
1530
1578
1593
1644
1674
1743
1923
1926
1959
2202
2226
2391
2403
2415
2418
2439
2442
2475
2496
2511
2559
2574
2595
2625
2655
2724
2904
2907
2940
Poetry website: www.totallydisconnected.com
ThatDonGuy
ThatDonGuy 
Joined: Jun 22, 2011
  • Threads: 98
  • Posts: 4684
March 3rd, 2021 at 5:51:14 PM permalink
Here's one:

There's a new game that consists of a keno blower with 100 balls, each numbered 1 through 100. Ten balls are drawn at random, and you win $1 multiplied by the lowest of the ten numbers. For example, if the balls 2, 8, 14, 15, 27, 45, 54, 62, 89, and 99 were drawn, you would win $2, as 2 is the lowest number.

What is the expected return (i.e. the mean value) of the game?
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 39
  • Posts: 2160
March 3rd, 2021 at 5:58:15 PM permalink
Quote: ThatDonGuy

Here's one:

There's a new game that consists of a keno blower with 100 balls, each numbered 1 through 100. Ten balls are drawn at random, and you win $1 multiplied by the lowest of the ten numbers. For example, if the balls 2, 8, 14, 15, 27, 45, 54, 62, 89, and 99 were drawn, you would win $2, as 2 is the lowest number.

What is the expected return (i.e. the mean value) of the game?

Hang on, let me just iterate through the combin(100,10) (approximately 17,310,300,000,000) outcomes.

No, really, there's an easy Excel solution. I get 101/11 = $9.18181818 ... as the expected payout. Charge $10 to play the game and you'll make a tidy profit.
Poetry website: www.totallydisconnected.com
Wizard
Administrator
Wizard
Joined: Oct 14, 2009
  • Threads: 1372
  • Posts: 22850
March 3rd, 2021 at 7:53:14 PM permalink
Quote: ThatDonGuy

There's a new game that consists of a keno blower with 100 balls, each numbered 1 through 100. Ten balls are drawn at random, and you win $1 multiplied by the lowest of the ten numbers. For example, if the balls 2, 8, 14, 15, 27, 45, 54, 62, 89, and 99 were drawn, you would win $2, as 2 is the lowest number.

What is the expected return (i.e. the mean value) of the game?



9.181818182

In case anyone is wondering, for the 80/20 case, as in keno, the answer is 3.857143
It's not whether you win or lose; it's whether or not you had a good bet.
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 39
  • Posts: 2160
March 4th, 2021 at 1:06:30 PM permalink
Quote: ThatDonGuy

Here's one:

There's a new game that consists of a keno blower with 100 balls, each numbered 1 through 100. Ten balls are drawn at random, and you win $1 multiplied by the lowest of the ten numbers. For example, if the balls 2, 8, 14, 15, 27, 45, 54, 62, 89, and 99 were drawn, you would win $2, as 2 is the lowest number.

What is the expected return (i.e. the mean value) of the game?

So, here is a slightly harder version --

A a keno blower has 100 balls, each numbered 1 through 100. Ten balls are drawn at random and recorded. After the ten balls are drawn, the lowest number recorded out of the 10 balls is then discarded and another ball is drawn from the blower to replace it. You then win $1 multiplied by the lowest of the ten numbers.

What is the expected win, to the nearest cent?

Here is a casino game version, with a strategic decision. After observing the first ten balls drawn, you are allowed to hit or stand. Hitting means that you discard the lowest and re-draw, with the lowest of that new group of 10 being your payout. Standing means you keep the original10 balls and make the lowest of those your payout. What is optimal strategy and what is the expected win in this game?

I don't have a closed solution to either -- only simulated results.
Last edited by: teliot on Mar 4, 2021
Poetry website: www.totallydisconnected.com
charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 33
  • Posts: 2341
March 4th, 2021 at 1:31:10 PM permalink
Let the ten first numbers be, from lowest, X Y Z1 Z2...Z8. It transpires you don't care what the Z's actually are. You only need to know 8 numbers between Y and 100 have already been picked.
If you stand you win will X.
If you discard X then there are three possibilities for the next ball B
(i) is less than X, you will win that value and have lost X-B.
(ii) is between X and Y, you will win that value and have won B-X
(iii) is greater than Y, you win will Y and have won Y-X.
As an example 40 50 61 62 63 64 65 66 67 68. (i) 1-39 lose between 1 and 39 (ii) 41-49 gain 1 thru 9 (iii) 51+ gain 10 (note there are 50-8 of these regardless of Z's) So on average you lose 3.5 by drawing.
In theory this is a function of X and Y.
I'm guessing you could work out the chances of the lowest number being 1,2,3 etc. using permutations. I'm quite so sure how you do the second lowest.
Edit: Changed average as had typo in my quick spreadsheet. See my later answer which looks at this example again.
Last edited by: charliepatrick on Mar 4, 2021
teliot
teliot
Joined: Oct 19, 2009
  • Threads: 39
  • Posts: 2160
March 4th, 2021 at 1:44:15 PM permalink
Quote: charliepatrick

Let the ten first numbers be, from lowest, X Y Z1 Z2...Z8. It transpires you don't care what the Z's actually are. You only need to know 8 numbers between Y and 100 have already been picked.
If you stand you win will X.
If you discard X then there are three possibilities for the next ball B
(i) is less than X, you will win that value and have lost X-B.
(ii) is between X and Y, you will win that value and have won B-X
(iii) is greater than Y, you win will Y and have won Y-X.
As an example 40 50 61 62 63 64 65 66 67 68. (i) 1-39 lose between 1 and 39 (ii) 41-49 gain 1 thru 9 (iii) 51+ gain 10 (note there are 50-8 of these regardless of Z's) So on average you lose 3.61111 by drawing.
In theory this is a function of X and Y.
I'm guessing you could work out the chances of the lowest number being 1,2,3 etc. using permutations. I'm quite so sure how you do the second lowest.

This is pretty much how I envisioned the closed solution being computed as well. But, it's definitely a lot of work and I would want to simulate my answer to verify. So I just ran some quick and dirty C code instead. :)
Poetry website: www.totallydisconnected.com
ThatDonGuy
ThatDonGuy 
Joined: Jun 22, 2011
  • Threads: 98
  • Posts: 4684
March 4th, 2021 at 2:06:26 PM permalink
Quote: teliot

Hang on, let me just iterate through the combin(100,10) (approximately 17,310,300,000,000) outcomes.

No, really, there's an easy Excel solution. I get 101/11 = $9.18181818 ... as the expected payout. Charge $10 to play the game and you'll make a tidy profit.


Quote: Wizard

9.181818182

In case anyone is wondering, for the 80/20 case, as in keno, the answer is 3.857143


Both answers are correct.


This involves something called the Hockey Stick Identity:
C(n,n) + C(n+1,1) + C(n+2,n) + ... + C(n+k,n) = C(n+k+1,n+1)
It gets its name from the fact that, if you iterate the values over Pascal's triangle, the path resembles a hockey stick.

Anyway, there are C(100,10) sets of numbers.
If the smallest number is N, the other numbers must be in the 100-N numbers > N, so there are C(100-N,9) sets of numbers where the smallest number is N.
The sum of the smallest numbers of all C(100,10) sets is:
1 x C(99,9) + 2 x C(98,9) + 3 x C(97,9) + ... + 90 x C(10,9) + 91 x C(9,9)
= (C(99,9) + C(98,9) + ... + C(9,9)) + (C(98,9) + C(97,9) + ... + C(9,9)) + (C(97,9) + C(96,9) + ... + C(9,9)) + ... + (C(10,9) + C(9,9)) + C(9,9)
Use the hockey stick identity on each group and the fact that C(9,9) = 1 = C(10,10) to get C(100,10) + C(99,10) + ... C(10,10)
Use the hockey stick identity to get C(101,11) for the sum
The expected value = C(101,11) / C(100,10)
= (101! / (11! 90!)) / (100! / (10! 90!)) = 101! / 11! x 10! / 100! = (101 x 100!) / (11 x 10!) x 10! / 100! = 101/11.

charliepatrick
charliepatrick
Joined: Jun 17, 2011
  • Threads: 33
  • Posts: 2341
March 4th, 2021 at 2:06:36 PM permalink
Quote: teliot

This is pretty much how I envisioned the closed solution being computed as well. But, it's definitely a lot of work and I would want to simulate my answer to verify. So I just ran some quick and dirty C code instead. :)

I haven't checked the answers yet, but this is what it produced.
I: 1 J: 2 Perms: 157366449604 Profit: 1 Win: 2
I: 1 J: 3 Perms: 144520208820 Profit: 1.988888888888889 Win: 2.988888888888889
I: 1 J: 4 Perms: 132601016340 Profit: 2.966666666666667 Win: 3.966666666666667
I: 1 J: 5 Perms: 121550931645 Profit: 3.933333333333333 Win: 4.933333333333334
I: 1 J: 6 Perms: 111315063717 Profit: 4.888888888888889 Win: 5.888888888888889
I: 1 J: 7 Perms: 101841441273 Profit: 5.833333333333333 Win: 6.833333333333333
I: 1 J: 8 Perms: 93080887185 Profit: 6.766666666666667 Win: 7.766666666666667
I: 1 J: 9 Perms: 84986896995 Profit: 7.688888888888889 Win: 8.68888888888889
I: 1 J: 10 Perms: 77515521435 Profit: 8.6 Win: 9.6
I: 1 J: 11 Perms: 70625252863 Profit: 9.5 Win: 10.5
....
I: 88 J: 89 Perms: 165 Profit: -42.5 Win: 88
I: 88 J: 90 Perms: 45 Profit: -42.477777777777774 Win: 88
I: 88 J: 91 Perms: 9 Profit: -42.46666666666667 Win: 88
I: 88 J: 92 Perms: 1 Profit: -42.46666666666667 Win: 88
I: 89 J: 90 Perms: 45 Profit: -43.48888888888889 Win: 89
I: 89 J: 91 Perms: 9 Profit: -43.477777777777774 Win: 89
I: 89 J: 92 Perms: 1 Profit: -43.477777777777774 Win: 89
I: 90 J: 91 Perms: 9 Profit: -44.48888888888889 Win: 90
I: 90 J: 92 Perms: 1 Profit: -44.48888888888889 Win: 90
I: 91 J: 92 Perms: 1 Profit: -45.5 Win: 91
AvWin: 16.22254798150687
   totalprofit=0;
totalperms=0;
for (i=1; i<=91; i++) {
for (j=i+1; j<=92; j++) {
perms=(100-j)*(99-j)*(98-j)*(97-j)*(96-j)*(95-j)*(94-j)*(93-j)/8/7/6/5/4/3/2;
profit=0;
if (i>1) { for (k=1; k<i; k++) {profit+=k-i;};};
if (j>i+1) { for (k=i+1; k<j; k++) {profit+=k-i;};};
if (j<92) { for (k=j+9; k<=100; k++) {profit+=j-i;};};
profit=profit/90;
outline=" ";
outline+="I: "+i+" ";
outline+="J: "+j+" ";
outline+="Perms: "+perms+" ";
outline+="Profit: "+profit+" ";
win=i; if (profit>0) {win=i+profit;};
outline+="Win: "+win+" ";
outline+="<BR>";
document.write(outline);
totalprofit+=win*perms;
totalperms+=perms;
}; };
average=totalprofit/totalperms;
outline+="AvWin: "+average+" ";
outline+="<BR>";
document.write(outline);

  • Jump to: