Finding the number of solutions of a system of equations in Macaulay 2

577 Views Asked by At

I just started working with Macaulay 2 and need some help. I need to find the number of solutions of a system of equations. I am having difficulty imputing this into the software so please be specific with the commands.

Say we have the following equations

$$u_{12}+u_{13}+u_{14} = \beta (x_1 x_2+x_1 x_3+x_1x_4) $$ $$u_{12}+u_{23}+u_{24} = \beta (x_2 x_1+x_2 x_3+x_2x_4) $$ $$u_{13}+u_{23}+u_{34} = \beta (x_3 x_1+x_3 x_2+x_3x_4) $$ $$u_{14}+u_{24}+u_{34} = \beta (x_4 x_1+x_4 x_2+x_4x_3) $$

Where we want to find the $u$'s. In fact we do know both $\beta$ and all the $x$'s. The $\beta = u_{12}+u_{13}+u_{14}+u{23}+u_{24}+u_{34}$ and say the $x_i=i$

Sorry to be asking for this I just am having hard time, programming. I was thinking if I define a variety in the polynomial ring in terms of the u's and then look at the ideal defined by the variety and then intersect it with the polynomial ring and take the degree of that

what i did is define QQ[x_1,x_2,x_3,x_4] then I made my matrix M to be the same as the one in the solution then I did the gens gb minors(4,M). From that I got the attached polynomials. Then I defined an ideal generated by those polynomials and took the degree of it

enter image description here

1

There are 1 best solutions below

2
On BEST ANSWER

Your equation is a linear system of four equations on the $u$ with coefficients which are polynomials in the $x$s. The transposed matrix of coefficients is $$\small \left( \begin{array}{cccc} -x_1 x_2-x_1 x_3-x_1 x_4+1 & -x_1 x_2-x_3 x_2-x_4 x_2+1 & -x_1 x_3-x_2 x_3-x_4 x_3 & -x_1 x_4-x_2 x_4-x_3 x_4 \\ -x_1 x_2-x_1 x_3-x_1 x_4+1 & -x_1 x_2-x_3 x_2-x_4 x_2 & -x_1 x_3-x_2 x_3-x_4 x_3+1 & -x_1 x_4-x_2 x_4-x_3 x_4 \\ -x_1 x_2-x_1 x_3-x_1 x_4+1 & -x_1 x_2-x_3 x_2-x_4 x_2 & -x_1 x_3-x_2 x_3-x_4 x_3 & -x_1 x_4-x_2 x_4-x_3 x_4+1 \\ -x_1 x_2-x_1 x_3-x_1 x_4 & -x_1 x_2-x_3 x_2-x_4 x_2+1 & -x_1 x_3-x_2 x_3-x_4 x_3+1 & -x_1 x_4-x_2 x_4-x_3 x_4 \\ -x_1 x_2-x_1 x_3-x_1 x_4 & -x_1 x_2-x_3 x_2-x_4 x_2+1 & -x_1 x_3-x_2 x_3-x_4 x_3 & -x_1 x_4-x_2 x_4-x_3 x_4+1 \\ -x_1 x_2-x_1 x_3-x_1 x_4 & -x_1 x_2-x_3 x_2-x_4 x_2 & -x_1 x_3-x_2 x_3-x_4 x_3+1 & -x_1 x_4-x_2 x_4-x_3 x_4+1 \end{array} \right). $$ If you compute all the $4\times 4$ minors and then a Groebner basis for the ideal they generate, you find that it is generated by the single polynomial $$x_1 x_2+x_3 x_2+x_4 x_2+x_1 x_3+x_1 x_4+x_3 x_4-1.$$ This means that the rank of the system is four if this polynomial does not vanish, and then the set of $u$s solving the original system form a subspace of dimension $2$ in, say, $\mathbb C^6$.

On the other hand, computing a Groebner basis for the ideal generated by the determinants of all $3\times 3$ minors shows that it is generated by $1$, that is, for all possible values of $x$s the rank is at least $3$. So when the poynomial above vanishes, the set of solutions is a subspace of dimensio $3$.

In any case, whatever the $x$s aare, there are infinitely many solutions.

I did the computation in Mathematica, rather than in M2, only because it is what I have at hand right now:

us = u @@@ Subsets[Range[4], {2}];
xs = x /@ Range[4];
beta = Total[us];
equation[i_] := Sum[
    u @@ Sort[{i, j}] - beta x[i] x[j], 
    {j, Complement[Range[4], {i}]}];
matrix = Table[Coefficient[equation[i], v], {i, 4}, {v, us}];
GroebnerBasis[Minors[matrix, 4], xs]

{-1 + x[1] x[2] + x[1] x[3] + x[2] x[3] + x[1] x[4] + x[2] x[4] + x[3] x[4]}

GroebnerBasis[Minors[matrix, 3], xs]

{1}

In Macaulay you have to construct the ring with

R = QQ[x_1,x_2,x_3,x_4] 

then construct the matrix of coefficients, call it m and then say

gens gb minors(4, m)

to get a Groebner basis for the ideal generated by the minors of size 4.