Solve trivariate linear Diophantine equation: $ 2x +3y +4z = 5 $

1.1k Views Asked by At

This exercise is from Rosen's Elementary Number Theory:

Solve $ 2x +3y +4z = 5 $ in the set of integers.

The solution given in the book is:

"Since $(2,3)=1$, we take $z$ to be any integer $t$ and solve the equation $2x +3y = 5-4z$, which leads to the solution $x=-5+3s-2t, y= 5-2s, z=t$. ".

My approach was following:

$2x +3y = 5-4z$

Since $1= 2(-1) +3 \cdot 1 $, we have $ 5-4z = 2(-(5-4z)) + 3(5-4z) $ so particular solutions are $x_0 = -(5-4z), y_0 = 5-4z$ and then the solution is $x= (-5+4z)+3s, y= (5-4z)-2s, z=z $.

  • Is my approach correct, it is different from Rosen's? If it is correct, how can be proved that they are same?

  • Why $y$ in Rosen's solution does not depend on $t$?

Thanks in advance.

1

There are 1 best solutions below

2
On BEST ANSWER

Hint: Rosen has $\begin{align} &\color{#c00}{(3,-2,0)}s\\ +\, &\color{#0a0}{(-2,0,1)}t\\ +\, &(-5,5,0)\end{align}$ vs. $\begin{align} &(3,-2,0)s\\ +\, &\color{#90f}{(4,-4,1)}z\\ +\,&(-5,5,0)\end{align}\,$ in yours

But: $\ 2\color{#c00}{(3,-2,0)} + \color{#0a0}{(-2,0,1)}\ \ =\ \ \color{#90f}{(4,-4,1)}\,$ so they are equivalent, i.e. the span doesn't change by the elementary row operation of adding $3$ times the first row to the second, since that's an invertible operation.

Remark $ $ See here for the general linear theory, and a formula / algorithm for the trivariate case.