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

m (replaced <quotes> tag by real quotes) |
|||

(19 intermediate revisions by 3 users not shown) | |||

Line 1: | Line 1: | ||

+ | {{Version|1}} | ||

<command> | <command> | ||

<title>Bertini.BUHSolve</title> | <title>Bertini.BUHSolve</title> | ||

Line 9: | Line 10: | ||

<description> | <description> | ||

<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. | <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 zero dimensional non-homogeneous polynomial system of equations by user defined homotopy. It 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. | |

− | This function solves a zero dimensional non-homogeneous polynomial system of | + | <par/> |

+ | Please note that user defined homotopy as implemented in Bertini is quite sensitive. The purpose of user defined homotopy is to solve parametrized 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 quadratic then the results could be unexpected. Furthermore, to get best results the total degree of the start system should be equal to the total degree of the target system. | ||

<itemize> | <itemize> | ||

Line 17: | Line 19: | ||

<item>@param <em>SSys</em>: List of polynomials of the start system for homotopy.</item> | <item>@param <em>SSys</em>: List of polynomials of the start system for homotopy.</item> | ||

− | |||

<item>@param <em>SSol</em>: List of lists containing the start solution for the homotopy. The elements of Lists are in the form of strings.</item> | <item>@param <em>SSol</em>: List of lists containing the start solution for the homotopy. The elements of Lists are in the form of strings.</item> | ||

− | <item>@param <em>Gamma</em>: Complex number in the form | + | <item>@param <em>Gamma</em>: 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. </item> |

