Identifier
Identifier
Values
[1] generating graphics... => 1
[2] generating graphics... => 1
[1,1] generating graphics... => 1
[3] generating graphics... => 1
[2,1] generating graphics... => 1
[1,1,1] generating graphics... => 1
[4] generating graphics... => 1
[3,1] generating graphics... => 1
[2,2] generating graphics... => 1
[2,1,1] generating graphics... => 1
[1,1,1,1] generating graphics... => 1
[5] generating graphics... => 1
[4,1] generating graphics... => 1
[3,2] generating graphics... => 1
[3,1,1] generating graphics... => 1
[2,2,1] generating graphics... => 1
[2,1,1,1] generating graphics... => 1
[1,1,1,1,1] generating graphics... => 1
[6] generating graphics... => 1
[5,1] generating graphics... => 1
[4,2] generating graphics... => 1
[4,1,1] generating graphics... => 1
[3,3] generating graphics... => 1
[3,2,1] generating graphics... => 2
[3,1,1,1] generating graphics... => 1
[2,2,2] generating graphics... => 1
[2,2,1,1] generating graphics... => 1
[2,1,1,1,1] generating graphics... => 1
[1,1,1,1,1,1] generating graphics... => 1
[7] generating graphics... => 1
[6,1] generating graphics... => 1
[5,2] generating graphics... => 1
[5,1,1] generating graphics... => 1
[4,3] generating graphics... => 1
[4,2,1] generating graphics... => 2
[4,1,1,1] generating graphics... => 1
[3,3,1] generating graphics... => 1
[3,2,2] generating graphics... => 1
[3,2,1,1] generating graphics... => 2
[3,1,1,1,1] generating graphics... => 1
[2,2,2,1] generating graphics... => 1
[2,2,1,1,1] generating graphics... => 1
[2,1,1,1,1,1] generating graphics... => 1
[1,1,1,1,1,1,1] generating graphics... => 1
[8] generating graphics... => 1
[7,1] generating graphics... => 1
[6,2] generating graphics... => 1
[6,1,1] generating graphics... => 1
[5,3] generating graphics... => 1
[5,2,1] generating graphics... => 2
[5,1,1,1] generating graphics... => 1
[4,4] generating graphics... => 1
[4,3,1] generating graphics... => 2
[4,2,2] generating graphics... => 3
[4,2,1,1] generating graphics... => 2
[4,1,1,1,1] generating graphics... => 1
[3,3,2] generating graphics... => 1
[3,3,1,1] generating graphics... => 3
[3,2,2,1] generating graphics... => 2
[3,2,1,1,1] generating graphics... => 2
[3,1,1,1,1,1] generating graphics... => 1
[2,2,2,2] generating graphics... => 1
[2,2,2,1,1] generating graphics... => 1
[2,2,1,1,1,1] generating graphics... => 1
[2,1,1,1,1,1,1] generating graphics... => 1
[1,1,1,1,1,1,1,1] generating graphics... => 1
[9] generating graphics... => 1
[8,1] generating graphics... => 1
[7,2] generating graphics... => 1
[7,1,1] generating graphics... => 1
[6,3] generating graphics... => 1
[6,2,1] generating graphics... => 2
[6,1,1,1] generating graphics... => 1
[5,4] generating graphics... => 1
[5,3,1] generating graphics... => 2
[5,2,2] generating graphics... => 3
[5,2,1,1] generating graphics... => 2
[5,1,1,1,1] generating graphics... => 1
[4,4,1] generating graphics... => 1
[4,3,2] generating graphics... => 2
[4,3,1,1] generating graphics... => 2
[4,2,2,1] generating graphics... => 2
[4,2,1,1,1] generating graphics... => 2
[4,1,1,1,1,1] generating graphics... => 1
[3,3,3] generating graphics... => 1
[3,3,2,1] generating graphics... => 2
[3,3,1,1,1] generating graphics... => 3
[3,2,2,2] generating graphics... => 1
[3,2,2,1,1] generating graphics... => 2
[3,2,1,1,1,1] generating graphics... => 2
[3,1,1,1,1,1,1] generating graphics... => 1
[2,2,2,2,1] generating graphics... => 1
[2,2,2,1,1,1] generating graphics... => 1
[2,2,1,1,1,1,1] generating graphics... => 1
[2,1,1,1,1,1,1,1] generating graphics... => 1
[1,1,1,1,1,1,1,1,1] generating graphics... => 1
[10] generating graphics... => 1
[9,1] generating graphics... => 1
[8,2] generating graphics... => 1
[8,1,1] generating graphics... => 1
[7,3] generating graphics... => 1
[7,2,1] generating graphics... => 2
[7,1,1,1] generating graphics... => 1
[6,4] generating graphics... => 1
[6,3,1] generating graphics... => 2
[6,2,2] generating graphics... => 3
[6,2,1,1] generating graphics... => 2
[6,1,1,1,1] generating graphics... => 1
[5,5] generating graphics... => 1
[5,4,1] generating graphics... => 2
[5,3,2] generating graphics... => 3
[5,3,1,1] generating graphics... => 3
[5,2,2,1] generating graphics... => 3
[5,2,1,1,1] generating graphics... => 2
[5,1,1,1,1,1] generating graphics... => 1
[4,4,2] generating graphics... => 1
[4,4,1,1] generating graphics... => 1
[4,3,3] generating graphics... => 2
[4,3,2,1] generating graphics... => 4
[4,3,1,1,1] generating graphics... => 3
[4,2,2,2] generating graphics... => 1
[4,2,2,1,1] generating graphics... => 3
[4,2,1,1,1,1] generating graphics... => 2
[4,1,1,1,1,1,1] generating graphics... => 1
[3,3,3,1] generating graphics... => 2
[3,3,2,2] generating graphics... => 1
[3,3,2,1,1] generating graphics... => 3
[3,3,1,1,1,1] generating graphics... => 3
[3,2,2,2,1] generating graphics... => 2
[3,2,2,1,1,1] generating graphics... => 2
[3,2,1,1,1,1,1] generating graphics... => 2
[3,1,1,1,1,1,1,1] generating graphics... => 1
[2,2,2,2,2] generating graphics... => 1
[2,2,2,2,1,1] generating graphics... => 1
[2,2,2,1,1,1,1] generating graphics... => 1
[2,2,1,1,1,1,1,1] generating graphics... => 1
[2,1,1,1,1,1,1,1,1] generating graphics... => 1
[1,1,1,1,1,1,1,1,1,1] generating graphics... => 1
[5,4,2] generating graphics... => 2
[5,4,1,1] generating graphics... => 2
[5,3,3] generating graphics... => 3
[5,3,2,1] generating graphics... => 5
[5,3,1,1,1] generating graphics... => 2
[5,2,2,2] generating graphics... => 3
[5,2,2,1,1] generating graphics... => 2
[4,4,3] generating graphics... => 1
[4,4,2,1] generating graphics... => 2
[4,4,1,1,1] generating graphics... => 3
[4,3,3,1] generating graphics... => 3
[4,3,2,2] generating graphics... => 2
[4,3,2,1,1] generating graphics... => 5
[4,2,2,2,1] generating graphics... => 2
[3,3,3,2] generating graphics... => 1
[3,3,3,1,1] generating graphics... => 3
[3,3,2,2,1] generating graphics... => 2
[6,4,2] generating graphics... => 3
[5,4,3] generating graphics... => 2
[5,4,2,1] generating graphics... => 4
[5,4,1,1,1] generating graphics... => 2
[5,3,3,1] generating graphics... => 5
[5,3,2,2] generating graphics... => 5
[5,3,2,1,1] generating graphics... => 4
[5,2,2,2,1] generating graphics... => 2
[4,4,3,1] generating graphics... => 2
[4,4,2,2] generating graphics... => 3
[4,4,2,1,1] generating graphics... => 5
[4,3,3,2] generating graphics... => 2
[4,3,3,1,1] generating graphics... => 5
[4,3,2,2,1] generating graphics... => 4
[3,3,3,2,1] generating graphics... => 2
[3,3,2,2,1,1] generating graphics... => 3
[5,4,3,1] generating graphics... => 4
[5,4,2,2] generating graphics... => 5
[5,4,2,1,1] generating graphics... => 4
[5,3,3,2] generating graphics... => 6
[5,3,3,1,1] generating graphics... => 5
[5,3,2,2,1] generating graphics... => 4
[4,4,3,2] generating graphics... => 2
[4,4,3,1,1] generating graphics... => 6
[4,4,2,2,1] generating graphics... => 5
[4,3,3,2,1] generating graphics... => 4
[5,4,3,2] generating graphics... => 5
[5,4,3,1,1] generating graphics... => 5
[5,4,2,2,1] generating graphics... => 5
[5,3,3,2,1] generating graphics... => 5
[4,4,3,2,1] generating graphics... => 5
[5,4,3,2,1] generating graphics... => 9
click to show generating function       
Description
The number of proper colouring schemes of a Ferrers diagram.
A colouring of a Ferrers diagram is proper if no two cells in a row or in a column have the same colour. The minimal number of colours needed is the maximum of the length and the first part of the partition, because we can restrict a latin square to the shape. We can associate to each colouring the integer partition recording how often each colour is used, see [1].
This statistic is the number of distinct such integer partitions that occur.
References
[1] Chow, T. Coloring a Ferrers diagram MathOverflow:203962
Code
def Ferrers_graph(mu):
    """Return the graph with vertices being the cells of the Ferrers
    diagram, two vertices are connected if the cells are in the same
    row or column.  
    """
    V = mu.cells()
    G = Graph([V, lambda a,b: a[0] == b[0] or a[1] == b[1]], loops=False, multiedges=False)
    return G

def all_colouring_partitions(mu):
    from sage.graphs.graph_coloring import all_graph_colorings
    mu = Partition(mu)
    res = dict()
    for c in all_graph_colorings(Ferrers_graph(mu), max(mu[0], len(mu))):
        la = Partition(sorted((len(v) for v in c.values()), reverse=True))
        res[la] = res.get(la, 0) + 1
    return res

def statistic(mu):
    return len(all_colouring_partitions(mu))

Created
Apr 18, 2017 at 13:23 by Martin Rubey
Updated
Apr 23, 2018 at 07:20 by Martin Rubey