[Trilinos-Users] a request

David Day dmday at sandia.gov
Tue Nov 4 09:32:43 MST 2008

Dear Jules Gilbert,
Do you mean that you wish to determine a matrix with specified row and
column sums?  You don't need Trilinos for that.

Let e denote the m column vector of ones and let apostrophe denote
transposition.  One solution is 

A = x e' + e y' + a e e' 

where x and y are vectors orthogonal to e, and a is a scalar.  The
scalar a is the sum of the row sums, or the sum of the column sums
(which must coincide).  Just read off x and y from 

x = (A- a e e') (e/m),  y = (A'- a e e') (e/m)
--David Day

On Mon, 2008-11-03 at 20:19 -0700, Jules Gilbert wrote:
> Hi;  I've been quiet, but subscribed to the Trilinos group for some time.
> Now I have a question.  I have an M * M matrix.  (Always a matrix,
> never merely rectangular.)  I have 2*M values, the sums along the
> length and width of the edges.
> I realize that depending on the size of M, such a system may be
> seriously underdetermined.  (Only M=2 is exactly determined.)  I want
> to produce code, in C, that I can use to best approximate the values
> of each of the M*M cells.
> Please email me;  I am just.stocks at gmail.com
> And thank you.
> --jg
> _______________________________________________
> Trilinos-Users mailing list
> Trilinos-Users at software.sandia.gov
> http://software.sandia.gov/mailman/listinfo/trilinos-users

More information about the Trilinos-Users mailing list