-1
$\begingroup$

How can we randomly generate matrix $A \in \mathbb{R}^{n \times m}_{\geq 0}$ that satisfies

$A 1_n = m1$ and $A^T 1_m = n1$.

$\endgroup$
2
  • 3
    $\begingroup$ You should specify the distribution of the randomly generated matrices. I think that you mean equidistributed in some sense. $\endgroup$ Commented Feb 8, 2022 at 12:43
  • 2
    $\begingroup$ This is generalization to the question mathoverflow.net/questions/73805/…, which is open. $\endgroup$ Commented Feb 9, 2022 at 6:28

2 Answers 2

5
$\begingroup$

I don't know if this is what you want, but here are two differnet ways:

  1. In the case $m=n$: Generate a bunch of random permutation matrices $A_i$ and take a random linear combination $\sum_i \alpha_i A_i$ with $\sum \alpha_i=n$ and $\alpha_i\geq 0$.

  2. Generate a random $m\times n$ matrix and use the Sinkhorn scaling algorithm the equalize row and column sums to the desired values.

$\endgroup$
6
  • $\begingroup$ With $\alpha_i\ge0$. $\endgroup$ Commented Feb 8, 2022 at 22:46
  • $\begingroup$ This is not going to be uniform. $\endgroup$ Commented Feb 9, 2022 at 6:30
  • $\begingroup$ Thanks @GerryMyerson! $\endgroup$ Commented Feb 9, 2022 at 8:48
  • $\begingroup$ @AmritanshuPrasad Sure - but there was no indication of any distribution given and my constructions are for sure random (I have no idea what kind of distribution then give…). $\endgroup$ Commented Feb 9, 2022 at 8:49
  • $\begingroup$ The other answer by Brenday McKay is quite relevant and related to my first point: You want to sample from a generalized Birkhoff polytope: en.wikipedia.org/wiki/Doubly_stochastic_matrix#Generalisations $\endgroup$ Commented Feb 9, 2022 at 8:51
2
$\begingroup$

This is an example of generating a random point in a polytope. There is some work on that general problem, but I don't know if it would be practical for your special case. For example:

Rubin, Generating random points in a polytope, Communications in Statistics - Simulation and Computation, 13 (1984) 375-396.

Probably searching forward and backwards from that will uncover other relevant articles.

$\endgroup$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.