Coin problem - all possible amounts from a set of coins

  • Thread starter musicgold
  • Start date
  • #1
musicgold
304
19
Homework Statement
Given 8 dimes (10 ¢ coins) and 3 quarters (25 ¢ coins), how many different amounts
of money can be created using one or more of the 11 coins?
Relevant Equations
m = 10d + 25q , where 0 <= d < 9 and 0 <= q < 4
where d is number of dimes and q is number of quarters used to get a m.
While I found 26 possible values of m with the trial and error method, I wanted to find an elegant approach to solve such problems.

I think the following equation represents the problem:
m = 10d + 25q where ## 0 <= d < 9 ## and ## 0 <= q < 4 ##
where d is the number of dimes and q is number of quarters used to get a m.

As d can take 9 values and q can take 4 values, m can take 36 possible values, some of which will be duplicate. Note that the combination d=0, q= 0 is invalid.

I am not able to find a way to quickly isolate the potential duplicate values.
When d =5, m can have 4 values 50, 75, 100 and 125 cents. 50 and 75 will also be created with only 2 or 3 quarters. So I have found 2 duplicates, and 1 invalid amounts out of 10.

How should I move forward from here?

Thanks
 
  • Like
Likes Delta2
Physics news on Phys.org
  • #2
I would look at the quarters. Their sums either end in 0 or 5.
 
  • Like
Likes MatinSAR and musicgold
  • #3
If two combinations, ##d_1, q_1## and ##d_2, q_2## give the same ##m##, then
##10d_1+25q_1=10d_2+25q_2##
##10(d_1-d_2)=25(q_2-q_1)##.
I'd look at how many different solutions this equation has. ##q_2-q_1## has to be ##2##, etc.
 
  • Like
Likes musicgold
  • #4
Hill said:
If two combinations, ##d_1, q_1## and ##d_2, q_2## give the same ##m##, then
##10d_1+25q_1=10d_2+25q_2##
##10(d_1-d_2)=25(q_2-q_1)##.
I'd look at how many different solutions this equation has. ##q_2-q_1## has to be ##2##, etc.
Got it. Thanks! 👍
As shown below there are 8 duplicates.
I also realized that there are actually 27 unique values of m and not 26.

27 unique values + 8 duplicates + 1 invalid = 36 combinations
1705631959839.png
 
  • Like
Likes Hill
  • #5
I think you left out the combination of no coins = zero cents so there are 28 unique and 8 dupes. Zero is a legitimate amount of money (I know 'cause my bank balance went there a couple of times in my younger days :smile:
 
  • #6
phinds said:
I think you left out the combination of no coins = zero cents so there are 28 unique and 8 dupes. Zero is a legitimate amount of money (I know 'cause my bank balance went there a couple of times in my younger days :smile:
The homework statement says “using one or more of the 11 coins”.
 
  • #7
Two quarters are the same as 5 dimes. So points [itex](d,q)[/itex] which differ by integer multiples of [itex](5, -2)[/itex] give the same [itex]m[/itex].
 
  • #8
Frabjous said:
The homework statement says “using one or more of the 11 coins”.
Ah HA ! I need to learn how to read. :smile:
 
  • Like
Likes Frabjous

1. How does the coin problem work?

The coin problem involves finding all possible amounts that can be made using a set of coins with different denominations. This typically requires iterating through all possible combinations of coins to determine the unique sums that can be achieved.

2. What is the significance of the coin problem?

The coin problem is a classic example of a combinatorial optimization problem that has applications in various fields such as computer science, cryptography, and finance. It helps in understanding algorithms for finding optimal solutions and can be used to test the efficiency of different approaches.

3. How do you approach solving the coin problem?

One common approach to solving the coin problem is using dynamic programming techniques, such as the bottom-up approach or recursive memoization. These methods help in efficiently computing all possible amounts that can be formed using the given set of coins.

4. What are some challenges associated with the coin problem?

Some challenges in solving the coin problem include dealing with large sets of coins, optimizing the algorithm for better performance, and handling cases where there are multiple ways to form the same sum using different coin combinations.

5. Can the coin problem be extended to include additional constraints?

Yes, the coin problem can be extended to include additional constraints such as limiting the number of times a particular coin can be used, introducing a maximum amount that can be achieved, or considering different coin denominations. These variations can make the problem more complex but also more interesting to solve.

Similar threads

  • Precalculus Mathematics Homework Help
Replies
1
Views
1K
  • Precalculus Mathematics Homework Help
Replies
1
Views
701
  • Precalculus Mathematics Homework Help
Replies
2
Views
2K
  • Precalculus Mathematics Homework Help
Replies
2
Views
1K
  • Introductory Physics Homework Help
Replies
3
Views
549
  • Precalculus Mathematics Homework Help
Replies
11
Views
3K
  • Precalculus Mathematics Homework Help
Replies
2
Views
882
  • Precalculus Mathematics Homework Help
Replies
3
Views
2K
  • Precalculus Mathematics Homework Help
Replies
22
Views
2K
  • Precalculus Mathematics Homework Help
Replies
7
Views
760
Back
Top