
Coin Change Combinations and Fast Algorithms
Hypothesis
Science Concepts Learned
An algorithm solves a problem the same way each time by following a fixed set of step-by-step rules. In this experiment, a brute-force program tests every possible combination of pennies, nickels, dimes, quarters, and half-dollars to count how many ways make change for a dollar. It works — but runs very slowly. When you search for patterns in the results, you find that the five-coin problem connects to simpler four-coin and three-coin problems. A new program built on those patterns runs over 26,000 times faster, solving the ten-thousand-dollar problem in less than an hour.
How many ways can five types of coins add up to one dollar? The answer is exactly 292 distinct groupings — and finding that number is a combinatorics problem. A brute-force program tests every possible combination of pennies, nickels, dimes, quarters, and half-dollars. It works, but runs very slowly. As the target amount grows, the number of possible combinations explodes: ten thousand dollars yields over 666 quadrillion arrangements. That makes brute force impractical. When you search for patterns in the results, you find that the five-coin problem connects to simpler four-coin and three-coin problems. A new program built on those patterns runs over 26,000 times faster — solving the ten-thousand-dollar problem in under an hour.
How much harder does a problem get as its size grows? This experiment answers that question directly. A brute-force program that tests every possible combination of pennies, nickels, dimes, quarters, and half-dollars works for small amounts — but as the target value increases, it slows to a crawl. By searching for patterns in the results, you discover that the five-coin problem connects to simpler four-coin and three-coin problems. A new program built on those patterns runs over 26,000 times faster, solving the ten-thousand-dollar problem in less than an hour. That speedup is what choosing the right algorithm looks like in practice: a problem that seemed practically unsolvable becomes finished before lunch.
When order does not matter, combinations count the different ways you can choose items from a group. Making change for a dollar means picking coins that add up correctly — and it turns out there are exactly 292 ways to do it using pennies, nickels, dimes, quarters, and half-dollars. That number comes from testing every possible mix of the five U.S. coins, which a computer program can do through brute force. As a result, each solution is a different combination of those five coin types.
Method & Materials
MEL Math — hands-on math experiment kits delivered monthly — makes abstract concepts tangible. (Affiliate link)
See what’s included