Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add functionality for counting, generating, and manipulating non-negative integer matrices #13238

Closed
saliola opened this issue Jul 12, 2012 · 2 comments

Comments

@saliola
Copy link

saliola commented Jul 12, 2012

Counting, generating, and manipulating non-negative integer matrices with
prescribed row sums and column sums.

    An *integer matrix* `m` with column sums `c := (c_1,...,c_k)` and row
    sums `l := (l_1,...,l_n)` where `c_1+...+c_k` is equal to `l_1+...+l_n`,
    is a `n \times k` matrix `m = (m_{i,j})` such that
    `m_{1,j}+\dots+m_{n,j} = c_j`, for all `j` and
    `m_{i,1}+\dots+m_{i,k} = l_i`, for all `i`.

    EXAMPLES:

    There are `6` integer matrices with row sums `[3,2,2]` and column sums
    `[2,5]`::

        sage: from sage.combinat.integer_matrices import IntegerMatrices
        sage: IM = IntegerMatrices([3,2,2], [2,5]); IM
        Non-negative integer matrices with row sums [3, 2, 2] and column sums [2, 5]
        sage: IM.list()
        [
        [2 1]  [1 2]  [1 2]  [0 3]  [0 3]  [0 3]
        [0 2]  [1 1]  [0 2]  [2 0]  [1 1]  [0 2]
        [0 2], [0 2], [1 1], [0 2], [1 1], [2 0]
        ]
        sage: IM.cardinality()
        6

CC: @sagetrac-chrisjamesberg

Component: combinatorics

Keywords: sd40, ncsf

Author: Franco Saliola

Reviewer: Chris Berg

Merged: sage-5.3.beta0

Issue created by migration from https://trac.sagemath.org/ticket/13238

@saliola saliola added this to the sage-5.3 milestone Jul 12, 2012
@saliola saliola changed the title Counting, generating, and manipulating non-negative integer matrices add functionality for counting, generating, and manipulating non-negative integer matrices Jul 12, 2012
@sagetrac-chrisjamesberg
Copy link
Mannequin

comment:3

Attachment: trac_13238-integer_matrices-fs.patch.gz

@jdemeyer
Copy link

jdemeyer commented Aug 1, 2012

Merged: sage-5.3.beta0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants