Re: Random double-stochastic matrices
- From: ellieandrogerxyzzy@xxxxxxxxxxxxxxxxxxxxxx (Roger Stafford)
- Date: Mon, 11 Sep 2006 16:56:27 GMT
In article <ef40721.-1@xxxxxxxxxxxxxxxxxxxxxxx>, "Itamar Cohen"
<ofanan@xxxxxxxxxxxxxxxxx> wrote:
Does anybody know a way to randomly generate double-stochastic matrix--------------------------
(i.e. a matrix, in which the sum of each column is exactly 1; and the
sum of each row is exactly 1). Each entry in the matrix should be
within [0,1].
Thanks a lot in advance.
Some questions.
1) Why do you bother to require that each matrix element be less than or
equal to 1, when that is implicit in the fact that each element is
non-negative and has to be a part of a sum which is 1?
2) It is also implicit in this problem that the matrix must be square.
Is that what you have in mind?
3) What kind of random distribution are you seeking? An immediate
solution comes to mind by initially setting all elements to 1/n in an n x
n matrix, which satisfies the requirements. Then taking a random location
(i,j), a) one increments that element by a random amount delta, b) all
other elements in the same row or column as (i,j) are incremented by
-delta/(n-1), and c) all other elements in the matrix are incremented by
+delta/(n-1)^2. This would leave all row and columns with unchanged
sums. This whole process is repeated a great many times, producing a
rather "random" matrix, but always of course taking care not to make any
element negative. The trouble is that doing this may not produce the kind
of random distribution you are after.
Roger Stafford
.
- Follow-Ups:
- Re: Random double-stochastic matrices
- From: Itamar Cohen
- Re: Random double-stochastic matrices
- References:
- Random double-stochastic matrices
- From: Itamar Cohen
- Random double-stochastic matrices
- Prev by Date: Equivalent to subplot for Histograms
- Next by Date: Re: Slow rsdec
- Previous by thread: Random double-stochastic matrices
- Next by thread: Re: Random double-stochastic matrices
- Index(es):
Relevant Pages
|