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/Solve-a-Linear-Diophantine-Equation

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:

1--33x + 103y = 6526
2--Dividing 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.
4--Multiplying (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
6--Substituting back into (1) yields
---x = 101 - 103k
7--By inspection, the only possible ---value of k is zero making
---x = x = 101 and y = 31
8--Checking: 33(101) + 103(31) =
---3333 + 3193 = 6526

The Euclidian Algorithm is another approach to problems of this sort.

Sure! We can solve this problem using Diophantine equations.

Let's assume that the box contains x small size bolts and y large size bolts.

Now we can set up two equations based on the information given:

1. The weight equation:
33x + 103y = 6526

This equation represents the total weight of the bolts in the box.

2. The quantity equation:
x + y = ?

This equation represents the total number of bolts in the box.

To solve the system of equations, we can use the method of substitution or elimination.

Let's use substitution. Solve equation (2) for x:

x = ? - y

Substitute this expression for x in equation (1):

33(? - y) + 103y = 6526

Now simplify and solve for y:

33? - 33y + 103y = 6526
33? + 70y = 6526
70y = 6526 - 33?
70y = ?(6526 - 33?)

Now we can determine the possible values for ? (total number of bolts) and solve for y.

Since both 70 and 6526 - 33? are divisible by 70, ? must also be divisible by 70. Let's assume ? = 70k, where k is a positive integer.

Substitute this into the equation:

70y = 70(6526 - 33k)
y = 6526 - 33k

Now, we need to find which values of k will make y a positive integer. From the equation above, we see that for y to be positive, 33k must be less than or equal to 6526.

33k ≤ 6526
k ≤ 6526 / 33
k ≤ 198

So, the possible values for k are from 1 to 198.

Finally, we can substitute these values of k back into the equation to find the corresponding values of y, and then use equation (2) to find the corresponding values of x.

For example, if we assume k = 1:
y = 6526 - 33(1) = 6493
x = ? - y = ? - 6493

Using this approach, you can generate a table of possible values for x and y by repeating the above steps for each value of k from 1 to 198.

This will give you the various combinations of x and y that satisfy the given conditions.