Suppose I have unlimited pennies ($0.01), nickels ($0.05), dimes ($0.10), and quarters ($0.25).
I can produce $0.36 using
Can I also produce $0.36 using exactly 7 coins?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
@Pi Han Goh -- You are very good at this stuff. Do you work in a math field (such as teaching or engineering) ?
Log in to reply
Yeah, @Pi Han Goh I am also intrigued by you!
I wish I had thought of it like that instead of elimination. Thanks for the new insight!
That's exactly how I thought it out!
Take 5 nickels,1 dime and 1 penny
5x0,05+1x0,01+1x0,10=0,36
5+1+1=7
I used a sledge hammer to crack a peanut! The following method is way over the top for this problem, but it has the advantage of being easily scaled up to solve harder problems of this type.
I asked WolframAlpha to expand ( x 1 + x 5 + x 1 0 + x 2 5 ) 7 and noted that the coefficient of x 3 6 was not zero . This indicates that there is at least one way of making 36 cents from seven of the given coins.
Hints as to why this works Think of multiplying out seven brackets. The first bracket represents the choices for the first coin, the second bracket for the second coin etc. When you (using WolframAlpha) expand brackets you multiply together one term from each bracket, and do this in all possible ways. As you multiply the powers of x you add the indices. As a bonus you can look at the powers in the expansion and see (with no extra work!) all possible totals with seven coins
My favorite solution here. Thank you.
Log in to reply
Pi Han -- Please let us know what kind of work you do (or schooling that you are in).
I really like your answer
Note: You have made a spelling error in "Wlofram" ⟹ "Wolfram"
Log in to reply
thanks, I'll correct it.
Excellent!
Im confused, Kinda aspie here. You say expanding 7 brackets but i cant see the work and im terribly confused. It seems i need to plug in numbers for x ...so id still run through numerous permutations and multiply them all by 7 to see if I arrived at 36.
Thats what I did in my head originally..but im not sure how to use this equation to prevent doing the same brute force process?
It seems like this just illustrates how to brute force? On paper?
Or am I missing something and this is a shortcut if used right?
Log in to reply
Yes, I'm using WolframAlpha, which is a free online maths package, as a shortcut. To brute force the answer out on paper using this method would require a lot of work.
To the bewildered, this is a polynomial and not an equation to be solved. It uses polynomial expansion to compute the values of all combinations of 7 coins, which occur as the exponents of the expanded polynomial. The coin values are represented by the exponents of x . Since 4 2 x 3 6 exists in the expansion, the answer is yes.
This is an example of a Diophantine Equation .
If negative integers were permitted in the solution, then there would be a countable infinite number of solutions, Here are a few examples, including the single solution in non-negative integers: p 6 6 6 1 6 1 6 1 − 4 1 − 4 n − 7 − 4 − 1 − 1 2 2 5 5 5 8 8 d 9 5 1 9 − 3 5 − 7 1 9 − 3 5 q − 1 0 1 − 2 2 − 1 3 0 − 3 1 − 2
Here is the full expansion: x 1 7 5 + 7 x 1 6 0 + 7 x 1 5 5 + 7 x 1 5 1 + 2 1 x 1 4 5 + 4 2 x 1 4 0 + 4 2 x 1 3 6 + 2 1 x 1 3 5 + 4 2 x 1 3 1 + 3 5 x 1 3 0 + 2 1 x 1 2 7 + 1 0 5 x 1 2 5 + 1 0 5 x 1 2 1 + 1 0 5 x 1 2 0 + 2 1 0 x 1 1 6 + 7 0 x 1 1 5 + 1 0 5 x 1 1 2 + 1 0 5 x 1 1 1 + 1 4 0 x 1 1 0 + 1 0 5 x 1 0 7 + 1 4 0 x 1 0 6 + 2 1 0 x 1 0 5 + 3 5 x 1 0 3 + 4 2 0 x 1 0 1 + 1 6 1 x 1 0 0 + 2 1 0 x 9 7 + 4 2 0 x 9 6 + 1 4 0 x 9 5 + 4 2 0 x 9 2 + 2 4 5 x 9 1 + 2 1 0 x 9 0 + 1 4 0 x 8 8 + 2 1 0 x 8 7 + 4 2 0 x 8 6 + 2 1 7 x 8 5 + 1 4 0 x 8 3 + 2 1 0 x 8 2 + 6 3 0 x 8 1 + 1 4 7 x 8 0 + 3 5 x 7 9 + 6 3 0 x 7 7 + 4 6 2 x 7 6 + 1 2 6 x 7 5 + 2 1 0 x 7 3 + 6 3 0 x 7 2 + 3 1 5 x 7 1 + 1 4 1 x 7 0 + 4 2 0 x 6 8 + 3 1 5 x 6 7 + 4 2 0 x 6 6 + 1 1 2 x 6 5 + 1 0 5 x 6 4 + 2 1 0 x 6 3 + 4 2 0 x 6 2 + 4 2 7 x 6 1 + 6 3 x 6 0 + 1 0 5 x 5 9 + 1 4 0 x 5 8 + 6 3 0 x 5 7 + 2 5 2 x 5 6 + 6 3 x 5 5 + 4 2 0 x 5 3 + 4 4 1 x 5 2 + 1 4 7 x 5 1 + 3 5 x 5 0 + 1 0 5 x 4 9 + 4 2 0 x 4 8 + 2 1 0 x 4 7 + 1 4 0 x 4 6 + 2 1 x 4 5 + 2 1 0 x 4 4 + 1 7 5 x 4 3 + 2 1 0 x 4 2 + 1 0 5 x 4 1 + 4 9 x 4 0 + 1 0 5 x 3 9 + 1 4 0 x 3 8 + 2 1 0 x 3 7 + 4 2 x 3 6 + 4 3 x 3 5 + 3 5 x 3 4 + 2 1 0 x 3 3 + 1 0 5 x 3 2 + 1 4 x 3 1 + 1 0 5 x 2 9 + 1 4 0 x 2 8 + 2 1 x 2 7 + 2 1 x 2 5 + 1 0 5 x 2 4 + 3 5 x 2 3 + 4 2 x 2 0 + 3 5 x 1 9 + 7 x 1 6 + 2 1 x 1 5 + 7 x 1 1 + x 7 .
Invoking the full Wolfram Mathematica 11.3 pile driver:
a = ( { p , n , d , q } /. Solve [ d + n + p + q = 7 ∧ 1 0 d + 5 n + p + 2 5 q = 3 6 ] ) [ [ 1 ] ] { − 8 5 d − 6 5 n + 2 4 1 3 9 , n , d , − 8 3 d − 6 n + 2 4 2 9 } b = Flatten [ Table [ a , { n , − 1 0 , 1 0 } , { d , − 1 0 , 1 0 } ] , 1 ] ; Select [ b , AllTrue [ $#$1 , IntegerQ ] & ] p 1 6 1 1 1 6 1 1 6 1 1 6 1 1 6 1 6 1 6 1 − 4 1 − 4 n − 1 0 − 1 0 − 7 − 7 − 7 − 4 − 4 − 1 − 1 − 1 2 2 5 5 5 8 8 d − 3 5 − 7 1 9 − 3 5 − 7 1 9 − 3 5 − 7 1 9 − 3 5 q 4 1 5 2 − 1 3 0 4 1 − 2 2 − 1 3 0 − 3 1 − 2
This reminds me of how Pascal's triangle can be applied to both polynomial expansion and combinatorics. Is that the relationship underlying this?
Without going into a long winded discussion,but Brilliant demands one, yes.
The following Python code will produce all possible combinations of coins that produce 36 cents:
def produce(target, coins=(25,10,5,1), current=()):
curr_val = sum(current)
if curr_val == target:
yield current
elif curr_val < target:
for i, c in enumerate(coins):
one_more_coin = current + (c,)
yield from produce(target, coins[i:], one_more_coin)
for p in produce(target=36):
print('%d coins: %s' % (len(p), p))
You'll notice that one of the 24 results use 7 coins, therefore the answer is Yes .
7 coins: (10, 5, 5, 5, 5, 5, 1)
Thanks for going to the extra step to find all possible combinations. ;)
It’s easiest to work backwards. Since we have to get to $0.36 we know one of our coin has to be a penny, leaving us 6 more coins and $0.35. We use the next size up coin the nickel at $0.05, if all 6 coins were nickels we would only have $0.30 of our $0.35 to go, so instead if 5 coins were nickels we would have $0.25 with $0.10 and 1 more coin to go. Which could be easily covered by a dime.
You're right, that's a good, natural way to do it (although I didn't figure it out by myself and tried to "brute-force" it instead). Thanks for showing that!
This is how I did it. After realizing there must be 1 penny, it was easy to see how 6 coins could equal 35 cents
1 × $ 0 . 0 1 + 5 × $ 0 . 0 5 + 1 × $ 0 . 1 0 = $ 0 . 3 6
If you were to use the quarters, there would not be the proper amount of coins to reach the goal of 7 coins. So you can eliminate quarters from the solution. The other examples showed how 2-3 dimes can add up to 0.36 without going over the 7 coin quota, so the only combination left to try would be 1 dime. You also need 1 penny to get to 0.36 cents. Now there are 5 coins remaining and the only option is nickles. Double check with addition.
I just figured out how many nickels you would need to get 35, that answer was 7 nickels. We still need room for the one penny in our coin total, so I traded two of the nickels in for a dime. That makes 5 nickels (25c) plus 1 dime (total 35c) and 1 penny (total 36c).
We obviously need at least one penny since 36 isn't a multiple of 5. And we can't have 6 pennies because we'd need a 30 cent coin. So we have one penny and now need 6 coins to make 35 cents. There can't be a quarter because then 5 coins of 5 cents and 10 cents would have to make 10. So we need 6 coins of 5 cents and 10 cents to make 35. We obviously need at least one 5 cent coin. Now 5 coins to make 30. Can't be all 10 cent coins because that would be only three. So we have at least two more 5 cent coins. Now we need 3 coins to make 20 cents. Again can't be all 10 cent coins because that should be 30. So need 2 more fives. Leaving one 10 cent coin to make 10. And we've got it. One penny, 5 fives, and one ten.
In the six coin solution remove one dime and add two nickels
3 x 2cent + 2 x 5 cent + 2 x 10 cent ( for Euro coins, not sure if USA has 2-cent coins )
5 nickle, a dime, and a penny equal $0.36
One dime, five nickels and a penny
5 nickels 1 dime and 1 penny
You can use 5 nickels, 1 penny and a dime.
5 nickles' 1 dime and 1 penny
As others have said, 1 dime, 5 nickels and 1 penny. But if I have unlimited coins, I'm the richest person on the planet... why am I wasting my time trying to make .36 cents in change? I'll just pay someone else to solve the problem for me.
5 nickles, 1 dime, 1 penny.
1 dime, 5 nickels, and a penny
1 dime 5 nickels and one penny
I simply went through coin permutations in my head and arrived at a combination that worked or would have accepted failure. Would love to learn a formula or procedure to deal with similar problems to stream line the process.
7 coins: 5 nickels, a dime, and a penny
5 x 5 = 25, 25 + 10 = 35, 35 + 1 = 36 cents
5-nickle-(0.05 x 5 =0.25) + 1-dime-(0.10 x 1 = 0.10) + 1-penny-(0.01 x 1 = 0.01) =0.36
6 coin solution has 2 dimes.Split one of the dimes into 2 nickels. This took me about 8 minutes to realize. I'm 12 btw
10+5+5+5+5+5+1=36
1 quarter, 1 dime and 1 penny.
5 nickels, 1 dime and 1 penny together makes $0.36.
Using 3 coins: 1 quarter, 1 dime, 1 penny Using 8 coins: 7 nickels, 1 penny
1 dime, 5 nickels and 1 penny
We can do this with 1 Penny ($0.01) 5 Nickels ($0.05) 1 Dime ($0.10) So, ($0.01) + ($0.05 × 5 i.e $0.25) + ($0.10) = $0.26 This is the only possibe solution
5 nickels, 1 dime 1 penny
Easy 5 Nikel+1 Dime+1 penny =7 Coins i.e. 5x0.5+1x0.01+1x0.10=0.36
Note that you must use one penny. So, we need to make $ 0 . 3 5 using 6 coins. We can easily notice that we can make $ 0 . 3 5 using seven nickels. This is one more than we need, so if we just combine two nickels into one coin, we will have solved the problem. We can combine two nickels by replacing the two nickels with a dime. So, we can make $ 0 . 3 6 with one penny, five nickels, and one dime.
The solution to this puzzle lies in the ability to compare the values of objects. Let's start with the simplest way to make 36 cents, which is with one quarter, one dime and one penny. This is written as 25 + 10 + 1 = 36 But this solution only uses 3 of the 7 Coins needed. However we also know that 5 × 5 = 25 This means that one quarter is the same value as 5 nickels, meaning we can also write the solution as 5 + 5 + 5 + 5 + 5 + 10 + 1 = 36 which shows clearly that we can make 36 cents using 7 Coins.
take 5 nickles,1 dime and 1 penny
5 coins from 0.05, 1 from 0.10 and 1 from 0.01
So let us take a look at the numbers first. 0.36 is the value to be obtained. As we know that the Nickle, the Dime, and the Quarter cannot possibly make a number that does not end in either 5 or 0, then the penny should be used in such a way that after subtracting the value of X number of pennies from 0.36, we are left with a number that ends in either 5 or 0. The closest number to 0.36 is 0.35 and by that method, we use up one coin. It is impossible to make 0.35 from six coins if we are to use a Quarter, and so, we look at Dimes and Nickles. Using another dime, we are left with 0.25 dollars, and five more coins to use. Now, 0.05 multiplied by 5 is 0.25, and that is how we get 0.36 from 7 coins.
0.01 1+0.1 1+0.05*5=0.36
Since all coins other than the penny have values that are integer multiples of $0.05, and $ 0 . 3 6 ≡ $ 0 . 0 1 ( m o d $ 0 . 0 5 ) , we would need either 1 penny or 6 pennies. Obviously 6 pennies won't do, since there is no $0.35 coin to make up the remainder. Thus it must be 1 penny, so the problem is reduced to making $0.35 in 6 coins. Since we have coins for $0.05 and $0.10, any multiple of $0.05 from $0.30 to $0.60 inclusive can be made using 6 such coins.
Like we get 6 coins (from 5 coins) by splitting one dime into 2 Nickels,
split another dime and we get 7 coins
I.e 5 nickels, 1 dime and 1 penny
It's already given that there is a 6 coin combination for $0.36 and there is a choice to add a penny (0.01$). So together they form a $0.37 combination of 7 coins. If it is a general question, without any clue, it would have been harder.
Wouldn't that give you 37 cents?
Problem Loading...
Note Loading...
Set Loading...
Using the 5 coin option that is given, split a dime into 2 nickels; this gives us the same amount with one more coin. In fact, this is what the 6 coin option does.
Do the same thing again, and you get 7 coins: 1 dime, 5 nickels, and 1 penny.