2

The main problem that I want to solve is the Diophantine equation $$c_1x_1 + c_2 x_2 + c_3 x_3 + c_4 x_4 = 0\;\;\;\text{(I)},$$

when $c_1+c_2+c_3+c_4=0$. The problem that I'm facing is that the solution that I'm finding is not compatible with $(t,t,t,t)$, that is always a solution for every $t\in\mathbb{Z}$.

To solve (I), I first consider $x_1 = t$ and try to solve the equation

$$(c_2+c_3+c_4)t = c_2x_2+ c_3 x_3 + c_4 x_4\;\;\;\text{(II)},$$

for every $t\in\mathbb{Z}$. To solve (II), I solve $$dy + c_4x_4 = (c_2+c_3+c_4)t\;\;\;\text{(III)},$$ where $d=\gcd(c_2,c_3)$, and $$dy=c_2x_2 + c_3x_3\;\;\;\text{(IV)},$$

A particular solution of (III) is $$y = \frac{c_2+c_3}{d}t\;\;\;\text{and}\;\;\; x_4 = t.$$

Hence, the general solution of (II) is $$ y=\frac{c_2+c_3}{d}t + \frac{c_4}{e}u\;\;\;\text{and}\;\;\; x_4 = t-\frac{d}{e}u,$$ (where $e=\mathrm{gcd}(d,c_4)=\mathrm{gcd}(c_2,c_3,c_4)$) for every $u\in\mathbb{Z}$.

By finding $z_2,z_3\in\mathbb{Z}$ such that $d=c_2z_2+c_3z_3$, the general solution of equation (I) is

\begin{cases} x_1 & = t,\\ x_2 & = \frac{(z_2+c_3v)[(c_2+c_3)t + dc_4 u]}{d}, \\ x_3 & = \frac{(z_3-c_2v)[(c_2+c_3)t+c_4u]}{d},\text{ and }\\ x_4 & = t-\frac{d}{e}u.\\\end{cases}

As $(t,t,t,t)$ is always a solution, I try to discover $z_2$ and $z_3$ by pluggin $x_i=t$ for any $i\in\{1,2,3,4\}$. The result is

$$z_2=z_3=\frac{d}{c_2+c_3},$$ which is not an integer. What I'm doing wrong here?

user34870
  • 1,173
  • 1
    Did you compare with this post? It is excactly the same problem, just with different scalars and not homogeneous. It has some interesting answers. – Dietrich Burde May 26 '20 at 11:16
  • Hi @DietrichBurde, I did follow the steps in https://math.stackexchange.com/questions/20906/how-to-find-an-integer-solution-for-general-diophantine-equation-ax-by-cz. I'll look this one and see if it helps. – user34870 May 26 '20 at 11:22

1 Answers1

1

added, Wednesday may 27. There is a one line proof that the process below tells us an integral basis for the lattice. use new names, column vector $w$ with element gcd = 1. The row is $w^T.$ We have $h$ being any lattice element, meaning $w^T h = 0.$ And we construct a square integer unimodular matrix $W$ with $w^T W = (1,0,0,0...,0).$ This gives $w^T =(1,0,0,...,0) W^{-1}.$ Put together with $w^T h = 0,$ we arrive at $$ (1,0,0,0...0) W^{-1} h = 0. $$ In turn, this means the first element in $W^{-1}h$ is zero, the others are a bunch of integers. so $$ W^{-1} h = \left( \begin{array}{c} 0 \\ g_2 \\ g_3 \\ \vdots \\ g_n \\ \end{array} \right) $$ Multiply on the left by $W$ for $$ h = W \left( \begin{array}{c} 0 \\ g_2 \\ g_3 \\ \vdots \\ g_n \\ \end{array} \right) $$ If you write this out, you see it means that $h$ itself is an integer linear combination of the columns of $W$ except the first (left hand) column. We get $h = g_2 c_2 + g_3 c_3 + \cdots + g_n c_n,$ where $c_j$ is column $j$ in the square matrix $W.$ The second through final columns of $W$ really do span the lattice of integer vectors orthogonal to $w^T.$ Furthermore, $\det W = 1$ says that they are independent; the second through $n$th columns of $W$ are a basis.

ORIGINAL: The problem you are doing is usually described as finding a basis for the integral lattice of integer vectors orthogonal to your given vector. I did one, I think the way I do this one is better than my usual way. I begin with row vector $v=(105,70, 42, 30)$ and find a square integer matrix, call it $R,$ of determinant $1$ such that $ vR = (1,0,0,0) .$ It follows that the second, third, and fourth column of $R$ are a basis for the lattice. Finally, I use a command for the LLL basis reduction.
The transpose of that gives the basis as rows, namely $$(-2, 3, 0, 0)$$ $$(-2, 0, 5, 0)$$ $$(-2, 0, 0, 7)$$

The Gram matrix for this basis is

[13  4  4]
[ 4 29  4]
[ 4  4 53]

so that the associated quadratic form is $$ 13 x^2 + 29 y^2 + 53 z^2 + 8yz + 8zx +8xy. $$

====================

