What is the best way to solve a system of linear equations?

  • Thread starter Thread starter SherlockOhms
  • Start date Start date
  • Tags Tags
    Linear Systems
AI Thread Summary
To solve the problem of finding the number of 20p, 10p, and 2p coins totaling £2.10 with 17 coins in total, two equations are established: 0.2(x1) + 0.1(x2) + 0.02(x3) = 2.10 and x1 + x2 + x3 = 17. It's suggested to rewrite the equations using whole numbers for easier manipulation: x1 + 10x2 + 20x3 = 210 and x1 + x2 + x3 = 17. The solution involves expressing x1 and x2 in terms of x3, then testing integer values for x3 to find valid non-negative solutions. The discussion emphasizes the importance of considering the constraints of the problem, as the number of coins must be natural numbers.
SherlockOhms
Messages
309
Reaction score
0

Homework Statement


A boy finds £2.10 in 20p, 10p and 2p coins. If there are 17 coins in all how many of each can he have?


Homework Equations


Row ops.



The Attempt at a Solution


I'm trying to come up with a few equations with which I can create a matrix.
x1 = amount of 20p.
x2 = amount of 10p.
x3 = amount of 2p.
So, 0.2(x1) + 0.1(x2) + 0.02(x3) = 2.10 and
x1 + x2 + x3 = 17.
Then, place the above in an augmented matrix and solve. Does this sound about right?
 
Physics news on Phys.org
Have you tried solving it in the way that you mentioned and checking if the result makes sense? Just try it and then interpret your results. If they make sense, then great! If not, try to figure out what went wrong. It looks like you've already made a good attempt, so you may as well follow through with your idea to see what happens :smile: In my opinion it's one of the best ways to learn!
 
Well, having worked through you come out with a matrix that has a parameter (which is pretty clear). The answer at the back of the book is saying that there are only 2 possible values for each x which sort of contradicts the fact that there are parameters in the solution.
 
Remember the context of the question though--if the x's represent the number of coins, they can only have non-negative integer values, which restricts the solution set. Of course there will be more solutions mathematically speaking, but not in the context of the question.
 
  • Like
Likes 1 person
SherlockOhms said:
Well, having worked through you come out with a matrix that has a parameter (which is pretty clear). The answer at the back of the book is saying that there are only 2 possible values for each x which sort of contradicts the fact that there are parameters in the solution.

No, it doesn't. Number of coins can be only a natural number, which puts additional constraint on the system.

This is actually the same problem we face when trying to balance chemical reactions by the algebraic method - almost always there is not enough equations, but we know that the coefficients have to be positive and non zero integers, and additionally we want them to be smallest possible.

Edit: danago was faster.
 
Brilliant! Got it now. Thanks for the help!
 
SherlockOhms said:

Homework Statement


A boy finds £2.10 in 20p, 10p and 2p coins. If there are 17 coins in all how many of each can he have?


Homework Equations


Row ops.



The Attempt at a Solution


I'm trying to come up with a few equations with which I can create a matrix.
x1 = amount of 20p.
x2 = amount of 10p.
x3 = amount of 2p.
So, 0.2(x1) + 0.1(x2) + 0.02(x3) = 2.10 and
x1 + x2 + x3 = 17.
Then, place the above in an augmented matrix and solve. Does this sound about right?

It is better to write the equations as x1+10x2+20x3=210 and x1+x2+x3=17, so you can deal with exact fractions instead of decimal numbers.

You can (for example) solve for x1 and x2 in terms of x3. Then you can evaluate the solution for x3 = 0, 2, 3, ... and see if you ever get non-negative integer numbers for x1 and x2. There will only be a few possibilities, because if x3 is too large one of x1 or x2 will become < 0.
 
Back
Top