Computing all binary matrices with given row and column sum

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|cite|improve this question























    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.







    share|cite|improve this question





















      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.







      share|cite|improve this question












      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.









      share|cite|improve this question










      share|cite|improve this question




      share|cite|improve this question









      asked Jul 16 at 15:41









      Dominik B.

      887




      887

























          active

          oldest

          votes











          Your Answer




          StackExchange.ifUsing("editor", function ()
          return StackExchange.using("mathjaxEditing", function ()
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          );
          );
          , "mathjax-editing");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "69"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Comments

          Popular posts from this blog

          What is the equation of a 3D cone with generalised tilt?

          Color the edges and diagonals of a regular polygon

          Relationship between determinant of matrix and determinant of adjoint?