parisize = 4000000, primelimit = 500000
? row
%1 = row
? row = [ 210/2, 210/3, 210/5, 210/7]
%2 = [105, 70, 42, 30]
? r1 = [ 1,-2,0,0; -1,3,0,0; 0,0,1,0; 0,0,0,1]
%3 = 
[ 1 -2 0 0]

[-1 3 0 0]

[ 0 0 1 0]

[ 0 0 0 1]

? rwo1 = row * r1 %4 = [35, 0, 42, 30] ? row1 = row * r1 %5 = [35, 0, 42, 30] ? ? r2 = [ -1,0,-7,0; 0,1,0,0; 1,0,6,0; 0,0,0,1] %6 = [-1 0 -7 0]

[ 0 1 0 0]

[ 1 0 6 0]

[ 0 0 0 1]

? matdet(r2) %7 = 1 ? matdet(r1) %8 = 1 ? inverse %9 = inverse ? r = r1 * r2 %10 = [-1 -2 -7 0]

[ 1 3 7 0]

[ 1 0 6 0]

[ 0 0 0 1]

? inverse = matadjoint(r2) * matadjoint(r1) %11 = [18 12 7 0]

[ 1 1 0 0]

[-3 -2 -1 0]

[ 0 0 0 1]

? r * inverse %12 = [1 0 0 0]

[0 1 0 0]

[0 0 1 0]

[0 0 0 1]

? row2 = row1 * r2 %13 = [7, 0, 7, 30] ? row * r %14 = [7, 0, 7, 30] ? r3 = [ 13,0,0,30; 0,1,0,0; 0,0,1,0; -3,0,0,7] %15 = [13 0 0 30]

[ 0 1 0 0]

[ 0 0 1 0]

[-3 0 0 7]

? matdet(r3) %16 = 181 ? r3 = [ 13,0,0,-30; 0,1,0,0; 0,0,1,0; -3,0,0,7] %17 = [13 0 0 -30]

[ 0 1 0 0]

[ 0 0 1 0]

[-3 0 0 7]

? matdet(r3) %18 = 1 ? row3 = row2 * r3 %19 = [1, 0, 7, 0] ? r = r * r3 %20 = [-13 -2 -7 30]

[ 13 3 7 -30]

[ 13 0 6 -30]

[ -3 0 0 7]

? inverse = matadjoint(r3) * inverse %21 = [126 84 49 30]

[ 1 1 0 0]

[ -3 -2 -1 0]

[ 54 36 21 13]

? r * inverse %22 = [1 0 0 0]

[0 1 0 0]

[0 0 1 0]

[0 0 0 1]

? r4 = [ 1,0,-7,0; 0,1,0,0; 0,0,1,0; 0,0,0,1] %23 = [1 0 -7 0]

[0 1 0 0]

[0 0 1 0]

[0 0 0 1]

? row3 %24 = [1, 0, 7, 0] ? row3 * r4 %25 = [1, 0, 0, 0] ? matdet(r4) %26 = 1 ? r = r * r4 %27 = [-13 -2 84 30]

[ 13 3 -84 -30]

[ 13 0 -85 -30]

[ -3 0 21 7]

? inverse = matadjoint(r4) * inverse %28 = [105 70 42 30]

[ 1 1 0 0]

[ -3 -2 -1 0]

[ 54 36 21 13]

? r * inverse %29 = [1 0 0 0]

[0 1 0 0]

[0 0 1 0]

[0 0 0 1]

? row * r %30 = [1, 0, 0, 0] ? ? r %31 = [-13 -2 84 30]

[ 13 3 -84 -30]

[ 13 0 -85 -30]

[ -3 0 21 7]

? lattice basis are the columns of r except the first column %32 = latticebasisarethecolumnsofrexceptthefirstcolumn ? ? choose = [ 0,0,0; 1,0,0; 0,1,0; 0,0,1] %33 = [0 0 0]

[1 0 0]

[0 1 0]

[0 0 1]

? r * choose %34 = [-2 84 30]

[ 3 -84 -30]

[ 0 -85 -30]

[ 0 21 7]

? columnbasis = r * choose %35 = [-2 84 30]

[ 3 -84 -30]

[ 0 -85 -30]

[ 0 21 7]

qflll(columnbasis) %37 = [1 -2 -2]

[0 1 6]

[0 -3 -17]

? reduced = columnbasis * qflll(columnbasis) %38 = [-2 -2 -2]

[ 3 0 0]

[ 0 5 0]

[ 0 0 7]

====================

Will Jagy
  • 139,541
  • Hi @will-jagy, I didn't understand your answer. Is $w=(c_1,c_2,c_3,c_4)?$. Could you give any reference about this wway to solve? – user34870 Jun 10 '20 at 12:14
  • 1
    @user34870 yes, you could take $w$ to be your vector. The fact that the sum of the $c_i$ is zero does not help very much. What matters is that the gcd of the four $c_i$ must be one; if not, you need to first find the gcd and divide every element by that. If you have a suitable vector $(c_1, c_2, c_3,c_4)$ I can work that one and edit it in here. – Will Jagy Jun 10 '20 at 16:14