Bill Allombert on Sat, 07 Jan 2023 18:50:39 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Solve an non-homogeneous system of equations mod Z.


On Sat, Jan 07, 2023 at 09:29:55PM +0800, Hongyi Zhao wrote:
> On Sat, Jan 7, 2023 at 5:31 PM Bill Allombert
> > One possible solution
> > Take w = [0,0,1/4]~
> 
> This solution is not given in advance. We need to find such things
> first. How did you find such a solution?

You should start by replacing mat1 by matriqz(mat1,-2) as I suggested.
Then everything is be easier.  For example

mat1 = [ -210, -210, -220; -221, -222, -232; 410, 411, 430 ];
vec1 = [ -27, -28, 105/2 ]~;
M1 = matrixqz(mat1,-2)
B1 = matinverseimage(mat1,M1)
x1 = B1*matsolvemod(M1,2,2*vec1)/2
\\%64 = [3/7, 1/42, 0]~
mat1*x1-vec1
\\%65 = [-68, -72, 133]~

So you get a solution.

Cheers,
Bill.