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

From ApCoCoAWiki
(New page: <command> <title>Hom.HSolve</title> <short_description>Solves a zero dimensional square homogeneous or non-homogeneous polynomial system of equations.</short_description> <syntax> Hom.HSol...)
 
Line 1: Line 1:
 
<command>
 
<command>
<title>Hom.HSolve</title>
+
<title>Hom.SRSolve</title>
<short_description>Solves a zero dimensional square 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.HSolve(P:LIST)
+
Hom.SRSolve(P: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/>
The use of this function is two folds depending on the input that you provide in ApCoCoAServer during execution. After passing the command HSolve(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 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+as, xy-1+bs, x^2+x+cs ], where a, b and c are complex numbers having magnitude near one and s is a slack variable. 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 LRSovle(P) 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 SRSolve(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.
 
<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>
Line 16: Line 18:
  
 
<example>
 
<example>
-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
+
-- An example of zero dimensional Non-Homogeneous Solving using the classical linear homotopy.
-- We want to solve zero dimensional non-homogeneous system x^2+y^2-5=0, xy-2=0.  
+
-- We want to find isolated solutions of the following system.  
  
Use S ::= QQ[x,y];               
+
Use QQ[x[1..3]];               
P := [x^2+y^2-5, xy-2];
+
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]
 +
];
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Hom.HSolve(P);
+
Hom.SRSolve(P);
  
 
-- Now you have to interact with ApCoCoAServer
 
-- Now you have to interact with ApCoCoAServer
 
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
 
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
-- If we enter 1 then the all finite solutions are:
+
-- Since we want to use the classical linear homotopy therefore we enter 2.
 +
-- The all finite solutions are:
  
 
----------------------------------------
 
----------------------------------------
 
[
 
[
[[2, 0], [1, 0]],
+
[[-2902316230611307/1250000000000000, -27857718907640603/10000000000000000],
  [[-1, 0], [-2, 0]],
+
  [-5674959881126967/500000000000000000, -8937804463608219/25000000000000000],
  [[-2, 0], [-1, 0]],
+
  [46724750476097837/100000000000000000, -38716232173770071/100000000000000000]],
  [[1, 0], [2, 0]]
+
  [[65920011696250427/1000000000000000, -1372011739419221/12500000000000],
 +
  [84785163919836641/10000000000000000, -10345947531705213/25000000000000000],
 +
  [12838340038652873/1000000000000000, 1179955721096759/156250000000000]],
 +
[[-11200479653149161/50000000000000000000, -1847541166671739/4000000000000000000],
 +
  [-398464307671313/250000000000, -83690324485203917/100000000000000],
 +
  [27034776057405041/100000000000000000, -16633293038412589/1000000000000000]],
 +
  [[1283479859536169/400000000000000, 226533750215299/80000000000000],
 +
  [-739601189373527/40000000000000000, 10474383104189437/50000000000000000],
 +
  [-4621056904224851/25000000000000000, 6394233590549897/25000000000000000]],
 +
  [[4510213996339667/12500000000000000000, 551766683622709/4000000000000000000],
 +
  [-26177318181795687/50000000000000, -3490003097264787/2000000000000],
 +
  [31612616513119707/10000000000000000, 21347082990880249/1000000000000000]]
 
]
 
]
  
 
+
-- The smallest list represents a complex number.
 
 
-- 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>
 
</example>
<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];
 
 
-- Then we compute the solution with
 
Hom.HSolve(M);
 
 
-- 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>
 
  
 
<example>
 
<example>
 
-- An example of zero dimensional Non-Homogeneous Solving using the polyhedral homotopy.
 
-- 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.  
+
-- 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]];           
 
Use QQ[x[1..2]];           
P := [x[1]^2-1, x[1]x[2]-1];
+
P := [x[1]^2-1, x[1]x[2]-1,x[1]^2-x[1]];
  
 
-- Then we compute the solution with
 
-- Then we compute the solution with
Hom.HSolve(P);
+
Hom.SRSolve(P);
  
 
-- Now you have to interact with ApCoCoAServer
 
-- Now you have to interact with ApCoCoAServer
 
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
 
-- Enter 1 for the polyhedral homotopy and 2 for the classical linear homotopy.
-- We enter 1 because we want to use polyhedral homotopy.
+
-- Since we want to use polyhedral homotopy therefore we enter 1.
 
-- The all finite solutions are:
 
-- The all finite solutions are:
  
 
----------------------------------------
 
----------------------------------------
 
[
 
[
  [[1, 0], [1, 0]],
+
  [[-51917361941691031/100000000000000000, -1846796377886887/4000000000000000],
  [[-1, 0], [-1, 0]]
+
  [-14765467180940843/10000000000000000, 23807586810196137/10000000000000000]],
 +
  [[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]]  
+
-- 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[1]=1+0i, x[2]=1+0i  
+
-- and we read it as x=2+0i, y=1+0i. Since imaginary part is zero therefore its a real solution.
  
 
</example>
 
</example>
Line 114: Line 99:
 
<seealso>
 
<seealso>
 
  <see>Introduction to CoCoAServer</see>
 
  <see>Introduction to CoCoAServer</see>
 +
<see>Hom.HSolve</see>
 
  <see>Hom.LRSolve</see>
 
  <see>Hom.LRSolve</see>
<see>Hom.SRSolve</see>
 
 
</seealso>
 
</seealso>
  

Revision as of 12:02, 22 July 2010

Hom.SRSolve

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

Syntax

Hom.SRSolve(P: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 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+as, xy-1+bs, x^2+x+cs ], where a, b and c are complex numbers having magnitude near one and s is a slack variable. 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 LRSovle(P) 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 SRSolve(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.

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

  • @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] 
];

-- Then we compute the solution with
Hom.SRSolve(P);

-- 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:

----------------------------------------
[
 [[-2902316230611307/1250000000000000, -27857718907640603/10000000000000000],
  [-5674959881126967/500000000000000000, -8937804463608219/25000000000000000],
  [46724750476097837/100000000000000000, -38716232173770071/100000000000000000]],
 [[65920011696250427/1000000000000000, -1372011739419221/12500000000000], 
  [84785163919836641/10000000000000000, -10345947531705213/25000000000000000],
  [12838340038652873/1000000000000000, 1179955721096759/156250000000000]],
 [[-11200479653149161/50000000000000000000, -1847541166671739/4000000000000000000],
  [-398464307671313/250000000000, -83690324485203917/100000000000000],
  [27034776057405041/100000000000000000, -16633293038412589/1000000000000000]],
 [[1283479859536169/400000000000000, 226533750215299/80000000000000],
  [-739601189373527/40000000000000000, 10474383104189437/50000000000000000],
  [-4621056904224851/25000000000000000, 6394233590549897/25000000000000000]],
 [[4510213996339667/12500000000000000000, 551766683622709/4000000000000000000],
  [-26177318181795687/50000000000000, -3490003097264787/2000000000000],
  [31612616513119707/10000000000000000, 21347082990880249/1000000000000000]]
]

-- 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]];

-- Then we compute the solution with
Hom.SRSolve(P);

-- 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:

----------------------------------------
[
 [[-51917361941691031/100000000000000000, -1846796377886887/4000000000000000],
  [-14765467180940843/10000000000000000, 23807586810196137/10000000000000000]],
 [[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.LRSolve