Calculate the value of x, y and z

  • Thread starter Greychu
  • Start date
  • Tags
    Value
In summary, there are an infinite number of solutions to this problem, but by solving a Diophantine equation, we can find all solutions where x and y are non-negative integers.
  • #1
Greychu
14
0
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
 
Physics news on Phys.org
  • #2
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
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
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.
 

FAQ: Calculate the value of x, y and z

How do I calculate the value of x, y, and z?

To calculate the value of x, y, and z, you need to have equations or data that relate these variables. Then, you can use algebraic techniques such as substitution, elimination, or graphing to solve for the values of x, y, and z.

What are the steps to calculate the value of x, y, and z?

The steps to calculate the value of x, y, and z typically involve writing out the equations or data, rearranging them to isolate the desired variable, and then solving for the variable using algebraic techniques. Make sure to check your work and plug the values back into the original equations to confirm your answer.

How do I know which algebraic technique to use when calculating the value of x, y, and z?

The algebraic technique you use to calculate the value of x, y, and z will depend on the specific equations or data you have. It is important to carefully analyze the problem and determine the most efficient technique to use. Practice and familiarity with different techniques will also help you choose the best method.

Can I use a calculator to calculate the value of x, y, and z?

Yes, you can use a calculator to calculate the value of x, y, and z. However, it is important to understand the concepts and equations involved in order to properly interpret and use the calculator's results. Using a calculator can also help you check your work and save time on tedious calculations.

Why is it important to calculate the value of x, y, and z?

Calculating the value of x, y, and z is important in many scientific and mathematical applications. It allows us to solve complex problems, make predictions, and understand relationships between variables. Additionally, it can help us make informed decisions and improve our understanding of the world around us.

Back
Top