Ask The Wizard #332

Using the standard U.S. coins of 1, 5, 10, 25, 50 cents and $1, how many ways can one make change for $1?

Gialmere

The answer is 293.

 

Let a(x) = number of ways to make x cents, using only pennies and nickles, where x is evening divisible by 5.

a(x) = 1+(x/5)

In other words, the number of ways is the number of possible nickles in the change, which will range from 0 to x/5.

Let b(x) = number of ways to make x cents, using only pennies, nickles, and dimes, where x is evening divisible by 5.

b(0)=1
b(5)=2
b(x) = a(x) + b(x-10), where x>=10.

In simple English, the number of ways to make x cents, is the sum of (1) b(x-10) = number of ways for x-10 cents by adding a dime to each way and (2) a(x) = Number of ways using no dimes.

Let c(x) = number of ways to make x cents, using only pennies, nickles, dimes, and quarters where x is evening divisible by 25.

c(0) = 1
c(x) = b(x) + c(x-25), where x>=25.

In simple English, the number of ways to make x cents, is the sum of (1) c(x-25) = number of ways for x-25 cents by adding a quarter to each way and (2) b(x) = Number of ways using no quarters.

Let d(x) = number of ways to make x cents, using only pennies, nickles, dimes, quarters, and half dollars where x is evening divisible by 50.

d(0) = 1
d(x) = c(x) + d(x-50), where x>=50.

In simple English, the number of ways to make x cents, is the sum of (1) d(x-50) = number of ways for x-50 cents by adding a half dollar to each way and (2) c(x) = Number of ways using no half dollars.

Following is a table showing these values for x = 5 to 100.

Ways to Make Change

x a(x) b(x) c(x) d(x)
0 1 1 1
5 2 2 0
10 3 4 0
15 4 6 0
20 5 9 0
25 6 12 13
30 7 16 0
35 8 20 0
40 9 25 0
45 10 30 0
50 11 36 49 50
55 12 42 0
60 13 49 0
65 14 56 0
70 15 64 0
75 16 72 121
80 17 81 0
85 18 90 0
90 19 100 0
95 20 110 0
100 21 121 242 292

Finally, add one for the $1 coin and the answer is 292+1 = 293.

This question is raised and discussed in my forum at Wizard of Vegas.

I tracked 3,000 spins in double-zero roulette because the first dozen numbers did not seem to come up as much the second two dozens. In the 3,000 spins, the numbers in the range of 1 to 12 came up 742 times. What are the odds of that?

anonymous

You would expect the number of times the ball would land in 1 to 12 to be 3000*(12/38) = 947.37.

The difference between your results and expectations is 947.37 - 742 = 205.37.

The variance is 3000*(12/38)*(1-(12/38)) = 648.20.

The standard deviation is the square root of the variance = sqrt(648.20) = 25.46.

Your results are 205.37/25.46 = 11.75 standard deviations south of expectations.

The p value, or the probability of being off by 11.75 standard deviations or more is 1 in 28,542,806,257,940,300,000,000,000,000,000.

I would be interested to know where the wheel is.

I found a blackjack game that pays 6 to 5 if the player a blackjack after splitting tens or aces? Re-splitting aces is not allowed. A dealer blackjack still beats any hand except pushes against a natural player blackjack. If the dealer draws to 21 points, a player ace and ten after splitting wins.

Scrooge

Let's ignore splitting tens, because even with this rule, the player should still stand on 20 against anything.

Assuming six decks, the probability of a pair of aces is combin(24,2)/combin(312,2) = 276/48,516 = 0.5689%.

The expected number of the two aces that will develop into a blackjack is 2*(16*6)/(312-2) = 0.619355.

The probabilitiy the dealer does not have a blackjack is 1 - (16*6)*(4*6-2)/combin(52*6-2,2) = 95.590354%.

The probability of the dealer drawing to 21 points is 7.7981%. The math on that is too complicated to explain.

The probability the rule is helpful is 0.5689% * 95.590354% * (1-7.7981%) = 0.3368044%.

The benefit per incident = Pr(dealer does not get to 21 points) * (0.2) + Pr(dealer does get to 21 points) * 1.2 = (1-0.122077839) * 0.2 + 0.122077839 * 1.2 = 0.3220778.

