Skip to content

Commit

Permalink
Add more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
kbseah committed May 23, 2018
1 parent b177ae6 commit 411c805
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/index.md
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.

Expand Down
30 changes: 30 additions & 0 deletions docs/real.md
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

0 comments on commit 411c805

Please sign in to comment.