Question 1187485
<br>
Finding a solution by pure trial and error is a good way to solve the problem; but it doesn't teach you any mathematical methods.<br>
There are at least a couple of ways to solve this using logical reasoning and simple mental arithmetic.  Let's look at those methods first.<br>
One informal method is using a "greedy" algorithm, in which you start by trying the largest possible number of the largest bills.<br>
There is a total of 530 pesos, so the maximum number of 100-peso bills is 5.  But we can't make the remaining30 pesos using five 20- or 50-peso bills.
If there are 4 100-peso bills, that leaves 130 pesos to be made using six 20- and 50-peso bills.  But trial and error (or formal calculations) show we can't do that.
If there are 3 100-peso bills, that leaves 230 pesos to be made using seven 20- and 50-peso bills.  Trial and error shows we CAN do that -- using 4 20-peso bills and 3 50-peso bills.<br>
ANSWER: 3 100-peso bills, 3 50-peso bills, and 4 20-peso bills = 300+150+80 = 530 pesos<br>
A more sophisticated but still informal solution uses logical reasoning to quickly cut down the number of possible combinations.<br>
Any combination of 50- and 100-peso bills will make a total that is a multiple of 50 pesos; the total is 530 pesos.  Subtracting 20-peso bills to reduce the remaining total to a multiple of 50 pesos, we find there must be 4 20-peso bills to make 80 pesos, leaving 450 pesos to be made with the 100- and 50-peso bills.<br>
Then trial and error shows the way to make the remaining 450 pesos using 6 100- and 50-peso bills is with 3 of each.<br>
And again the answer is 3 100-peso bills, 3 50-peso bills, and 4 20-peso bills.<br>
And here is a formal algebraic solution....<br>
x = # of 100-peso bills
y = # of 50-peso bills
z = # of 20-peso bills<br>
[1] x+y+z = 10  (the total number of bills is 10)
[2] 100x+50y+20z = 530  (the total value is 530 pesos)<br>
Simplify [2]: 10x+5y+2z=53<br>
Eliminate z:<br>
2x+2y+2z=20
10x+5y+2z=53
8x+3y=33<br>
Solve that equation for one variable in terms of the other, and use the fact that x, y, and z are positive integers less than 10 to deduce the solution.<br>
3y=33-8x
y=11-(8/3)x<br>
y is an integer, and 11 is an integer, so (8/3)x must be an integer.  That means x must be either 3 or 6.  x=6 would make y negative, so x must be 3.<br>
Then y=11-(8/3)3=11-8=3; and x=3 and y=3 means z=4.<br>
And once again, using formal mathematics, the solution is 3 100-peso bills, 3 50-peso bills, and 4 20-peso bills.<br>