# Homework Help: Calculate the value of x, y and z

1. Aug 25, 2010

### Greychu

In a market, there are 3 types of shirts, shirt x = $0.10, shirt y =$3.00 and shirt z = $6.00. The condition here is you need to buy total number of 100 shirts for shirt x, y and/or z with$ 100 exactly!

I believe this can be written as
0.1x + 3y + 6z = 100 ... (1)
x + y + z = 100 ... (2)

where x = number of shirt x
y = number of shirt y
z = number of shirt z

*Solution ==> x = 70, y = 29 and z = 1*

x = (200 + 3z)/2.9 ... (3)
y = (90 - 5.9z)/2.9 ... (4)

The problem now is whenever I substitute the (3) and (4) back to (1) or (2), it eliminates the z terms. So can someone show me a better way to deal with this kind of problem?

Regards

2. Aug 25, 2010

### rock.freak667

You have two equations with three unknowns.
So you have an infinite number of solutions, because of this, you can choose any value of z (such as 1) and get the corresponding values of x and y.

3. Aug 25, 2010

### ehild

Your equations 3 and 4 are solutions of the original system of equations. As there are two equations and three unknown, you are free to choose x. BUT: x,y,z are positive integers or z can be 0.
200+3z is a positive integer, so must be 2.9x. What value of x makes 2.9x a positive integer?

ehild

4. Aug 25, 2010

### HallsofIvy

As rockfreak669 and ehild have said, with three unknown values and only two equations to satisfy, there can be an infinite number of solutions. Here, however, you have another piece of information. The unknown values, being numbers of shirts (I cannot imagine what a 10 cent shirt looks like!) must be non-negative integers. You have, correctly x+ y+ z= 100 (since there must be 100 shirts) and .1x+ 3y+ 6z= 100 O(since the total cost is \$100). You could use the first equation to eliminate z: z= 100- x- y and putting that into the second equation, .1x+ 3y+ 6(100- x- y)= .1x+ 3y+ 600- 6x- 6y= 100 or 5.9x+ 3y= 500. If you multiply through by 10, you have 59x+ 30y= 5000. This, with integer coefficients and integer values for x and y, is an example of a Diophantine equation. There still may be an infinite number of solutions but the fact that x and y must be non-negative integers restricts the possible solutions.

Start by solving 59x+ 30y= 1 and then multiply by 5000. Note that 30 divides into 59 once with a remainder of 29. That is, 59(1)- 30(1)= 29. And 29 divides into 30 once with a remainder of one. That is, 30(1)+ 29(-1)= 1. Putting the 29 from the first equation into that, 30(1)+ (59(1)- 30(1))(-1)= 30(2)+ 59(-1)= 1. Multiplying both sides of that by 500- gives 59(-5000)+ 30(10000)= 5000.

x= -5000 and y= 10000 is NOT the solution you want because x is negative and so cannot be a "number of shirts". But it should be easy to see that x= -5000+ 30k and y= 10000- 59k are also integer solutions to the equation. I will leave it to you to show that is true and find k so that both x and y are non-negative integers.