Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - How to determine the multiplicity of a multivariate zero?
Author Message
  Post subject:  Re: How to determine the multiplicity of a multivariate zero?  Reply with quote
This depends on the coefficient domains of the rings used:
if QQ (or QQ[i]) is used (i.e. ring r =QQ,...), everything is exact and rounding errors do not occur. Problem: zeros may be not rational numbers.
If long floating point numbers are used (for example inside solve),
rounding errors occur: one can only use a larger accuracy.
Post Posted: Fri Mar 09, 2018 6:57 pm
  Post subject:  Re: How to determine the multiplicity of a multivariate zero?  Reply with quote
Hi Hannes, Hi all,
Thank you very much for your last post. I tried a simpler example to make sure that I understand how the trick with the local ring works, and see if I can get the right multiplicities:

Question:
1. Find the common points of the unit circle x2+y2-1=0 and the two lines y=1 and x=0.
2. Find the multiplicities of the answers to part 1.

Answer:
It is an easy problem and one can picture the answer in his mind. There are 2 common points, one at (x=0, y=1) with a multiplicity of 3, and one at (x=0, y=-1) with a multiplicity of 1. But how to verify the multiplicities with the help of SINGULAR!?
Code:
ring r=0,(x,y),lp;
poly f1=x2+y2-1;
poly f2=x*(y-1);
ideal I=f1,f2;
ideal g=std (i);
vdim(g);

// move the zero at (x=0, y=1) to the origin:
map f=r,x,y+1;
ideal ii=f(i);
// check that it is really a zero:
subst(ii,x,0,y,0);
// define a local ring:
ring rr=0,(x,y),ds;
// get ii in rr:
ideal ii=imap(r,ii);
// compute the multiplicity at 0:
vdim(std(ii));


The output to the last command, namely vdim(std(ii)) is 3, therefore we get the right multiplicity for this zero.
If we change the line
Code:
map f=r,x,y+1;
to
Code:
map f=r,x,y-1;

then we are moving the zero at (x=0, y=-1) to the origin and we get a multiplicity of 1, which is what we expected and everything is fine. However, what if we have only a bit of inaccuracy in the value of the zeros (what generally happens if they are calculated with some sort of numerical method)? In this case, we do not get the right multiplicities. For example, if we assume that the triple zero is at (x=1/1000000000000000, y=1), we get multiplicity of zero (it is not a zero at all) if we stay in the ring r=0,(x,y),lp and we get a multiplicity of 1 if we define the ring as r=(real,20),(x,y),lp!

So I have a new question:
How to get around the inaccuracy of the non-precise zeros?
Post Posted: Fri Mar 09, 2018 3:33 pm
  Post subject:  Re: How to determine the multiplicity of a multivariate zero?  Reply with quote
One possibility (using approximate arithmetic):
use solve(g,20,1);
(see https://www.singular.uni-kl.de/Manual/4-1-1/sing_1727.htm for an example.
The other possibility for the solution x1=,x2=1,y1=1,y2=0:
Code:
// move the zero to the origin:
map f=r,x1,x2-1,y1-1,y2;
ideal ii=f(i);
// check that it is really a zero:
subst(ii,x1,0,x2,0,y1,0,y2,0);
// define a local ring:
ring rr=0,(x1,x2,y1.y2),ds;
// get ii in rr:
ideal ii=imap(r,ii);
// compute the multiplicity at 0:
degree(std(ii));
// or:
vdim(std(ii));
Post Posted: Thu Mar 08, 2018 2:39 pm
  Post subject:  Re: How to determine the multiplicity of a multivariate zero?  Reply with quote
Hi Hannes, Hi All,
Yes, I did consider the complex solutions! To solve for solutions I just took the first polynomial of the Groebner basis g[1], factorized it, and solved for x1. Symmetry considerations told me that the other variables x2.y1,and y2 must satisfy the same polynomial g[1] set to zero. Alternatively one could change the order of variables in the definition of the ring and verify that the first member of the Groebner basis is exactly the same g[1], except for x1 substituted by x2,y1, or y2. g[1] has 93 distinct complex solutions (I know the multiplicities, though).

Now I went through all 93^4 possible four-tuples (x1,x2,y1,y2) and checked which ones satisfy the original system of equations with a threshold of 10^-7 on the absolute value. There are only four "original" polynomials so I preferred to check them instead of the remaining 12 equations of the Groebner basis, g. This way I got the mentioned 248 solutions!

If I change the threshold from 10^7 to 10^5 then I get exactly your 408 solutions! A threshold of 10^-6 gives 312 solutions. It is getting philosophical!!

I am going to have a look at what you recommended, namely map() and ds term ordering. A short example would be very kind of you to get me started.

TYVM and looking forward to hearing more from you
Post Posted: Wed Mar 07, 2018 5:52 pm
  Post subject:  Re: How to determine the multiplicity of a multivariate zero?  Reply with quote
Did you also searched for the complex roots?
solve(g) (from solve.lib) finds 408 solutions.
To count the multiplicity at a specific root,
move it to the point (0,...0) (via map),
change to a local ordering (ds) and compute vdim(std(...)).
Post Posted: Wed Mar 07, 2018 2:32 pm
  Post subject:  How to determine the multiplicity of a multivariate zero?  Reply with quote
Hi all,
I have a zero-dimensional ideal for which I also have a Groebner basis w.r.t. the lexicographic term ordering (lp).

Code:
ring r=0,(y2,y1,x2,x1),lp;   
poly f1=32*x1^3*y1^2*(1+2*x1*x2)^2*(1+2*y1*y2)*x2^3*y2^2*(x1^2-x2^2)+(1-2*x1*x2)^2*(1-2*y1*y2)*(1+2*x1*x2)^2*(1+2*y1*y2)*x2^4*y2^2- 
32*(1-2*x1*x2)^2*(1-2*y1*y2)*x1^3*y1^2*x2^3*y2^2*(x1^2-x2^2)-
(1-2*x1*x2)^2*(1-2*y1*y2)*x1^4*y1^2*(1+2*x1*x2)^2*(1+2*y1*y2);
poly f2=32*x1^2*y1^3*(1+2*x1*x2)*(1+2*y1*y2)^2*x2^2*y2^3*(y1^2-y2^2)+(1-2*x1*x2)*(1-2*y1*y2)^2*(1+2*x1*x2)*(1+2*y1*y2)^2*x2^2*y2^4- 
32*(1-2*x1*x2)*(1-2*y1*y2)^2*x1^2*y1^3*x2^2*y2^3*(y1^2-y2^2)-
(1-2*x1*x2)*(1-2*y1*y2)^2*x1^2*y1^4*(1+2*x1*x2)*(1+2*y1*y2)^2;
poly f3=x1^2+x2^2-1;
poly f4=y1^2+y2^2-1;
ideal i=f1,f2,f3,f4;
ideal g=stdfglm(i);

The above code takes only a few seconds to run, so feel free to try it. The command vdim(g) indicates that there are 720 zeros including multiplicities. My calculations though find only 248 zeros, therefore some of them must be multiple zeros. How do I find the multiplicity of each zero, please? Can SINGULAR calculate it? Any other reference is very much appreciated.

If you need any other information, e.g. how exactly I calculated the zeors, I'd be happy to provide an answer as long as it is within my knowledge.

Greetings
Rambiz
Post Posted: Wed Mar 07, 2018 9:47 am


It is currently Fri May 13, 2022 11:03 am
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group