− | <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 set ConfigSet := [ | + | <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 set <tt>ConfigSet := ["USERHOMOTOPY: 1"]</tt>. Please note that <tt>ConfigSet</tt> must contain "USERHOMOTOPY: 1" to use user defined homotopy. 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 of adding some configurations. For details about configuration settings see Bertini manual <tt>http://www.nd.edu/~sommese/bertini/BertiniUsersManual.pdf</tt>. </item> |

<item>@return A list of lists containing real solutions of system P.</item> | <item>@return A list of lists containing real solutions of system P.</item> | ||

Line 29: | Line 30: | ||

<example> | <example> | ||

− | -- We want to solve the system x^2-1=0, y^2-1=0, | + | -- 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 := < | + | Gamma := "1"; |

− | SSol := [[[ | + | SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ],[ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; |

− | ConfigSet := [ | + | ConfigSet := ["USERHOMOTOPY: 1"]; |

+ | |||

+ | |||

+ | -- Then we compute the solution with | ||

+ | Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); | ||

+ | |||

+ | -- And we achieve a list of lists containing real solutions. | ||

+ | ---------------------------------------- | ||

+ | [ | ||

+ | [-250000000000021/250000000000000, -250000000000021/250000000000000], | ||

+ | [250000000000021/250000000000000, 250000000000021/250000000000000] | ||

+ | ] | ||

+ | |||

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

+ | </example> | ||

+ | |||

+ | <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 := "0.2+1.2*I"; | ||

+ | SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ], [ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; | ||

+ | ConfigSet := ["USERHOMOTOPY: 1", "MPTYPE: 1", "PRECISION: 128"]; | ||

+ | |||

+ | |||

+ | -- 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. | ||

+ | </example> | ||

+ | |||

+ | |||

+ | <example> | ||

+ | -- We want to solve the given system for Gamma=0.2+1.2*I and using default configurations. | ||

+ | -- The start solution for the homotopy is [ [0.0, 0.0 ], [1.0, 0.0], [0.0, 0.0], [1.0, 0.0] ]. | ||

+ | -- The start system for the homotopy is [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]. | ||

+ | |||

+ | Use S ::= QQ[x[1..4]]; | ||

+ | P := [ | ||

+ | 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 18x[1]x[3]x[4] - 48x[2]x[3]x[4] + 9x[1]x[2] - 6x[1]x[3] + 9x[2]x[3] + | ||

+ | 15x[2]x[4] + 9x[3]x[4] + 15x[1] + 15x[3] - 15, | ||

+ | 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 48x[1]x[3]x[4] - 18x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] - 6x[2]x[3] + | ||

+ | 15x[1]x[4] + 9x[3]x[4] + 15x[2] + 15x[3] - 15, | ||

+ | 186x[1]x[2]x[3]x[4] - 48x[1]x[2]x[3] - 18x[1]x[2]x[4] - 42x[1]x[3]x[4] - 24x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] + 15x[2]x[3] - | ||

+ | 6x[1]x[4] + 9x[3]x[4] + 15x[1] + 15x[4] - 15, | ||

+ | 24x[1]x[2]x[3]x[4] - 3x[1]x[3] - 3x[2]x[3] - 3x[1]x[4] - 3x[2]x[4] + 3, | ||

+ | x[1]^2 - x[1], | ||

+ | x[2]^2 - x[2], | ||

+ | x[3]^2 - x[3], | ||

+ | x[4]^2 - x[4] | ||

+ | ]; | ||

+ | SSys := [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]; | ||

+ | Gamma := "0.2+1.2*I"; | ||

+ | SSol := [ [ ["0.0", "0.0"], ["1.0", "0.0"], ["0.0", "0.0"], ["1.0", "0.0"] ] ]; | ||

+ | ConfigSet := ["USERHOMOTOPY: 1"]; | ||

Line 46: | Line 116: | ||

-- And we achieve a list of lists containing real solutions. | -- And we achieve a list of lists containing real solutions. | ||

---------------------------------------- | ---------------------------------------- | ||

− | |||

− | |||

− | For Bertini output files please refer to ApCoCoA directory/Bertini. | + | [[0, 1, 0, 1]] |

+ | |||

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

</example> | </example> | ||

+ | |||

</description> | </description> | ||

Line 59: | Line 130: | ||

<seealso> | <seealso> | ||

− | <see>Introduction to CoCoAServer</see> | + | <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see> |

− | <see>Bertini.BCMSolve</see> | + | <see>ApCoCoA-1:Bertini.BCMSolve|Bertini.BCMSolve</see> |

− | <see>Bertini.BZCSolve</see> | + | <see>ApCoCoA-1:Bertini.BZCSolve|Bertini.BZCSolve</see> |

− | <see>Bertini.BMSolve</see> | + | <see>ApCoCoA-1:Bertini.BMSolve|Bertini.BMSolve</see> |

− | <see>Bertini.BSolve</see> | + | <see>ApCoCoA-1:Bertini.BSolve|Bertini.BSolve</see> |

</seealso> | </seealso> | ||

Line 69: | Line 140: | ||

<key>bertini.buhsolve</key> | <key>bertini.buhsolve</key> | ||

<key>solve zero dimensional non-homogeneous polynomial system by user defined homotopy</key> | <key>solve zero dimensional non-homogeneous polynomial system by user defined homotopy</key> | ||

− | <wiki-category>Package_bertini</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_bertini</wiki-category> |

</command> | </command> |

## Latest revision as of 13:28, 29 October 2020

This article is about a function from ApCoCoA-1. |

## 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 equations by user defined homotopy. It 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.

Please note that user defined homotopy as implemented in Bertini is quite sensitive. The purpose of user defined homotopy is to solve parametrized 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 quadratic then the results could be unexpected. Furthermore, to get best results the total degree of the start system should be equal to the total degree of the target system.

@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"]`. Please note that`ConfigSet`must contain "USERHOMOTOPY: 1" to use user defined homotopy. 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 of adding some configurations. 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 := "1"; SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ],[ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1"]; -- Then we compute the solution with Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); -- And we achieve a list of lists containing real solutions. ---------------------------------------- [ [-250000000000021/250000000000000, -250000000000021/250000000000000], [250000000000021/250000000000000, 250000000000021/250000000000000] ] --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 := "0.2+1.2*I"; SSol := [ [ ["-1.0", "0.0"], ["-1.0", "0.0"] ], [ ["1.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1", "MPTYPE: 1", "PRECISION: 128"]; -- 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.

#### Example

-- We want to solve the given system for Gamma=0.2+1.2*I and using default configurations. -- The start solution for the homotopy is [ [0.0, 0.0 ], [1.0, 0.0], [0.0, 0.0], [1.0, 0.0] ]. -- The start system for the homotopy is [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]. Use S ::= QQ[x[1..4]]; P := [ 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 18x[1]x[3]x[4] - 48x[2]x[3]x[4] + 9x[1]x[2] - 6x[1]x[3] + 9x[2]x[3] + 15x[2]x[4] + 9x[3]x[4] + 15x[1] + 15x[3] - 15, 186x[1]x[2]x[3]x[4] - 42x[1]x[2]x[3] - 24x[1]x[2]x[4] - 48x[1]x[3]x[4] - 18x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] - 6x[2]x[3] + 15x[1]x[4] + 9x[3]x[4] + 15x[2] + 15x[3] - 15, 186x[1]x[2]x[3]x[4] - 48x[1]x[2]x[3] - 18x[1]x[2]x[4] - 42x[1]x[3]x[4] - 24x[2]x[3]x[4] + 9x[1]x[2] + 9x[1]x[3] + 15x[2]x[3] - 6x[1]x[4] + 9x[3]x[4] + 15x[1] + 15x[4] - 15, 24x[1]x[2]x[3]x[4] - 3x[1]x[3] - 3x[2]x[3] - 3x[1]x[4] - 3x[2]x[4] + 3, x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]; SSys := [ x[1],x[2]-1,x[3],x[4]-1,x[1]^2 - x[1], x[2]^2 - x[2], x[3]^2 - x[3], x[4]^2 - x[4] ]; Gamma := "0.2+1.2*I"; SSol := [ [ ["0.0", "0.0"], ["1.0", "0.0"], ["0.0", "0.0"], ["1.0", "0.0"] ] ]; ConfigSet := ["USERHOMOTOPY: 1"]; -- Then we compute the solution with Bertini.BUHSolve(P, SSys, Gamma, SSol, ConfigSet); -- And we achieve a list of lists containing real solutions. ---------------------------------------- [[0, 1, 0, 1]] --For Bertini output files please refer to ApCoCoA directory/Bertini.

### See also