Partition/Diagram Algebras

class sage.combinat.partition_algebra.PartitionAlgebraElement_ak(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_bk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_generic(M, x)
Bases: sage.combinat.free_module.CombinatorialFreeModuleElement
class sage.combinat.partition_algebra.PartitionAlgebraElement_pk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_prk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_rk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_sk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebraElement_tk(M, x)
Bases: sage.combinat.partition_algebra.PartitionAlgebraElement_generic
class sage.combinat.partition_algebra.PartitionAlgebra_ak(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_bk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_generic(R, cclass, n, k, name=None, prefix=None)
Bases: sage.combinat.combinatorial_algebra.CombinatorialAlgebra
class sage.combinat.partition_algebra.PartitionAlgebra_pk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_prk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_rk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_sk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.PartitionAlgebra_tk(R, k, n, name=None)
Bases: sage.combinat.partition_algebra.PartitionAlgebra_generic
class sage.combinat.partition_algebra.SetPartitionsAk_k(k)
Bases: sage.combinat.set_partition.SetPartitions_set
class sage.combinat.partition_algebra.SetPartitionsAkhalf_k(k)

Bases: sage.combinat.combinat.CombinatorialClass

cardinality()

TESTS:

sage: SetPartitionsAk(1.5).cardinality()
5
sage: SetPartitionsAk(2.5).cardinality()
52
sage: SetPartitionsAk(3.5).cardinality()
877
class sage.combinat.partition_algebra.SetPartitionsBk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAk_k

cardinality()

Returns the number of set partitions in B_k where k is an integer. This is given by (2k)!! = (2k-1)*(2k-3)*...*5*3*1.

EXAMPLES:

sage: SetPartitionsBk(3).cardinality()
15
sage: SetPartitionsBk(2).cardinality()
3
sage: SetPartitionsBk(1).cardinality()
1
sage: SetPartitionsBk(4).cardinality()
105
sage: SetPartitionsBk(5).cardinality()
945
class sage.combinat.partition_algebra.SetPartitionsBkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAkhalf_k

cardinality()

TESTS:

sage: B3p5 = SetPartitionsBk(3.5)
sage: B3p5.cardinality()
15
class sage.combinat.partition_algebra.SetPartitionsIk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAk_k

cardinality()

TESTS:

sage: SetPartitionsIk(2).cardinality()
13
class sage.combinat.partition_algebra.SetPartitionsIkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAkhalf_k

cardinality()

TESTS:

sage: SetPartitionsIk(1.5).cardinality()
4
sage: SetPartitionsIk(2.5).cardinality()
50
sage: SetPartitionsIk(3.5).cardinality()
871
class sage.combinat.partition_algebra.SetPartitionsPRk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsRk_k

cardinality()

TESTS:

sage: SetPartitionsPRk(2).cardinality()
6
sage: SetPartitionsPRk(3).cardinality()
20
sage: SetPartitionsPRk(4).cardinality()
70
sage: SetPartitionsPRk(5).cardinality()
252
class sage.combinat.partition_algebra.SetPartitionsPRkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsRkhalf_k

cardinality()

TESTS:

sage: SetPartitionsPRk(2.5).cardinality()
6
sage: SetPartitionsPRk(3.5).cardinality()
20
sage: SetPartitionsPRk(4.5).cardinality()
70
class sage.combinat.partition_algebra.SetPartitionsPk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAk_k

cardinality()

TESTS:

sage: SetPartitionsPk(2).cardinality()
14
sage: SetPartitionsPk(3).cardinality()
132
sage: SetPartitionsPk(4).cardinality()
1430
class sage.combinat.partition_algebra.SetPartitionsPkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAkhalf_k

cardinality()

TESTS:

sage: SetPartitionsPk(2.5).cardinality()
42
sage: SetPartitionsPk(1.5).cardinality()
5
class sage.combinat.partition_algebra.SetPartitionsRk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAk_k

cardinality()

TESTS:

sage: SetPartitionsRk(2).cardinality()
7
sage: SetPartitionsRk(3).cardinality()
34
sage: SetPartitionsRk(4).cardinality()
209
sage: SetPartitionsRk(5).cardinality()
1546
class sage.combinat.partition_algebra.SetPartitionsRkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAkhalf_k

cardinality()

TESTS:

sage: SetPartitionsRk(2.5).cardinality()
7
sage: SetPartitionsRk(3.5).cardinality()
34
sage: SetPartitionsRk(4.5).cardinality()
209
class sage.combinat.partition_algebra.SetPartitionsSk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAk_k

cardinality()

Returns k!.

TESTS:

sage: SetPartitionsSk(2).cardinality()
2
sage: SetPartitionsSk(3).cardinality()
6
sage: SetPartitionsSk(4).cardinality()
24
sage: SetPartitionsSk(5).cardinality()
120
class sage.combinat.partition_algebra.SetPartitionsSkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsAkhalf_k

cardinality()

TESTS:

sage: SetPartitionsSk(2.5).cardinality()
2
sage: SetPartitionsSk(3.5).cardinality()
6
sage: SetPartitionsSk(4.5).cardinality()
24
sage: ks = [2.5, 3.5, 4.5, 5.5]
sage: sks = [SetPartitionsSk(k) for k in ks]
sage: all([ sk.cardinality() == len(sk.list()) for sk in sks])
True
class sage.combinat.partition_algebra.SetPartitionsTk_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsBk_k

cardinality()

TESTS:

sage: SetPartitionsTk(2).cardinality()
2
sage: SetPartitionsTk(3).cardinality()
5
sage: SetPartitionsTk(4).cardinality()
14
sage: SetPartitionsTk(5).cardinality()
42
class sage.combinat.partition_algebra.SetPartitionsTkhalf_k(k)

Bases: sage.combinat.partition_algebra.SetPartitionsBkhalf_k

cardinality()

TESTS:

sage: SetPartitionsTk(2.5).cardinality()
2
sage: SetPartitionsTk(3.5).cardinality()
5
sage: SetPartitionsTk(4.5).cardinality()
14
sage.combinat.partition_algebra.create_set_partition_function(letter, k)

EXAMPLES:

sage: from sage.combinat.partition_algebra import create_set_partition_function
sage: create_set_partition_function('A', 3)
Set partitions of {1, ..., 3, -1, ..., -3}
sage.combinat.partition_algebra.identity(k)

Returns the identity set partition 1, -1, ..., k, -k

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: pa.identity(2)
{{2, -2}, {1, -1}}
sage.combinat.partition_algebra.is_planar(sp)

Returns True if the diagram corresponding to the set partition is planar; otherwise, it returns False.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: pa.is_planar( pa.to_set_partition([[1,-2],[2,-1]]))
False
sage: pa.is_planar( pa.to_set_partition([[1,-1],[2,-2]]))
True
sage.combinat.partition_algebra.pair_to_graph(sp1, sp2)

Returns a graph consisting of the graphs of set partitions sp1 and sp2 along with edges joining the bottom row (negative numbers) of sp1 to the top row (positive numbers) of sp2.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: sp1 = pa.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = pa.to_set_partition([[1,-2],[2,-1]])        
sage: g = pa.pair_to_graph( sp1, sp2 ); g
Graph on 8 vertices
sage: g.vertices() #random
[(1, 2), (-1, 1), (-2, 2), (-1, 2), (-2, 1), (2, 1), (2, 2), (1, 1)]
sage: g.edges() #random
[((1, 2), (-1, 1), None),
 ((1, 2), (-2, 2), None),
 ((-1, 1), (2, 1), None),
 ((-1, 2), (2, 2), None),
 ((-2, 1), (1, 1), None),
 ((-2, 1), (2, 2), None)]
sage.combinat.partition_algebra.propagating_number(sp)

Returns the propagating number of the set partition sp. The propagating number is the number of blocks with both a positive and negative number.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: sp1 = pa.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = pa.to_set_partition([[1,2],[-2,-1]])        
sage: pa.propagating_number(sp1)
2
sage: pa.propagating_number(sp2)
0
sage.combinat.partition_algebra.set_partition_composition(sp1, sp2)

Returns a tuple consisting of the composition of the set partitions sp1 and sp2 and the number of components removed from the middle rows of the graph.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: sp1 = pa.to_set_partition([[1,-2],[2,-1]])
sage: sp2 = pa.to_set_partition([[1,-2],[2,-1]])
sage: pa.set_partition_composition(sp1, sp2) == (pa.identity(2), 0)
True
sage.combinat.partition_algebra.to_graph(sp)

Returns a graph representing the set partition sp.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: g = pa.to_graph( pa.to_set_partition([[1,-2],[2,-1]])); g
Graph on 4 vertices
sage: g.vertices() #random
[1, 2, -2, -1]
sage: g.edges() #random
[(1, -2, None), (2, -1, None)]
sage.combinat.partition_algebra.to_set_partition(l, k=None)

Coverts a list of a list of numbers to a set partitions. Each list of numbers in the outer list specifies the numbers contained in one of the blocks in the set partition.

If k is specified, then the set partition will be a set partition of 1, ..., k, -1, ..., -k. Otherwise, k will default to the minimum number needed to contain all of the specified numbers.

EXAMPLES:

sage: import sage.combinat.partition_algebra as pa
sage: pa.to_set_partition([[1,-1],[2,-2]]) == pa.identity(2)
True

Previous topic

Schubert Polynomials

Next topic

Iwahori Hecke Algebras

This Page