Search for Science Fair Projects

1000 Science Fair Projects with Complete Instructions

Applied Mathematics Science Fair Project

Coin Change Combinations and Fast Algorithms

Hard
Coin Change Combinations and Fast Algorithms | Science Fair Projects | STEM Projects
How many different ways can you make change for a dollar using five types of coins? The answer is 292. For ten thousand dollars the number explodes to over 666 quadrillion. You write a computer program that tests every possible combination of pennies, nickels, dimes, quarters, and half-dollars. This brute-force approach works but runs very slowly. So 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 based on these patterns runs over 26,000 times faster. It solves the ten-thousand-dollar problem in less than an hour.

Hypothesis

The hypothesis is that there are a finite number of ways to make change for a given amount of money using the five U.S. coins.

Science Concepts Learned

Algorithms

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.

Combinatorics

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.

Computational Complexity

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.

Permutations and Combinations

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

You will write a computer program to determine the number of ways to make change for various amounts of money using the five U.S. coins. You will then search for patterns in the numbers of solutions and use them to create a new, faster program.
You will need a computer, a Fortran program, and the five U.S. coins.

MEL Mathhands-on math experiment kits delivered monthly — makes abstract concepts tangible. (Affiliate link)

See whats included

Results

The results of this project showed that there is a finite number of ways to make change for a given amount of money using the five U.S. coins. An efficient algorithm was found that determined the number of solutions for the original 5 coin problem by relating it to the simpler 4 coin problem, and then to the even simpler 3 coin problem. For $5.00, the new program ran over 26,000 times faster than the original program and even faster for larger amounts.

Why do this project?

This science project is interesting and unique because it uses a computer program to solve a mathematical problem. It also shows how patterns in the data can be used to create a faster program.

Also Consider

Experiment variations to consider include testing different amounts of money and using different coins.

Full project details

Additional information and source material for this project are available below.
Share this Science Project:

Related Science Fair Project Ideas

Earnings Data and Stock Price Prediction
Score 108 stocks with a math-based rating system and test whether the equations can beat the market over five years.
Hard
Rubik's Cube Disorder and Repeated Move Sequences
Simulate a Rubik's Cube on a computer and discover that its scramble pattern follows a polynomial equation as you repeat the same moves.
Hard
Buying vs. Renting at Different Incomes
Model four income levels against real housing prices to discover whether buying or renting builds more wealth over 30 years.
Hard
Share this Science Project: