Difference between revisions of "ApCoCoA-1:Hom.HSolve"

From ApCoCoAWiki
m (insert version info)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
 
<title>Hom.HSolve</title>
 
<title>Hom.HSolve</title>
<short_description>Solves a zero dimensional homogeneous or non-homogeneous polynomial system of equations.</short_description>
+
<short_description>Solves a zero dimensional square homogeneous or non-homogeneous polynomial system of equations.</short_description>
 
<syntax>
 
<syntax>
Hom.HSolve(P:LIST)
+
Hom.HSolve(P:LIST,HomTyp:INT):LIST
 
</syntax>
 
</syntax>
 
<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/>
 
<par/>
This function uses total degree homotopy to find all isolated solutions of a zero dimensional system of polynomial equations. It uses default configurations provided by Bertini. The system of polynomials may be homogeneous or nonhomogeneous. For homogeneous polynomial system the output will be the list of all real solutions and for nonhomogeneous system the output will be the list of all finite solutions.
+
This function can do two kinds of different computations depending on the input that you provide in ApCoCoAServer during execution. After passing the command <tt>Hom.HSolve(P)</tt> in ApCoCoA you need to interact with ApCoCoAServer. At this stage ApCoCoAServer asks you to enter 1 for the polyhedral homotopy and to enter 2 for the classical linear homotopy. As a result this function provides all isolated solutions of a zero dimensional system of polynomial equations. The system of polynomials may be homogeneous or non-homogeneous.
 
<itemize>
 
<itemize>
 
<item>@param <em>P</em>: List of polynomials of the given system.</item>
 
<item>@param <em>P</em>: List of polynomials of the given system.</item>
 +
<item>@param <em>HomTyp</em>: set it to 1 for polyhedral homotopy and to 2 for classical linear homotopy.</item>
 
<item>@return A list of lists containing the finite solutions of the system P.</item>
 
<item>@return A list of lists containing the finite solutions of the system P.</item>
  
Line 16: Line 18:
  
 
<example>
 
<example>
-- An example of zero dimensional Non-Homogeneous Solving.
+
-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
 
-- We want to solve zero dimensional non-homogeneous system x^2+y^2-5=0, xy-2=0.  
 
-- We want to solve zero dimensional non-homogeneous system x^2+y^2-5=0, xy-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];
 +
HomTyp:=1;
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Hom.HSolve(P);
+
Hom.HSolve(P,HomTyp);
  
 
-- Now you have to interact with ApCoCoAServer
 
-- Now you have to interact with ApCoCoAServer
Line 44: Line 47:
 
</example>
 
</example>
 
<example>
 
<example>
-- An example of zero dimensional Homogeneous Solving
+
-- An example of zero dimensional Homogeneous Solving using the classical linear homotopy.
-- We want to solve zero dimensional homogeneous system x^2-z^2=0, xy-z^2=0.
+
-- We want to solve zero dimensional homogeneous system x^2-y^2=0, xy-y^2=0.
  
Use S ::= QQ[x,y,z];             
+
Use S ::= QQ[x,y];             
M := [x^2-z^2, xy-z^2];
+
M := [x^2-y^2, xy-y^2];
SysTyp := <quotes>hom</quotes>;
+
HomTyp:=1;
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Bertini.BSolve(M,SysTyp);
+
Hom.HSolve(M,HomTyp);
 +
 
 +
-- Now you have to interact with ApCoCoAServer
 +
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
 +
-- If we enter 2 then the all finite solutions are:
  
-- And we achieve a list of lists containing all real solutions.
 
 
----------------------------------------
 
----------------------------------------
 
[
 
[
[2190685167348543/5000000000000000, 2190685167348543/5000000000000000, 2190685167348543/5000000000000000],
+
[[20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000],  
[1237092982347763/5000000000000000, 1237092982347763/5000000000000000, -1237092982347763/5000000000000000],
+
  [20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000]],  
[3235177805819999/100000000000000000000000000000, 9932123317905381/10000000000000000,621807549382663/5000000000000000000000000000],  
+
[[0, 0], [0, 0]],
[3006769352985381/100000000000000000000000000000,1241515414738241/1250000000000000, 555981798431817/5000000000000000000000000000]
+
[[0, 0], [0, 0]],  
 +
[[-60689558229793541/10000000000000000000000000, 245542879738863/2000000000000000000000],  
 +
  [-3034482281801981/500000000000000000000000, 3069286290270979/25000000000000000000000]]
 
]
 
]
  
--These are the real solutions of the system
+
 
--For Bertini output files please refer to ApCoCoA directory/Bertini.
+
-- The smallest list represents a complex number. For example above system has 4 solutions the first solution is
 +
-- [[20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000],
 +
--  [20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000]]
 +
-- and we read it as  x=20597740658111043/500000000000000000000000 - 74403123210058537/1000000000000000000000000i,
 +
-- y = 20597740658111043/500000000000000000000000 - 74403123210058537/1000000000000000000000000i
 +
 
 +
 
 
------------------------------------
 
------------------------------------
 
</example>
 
</example>
 +
 +
<example>
 +
-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
 +
-- We want to solve zero dimensional non-homogeneous system x[1]^2-1=0, x[1]x[2]-1=0.
 +
 +
Use QQ[x[1..2]];         
 +
P := [x[1]^2-1, x[1]x[2]-1];
 +
HomTyp:=1;
 +
 +
-- Then we compute the solution with
 +
Hom.HSolve(P,HomTyp);
 +
 +
-- Now you have to interact with ApCoCoAServer
 +
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
 +
-- We enter 1 because we want to use polyhedral homotopy.
 +
-- The all finite solutions are:
 +
 +
----------------------------------------
 +
[
 +
[[1, 0], [1, 0]],
 +
[[-1, 0], [-1, 0]]
 +
]
 +
 +
 +
-- The smallest list represents a complex number. For example above system has 2 solutions the first solution is [[1, 0], [1, 0]]
 +
-- and we read it as  x[1]=1+0i, x[2]=1+0i
 +
 +
</example>
 +
  
 
</description>
 
</description>
Line 75: Line 118:
  
 
<seealso>
 
<seealso>
  <see>Introduction to CoCoAServer</see>
+
  <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
  <see>Hom.LRSolve</see>
+
  <see>ApCoCoA-1:Hom.LRSolve|Hom.LRSolve</see>
  <see>Hom.SRSolve</see>
+
  <see>ApCoCoA-1:Hom.SRSolve|Hom.SRSolve</see>
 
</seealso>
 
</seealso>
  
 
<key>hsolve</key>
 
<key>hsolve</key>
<key>hom4ps.bsolve</key>
+
<key>hom4ps.hsolve</key>
 +
<key>hom.hsolve</key>
 
<key>solve zero dimensional polynomial system</key>
 
<key>solve zero dimensional polynomial system</key>
<wiki-category>Package_hom4ps</wiki-category>
+
<wiki-category>ApCoCoA-1:Package_hom4ps</wiki-category>
 
</command>
 
</command>

Latest revision as of 10:09, 7 October 2020

This article is about a function from ApCoCoA-1.

Hom.HSolve

Solves a zero dimensional square homogeneous or non-homogeneous polynomial system of equations.

Syntax

Hom.HSolve(P:LIST,HomTyp:INT):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 can do two kinds of different computations depending on the input that you provide in ApCoCoAServer during execution. After passing the command Hom.HSolve(P) in ApCoCoA you need to interact with ApCoCoAServer. At this stage ApCoCoAServer asks you to enter 1 for the polyhedral homotopy and to enter 2 for the classical linear homotopy. As a result this function provides all isolated solutions of a zero dimensional system of polynomial equations. The system of polynomials may be homogeneous or non-homogeneous.

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

  • @param HomTyp: set it to 1 for polyhedral homotopy and to 2 for classical linear homotopy.

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


Example

-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
-- We want to solve zero dimensional non-homogeneous system x^2+y^2-5=0, xy-2=0. 

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

-- Then we compute the solution with
Hom.HSolve(P,HomTyp);

-- Now you have to interact with ApCoCoAServer
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
-- If we enter 1 then the all finite solutions are:

----------------------------------------
[
[[2, 0], [1, 0]],
 [[-1, 0], [-2, 0]],
 [[-2, 0], [-1, 0]],
 [[1, 0], [2, 0]]
]



-- The smallest list represents a complex number. For example above system has 4 solutions the first solution is [[2, 0], [1, 0]] 
-- and we read it as  x=2+0i, y=1+0i 

Example

-- An example of zero dimensional Homogeneous Solving using the classical linear homotopy.
-- We want to solve zero dimensional homogeneous system x^2-y^2=0, xy-y^2=0.

Use S ::= QQ[x,y];            
M := [x^2-y^2, xy-y^2];
HomTyp:=1;

-- Then we compute the solution with
Hom.HSolve(M,HomTyp);

-- Now you have to interact with ApCoCoAServer
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
-- If we enter 2 then the all finite solutions are:

----------------------------------------
[
 [[20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000], 
  [20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000]], 
 [[0, 0], [0, 0]],
 [[0, 0], [0, 0]], 
 [[-60689558229793541/10000000000000000000000000, 245542879738863/2000000000000000000000],   
  [-3034482281801981/500000000000000000000000, 3069286290270979/25000000000000000000000]]
]


-- The smallest list represents a complex number. For example above system has 4 solutions the first solution is 
-- [[20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000], 
--  [20597740658111043/500000000000000000000000, -74403123210058537/1000000000000000000000000]] 
-- and we read it as  x=20597740658111043/500000000000000000000000 - 74403123210058537/1000000000000000000000000i,
-- y = 20597740658111043/500000000000000000000000 - 74403123210058537/1000000000000000000000000i 


------------------------------------

Example

-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
-- We want to solve zero dimensional non-homogeneous system x[1]^2-1=0, x[1]x[2]-1=0. 

Use QQ[x[1..2]];           
P := [x[1]^2-1, x[1]x[2]-1];
HomTyp:=1;

-- Then we compute the solution with
Hom.HSolve(P,HomTyp);

-- Now you have to interact with ApCoCoAServer
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
-- We enter 1 because we want to use polyhedral homotopy.
-- The all finite solutions are:

----------------------------------------
[
 [[1, 0], [1, 0]],
 [[-1, 0], [-1, 0]]
]


-- The smallest list represents a complex number. For example above system has 2 solutions the first solution is [[1, 0], [1, 0]] 
-- and we read it as  x[1]=1+0i, x[2]=1+0i 



See also

Introduction to CoCoAServer

Hom.LRSolve

Hom.SRSolve