If you have ones, fives and tens. Assuming that there are enough of each denomination of each currency in the drawer. How many different ways can you make change for a $50 if you must use at least one bill of each kind?
-
We want to solve for positive integer solutions
x + 5y + 10z = 50.
Plainly, x has to be a multiple of 5.
So, writing x = 5k for some positive integer k yields
5k + 5y + 10z = 50 ==> k + y + 2z = 10
This can be enumerated from here:
z = 0 ==> k + y = 10 has 9 positive. integer solutions
z = 1 ==> k + y = 8 has 7 non-neg. integer solutions
z = 2 ==> k + y = 6 has 5 non-neg. integer solutions
z = 3 ==> k + y = 4 has 3 non-neg. integer solutions
z = 4 ==> k + y = 2 has 1 non-neg. integer solutions
z = 5 (and higher): no non-neg. integer solution.
Altogether, there are 1 + 3 + 5 + 7 + 9 = 25 ways.
I hope this helps!
x + 5y + 10z = 50.
Plainly, x has to be a multiple of 5.
So, writing x = 5k for some positive integer k yields
5k + 5y + 10z = 50 ==> k + y + 2z = 10
This can be enumerated from here:
z = 0 ==> k + y = 10 has 9 positive. integer solutions
z = 1 ==> k + y = 8 has 7 non-neg. integer solutions
z = 2 ==> k + y = 6 has 5 non-neg. integer solutions
z = 3 ==> k + y = 4 has 3 non-neg. integer solutions
z = 4 ==> k + y = 2 has 1 non-neg. integer solutions
z = 5 (and higher): no non-neg. integer solution.
Altogether, there are 1 + 3 + 5 + 7 + 9 = 25 ways.
I hope this helps!