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

From ApCoCoAWiki
m (insert version info)
 
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{Version|1}}
 
<command>
 
<command>
 
<title>Hom.LRSolve</title>
 
<title>Hom.LRSolve</title>
 
<short_description>Solves a non-square zero dimensional homogeneous or non-homogeneous polynomial system of equations.</short_description>
 
<short_description>Solves a non-square zero dimensional homogeneous or non-homogeneous polynomial system of equations.</short_description>
 
<syntax>
 
<syntax>
Hom.LRSolve(P:LIST)
+
Hom.LRSolve(P:LIST,HomTyp:INT)
 
</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 finds isolated solutions of a non-square polynomial system by using the idea of randomization. Consider the non-square polynomial system F:=[ x^2-1, xy-1, x^2-x ]. After randomization this system will be converted into a  system G := [ x^2-1+a(x^2-x), xy-1+b(x^2-x) ], where a and b are complex numbers having magnitude near one. The system G is a randomization of system F. Some times the system G may have more solutions than F. This function first randomize the given system to make it square and then call HOM4PS to solve it. This function and the function SRSovle(P) do the same job but with a different technique of randomization.  
+
This function computes isolated solutions of a non-square polynomial system by using the idea of randomization. Consider the non-square polynomial system <tt>F:=[ x^2-1, xy-1, x^2-x ]</tt>. After randomization this system will be converted into a  system <tt>G := [ x^2-1+a(x^2-x), xy-1+b(x^2-x) ]</tt>, where a and b are complex numbers having absolute value near one. The system G is a randomization of system F. Sometimes the system G may have more solutions than F. This function first randomizes the given system to make it square and then call HOM4PS to solve it. This function and the function <ref>ApCoCoA-1:Hom.SRSolve|Hom.SRSolve</ref> do the same job but with a different technique of randomization.  
  
The use of this function is two folds depending on the input that you provide in ApCoCoAServer during execution. After passing the command LRSolve(P) in CoCoA you need to interact with ApCoCoAServer. At this stage ApCoCoAServer asks you to enter 1 for the polyhedral homotopy and 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 nonhomogeneous.
+
This functions provides two different kinds of computation depending on the input that you provide in ApCoCoAServer during execution. After passing the command <tt>Hom.LRSolve(P,HomTyp)</tt> in ApCoCoA you need to interact with ApCoCoAServer. At this stage ApCoCoAServer asks you to enter 1 for the polyhedral homotopy and 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 29: Line 31:
 
   x[1]^2 - x[1]  
 
   x[1]^2 - x[1]  
 
];
 
];
 +
HomTyp:=1;
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Hom.LRSolve(P);
+
Hom.LRSolve(P,HomTyp);
  
 
-- Now you have to interact with ApCoCoAServer
 
-- Now you have to interact with ApCoCoAServer
Line 69: Line 72:
 
Use QQ[x[1..2]];           
 
Use QQ[x[1..2]];           
 
P := [x[1]^2-1, x[1]x[2]-1,x[1]^2-x[1]];
 
P := [x[1]^2-1, x[1]x[2]-1,x[1]^2-x[1]];
 +
HomTyp:=1;
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Hom.LRSolve(P);
+
Hom.LRSolve(P,HomTyp);
  
 
-- Now you have to interact with ApCoCoAServer
 
-- Now you have to interact with ApCoCoAServer
Line 100: Line 104:
  
 
<seealso>
 
<seealso>
  <see>Introduction to CoCoAServer</see>
+
  <see>ApCoCoA-1:Introduction to CoCoAServer|Introduction to CoCoAServer</see>
  <see>Hom.HSolve</see>
+
  <see>ApCoCoA-1:Hom.HSolve|Hom.HSolve</see>
  <see>Hom.SRSolve</see>
+
  <see>ApCoCoA-1:Hom.SRSolve|Hom.SRSolve</see>
 
</seealso>
 
</seealso>
  
<key>hsolve</key>
+
<key>lrsolve</key>
<key>hom4ps.bsolve</key>
+
<key>hom.lrsolve</key>
 +
<key>hom4ps.lrsolve</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.LRSolve

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

Syntax

Hom.LRSolve(P:LIST,HomTyp:INT)

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 computes isolated solutions of a non-square polynomial system by using the idea of randomization. Consider the non-square polynomial system F:=[ x^2-1, xy-1, x^2-x ]. After randomization this system will be converted into a system G := [ x^2-1+a(x^2-x), xy-1+b(x^2-x) ], where a and b are complex numbers having absolute value near one. The system G is a randomization of system F. Sometimes the system G may have more solutions than F. This function first randomizes the given system to make it square and then call HOM4PS to solve it. This function and the function Hom.SRSolve do the same job but with a different technique of randomization.

This functions provides two different kinds of computation depending on the input that you provide in ApCoCoAServer during execution. After passing the command Hom.LRSolve(P,HomTyp) in ApCoCoA you need to interact with ApCoCoAServer. At this stage ApCoCoAServer asks you to enter 1 for the polyhedral homotopy and 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 classical linear homotopy.
-- We want to find isolated solutions of the following system. 

Use QQ[x[1..3]];              
P := [
  x[1]x[2]x[3] - x[1]x[2]-15, 
  3x[1]x[2]-x[1]+5, 
  7x[1]x[3] - x[1],
  24x[1]x[2]+x[3] - 3x[1]x[3] - 1, 
  x[1]^2 - x[1] 
];
HomTyp:=1;

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

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

----------------------------------------
[
 [[9455327382203569/5000000000000000, -25208009777282481/10000000000000000],
  [13172347071045859/1000000000000000000, 780259255441451/10000000000000000],
  [50662103933981573/100000000000000000, 24894084616179979/50000000000000000]],
 [[94045825811783779/10000000000000000000, -18561325122258089/500000000000000000],
  [-11252856171103929/500000000000000, 53756347909614881/10000000000000000],
  [43866568184785617/10000000000000000, -970984718484509/40000000000000]],
 [[23564339009933287/1000000000000000000, 37422202697036111/1000000000000000000],
  [-20929334925895049/1000000000000000, -24991129623196171/2500000000000000],
  [26847721395327557/10000000000000000, 20456859352398073/1000000000000000]],
 [[-5340666810400797/10000000000000000, 7138058708108771/2500000000000000],
  [157412137424673/4000000000000000, -15131835631465503/250000000000000000],
  [45533206002984217/1000000000000000000, -67237130550938307/100000000000000000]],
 [[2223557602823067/10000000000000, -19326230622413977/250000000000000],
  [-15392736087963673/2000000000000000, 18511778667155307/200000000000000000],
  [-25906948948013323/1000000000000000, 3338667600178357/50000000000000]]
]


-- The smallest list represents a complex number.


Example

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

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

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

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

----------------------------------------
[
[[-9143436298249491/20000000000000000, 9937657539108147/50000000000000000],
 [-24282046571107613/50000000000000000, 18641461485865229/100000000000000000]],
 [[1, 0], [1, 0]]
]



-- The smallest list represents a complex number. For example above system has 2 solutions the second solution is [[1, 0], [1, 0]] 
-- and we read it as x=2+0i, y=1+0i. Since imaginary part is zero therefore its a real solution. 



See also

Introduction to CoCoAServer

Hom.HSolve

Hom.SRSolve