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



omg! Was too sleepy and typed 2x2. I can't believe it!
Actually I meant a 2 dimensional matrix. Is it still trivial?
I apologize for the mistake.

Regards,
M

"Mistakes committed on Usenet will come back haunt forever"




websnarf@xxxxxxxxx wrote:
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: 12 LED resistance circuit help
    ... >> no reason for me to apologize to you for flaming you about that. ... >cussing me out after I pointed out your mistake. ... >>>The simple fact remains that one LED WILL DISIPATE MORE POWER THAN ... of two LEDs in series, one with Vfmin and the other with Vfmax with ...
    (sci.electronics.basics)
  • Re: 12 LED resistance circuit help
    ... I made the mistake of figuring that you actually posted stuff that you ... >>> no reason for me to apologize to you for flaming you about that. ... > of two LEDs in series, one with Vfmin and the other with Vfmax with ... >>> question since, trick question or not, it certainly woke you up ...
    (sci.electronics.basics)
  • Re: NOT FOR PUBLIC DISTRIBUTION _- FOR YOUR INFORMATION ONLY
    ... Subject: trashing bodhi ... > and you never apologized for that mistake either. ... Why should i apologize when i didn't send you any threating e-mails?? ...
    (alt.gathering.rainbow)
  • Re: OT Herring
    ... I suggested you should be a man and apologize for your ... >> 'mistake' that you turned into a large fabrication with your fake web pages. ... personal attacks to starting threads specifically to frame personal ...
    (rec.boats)
  • Re: K4YZ Lying So Prolifically He Cant Keep His Own Stories Straight
    ... > Mark C Morgan uttered a lie. ... ctuing a stevie misderection ... >>> is NOT an active callsign, ergo there's no one to apologize to. ... no I am suggesting you apologize for making the mistake, ...
    (rec.radio.amateur.policy)