Thread: Linear diophantine equation - 7 variables

1. Linear diophantine equation - 7 variables

I'm trying to solve the following diophantine equation:

$\displaystyle 45a -32b +21c -12d +5e -0f + X = 480$

(That's a coefficient of zero for the variable f and 1 for the variable X.)

Specifically, I'm trying to solve for X, in the case when the solution is 480.

In this thread, user ILikeSerena provides some helpful discussion using matrices to find solutions.

In my example, we know $\displaystyle gcd(45,-32,21,-12,5,0,1)=1$. 1 divides 480, so as I understand it, we know that the equation has solutions and there is a solution for 1.

$\displaystyle 45a' -32b' +21c' -12d' +5e' -0f' + X' = 1$

So, referring to ILikeSerena's earlier posts, I create a matrix as follows:

$\displaystyle \begin{bmatrix} a &b &c &d &e &f &X \end{bmatrix}$

$\displaystyle \begin{bmatrix}1 &0 &0 &0 &0 &0 &0\\0 &1 &0 &0 &0 &0 &0\\0 &0 &1 &0 &0 &0 &0\\0 &0 &0 &1 &0 &0 &0\\0 &0 &0 &0 &1 &0 &0\\0 &0 &0 &0 &0 &1 &0\\0 &0 &0 &0 &0 &0 &1 \end{bmatrix}\begin{bmatrix}45 \\-32 \\21 \\-12 \\5 \\0 \\1 \end{bmatrix}$

I'm just not sure what I should be aiming to do next. I already have one row with a remainder of only 1, but I can't see how that helps. Should I be manipulating the matrix so that it is one of the other variables that has a remainder of 1?

Grateful for any hints/pointers.

CL

2. Re: Linear diophantine equation - 7 variables

Originally Posted by covfefe
$\displaystyle 45a -32b +21c -12d +5e -0f + X = 480$
Why are you including 0f? Evidently ALWAYS zero!

X = 480 - 45a + 32b - 21c + 12d - 5e

3. Re: Linear diophantine equation - 7 variables

What DenisB is saying is that you can literally plug in any numbers you want for $a,b,c,d,e,f$ and you will get a value for $X$ that will solve the equation. For example, make them all zero, and $X=480$.

4. Re: Linear diophantine equation - 7 variables

Thanks - I see what you mean. I don't think I'm describing the problem correctly - I'll give it some more thought before posting again.

5. Re: Linear diophantine equation - 7 variables

Originally Posted by covfefe
I don't think I'm describing the problem correctly
I know that you are not. But I have no idea what could even be?