Question 1019647: This diophantine equation seems impossible for me..
"A dealer spent $10000 buying cattle, some at $410 each and the rest at $530 each. How many of each sort did she buy?"
I made a diophantine equation for this..
simplifies to:
i seem to have most trouble when the c is the biggest number in the equation in ax+by=c
I tried using euclid's algorithm but it doesnt seem to work for me, i think im using it wrong..
Any help to the question would be helpful.
Found 2 solutions by robertb, mathmate: Answer by robertb(5830) (Show Source):
You can put this solution on YOUR website! Sometimes it is easier to solve a math problem by brute force, especially when the values we expect to get are moderate, positive values.
By a little trial and error, a particular solution to the Diophantine equation is x = 5 and y = 15.
(BTW, A Diophantine equation ax+by = c has solutions if and only if gcd(a,b) divides c. If so, it has infinitely many solutions, and any one solution can be used to generate all the other ones.)
Answer by mathmate(429) (Show Source):
You can put this solution on YOUR website!
Question:
This diophantine equation seems impossible for me..
"A dealer spent $10000 buying cattle, some at $410 each and the rest at $530 each. How many of each sort did she buy?"
I made a diophantine equation for this..

simplifies to:

i seem to have most trouble when the c is the biggest number in the equation in ax+by=c
I tried using euclid's algorithm but it doesnt seem to work for me, i think im using it wrong..
Any help to the question would be helpful.
Solution:
There exists a systematic method for solving linear diophantine equations like this one. As Robert mentioned, the key is
1. check if there is a solution.
2. find a particular solution, and form the basis for finding all the other solutions.
This problem is a good example of doing the above, as follows.
Given : 410x+530y=10000
Step 1.
Will first find the GCF(410,530) by Euclid's algorithm:
530=410(1)+120
410=120(3)+50
120=50(2)+20
50=20(2)+10
20=10(2)
Therefore the GCF is 10, and since 10|10000, there are infinite solutions.
Step 2.
Find A particular solution.
we need to express the GCF (10) as the difference of multiples of 410 and 530. If the answer is not obtained by inspection, we can use the reverse of the Euclid Algorithm to retrace the values.
For this particular example, we have
10=50-20(2)
=50-2(120-50(2))
=50(5)-120(2)
=(410-3(120))(5)-120(2)
=410(5)-120(17)
=410(5)-(530-410)(17)
=410(22)-530(17)
Multiplying by 1000 gives
10000=410(22000)-530(17000) which satisfies the given diophantine equation, and constitutes ONE solution, where
x=22000, y=-17000
Step 3.
We need to find positive values of x and y in order to satisfy the conditions of the problem.
For this, we start from the original solution of
x=22000 and y=-17000 and start exchanging x and y according to
x=22000-530k/10=22000-53k
y=-17000+410k/10=-17000+41k
In order to get a positive value for y, we try k≥17000/41=414.6, or 415
x=5, y=15, since both x and y are non-negative, it is a valid solution.
Try k=416, x=-48, y=56 which is not acceptable.
So the final answer is
x=5, y=15.
Check: 5(410)+15(530)=10000, therefore answer is correct.
|
|
|