Bill Allombert on Sun, 01 Jan 2023 16:43:40 +0100


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

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


On Sun, Jan 01, 2023 at 11:17:52PM +0800, Hongyi Zhao wrote:
> Hi here,
> 
> I've a set of matrices and vectors as follows:
> 
> mats:= [
> [ [ -2, 0, 0 ], [ 0, -2, 0 ], [ 1, 1, 0 ] ],
> [ [ -2, 0, 0 ], [ 0, 0, 0 ], [ 0, -1, -2 ] ],
> [ [ 0, 1, 2 ], [ 1, -1, 0 ], [ -1, 0, -2 ] ],
> [ [ -1, 1, 0 ], [ 1, -1, 0 ], [ -1, -1, -2 ] ],
> [ [ -2, 0, 0 ], [ 0, -2, 0 ], [ 0, 0, -2 ] ]
> ];
> vecs:=  [
> [ -23/8, 17/8, -9/8 ],
> [ 17/8, 1, -3 ],
> [ 0, 0, 0 ],
> [ 1, -2, -15/16 ],
> [ 1/8, -23/8, 15/16 ]
> ];

When posting to this list, please use PARI/GP syntax, not GAP syntax.
GAP does not use the same convention for matrix action than PARI,
mixing the two can only lead to confusion.

> I want to find a common set of solutions, a.k.a., x, for the above
> matrices and their corresponding vectors, which satisfy the following
> conditions:
> 
>   mat * x = vec  (mod Z). \forall mat \in mats, and \forall vec \in
> vecs in the corresponding order.

What is Z ? 

> Any tips for tackling this problem?

I suggest you look up matrixqz.

Cheers,
Bill.