Singular
https://www.singular.uni-kl.de/forum/

Finding parameters
https://www.singular.uni-kl.de/forum/viewtopic.php?f=10&t=1886
Page 1 of 2

Author:  Michele T [ Mon Nov 08, 2010 2:45 pm ]
Post subject:  Finding parameters

Is there a way to solve the following problem?
Given a nxn A=(A_ij) matrix (for example n=3,4...) where A-ij is a
polynomial of degree one in X_1, ..., X_n, and given a n-vector
v=(B_11*X_1+...+B_1n*X_n, ..., B_n1*X_1+...+B_nn*X_n)^t where B_ij are
parameters, is it possible to find value for B_ij in such way that the
vector v belongs to the vector space spanned by the columns of A?
thank you.
best
Michele

Author:  malex [ Tue Nov 09, 2010 4:52 pm ]
Post subject:  Re: Finding parameters

Dear Michele,

Could you please explain a bit more:

What is the ground field?
Are A-ij homogeneous?
Do you have a simple (but non-trivial) example of such an input and the expected result?

Regards,
Oleksandr

Author:  Michele T [ Tue Nov 09, 2010 5:00 pm ]
Post subject:  Re: Finding parameters

The ground field is C. and the matrix A has entries that are homogeneous polynomials of degree 1.
one example is the following:
Let A be the matrix with rows (x.0) and (0,y) and let v=(ay,bx)^t and I know that the answer is a=b=0.
is it more clear?
thank you!

Author:  malex [ Tue Nov 09, 2010 5:20 pm ]
Post subject:  Re: Finding parameters

Thanks.

What about some non-trivial examples?

Regards,
Oleksandr

Author:  Michele T [ Tue Nov 09, 2010 5:47 pm ]
Post subject:  Re: Finding parameters

other example:
Let A= | 2y x 0 |
| -z 0 y |
| 0 -z 2z |

and V= | xa_1+2xa_5-2ya_4+2yb_5+zb_4-zc_1+2zc_5 |
| 2xa_2-xa_6-2ya_5+yb_2-yb_6+zb_5-zc_6 |
| 3xa_3-2ya_6+2yb_3+zb_6+zc_3 |

where I have parameters a_1..a_6,b_1..b_6,c_1..c_6.
the fact is that I'm able after long time to compute it by hands but if the matrix become bigger is too long....
thank you
Michele

Author:  malex [ Tue Nov 09, 2010 7:24 pm ]
Post subject:  Re: Finding parameters

Hi,

I am not sure about your vector 'v':

In the 1st example the vector 'v' is NOT of the form
Code:
(B_11*X_1+...+B_1n*X_n, ..., B_n1*X_1+...+B_nn*X_n)^t

It is also the case in your second example.

From your initial question it seems that your are looking for the k-basis of the space spanned by the columns of the matrix 'A'
(which seems to be an easy linear algebra problem), while in your examples you look for a subspace in it...

Please clarify the use of 'v'.

Regards,
O.

Author:  Michele T [ Wed Nov 10, 2010 10:53 am ]
Post subject:  Re: Finding parameters

Hi,
you are right, my first post was badly written....
so v=(B_11*X_1+...+B_1n*X_n, ..., B_n1*X_1+...+B_nn*X_n)^t but then I have some restriction on the B_ij, like some of them are zero.....
thank you
Michele

Author:  malex [ Wed Nov 10, 2010 1:48 pm ]
Post subject:  Re: Finding parameters

Hi,

let's consider the 1st problem (no restrictions):
Quote:
v=(B_11*X_1+...+B_1n*X_n, ..., B_n1*X_1+...+B_nn*X_n)^t


Code:
option(redTail); option(redSB); LIB "matrix.lib"; // some init
ring R = 0,(x,y,z), dp; // common ring for both examples
matrix A[2][2] = x,0,   0,y; // 1st example
matrix B[3][3] = 2y, x, 0,     -z,0,y,    0, -z,2z; // 2nd example

// Let's COMPUTE column bases:
print( gauss_col(B) );
// x,0,
// 0,y
print( gauss_col(A) );
// -2*y,2*x,-x,
//    z,  y, 0,
//    0,  0, z 


Which means that the spaces spanned by the columns of the matrices A or B look as follows:

1st example: a (x, 0)^t + b (0,y)^t, for any a,b
2nd example: a (-2y,z,0)^t + b (2x,y,0)^t + c (-x,0,z), for any a,b,c

