Jacques Gélinas on Sat, 18 Aug 2018 00:24:19 +0200


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

RE: Equation solver


> N=2 :
> C(0,0) + C(0,1) + C(1,0) + C(1,1) != 0 (mod 4)

This is the solution set for N=2:

S2 = Set([]);
forvec(X=vector(4,k,[0,1]),if(vecsum(X)%4,S2=setunion(S2,Set(matrix(2,2,i,j,X[2*(i-1)+j])))));
#S2 == 14

For N>2, you need to use larger vectors X, form different solution sets S2,
and take their intersection. 

> N=3 :
>  C(0,0) + C(0,1) + C(1,0) + C(1,1) != 0 (mod 4)
>  C(0,1) + C(0,2) + C(1,1) + C(1,2) != 0 (mod 4)
>  C(1,0) + C(1,1) + C(2,0) + C(2,1) != 0 (mod 4)
>  C(0,0) + C(0,2) + C(2,0) + C(2,2) != 0 (mod 4)
>  C(1,1) + C(1,2) + C(2,1) + C(2,2) != 0 (mod 4)

Jacques Gélinas