0

I have the following:

$$12x+28y=20$$

I'm trying to find solutions to the equation above defined by: $12x\equiv 20\pmod {28}$

The GCD is $d = gcd(28,12)=4$ and since $4 | 20 $, then there are 4 solutions that exist. (please correct me if I'm wrong).

Using the extending Euclidean Algorithm, we find $x_0=-2$ and $y_0=1$. The general solution is defined by: $$x_0+t(\frac nd)$$ which in turn gives $-2+7t$ in our case. But how can we have a negative remainder if $x=-2 \pmod 7$ which can't happen.

Dimitri
  • 1,287

3 Answers3

1

Your extended Euclid result, $x_0=-2, y_0=1$ is a solution to $12x+28y=\gcd(12, 28)=4$. However, you want solutions to $12y+28z=20$ so you need to multiply your solutions by $5$, namely $x=5(-2)+7t=-10+7t\equiv 4\pmod7$. Since there are 4 solutions to the original equation, as you've correctly noticed, we'll have $x\equiv 4, 11, 18, 25\pmod{28}$.

Rick Decker
  • 8,718
0

Divide both sides of 12x + 28y = 20 by 4 gives: 3x + 7y = 5. Solve for x gives: x = (5 - 7y)/3 = 2 - 2y - (y+1)/3. Since x is an integer, -(y+1)/3 must be an integer so y + 1 = -3n and so y = -3n - 1 with n being an integer. So substituting y back into the equation and get x = (5 - 7(-3n - 1))/3 = (5 + 21n +7)/3 = 7n + 4. Thus (x,y) = (7n + 4, -3n - 1) with n an integer. Check: 3x + 7y = 3(7n + 4) + 7(-3n - 1) = 12 - 7 = 5 as claimed.

DeepSea
  • 77,651
0

Divide 12x + 28y = 20 by 4, then 3x + 7y = 5.

3x = 5 mod 7.

3x = 12 mod 7.

x = 4 mod 7.

Therefore x = 4 + 7n and y = -1 - 3n for any value of n.

There are infinitely many solutions not just x = 4,11,18, and 25.