Difference between revisions of "ApCoCoA-1:Bertini.BUHSolve"

From ApCoCoAWiki
Line 30: Line 30:
 
<example>
 
<example>
 
-- We want to solve the system x^2-1=0, y^2-1=0, using default value of Gamma i.e. Gamma=1 and default configurations.  
 
-- We want to solve the system x^2-1=0, y^2-1=0, using default value of Gamma i.e. Gamma=1 and default configurations.  
-- The two start solutions for the homotopy are [[-1.0, 0.0 ],[-1.0,0.0]] and [[1.0, 0.0],[1.0,0.0]].
+
-- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0], [1.0, 0.0] ].
 
-- The start system for the homotopy is x^2=0, y^2=0.  
 
-- The start system for the homotopy is x^2=0, y^2=0.  
  
 
Use S ::= QQ[x,y];               
 
Use S ::= QQ[x,y];               
 
P := [x^2-1, y^2-1];
 
P := [x^2-1, y^2-1];
SSys := [x^2,y^2];
+
SSys := [x^2, y^2];
 
Gamma := <quotes>1</quotes>;
 
Gamma := <quotes>1</quotes>;
SSol := [[[<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>,<quotes>0.0</quotes>]],[[<quotes>1.0</quotes>, <quotes>0.0</quotes>],[<quotes>1.0</quotes>,<quotes>0.0</quotes>]]];
+
SSol := [ [ [<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>, <quotes>0.0</quotes>] ],[ [<quotes>1.0</quotes>, <quotes>0.0</quotes>], [<quotes>1.0</quotes>, <quotes>0.0</quotes>] ] ];
 
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>];
 
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>];
  
Line 46: Line 46:
 
-- And we achieve a list of lists containing real solutions.
 
-- And we achieve a list of lists containing real solutions.
 
----------------------------------------
 
----------------------------------------
[[-1000000000000043/1000000000000000, -1000000000000043/1000000000000000],
+
[
[1000000000000043/1000000000000000, 1000000000000043/1000000000000000]]
+
[-1000000000000043/1000000000000000, -1000000000000043/1000000000000000],
 +
[1000000000000043/1000000000000000, 1000000000000043/1000000000000000]
 +
]
  
 
For Bertini output files please refer to ApCoCoA directory/Bertini.
 
For Bertini output files please refer to ApCoCoA directory/Bertini.
Line 53: Line 55:
  
 
<example>
 
<example>
-- We want to solve the system x^2+y^2-5, xy-2, for Gamma=0.2+1.2I and for fixed higher precision (user defined configurations).  
+
-- We want to solve the system x^2+y^2-5, xy-2, for Gamma=0.2+1.2*I and for fixed higher precision (user defined configurations).  
-- The two start solutions for the homotopy are [[-1.0, 0.0 ],[-1.0,0.0]] and [[1.0, 0.0],[1.0,0.0]].
+
-- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0],[1.0, 0.0] ].
 
-- The start system for the homotopy is x^2=0, y^2=0.  
 
-- The start system for the homotopy is x^2=0, y^2=0.  
  
 
Use S ::= QQ[x,y];               
 
Use S ::= QQ[x,y];               
P := [x^2+y^2-5,xy-2];
+
P := [x^2+y^2-5, xy-2];
SSys := [x^2,y^2];
+
SSys := [x^2, y^2];
Gamma := <quotes>0.2+1.2I</quotes>;
+
Gamma := <quotes>0.2+1.2*I</quotes>;
SSol := [[[<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>,<quotes>0.0</quotes>]],[[<quotes>1.0</quotes>, <quotes>0.0</quotes>],[<quotes>1.0</quotes>,<quotes>0.0</quotes>]]];
+
SSol := [ [ [<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>, <quotes>0.0</quotes>] ], [ [<quotes>1.0</quotes>, <quotes>0.0</quotes>], [<quotes>1.0</quotes>, <quotes>0.0</quotes>] ] ];
 
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>, <quotes>MPTYPE: 1</quotes>, <quotes>PRECISION: 128</quotes>];
 
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>, <quotes>MPTYPE: 1</quotes>, <quotes>PRECISION: 128</quotes>];
  
Line 70: Line 72:
 
-- And we achieve a list of lists containing real solutions.
 
-- And we achieve a list of lists containing real solutions.
 
----------------------------------------
 
----------------------------------------
[[-1000000000000043/1000000000000000, -1000000000000043/1000000000000000],
+
[  
[1000000000000043/1000000000000000, 1000000000000043/1000000000000000]]
+
[-249999999999997684505697380148733364799/125000000000000000000000000000000000000, -1000000000000021662026757256894697354703/1000000000000000000000000000000000000000], [249999999999997684505697380148733364799/125000000000000000000000000000000000000, 1000000000000021662026757256894697354703/1000000000000000000000000000000000000000]
 +
]
  
 
For Bertini output files please refer to ApCoCoA directory/Bertini.
 