those a,b,c are your free parameters...

Do you agree with these results?

O.

ps: you can use gauss_col since input is homogeneous of the same degree!

Author:  Michele T [ Wed Nov 10, 2010 4:04 pm ]
Post subject:  Re: Finding parameters

yes, I agree also because I already know that the column were linearly independent over C[x,y,z].
thank you again.
best
Michele

Author:  malex [ Wed Nov 10, 2010 5:10 pm ]
Post subject:  Re: Finding parameters

fine. so what about 'v'?

O.

Author:  Michele T [ Wed Nov 10, 2010 6:05 pm ]
Post subject:  Re: Finding parameters

what do you mean? I'm trying to understand if there is a way to compute values for the parameters in v such that it belongs to the vector spaces spanned by the columns of A.

Author:  malex [ Thu Nov 11, 2010 2:06 am ]
Post subject:  Re: Finding parameters

after computing a K-basis of the space spanned by columns from A (already explained above) you intersect it with the space given by your conditions (seems to be encoded by the vector ''v'').

I think that your task reduces to a simple linear algebra problem if you switch to the following K-basis:
{ var(i) * gen(j) | 1<=i<=nvars(basering), 1<= j <= nrows(A) } (e.g. using ''jacob'')

ps: do you know about the Gauss algorithm?

O.

Author:  Michele T [ Thu Nov 11, 2010 11:08 am ]
Post subject:  Re: Finding parameters

yes, I know what is the Gauss algorithm.
why do i need to change to such bases?
sorry but i'm not very good at computations...
thank you.
best
Michele

Author:  malex [ Thu Nov 11, 2010 1:51 pm ]
Post subject:  Re: Finding parameters

After switching from vectors over k[x..z] to vectors in k^{n * nrows(A)}, -
it is already linear algebra and you use Gauss to intersect two K-vector spaces.

one can do that directly over k[x..z] but i think it's better to understand what is actually going on.

just start with your 1st example:

you wanted to intersect <(x,0)^t, (0,y)^t>_k with <(y,0)^t, (0,x)^t>_k:

Code:
> ring R = 0,(x,y), dp; matrix A[2][2] = x, 0, 0, y; print(A);
x,0,
0,y
> matrix v[2][2] = y, 0, 0, x; print(v);
y,0,
0,x

Now switch to the basis {x*gen(1) y*gen(1) x*gen(2) y*gen(2)}:
Code:
> print(transpose(jacob(A)));
1,0,
0,0,
0,0,
0,1
> print(transpose(jacob(v)));
0,0,
0,1,
1,0,
0,0

so you just intersect <(1,0,0,0)^t, (0,0,0,1)^t>_k with <(0,0,1,0)^t, (0,1,0,0)^t>_k:

Code:
> LIB "matrix.lib"; print( gauss_col (transpose(jacob(A)) + transpose(jacob(-v))) );
1,0,0,0,
0,1,0,0,
0,0,1,0,
0,0,0,1


now you simply read off relations on parameters:
in this example they all are zero, i.e. only the zero point
(btw, zero is ALWAYS a solution for your problem)

do you understand?

O.

Author:  Michele T [ Thu Nov 11, 2010 4:52 pm ]
Post subject:  Re: Finding parameters

I think I do, thank you very much.
just to be sure just look at the second example:
This is what I did:
Code:
> LIB "matrix.lib";
> ring R = 0,(x,y,z), dp;
> matrix B[3][3] = 2y, x, 0,     -z,0,y,    0, -z,2z;
> matrix v[3][14]= x,0,0,-2y,2x,0,0,0,z,2y,0,-z,0,2z,  0,2x,0,0,-2y,-x,y,0,0,z,y,0,0,0,   0,0,3x,0,0,-2y,0,2y,0,0,z,0,z,0;
> print(v);                                                                                                               
x,0, 0, -2y,2x, 0,  0,0, z,2y,0,-z,0,2z,
0,2x,0, 0,  -2y,-x, y,0, 0,z, y,0, 0,0,
0,0, 3x,0,  0,  -2y,0,2y,0,0, z,0, z,0 
> print( gauss_col (transpose(jacob(B)) + transpose(jacob(-v))) );
1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0

so does this means that the only solution is the zero one?Thank you again!!

Page 1 of 2 All times are UTC + 1 hour [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/