MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

random matrix from row and column sums


Is there an efficient method in Mathematica to generate random tables
of nonnegative integers from a list of row sums and a list of column
sums?

For example for row sums of {7,3,2} and column sums of {2,9,1} the
following two tables satisfy the constraints:

{{2, 5, 0}, {0, 2, 1}, {0, 2, 0}}
and

{{1, 6, 0}, {1, 2, 0}, {0, 1, 1}}

Thanks


  • Prev by Date: Equation exporting
  • Next by Date: Calling windows programs
  • Previous by thread: Equation exporting
  • Next by thread: Re: random matrix from row and column sums