Computing all binary matrices with given row and column sum
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
Given $a,b in mathbbN$, and $r,c in mathbbN$. I want to
construct all matrices $A in 0,1^a times b$ such that each row of $A$
contains exactly $r$ ones and each column of $A$ contains exactly $c$ ones. Generally $a neq b$ and $r neq c$.
If it makes constructing these matrices $A$ any simpler, one can also assume that each row and column in $Acdot A^T$ appears the same number of times.
My first thought was that one can set the first row and column of $A$ without loss of generality and then compute all possible permutations of the first row and column and combine them together. Most of the time this does not yield a matrix with the desired properties because one does not use the information about the rows and column simultaneously.
Does anyone have any ideas? One can further assume that $a+b leq 30$ holds.
combinatorics matrices
add a comment |Â
up vote
2
down vote
favorite
Given $a,b in mathbbN$, and $r,c in mathbbN$. I want to
construct all matrices $A in 0,1^a times b$ such that each row of $A$
contains exactly $r$ ones and each column of $A$ contains exactly $c$ ones. Generally $a neq b$ and $r neq c$.
If it makes constructing these matrices $A$ any simpler, one can also assume that each row and column in $Acdot A^T$ appears the same number of times.
My first thought was that one can set the first row and column of $A$ without loss of generality and then compute all possible permutations of the first row and column and combine them together. Most of the time this does not yield a matrix with the desired properties because one does not use the information about the rows and column simultaneously.
Does anyone have any ideas? One can further assume that $a+b leq 30$ holds.
combinatorics matrices
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
Given $a,b in mathbbN$, and $r,c in mathbbN$. I want to
construct all matrices $A in 0,1^a times b$ such that each row of $A$
contains exactly $r$ ones and each column of $A$ contains exactly $c$ ones. Generally $a neq b$ and $r neq c$.
If it makes constructing these matrices $A$ any simpler, one can also assume that each row and column in $Acdot A^T$ appears the same number of times.
My first thought was that one can set the first row and column of $A$ without loss of generality and then compute all possible permutations of the first row and column and combine them together. Most of the time this does not yield a matrix with the desired properties because one does not use the information about the rows and column simultaneously.
Does anyone have any ideas? One can further assume that $a+b leq 30$ holds.
combinatorics matrices
Given $a,b in mathbbN$, and $r,c in mathbbN$. I want to
construct all matrices $A in 0,1^a times b$ such that each row of $A$
contains exactly $r$ ones and each column of $A$ contains exactly $c$ ones. Generally $a neq b$ and $r neq c$.
If it makes constructing these matrices $A$ any simpler, one can also assume that each row and column in $Acdot A^T$ appears the same number of times.
My first thought was that one can set the first row and column of $A$ without loss of generality and then compute all possible permutations of the first row and column and combine them together. Most of the time this does not yield a matrix with the desired properties because one does not use the information about the rows and column simultaneously.
Does anyone have any ideas? One can further assume that $a+b leq 30$ holds.
combinatorics matrices
asked Jul 16 at 15:41
Dominik B.
887
887
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2853517%2fcomputing-all-binary-matrices-with-given-row-and-column-sum%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password