## Poll

2 votes (16.66%) | |||

3 votes (25%) | |||

2 votes (16.66%) | |||

3 votes (25%) | |||

No votes (0%) | |||

1 vote (8.33%) | |||

1 vote (8.33%) | |||

1 vote (8.33%) | |||

4 votes (33.33%) | |||

2 votes (16.66%) |

**12 members have voted**

typedef uint64_t num_t;

However, I can't ask anyone to teach me a new computer language. I was half finished doing it this way anyway, so will try to complete it with my own code.

Thanks ZPP for your help!

Quote:ThatDonGuyI think I sort of do.

The formula is the product of:

1 + x y

1 + x y^{2}

1 + x y^{3}

1 + x y^{4}

...

1 + x y^{79}

1 + x y^{80}

If you draw 20 particular balls, multiply the product of the left sides of the terms of the balls you did not draw and the right sides of the balls you did draw together; you will get x^{20}and y^{sum of the numbers}.

To determine how many times 20 balls add up to some number N, count the number of times x^{20}y^{N}is such a product.

How to get such a count without having to go through all 2^{80}products, I don't know, and presumably, that's why things like Mathematica exist.

HOUSE LIGHTBULB MOMENT - this may be similar to ZPP's solution

Instead of treating those as 80 different sums, do the products from top to bottom - i.e.

Start with (1 + xy) (1 + x y

^{2})

Multiply that by (1 + x y

^{3})

Multiply that result by (1 + x y

^{4})

and so on through (1 + x y

^{80})

This can be done with an array, where each row is one of the y exponents (from 0 to 1410) and each column is one of the x exponents (from 0 to 20)

Cell (a, b) is the current number of times x

^{a}y

^{b}appears in the solution so far

Start with all cells 0, except for 1s in (0,0) and (1,1); this is 1 + xy

Each step multiplies the existing value by x y

^{n}n for some n from 1 to 80, then adding it to the existing result. This is done by making a copy of the array, shifting it one column to the right and n rows down, and adding those values to the existing values.

Once all 80 steps are done, cell (20, N) will contain the number of combinations of 20 balls that add up to N.

This took 1/2 second to calculate in C#.

I find it odd that small vs big has a different payout, given the symmetrical distribution. Any sense as to why they might do that?

Quote:rsactuaryIn your WOO post, you don't define rain, cloud, lightning, fire and sprout.

I find it odd that small vs big has a different payout, given the symmetrical distribution. Any sense as to why they might do that?

Good catches, thanks. The big had a typo in the win. I just added a description of the ranges covered by the bets you asked about.

For everyone else, here is my new page on the game with the prop bets on the total off all balls: Blitz Bingo.

3,535,316,142,212,170,000Quote:WizardFor everyone else, here is my new page on the game with the prop bets on the total off all balls: Blitz Bingo.

should be

3,535,316,142,212,174,320

Combin(80,20) on Wolfram Alpha

Rule 5 has a typo on the payout for Big: it says 1.91, but on your EV table you have 1.95.

Dog Hand

#include <iostream>

#include <stdlib.h>

using namespace std;

void fast(void);

__int64 a[81][21][1601];

int main(void)

{

int i;

fast();

cerr << "Enter any number\t";

cin >> i;

return 1;

}

void fast(void)

{

int k,m,n,t;

for (k=0; k<=80; k++) // lowest available ball

{

for (m=0; m<=20; m++)

{

for (n=0; n<=1600; n++)

a[k][m][n]=0;

}

}

for (k=20; k<=80; k++)

{

for (m=k; m<=80; m++) // 20th ball

a[k][20][m]=1;

}

for (k=19; k<=79; k++) // lowest available ball

{

for (m=k; m<=79; m++) // 19th ball

{

for (t=0; t<=80; t++)

{

a[k][19][m+t]+=a[m+1][20][t];

}

}

}

for (k=18; k<=78; k++) // lowest available ball

{

for (m=k; m<=78; m++) // 18th ball

{

for (t=0; t<=160; t++)

{

a[k][18][m+t]+=a[m+1][19][t];

}

}

}

int level;

for (level=17; level>=1; level--)

{

for (k=level; k<=60+level; k++) // lowest available ball

{

for (m=k; m<=60+level; m++) // level-th ball

{

for (t=0; t<=1410; t++)

{

a[k][level][m+t]+=a[m+1][level+1][t];

}

}

}

}

printf("Raw totals\n");

for (n=0; n<=1410; n++)

{

if (a[1][1][n]>0)

printf("%i\t%I64i\n",n,a[1][1][n]);

}

printf("formatted totals\n");

for (n=0; n<=1410; n++)

{

if (a[1][1][n]>0)

printf("<tr><td>%i</td><td>%I64i</td></tr>\n",n,a[1][1][n]);

}

return;

}

I'd like to thank all who participated! This a great example of why I love this forum. I hope others have learned something as well.

Quote:7craps3,535,316,142,212,170,000Quote:WizardFor everyone else, here is my new page on the game with the prop bets on the total off all balls: Blitz Bingo.

should be

3,535,316,142,212,174,320

Combin(80,20) on Wolfram Alpha

Damn Microsoft! Excel allows for only so many significant digits (usually 15). I wish I had a dollar for every time I've had similar corrections.

Quote:DogHandWizard,

Rule 5 has a typo on the payout for Big: it says 1.91, but on your EV table you have 1.95.

Dog Hand

Thanks, got it.

Exactly. This is why I’ve never spent much time studying generating functions.Quote:WizardI get the theory about finding the generating function, but to actually do it would be the equal amount of work as just cycling through all combin(80,20) balls by brute force.

.

I prefer slick, formulaic solutions and would be much more impressed by an estimate accurate within .1% to an exact solution that was so voluminous that it required programming.

You can probably just use the expectation (810) and standard deviation (90) to get decent estimates for values within 2 or 3 SDs of expectation.

You're welcome.Quote:WizardI didn't get very far with the code above. My C++ compiler didn't like this statement and I don't understand what it is supposed to:

typedef uint64_t num_t;

However, I can't ask anyone to teach me a new computer language. I was half finished doing it this way anyway, so will try to complete it with my own code.

Thanks ZPP for your help!

The typedef defines num_t as uint64_t. The point is that (80 choose 20) is near the limit of 64-bit int, so if I want to switch to double, for larger values, I only have to change that one typedef (and the printfs). Also, if I wanted to use an old version of MSVC that doesn't support uint64_t, I would only have to change the one typedef (and the printfs) to usigned __int64... :)

I'm pretty sure Excel is just using "double" for everything internally.Quote:WizardDamn Microsoft! Excel allows for only so many significant digits (usually 15).