- #1
phoenixthoth
- 1,605
- 2
What values "should" coins have?
Suppose in the current system, there aren't 50 cent pieces, just quarters, dimes, nickels, and pennies. Then the most number of coins you'll ever need is 9. (This happens for .99 and .94.) The average number of coins you need is 4.7 for values from 0 to $1. The quartiles are 3, 5, and 6, meaning that 25% of the time, you need from 0 to 3 coins, 25% of the time you need 4 or 5, 25% of the time 6, and 25% of the time over 6.
How would things change if coins had different values, assuming four types of coins?
To simplify the results, let M be a function that gives the most number of coins you'll ever need, A gives the average, and Q be the quartiles (so the second quartile is the median). What's written above can be translated to:
M(.25, .1, .05, .01) = 9
A(.25, .1, .05, .01) = 4.7
Q(.25, .1, .05, .01) = {3,5,6}.
Not all values of coins are feasible. For instance, if everything is the same except pennies are worth .02 instead of .01, then not all amounts of change can be given with those coins (.01, .11, .21, etc.).
Among the different feasible values for coins, what should the values be to minimize M and A (and Q, I suppose)?
For instance, if the nickel is changed to .03, I get
M(.25, .1, .03, .01) = 8 (you need 8 coins only if you're trying to get .93)
A(.25, .1, .03, .01) = 4.2
Q(.25, .1, .03, .01) = {3,4,5}.
In some sense, changing the value of a nickel to .03 would be better because the average number of coins you need goes down from 4.7 to 4.2.
To try to get an extremely bad scenario, .04, .03, .02, and .01 would be a particularly bad feasible case.
M(.04, .03, .02, .01) = 25 (you need 25 coins if you're trying to get .97, .98, .99, or $1)
A(.04, .03, .02, .01) = 12.9
Q(.04, .03, .02, .01) = {6.75, 13, 19}.
As long as the penny is worth .01, the result is feasible. An even worse feasible case is 1.00, .99, .98, .01:
M(1, .99, .98, .01) = 97
A(1, .99, .98, .01) = 47.1
Q(1, .99, .98, .01) = {21.75, 47, 72.25}.
In the case that the values are no more than .50, here are the worst and best cases:
Worst M:
M(.50, .49, .48, .01) = 48
Worst A:
A(.50, .49, .48, .01)= 22.9
Best M:
M(.27, .08, .03, 0.01) = 7 [7 occurs several times]...compare to 9 in the current case .25, .10, .05, and .01.
Best A:
A(.37, .11, .03, .01) = 4.1 [also occurs when the high is 0.38]...compare to 4.7 in the current case .25, .10, .05, and .01.
Now I'm going to search for the best/worst M and A when the values can go up to 1.00 instead of .50. This will take a lot longer...There were 18,424 cases when the max value is .50 but something like 156,849 cases when the max value is 1.00.
Suppose in the current system, there aren't 50 cent pieces, just quarters, dimes, nickels, and pennies. Then the most number of coins you'll ever need is 9. (This happens for .99 and .94.) The average number of coins you need is 4.7 for values from 0 to $1. The quartiles are 3, 5, and 6, meaning that 25% of the time, you need from 0 to 3 coins, 25% of the time you need 4 or 5, 25% of the time 6, and 25% of the time over 6.
How would things change if coins had different values, assuming four types of coins?
To simplify the results, let M be a function that gives the most number of coins you'll ever need, A gives the average, and Q be the quartiles (so the second quartile is the median). What's written above can be translated to:
M(.25, .1, .05, .01) = 9
A(.25, .1, .05, .01) = 4.7
Q(.25, .1, .05, .01) = {3,5,6}.
Not all values of coins are feasible. For instance, if everything is the same except pennies are worth .02 instead of .01, then not all amounts of change can be given with those coins (.01, .11, .21, etc.).
Among the different feasible values for coins, what should the values be to minimize M and A (and Q, I suppose)?
For instance, if the nickel is changed to .03, I get
M(.25, .1, .03, .01) = 8 (you need 8 coins only if you're trying to get .93)
A(.25, .1, .03, .01) = 4.2
Q(.25, .1, .03, .01) = {3,4,5}.
In some sense, changing the value of a nickel to .03 would be better because the average number of coins you need goes down from 4.7 to 4.2.
To try to get an extremely bad scenario, .04, .03, .02, and .01 would be a particularly bad feasible case.
M(.04, .03, .02, .01) = 25 (you need 25 coins if you're trying to get .97, .98, .99, or $1)
A(.04, .03, .02, .01) = 12.9
Q(.04, .03, .02, .01) = {6.75, 13, 19}.
As long as the penny is worth .01, the result is feasible. An even worse feasible case is 1.00, .99, .98, .01:
M(1, .99, .98, .01) = 97
A(1, .99, .98, .01) = 47.1
Q(1, .99, .98, .01) = {21.75, 47, 72.25}.
In the case that the values are no more than .50, here are the worst and best cases:
Worst M:
M(.50, .49, .48, .01) = 48
Worst A:
A(.50, .49, .48, .01)= 22.9
Best M:
M(.27, .08, .03, 0.01) = 7 [7 occurs several times]...compare to 9 in the current case .25, .10, .05, and .01.
Best A:
A(.37, .11, .03, .01) = 4.1 [also occurs when the high is 0.38]...compare to 4.7 in the current case .25, .10, .05, and .01.
Now I'm going to search for the best/worst M and A when the values can go up to 1.00 instead of .50. This will take a lot longer...There were 18,424 cases when the max value is .50 but something like 156,849 cases when the max value is 1.00.
Last edited: