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

From ApCoCoAWiki
(New page: <command> <title>BSolve</title> <short_description>Solves zero dimensional Homogeneous or Non-Homogeneous polynomial system with Default Configurations.</short_description> <syntax> Bertin...)
 
m (replaced <quotes> tag by real quotes)
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
<title>BSolve</title>
+
<title>Bertini.BCMSolve</title>
<short_description>Solves zero dimensional Homogeneous or Non-Homogeneous polynomial system with Default Configurations.</short_description>
+
<short_description>Solves a zero dimensional non-homogeneous polynomial system of equations using multi-homogenization and user configurations.</short_description>
 
<syntax>
 
<syntax>
Bertini.BSolve(M:LIST, SysTyp:STRING)
+
Bertini.BCMSolve(P:LIST, ConfigSet:LIST)
 
</syntax>
 
</syntax>
 
<description>
 
<description>
{{ApCoCoAServer}}
+
<em>Please note:</em> The function(s) explained on this page is/are using the <em>ApCoCoAServer</em>. You will have to start the ApCoCoAServer in order to use it/them.
 +
<par/>
 +
This function solves a polynomial system of equations using multihomogeneous homotopy. The polynomial system of equations must be quadratic. If the system has <tt>N</tt> variables then multihomogeneous homotopy will introduce <tt>N</tt> homogeneous variables to solve the system. It uses total degree homotopy to find all isolated solutions and enables you to use all kinds of user configurations provided by Bertini. Please read about configuration settings provided in Bertini manual. The system of polynomials should be non-homogeneous. The output will be the list of all finite solutions.
  
<em>M</em>: List of polynomials in the system to be solved.
+
<itemize>
 
+
<item>@param <em>P</em>: List of polynomials of the given system.</item>
<em>SysTyp</em>: Type of the system to be solved. Homogeneous ("hom") or nonhomogeneous ("Nhom").
 
  
 +
<item>@param <em>ConfigSet</em>: 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 leave this list empty. The use of configuration settings is little tricky but very useful. You can switch from one kind of solving to the other just by changing or adding some configurations. For details about configuration settings see Bertini mannual <tt>http://www.nd.edu/~sommese/bertini/BertiniUsersManual.pdf</tt>.</item>
 +
<item>@return A list of lists containing the finite solutions of the polynomial system <tt>P</tt>.</item>
 +
</itemize>
 
   
 
   
 
<example>
 
<example>
-- Zero Dimensional Non-Homogeneous Solving
+
-- We want to solve the system x^2+y^2-5=0,xy-2=0, using multi-homogenization, for adaptive precision.  
-- We want to solve zero dimensional non-homogeneous system x^2+y^2-5=0, xy-2=0.  
 
  
Use S ::= QQ[x,y];             --  Define appropriate ring
+
Use S ::= QQ[x,y];          
M := [x^2+y^2-5, xy-2];
+
P := [x^2+y^2-5,xy-2];
SysTyp := "Nhom";
+
ConfigSet := ["MPTYPE: 2"];
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
$Bertini.BSolve(M,SysTyp);
+
Bertini.BCMSolve(P,ConfigSet);
  
-- And we achieve:
+
-- And we achieve a list of lists containing finite solutions.
 
----------------------------------------
 
----------------------------------------
The number of real finite solutions are:
+
[
4     
+
[
The real finite solutions are:
+
Vector(1000000000000017/1000000000000000, 145132717332349/15625000000000000000000000000),
                                       
+
Vector(49999999999999/25000000000000, -3537662353156057/100000000000000000000000000000)
2.000000000000052e+00 -1.207721921243940e-14
+
],
9.999999999999164e-01 1.727395183148409e-14
+
[
 +
Vector(-62500000000003/62500000000000, 4415730565392687/100000000000000000000000000000),
 +
Vector(-499999999999983/250000000000000, -66866973306543/400000000000000000000000000)
 +
],
 +
[
 +
Vector(999999999999983/500000000000000, -1787591178181031/50000000000000000000000000000),
 +
Vector(1000000000000013/1000000000000000, 281412486737749/25000000000000000000000000000)
 +
],
 +
[
 +
Vector(-499999999999999/250000000000000, -3956938527452181/1000000000000000000000000000000),
 +
Vector(-9999999999999989/10000000000000000, -596634837824491/1250000000000000000000000000000)
 +
]
 +
]
  
-9.999999999999680e-01 -1.380221440309691e-14
+
--For Bertini output files please refer to ApCoCoA directory/Bertini.
-2.000000000000005e+00 -8.389594590085023e-15
+
</example>
 
 
9.999999999999293e-01 2.686603221243866e-14
 
2.000000000000473e+00 4.530296702485832e-13
 
  
-2.000000000000031e+00 -1.809322618557695e-15
 
-9.999999999999383e-01 -2.558999563654189e-15
 
  
For summary of all solutions refer to ApCoCoAServer.
 
 
</example>
 
 
<example>
 
<example>
-- Zero Dimensional Homogeneous Solving
+
--The same example as above but this time using regeneration.
-- We want to solve zero dimensional homogeneous system x^2-z^2=0, xy-z^2=0.
+
--Regeneration is an equation-by-equation method for finding the non-singular isolated solutions.
 +
-- We want to solve the system x^2+y^2-5=0,xy-2=0, using multi-homogenization, for adaptive precision.  
  
Use S ::= QQ[x,y,z];             --  Define appropriate ring
+
Use S ::= QQ[x,y];          
M := [x^2-z^2, xy-z^2];
+
P := [x^2+y^2-5,xy-2];
SysTyp := "hom";
+
ConfigSet := ["USEREGENERATION: 1"];
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
$Bertini.BSolve(M,SysTyp);
+
Bertini.BCMSolve(P,ConfigSet);
  
-- And we achieve:
+
-- And we achieve a list of lists containing finite solutions.
 
----------------------------------------
 
----------------------------------------
The number of real solutions are:
+
[
4     
+
[
The real solutions are:
+
Vector(9999999999999999/10000000000000000, -643977180168769/1250000000000000000000000000000),
                                       
+
Vector(2, 1660674691787513/5000000000000000000000000000000)
 +
],
 +
[
 +
Vector(-2000000000000001/1000000000000000, 584020313856301/500000000000000000000000000000),
 +
Vector(-9999999999999999/10000000000000000, 45486167963413/125000000000000000000000000000)
 +
],
 +
[
 +
Vector(2, 2989952880295369/1000000000000000000000000000000),
 +
Vector(9999999999999993/10000000000000000, 732258034227497/5000000000000000000000000000000)
 +
],
 +
[
 +
Vector(-1, -879366755419571/5000000000000000000000000000000),
 +
Vector(-2, 4460430333228999/10000000000000000000000000000000)
 +
]
 +
]
  
4.750270171019972e-01 7.277175694441498e-01
+
--For Bertini output files please refer to ApCoCoA directory/Bertini.
4.750270171019972e-01 7.277175694441498e-01
+
</example>
4.750270171019972e-01 7.277175694441498e-01
 
  
-1.161874166440340e+00 -1.121939725361908e+00
+
<example>
-1.161874166440340e+00 -1.121939725361908e+00
+
-- We want to solve the non-homogenous polynomial system (29/16)z[1]^3 - 2z[1]z[2]=0, z[2] - z[1]^2=0, using multi-homogenization.  
1.161874166440340e+00 1.121939725361908e+00
+
-- In addition suppose we want Bertini to follow the paths very closely (correct to 8 digits before the endgame and correct to 11
 +
-- digits when running the endgame) and that you want the endgame to compute approximations of each solution until successive
 +
-- approximations agree to at least 14 digits.  
  
-1.213218743783253e-14 9.540042296620362e-14
+
Use S ::= QQ[z[1..2]];           
1.297490331797821e+00 -3.349764345312171e-01
+
P := [(29/16)z[1]^3 - 2z[1]z[2], z[2] - z[1]^2];
-9.696352192508132e-14 -3.162549982974766e-13
+
ConfigSet := ["TRACKTOLBEFOREEG: 1e-8", "TRACKTOLDURINGEG: 1e-11", "FINALTOL: 1e-14"];
  
 +
-- Then we compute the solution with
 +
Bertini.BCMSolve(P,ConfigSet);
 +
 +
-- And we achieve a list of lists containing finite solutions.
 +
----------------------------------------
 +
[
 +
[
 +
Vector(-6272142330887219272991421734532181259967888828557/2500000000000000000000000000000000000000000000000000000000000000,
 +
-16866585769960937068249054027382922938807741513177/100000000000000000000000000000000000000000000000000000000000000000),
 +
Vector(8805522460698904717783577526969974058842568093851/20000000000000000000000000000000000000000000000000000000000000000000000000,
 +
371666764789855282623508352529304991388858172316/6250000000000000000000000000000000000000000000000000000000000000000000000000000)
 +
],
 +
[
 +
Vector(2800994767392818954296004874687536350261142130669/2000000000000000000000000000000000000000000000000000000000000000,
 +
-10442004545151043511524382737808469250701933034019/5000000000000000000000000000000000000000000000000000000000000000),
 +
Vector(-16863840390941893071858292951853672304120979133893/100000000000000000000000000000000000000000000000000000000000000000000000,
 +
-5137795605139651161672232162161044043786444504329/1250000000000000000000000000000000000000000000000000000000000000000000000000000)
 +
],
 +
[
 +
Vector(1745556907758497619927983789627389730399846491963/1250000000000000000000000000000000000000000000000000000000000000,
 +
28437259304210599902269601024330245142947311467321/10000000000000000000000000000000000000000000000000000000000000000),
 +
Vector(-43119800109410418470261587328237339500316468515037/100000000000000000000000000000000000000000000000000000000000000000000000,
 +
11161237954525426581510768500892187905929449123739/2000000000000000000000000000000000000000000000000000000000000000000000000000000)
 +
]
 +
]
  
-2.845295858183006e-14 1.079961801218032e-13
 
1.297490331797885e+00 -3.349764345312022e-01
 
-9.799048563439788e-14 -3.558617333271439e-13
 
  
For summary of all solutions refer to ApCoCoAServer
 
  
------------------------------------
+
--For Bertini output files refer to ApCoCoA directory/Bertini.
 +
------------------------------------------
 
</example>
 
</example>
 +
  
 
</description>
 
</description>
 
<types>
 
<types>
   <type>cocoaserver</type>
+
   <type>apcocoaserver</type>
 +
  <type>poly_system</type>
 
</types>
 
</types>
<key>bsolve</key>
+
 
 +
<seealso>
 +
<see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
 +
<see>ApCoCoA-1:Bertini.BSolve|Bertini.BSolve</see>
 +
<see>ApCoCoA-1:Bertini.BMSolve|Bertini.BMSolve</see>
 +
<see>ApCoCoA-1:Bertini.BUHSolve|Bertini.BUHSolve</see>
 +
</seealso>
 +
 
 +
<key>bcmsolve</key>
 +
<key>bertini.bcmsolve</key>
 
<key>solve zero dimensional polynomial system</key>
 
<key>solve zero dimensional polynomial system</key>
<key>solve b</key>
+
<wiki-category>ApCoCoA-1:Package_bertini</wiki-category>
<key>eullah</key>
 
<wiki-category>Package_bertini</wiki-category>
 
 
</command>
 
</command>

Latest revision as of 13:27, 29 October 2020

This article is about a function from ApCoCoA-1.

Bertini.BCMSolve

Solves a zero dimensional non-homogeneous polynomial system of equations using multi-homogenization and user configurations.

Syntax

Bertini.BCMSolve(P: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 polynomial system of equations using multihomogeneous homotopy. The polynomial system of equations must be quadratic. If the system has N variables then multihomogeneous homotopy will introduce N homogeneous variables to solve the system. It uses total degree homotopy to find all isolated solutions and enables you to use all kinds of user configurations provided by Bertini. Please read about configuration settings provided in Bertini manual. The system of polynomials should be non-homogeneous. The output will be the list of all finite solutions.

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

  • @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 leave this list empty. The use of configuration settings is little tricky but very useful. You can switch from one kind of solving to the other just by changing or adding some configurations. For details about configuration settings see Bertini mannual http://www.nd.edu/~sommese/bertini/BertiniUsersManual.pdf.

  • @return A list of lists containing the finite solutions of the polynomial system P.

Example

-- We want to solve the system x^2+y^2-5=0,xy-2=0, using multi-homogenization, for adaptive precision. 

Use S ::= QQ[x,y];            
P := [x^2+y^2-5,xy-2];
ConfigSet := ["MPTYPE: 2"];

-- Then we compute the solution with
Bertini.BCMSolve(P,ConfigSet);

-- And we achieve a list of lists containing finite solutions.
----------------------------------------
[
[
 Vector(1000000000000017/1000000000000000, 145132717332349/15625000000000000000000000000),
 Vector(49999999999999/25000000000000, -3537662353156057/100000000000000000000000000000)
],
[
 Vector(-62500000000003/62500000000000, 4415730565392687/100000000000000000000000000000),
 Vector(-499999999999983/250000000000000, -66866973306543/400000000000000000000000000)
],
[
 Vector(999999999999983/500000000000000, -1787591178181031/50000000000000000000000000000),
 Vector(1000000000000013/1000000000000000, 281412486737749/25000000000000000000000000000)
],
[ 
 Vector(-499999999999999/250000000000000, -3956938527452181/1000000000000000000000000000000),
 Vector(-9999999999999989/10000000000000000, -596634837824491/1250000000000000000000000000000)
]
]

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


Example

--The same example as above but this time using regeneration.
--Regeneration is an equation-by-equation method for finding the non-singular isolated solutions.
-- We want to solve the system x^2+y^2-5=0,xy-2=0, using multi-homogenization, for adaptive precision. 

Use S ::= QQ[x,y];            
P := [x^2+y^2-5,xy-2];
ConfigSet := ["USEREGENERATION: 1"];

-- Then we compute the solution with
Bertini.BCMSolve(P,ConfigSet);

-- And we achieve a list of lists containing finite solutions.
----------------------------------------
[
[
Vector(9999999999999999/10000000000000000, -643977180168769/1250000000000000000000000000000), 
Vector(2, 1660674691787513/5000000000000000000000000000000)
], 
[
Vector(-2000000000000001/1000000000000000, 584020313856301/500000000000000000000000000000),
Vector(-9999999999999999/10000000000000000, 45486167963413/125000000000000000000000000000)
],
[
Vector(2, 2989952880295369/1000000000000000000000000000000), 
Vector(9999999999999993/10000000000000000, 732258034227497/5000000000000000000000000000000)
], 
[
Vector(-1, -879366755419571/5000000000000000000000000000000), 
Vector(-2, 4460430333228999/10000000000000000000000000000000)
]
]

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

Example

-- We want to solve the non-homogenous polynomial system (29/16)z[1]^3 - 2z[1]z[2]=0, z[2] - z[1]^2=0, using multi-homogenization. 
-- In addition suppose we want Bertini to follow the paths very closely (correct to 8 digits before the endgame and correct to 11 
-- digits when running the endgame) and that you want the endgame to compute approximations of each solution until successive 
-- approximations agree to at least 14 digits. 

Use S ::= QQ[z[1..2]];             
P := [(29/16)z[1]^3 - 2z[1]z[2], z[2] - z[1]^2];
ConfigSet := ["TRACKTOLBEFOREEG: 1e-8", "TRACKTOLDURINGEG: 1e-11", "FINALTOL: 1e-14"];

-- Then we compute the solution with
Bertini.BCMSolve(P,ConfigSet);

-- And we achieve a list of lists containing finite solutions.
----------------------------------------
[
[
Vector(-6272142330887219272991421734532181259967888828557/2500000000000000000000000000000000000000000000000000000000000000, 
-16866585769960937068249054027382922938807741513177/100000000000000000000000000000000000000000000000000000000000000000), 
Vector(8805522460698904717783577526969974058842568093851/20000000000000000000000000000000000000000000000000000000000000000000000000,
371666764789855282623508352529304991388858172316/6250000000000000000000000000000000000000000000000000000000000000000000000000000)
],
[
Vector(2800994767392818954296004874687536350261142130669/2000000000000000000000000000000000000000000000000000000000000000, 
-10442004545151043511524382737808469250701933034019/5000000000000000000000000000000000000000000000000000000000000000), 
Vector(-16863840390941893071858292951853672304120979133893/100000000000000000000000000000000000000000000000000000000000000000000000,
-5137795605139651161672232162161044043786444504329/1250000000000000000000000000000000000000000000000000000000000000000000000000000)
], 
[
Vector(1745556907758497619927983789627389730399846491963/1250000000000000000000000000000000000000000000000000000000000000, 
28437259304210599902269601024330245142947311467321/10000000000000000000000000000000000000000000000000000000000000000), 
Vector(-43119800109410418470261587328237339500316468515037/100000000000000000000000000000000000000000000000000000000000000000000000,
11161237954525426581510768500892187905929449123739/2000000000000000000000000000000000000000000000000000000000000000000000000000000)
]
]



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



See also

Introduction to CoCoAServer

Bertini.BSolve

Bertini.BMSolve

Bertini.BUHSolve