Package sage :: Package combinat :: Module alternating_sign_matrix
[hide private]
[frames] | no frames]

Module alternating_sign_matrix

source code


Alternating Sign Matrices



Classes [hide private]
  AlternatingSignMatrices_n
  ContreTableaux_n
  TruncatedStaircases_nlastcolumn
Functions [hide private]
 
from_contre_tableau(comps)
Returns an alternating sign matrix from a contretableaux.
source code
 
AlternatingSignMatrices(n)
Returns the combinatorial class of alternating sign matrices of size n.
source code
 
ContreTableaux(n)
Returns the combinatorial class of contre tableaux of size n.
source code
 
_next_column_iterator(previous_column, height, i=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Returns a generator for all columbs of height height...
source code
 
_previous_column_iterator(column, height, max_value)
TESTS:...
source code
 
TruncatedStaircases(n, last_column)
Returns the combinatorial class of truncated staircases of size n with last column last_column.
source code
Function Details [hide private]

from_contre_tableau(comps)

source code 

Returns an alternating sign matrix from a contretableaux.

TESTS:
    sage: import sage.combinat.alternating_sign_matrix as asm
    sage: asm.from_contre_tableau([[1, 2, 3], [1, 2], [1]])
    [0 0 1]
    [0 1 0]
    [1 0 0]
    sage: asm.from_contre_tableau([[1, 2, 3], [2, 3], [3]])
    [1 0 0]
    [0 1 0]
    [0 0 1]

AlternatingSignMatrices(n)

source code 

    Returns the combinatorial class of alternating sign matrices of
    size n.

    EXAMPLES:
        sage: a2 = AlternatingSignMatrices(2); a2
        Alternating sign matrices of size 2
        sage: for a in a2: print a, "-
"
        [0 1]
        [1 0] 
        -
        [1 0]
        [0 1]
        -
    

ContreTableaux(n)

source code 

Returns the combinatorial class of contre tableaux of size n.

EXAMPLES:
    sage: ct4 = ContreTableaux(4); ct4
    Contre tableaux of size 4
    sage: ct4.count()
    42
    sage: ct4.first()
    [[1, 2, 3, 4], [1, 2, 3], [1, 2], [1]]
    sage: ct4.last()
    [[1, 2, 3, 4], [2, 3, 4], [3, 4], [4]]
    sage: ct4.random_element()
    [[1, 2, 3, 4], [1, 2, 3], [1, 3], [3]]

_next_column_iterator(previous_column, height, i=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

Returns a generator for all columbs of height height
properly filled from row 1 to i

TESTS:
    sage: import sage.combinat.alternating_sign_matrix as asm
    sage: list(asm._next_column_iterator([1], 0))
    [[]]
    sage: list(asm._next_column_iterator([1,5],1))
    [[1], [2], [3], [4], [5]]
    sage: list(asm._next_column_iterator([1,4,5],2))
    [[1, 4], [1, 5], [2, 4], [2, 5], [3, 4], [3, 5], [4, 5]]

_previous_column_iterator(column, height, max_value)

source code 

TESTS:
    sage: import sage.combinat.alternating_sign_matrix as asm
    sage: list(asm._previous_column_iterator([2,3], 3, 4))
    [[1, 2, 3], [1, 2, 4], [1, 3, 4], [2, 3, 4]]

TruncatedStaircases(n, last_column)

source code 

Returns the combinatorial class of truncated staircases
of size n with last column last_column.

EXAMPLES:
    sage: t4 = TruncatedStaircases(4, [2,3]); t4
    Truncated staircases of size 4 with last column [2, 3]
    sage: t4.count()
    4
    sage: t4.first()
    [[4, 3, 2, 1], [3, 2, 1], [3, 2]]
    sage: t4.list()
    [[[4, 3, 2, 1], [3, 2, 1], [3, 2]], [[4, 3, 2, 1], [4, 2, 1], [3, 2]], [[4, 3, 2, 1], [4, 3, 1], [3, 2]], [[4, 3, 2, 1], [4, 3, 2], [3, 2]]]