Number of matrices with entries in $0,1,2$ with prescribed row and column sums

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I want to count the number of $ell_1timesell_2$ matrices with entries in $0,1,2$ and prescribed sum of entries for each row and column.



For example, there are three $2times 2$ matrices with row and column sums equal to 2:
$$beginpmatrix2&0\0&2endpmatrix,beginpmatrix0&2\2&0endpmatrix,beginpmatrix1&1\1&1endpmatrix$$



There are 21 $3times 3$ matrices with row and column sums equal to 2 - not listed here, but you can check in GAP using the following command:



gap> R:=Filtered(Tuples([0,1,2],3),r->Sum(r)=2);
gap> Q:=Filtered(Tuples(R,3),M->ForAll(TransposedMat(M),r->Sum(r)=2));
gap> Size(Q);


I also found a paper by Wang and Zhang (1997) for the number of matrices with entries in $0,1$ with prescribed row and column sums, so I am wondering how I can extend it to $0,1,2$.







share|cite|improve this question
























    up vote
    2
    down vote

    favorite












    I want to count the number of $ell_1timesell_2$ matrices with entries in $0,1,2$ and prescribed sum of entries for each row and column.



    For example, there are three $2times 2$ matrices with row and column sums equal to 2:
    $$beginpmatrix2&0\0&2endpmatrix,beginpmatrix0&2\2&0endpmatrix,beginpmatrix1&1\1&1endpmatrix$$



    There are 21 $3times 3$ matrices with row and column sums equal to 2 - not listed here, but you can check in GAP using the following command:



    gap> R:=Filtered(Tuples([0,1,2],3),r->Sum(r)=2);
    gap> Q:=Filtered(Tuples(R,3),M->ForAll(TransposedMat(M),r->Sum(r)=2));
    gap> Size(Q);


    I also found a paper by Wang and Zhang (1997) for the number of matrices with entries in $0,1$ with prescribed row and column sums, so I am wondering how I can extend it to $0,1,2$.







    share|cite|improve this question






















      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I want to count the number of $ell_1timesell_2$ matrices with entries in $0,1,2$ and prescribed sum of entries for each row and column.



      For example, there are three $2times 2$ matrices with row and column sums equal to 2:
      $$beginpmatrix2&0\0&2endpmatrix,beginpmatrix0&2\2&0endpmatrix,beginpmatrix1&1\1&1endpmatrix$$



      There are 21 $3times 3$ matrices with row and column sums equal to 2 - not listed here, but you can check in GAP using the following command:



      gap> R:=Filtered(Tuples([0,1,2],3),r->Sum(r)=2);
      gap> Q:=Filtered(Tuples(R,3),M->ForAll(TransposedMat(M),r->Sum(r)=2));
      gap> Size(Q);


      I also found a paper by Wang and Zhang (1997) for the number of matrices with entries in $0,1$ with prescribed row and column sums, so I am wondering how I can extend it to $0,1,2$.







      share|cite|improve this question












      I want to count the number of $ell_1timesell_2$ matrices with entries in $0,1,2$ and prescribed sum of entries for each row and column.



      For example, there are three $2times 2$ matrices with row and column sums equal to 2:
      $$beginpmatrix2&0\0&2endpmatrix,beginpmatrix0&2\2&0endpmatrix,beginpmatrix1&1\1&1endpmatrix$$



      There are 21 $3times 3$ matrices with row and column sums equal to 2 - not listed here, but you can check in GAP using the following command:



      gap> R:=Filtered(Tuples([0,1,2],3),r->Sum(r)=2);
      gap> Q:=Filtered(Tuples(R,3),M->ForAll(TransposedMat(M),r->Sum(r)=2));
      gap> Size(Q);


      I also found a paper by Wang and Zhang (1997) for the number of matrices with entries in $0,1$ with prescribed row and column sums, so I am wondering how I can extend it to $0,1,2$.









      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Aug 22 at 11:28









      Alvin

      564




      564

























          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%2f2890937%2fnumber-of-matrices-with-entries-in-0-1-2-with-prescribed-row-and-column-su%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%2f2890937%2fnumber-of-matrices-with-entries-in-0-1-2-with-prescribed-row-and-column-su%23new-answer', 'question_page');

          );

          Post as a guest













































































          這個網誌中的熱門文章

          How to combine Bézier curves to a surface?

          Mutual Information Always Non-negative

          Why am i infinitely getting the same tweet with the Twitter Search API?