For Bertini output files please refer to ApCoCoA directory/Bertini.

Revision as of 12:37, 12 May 2010

Bertini.BUHSolve

Solves a zero dimensional non-homogeneous polynomial system of equations by user defined homotopy.

Syntax

Bertini.BUHSolve(P:LIST, SSys:LIST, Gamma:STRING, SSol:LIST, ConfigSet:LIST)

Description

Please note: The function(s) explained on this page is/are using the ApCoCoAServer. You will have to start the ApCoCoAServer in order to use it/them.


This function solves a zero dimensional non-homogeneous polynomial system of equaiton by user defined homotopy. Please note that user defined homotopy as implemented in Bertini is quite sensitive. The purpose of user defined homotopy is to solve parameterized systems of polynomial equations. If F is a polynomial system having solution S and G is a polynomial system having the same monomials but differs only in coefficients then we can use user defined homotopy to solve the system G, considering the system F as start system for the homotopy and S the start solution. User defined homotopy works well for square systems. If the system is not square then the results could be unexpected.

  • @param P: List of polynomials of the given system.

  • @param SSys: List of polynomials of the start system for homotopy.


  • @param SSol: List of lists containing the start solution for the homotopy. The elements of Lists are in the form of strings.

  • @param Gamma: Complex number in the form "a+b*I" ( e.g. "0.8 - 1.2*I" ). The homotopy continuation method trace the paths that originate at the solutions of the start system towards the solutions of the target system. If there is singularity in some path then that singularity can be avoided using Gamma Trick. A path which diverges for one value of Gamma may converge for the other value. We can choose Gamma as random complex number. If you do not want to care about Gamma then choose Gamma=1 as default value.

  • @param ConfigSet: List of strings representing configurations to be used. Bertini uses multiple configuration settings. These configurations should be provided by the user. If you want to use default configurations then set ConfigSet := ["USERHOMOTOPY: 1"]. For details about configuration settings see Bertini manual http://www.nd.edu/~sommese/bertini/BertiniUsersManual.pdf.

  • @return A list of lists containing real solutions of system P.

Example

-- We want to solve the system x^2-1=0, y^2-1=0, using default value of Gamma i.e. Gamma=1 and default configurations. 
-- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0], [1.0, 0.0] ].
-- The start system for the homotopy is x^2=0, y^2=0. 

Use S ::= QQ[x,y];              
P := [x^2-1, y^2-1];
SSys := [x^2, y^2];
Gamma := <quotes>1</quotes>;
SSol := [ [ [<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>, <quotes>0.0</quotes>] ],[ [<quotes>1.0</quotes>, <quotes>0.0</quotes>], [<quotes>1.0</quotes>, <quotes>0.0</quotes>] ] ];
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>];


-- Then we compute the solution with
Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet);

-- And we achieve a list of lists containing real solutions.
----------------------------------------
[
[-1000000000000043/1000000000000000, -1000000000000043/1000000000000000],
[1000000000000043/1000000000000000, 1000000000000043/1000000000000000]
]

For Bertini output files please refer to ApCoCoA directory/Bertini.

Example

-- We want to solve the system x^2+y^2-5, xy-2, for Gamma=0.2+1.2*I and for fixed higher precision (user defined configurations). 
-- The two start solutions for the homotopy are [ [-1.0, 0.0 ],[-1.0, 0.0] ] and [ [1.0, 0.0],[1.0, 0.0] ].
-- The start system for the homotopy is x^2=0, y^2=0. 

Use S ::= QQ[x,y];              
P := [x^2+y^2-5, xy-2];
SSys := [x^2, y^2];
Gamma := <quotes>0.2+1.2*I</quotes>;
SSol := [ [ [<quotes>-1.0</quotes>, <quotes>0.0</quotes>], [<quotes>-1.0</quotes>, <quotes>0.0</quotes>] ], [ [<quotes>1.0</quotes>, <quotes>0.0</quotes>], [<quotes>1.0</quotes>, <quotes>0.0</quotes>] ] ];
ConfigSet := [<quotes>USERHOMOTOPY: 1</quotes>, <quotes>MPTYPE: 1</quotes>, <quotes>PRECISION: 128</quotes>];


-- Then we compute the solution with
Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet);

-- And we achieve a list of lists containing real solutions.
----------------------------------------
[ 
[-249999999999997684505697380148733364799/125000000000000000000000000000000000000, -1000000000000021662026757256894697354703/1000000000000000000000000000000000000000], [249999999999997684505697380148733364799/125000000000000000000000000000000000000, 1000000000000021662026757256894697354703/1000000000000000000000000000000000000000]
]

For Bertini output files please refer to ApCoCoA directory/Bertini.



See also

Introduction to CoCoAServer

Bertini.BCMSolve

Bertini.BZCSolve

Bertini.BMSolve

Bertini.BSolve