0

I am trying to find a cubic polynomial over GF(5) that evaluates to zero at the points (1,2,0),(2,0,0),(1,4,1),(-2,-1,-1),(-3,2,1),(1,-1,0),(2,-3,1),(-3,-2,2),(1,-2,1).

Clearly the zero polynomial would satisfy the condition, thus I'm looking for a proper cubic polynomial. I note that the generic form of such a polynomial is $f= ax^3+ by^3+ cz^3+ dx^2y + ex^2z+ fy^2x+ iy^2z+ gz^2x+ kz^2y+ lxyz$, that is I need to solve for the coefficients $a,b,\ldots,l$.

I would prefer to do this calculation in GAP as I am using the software already for other calculations.

ahulpke
  • 18,416
  • 1
  • 21
  • 38
user23
  • 35
  • P.S. See also http://math.stackexchange.com/q/347387/ – Olexandr Konovalov Mar 25 '15 at 13:43
  • I need some explanation please. what is the values of the coefficients with the nine points. – user23 Mar 25 '15 at 14:11
  • This is not a duplicate (but badly worded). My guess is that the user is a graduate student in finite geometry who wants to describe a set of points by a polynomial of restricted form. I.e. the question is an interpolation question. One can solve this with Grobner bases, but the space (as the question is marked as duplicate I cannot post an answer) is too short to explain. (The polynomial must have the form Z(5)^3x^2yb+x^2ze-xy^2b+xyzb+Z(5)xyzc+xyze +Z(5)xz^2e+y^3b-y^2zb+Z(5)^3y^2* zc-y^2z* e+Z(5)^3yz^2b+Z(5)yz^2c+yz^2e+z^3*c) – ahulpke Mar 25 '15 at 15:33
  • @ahulpke: thanks, then the question may be reopened once its author will edit it to give us more details and perhaps show attempts in GAP achieved so far (e.g. typing the polynomial as a GAP input would help) – Olexandr Konovalov Mar 25 '15 at 17:39
  • Same about the list of points - please use comma instead of a colon as a separator. – Olexandr Konovalov Mar 25 '15 at 17:40
  • Thanks Alexander, I didn't understand the answer well. – user23 Mar 25 '15 at 22:25
  • from these points(1,2,0),(2,0,0),(1,4,1),(-2,-1,-1),(-3,2,1),(1,-1,0),(2,-3,1),(-3,-2,2),(1,-2,1),I want to find a polynomial curve which contain some or all of them in known constants or coefficients because it depends they are lie or not on the cubic polynomial curve. – user23 Mar 25 '15 at 22:41
  • Then please edit the question, adding more context: then it may be reopened so you might get a more detailed answer. If you intend to use this site often, it's very much recommended to learn how to properly type mathematical symbols and inline GAP code. Also, inserting longer chunks of GAP code, indent them by four spaces. Then, learn how to copy and paste GAP input/output from the GAP terminal into your question. This will help to make your question clearer and save the answerer's time from retyping. – Olexandr Konovalov Mar 25 '15 at 22:46

2 Answers2

1

To describe the solution of the linear system in GAP:

The first step is to get linear equations by evaluating the polynomial at the points. To allow distinguishing the coefficients we introduce the variables as extra polynomial variables:

field:=GF(5);
x:=X(field,"x");
y:=X(field,"y");
z:=X(field,"z");
a:=X(field,"a");
b:=X(field,"b");
c:=X(field,"c");
d:=X(field,"d");
e:=X(field,"e");
f:=X(field,"f");
g:=X(field,"g");
i:=X(field,"i");
k:=X(field,"k");
l:=X(field,"l");
pol:=a*x^3+b*y^3+c*z^3+d*x^2*y+e*x^2*z+f*y^2*x+i*y^2*z+g*z^2*x
     +k*z^2*y+l*x*y*z;

Next, define the points, move them over GF(5), and evaluate the polynomial:

pts:=[[1,2,0],[2,0,0],[1,4,1],[-2,-1,-1],[-3,2,1],[1,-1,0],
      [2,-3,1],[-3,-2,2],[1,-2,1]];
pts:=List(pts,x->x*One(field));
vals:=List(pts,p->Value(pol,[x,y,z],p));

The result you get are linear equations, but written as polynomials. While it probably is quickest to retype them, the following GAP code constructs the coefficient matrix for these equations. (The list mums gives the index numbers of the variables):

nums:=List([a,b,c,d,e,f,g,i,k,l],IndeterminateNumberOfUnivariateLaurentPolynomial);
mat:=[];
for v in vals do
  ex:=ExtRepPolynomialRatFun(v);
  vec:=List([1..Length(nums)],x->Zero(field));
  for s in [1,3..Length(ex)-1] do
    vec[Position(nums,ex[s][1])]:=ex[s+1];
  od;
  Add(mat,vec);
od;

Since GAP works with row vectors, we need to have the equation coefficients actually in the columns, thus transpose the matrix. We now calculate a basis for the nullspace, and construct the corresponding polynomials:

mat:=TransposedMat(mat);

sol:=[];
for v in TriangulizedNullspaceMat(mat) do
  Add(sol,Value(pol,[a,b,c,d,e,f,g,i,k,l],v));
od;

We get the following three basis elements for the solutions:

$Z(5)^{3}x^{2}y-xy^{2}+xyz+y^{3}-y^{2}z+Z(5)^{3}yz^{2}$,

$Z(5)xyz+Z(5)^{3}y^{2}z+Z(5)yz^{2}+z^{3}$,

$x^{2}z+xyz+Z(5)xz^{2}-y^{2}z+yz^{2}$

ahulpke
  • 18,416
  • 1
  • 21
  • 38
0

Hint: For each point, the condition that the cubic evaluates to zero at this point is equivalent to a linear equation in $a,\dots,l$. In all, you obtain a homogeneous system of 9 linear equations in the 10 variables $a,\dots,l$, and you are looking for a non-trivial solution to this system. You could do this by finding a basis for the null space of the matrix corresponding to the system.

Brent Kerby
  • 5,539