The overall benefit of the rule is the product of how often the situation occurs and the benefit when it does = 0.003368044 * 0.322077839 = 0.11%.

You have two cubes. You can number each side of both dice as you wish, as long as each side is an integer and greater or equal to one. You may repeat the same number on the same die and go as high as you wish. Other than creating standard dice, how can you number them so the probability of any given total is the same as standard dice?

anonymous

Die 1 = 1,2,2,3,3,4.
Die 2 = 1,3,4,5,6,8.

I'm afraid my solution to this one was pretty much trial and error.

What is the cost in player errors if I play the optimal strategy for Not so Ugly Ducks in Illinois Deuces?

anonymous

As a reminder, here are the pay tables mentioned:

Not so Ugly Ducks: 1-2-3-4-4-10-16-25-200-800.
Illinois Deuces: 1-2-3-4-4-9-15-25-200-800

Next, here is the return table for Not so Ugly Ducks, following the optimal strategy for that game.

Not so Ugly Ducks -- Correct Strategy

Event Pays Combinations Probability Return
Natural royal flush 800 458,696,304 0.000023 0.018409
Four deuces 200 3,721,737,204 0.000187 0.037342
Wild royal flush 25 38,006,962,464 0.001907 0.047668
Five of a kind 16 61,961,233,656 0.003108 0.049735
Straight flush 10 102,392,435,976 0.005137 0.051368
Four of a kind 4 1,216,681,289,508 0.061038 0.244151
Full house 4 520,566,943,104 0.026116 0.104462
Flush 3 413,870,908,056 0.020763 0.062289
Straight 2 1,142,885,476,800 0.057336 0.114671
Three of a kind 1 5,325,911,611,716 0.267188 0.267188
Nothing 0 11,106,773,222,412 0.557199 0.000000
Total 19,933,230,517,200 1.000000 0.997283

Next, here is the return table for Illinois Deuces, using the correct strategy for that pay table. The lower right cell shows a return of 0.989131.

Illinois Deuces -- Correct Strategy

Event Pays Combinations Probability Return
Natural royal flush 800 459,049,128 0.000023 0.018423
Four deuces 200 3,727,422,492 0.000187 0.037399
Wild royal flush 25 38,117,987,136 0.001912 0.047807
Five of a kind 15 62,201,557,608 0.003120 0.046807
Straight flush 9 98,365,859,016 0.004935 0.044413
Four of a kind 4 1,221,942,888,444 0.061302 0.245207
Full house 4 522,030,131,520 0.026189 0.104756
Flush 3 407,586,633,720 0.020448 0.061343
Straight 2 1,145,767,137,120 0.057480 0.114961
Three of a kind 1 5,342,397,992,292 0.268015 0.268015
Nothing 0 11,090,633,858,724 0.556389 0.000000
Total 19,933,230,517,200 1.000000 0.989131

The next table shows the return table using the combinations and probability from Not so Ugly Ducks on the pay table for Illinois Deuces. The lower right cell shows a return of 0.989131.

Illinois Deuces -- NSUD Strategy

Event Pays Combinations Probability Return
Natural royal flush 800 458,696,304 0.000023 0.018409
Four deuces 200 3,721,737,204 0.000187 0.037342
Wild royal flush 25 38,006,962,464 0.001907 0.047668
Five of a kind 15 61,961,233,656 0.003108 0.046627
Straight flush 9 102,392,435,976 0.005137 0.046231
Four of a kind 4 1,216,681,289,508 0.061038 0.244151
Full house 4 520,566,943,104 0.026116 0.104462
Flush 3 413,870,908,056 0.020763 0.062289
Straight 2 1,142,885,476,800 0.057336 0.114671
Three of a kind 1 5,325,911,611,716 0.267188 0.267188
Nothing 0 11,106,773,222,412 0.557199 0.000000
Total 19,933,230,517,200 1.000000 0.989038

The cost of errors is the optimal return for Illinois Deuces (second table) less the return for Illinois Deuces using NSUD strategy (third table) = 0.989131 - 0.989038 = 0.000093.