-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
kbseah
committed
May 23, 2018
1 parent
b177ae6
commit 411c805
Showing
2 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
## changer-ranger | ||
--- | ||
title: changer-ranger | ||
--- | ||
|
||
Fun with the change-making problem. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: Real-life currencies | ||
--- | ||
|
||
How well do real-life currencies perform in making change? | ||
|
||
## The currencies | ||
|
||
For this analysis, I have chosen four well-known currencies. Here they are with their sub-base-unit coins (e.g. for USD, everything under $1). | ||
|
||
Currency | Code | Denominations | ||
-------------- | ---- | ------------- | ||
US dollar | USD | 25, 10, 5, 1 | ||
Japanese yen | JPY | 100, 50, 10, 5, 1 | ||
Euro | EUR | 100, 50, 20, 10, 5, 2, 1 | ||
Pound sterling | GBP | 100, 50, 20, 10, 5, 2, 1 | ||
|
||
There are also 1 USD and 0.50 USD coins in circulation, but they are quite uncommon so they have been left out of this analysis. | ||
|
||
## Minimizing number of coins | ||
|
||
![Number of coins needed to change amounts from 1 to 99 in four currencies, optimizing for fewest coins or lowest weight](currency_comparison_changestats_counts.png) | ||
|
||
## Minimizing the weight of coins | ||
|
||
![Total weights of coins needed to change amounts from 1 to 99 in four currencies, optimizing for fewest coins or for lowest total weight.](currency_comparison_changestats_weights.png) | ||
|
||
## Discrepancies between lowest-count and lowest-weight | ||
|
||
## Discrepancies between optimal and greedy minimum-count solutions |