Re: Filling a 2x2 array with random numbers such that...



manishwiz@xxxxxxxxx wrote:
I need to RANDOMLY fill a 2x2 matrix such that the sum of each of rows
is same and the sum of each of the columns is same and these two sums
need not be same. the two sums shall be given.

i.e., a+b=c+d and a+c=b+d. From what I can tell, this solves to a=d
and b=c. So it seems fairly straightforward, to pick two random
numbers for the two entries in the first row, then reverse and copy
them to the second row.

--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/

.



Relevant Pages

  • Re: Sum challenge
    ... Christopher Weaver wrote... ... >I would like to create a formula in column A that sums the values in ... the first row in column B that is not blank. ... Prev by Date: ...
    (microsoft.public.excel)
  • Re: Filling a 2x2 array with random numbers such that...
    ... I apologize for the mistake. ... the two sums shall be given. ... numbers for the two entries in the first row, ...
    (comp.programming)