Diophantine Equations (Algebra 2)
posted by Peter on .
A box contains two sizes of bolts. The small size weighs 33 grams. The large size weighs 103 grams. The total weight of the bolts is 6526 grams. How many of each size are there? Can you write and solve it with Diophantine Equations.

number of smaller size : x
number of larger size : y
33x + 103y = 6526
There are several ways to solve these for positive integer solutions.
I use a method involving "continued fractions" , which I will not even attempt to show here.
With my method , I found that
x = 101 and y = 31 gives a solution
Here is a page which is very similar to what I do
http://www.wikihow.com/SolveaLinearDiophantineEquation
Professor Burris from the University of Waterloo (my old school) has written hundreds of little algorithms to solve these kind of problems.
here is one of them for our problem
http://www.math.uwaterloo.ca/~snburris/htdocs/linear.html
enter :
33 for a, 103 for b, and 6526 for c
This will give us an initial solution of
x = 163150 and y = 52208
Of course this is no good, since both our values must be positive, but ....
the slope of our linear equation is 33/103
which means that for every increase of 33 in 52208 we have to decrease 163150 by 103
so I increased and decreased by a factor of 1583
x = 163150  1583(103) = 101
y = 52208 + 1583(33) = 31
btw, I got the 1583 by using the lower integer value of 163150/103 
By successive reductions:
133x + 103y = 6526
2Dividing by the lowest coefficient
x + 3y + 4y/33 = 197 + 25/33
(4y  25)/33 = 197  x  3y
3(4y  25)/33 must be an integer.
4Multiplying (3) by 25 and redividing
(100y  625)/33 =
3y + y/33 18  31/33
5(y  31)/33 must be an integer k making y = 33x + 31
6Substituting back into (1) yields
x = 101  103k
7By inspection, the only possible value of k is zero making
x = x = 101 and y = 31
8Checking: 33(101) + 103(31) =
3333 + 3193 = 6526
The Euclidian Algorithm is another approach to problems of this sort.