Wolfram Research

Function Repository Resource:

ConjugatePartition (1.0.1) current version: 1.1.0 »

Source Notebook

Switch the rows and columns of a partition

Contributed by: Wolfram Staff

ResourceFunction["ConjugatePartition"][p]

gives the partition that transposes the rows and columns of the integer partition p.

Details

A partition of n is a list of weakly decreasing positive integers that add up to n. For instance, written compactly, these are the five partitions of 4: 4, 31, 22, 211, 1111.

Examples

Basic Examples (2) 

A partition of 10 and its conjugate:

In[1]:=
p = {6, 3, 1};
cp = ResourceFunction["ConjugatePartition"][p]
Out[1]=

Use the resource function FerrersDiagram to show the Ferrers diagrams of the partition and its conjugate together:

In[2]:=
{ResourceFunction["FerrersDiagram"][p], ResourceFunction["FerrersDiagram"][cp]} // Row[#, Spacer[10]] &
Out[2]=

Some partitions are self-conjugate:

In[3]:=
s = {5, 2, 1, 1, 1};
In[4]:=
ResourceFunction["ConjugatePartition"][s]
Out[4]=

Using the resource function FerrersDiagram, verify that a self-conjugate partition has a symmetric Ferrers diagram:

In[5]:=
ResourceFunction["FerrersDiagram"][s]
Out[5]=

Publisher

George Beck

Version History

  • 1.1.0 – 21 February 2024
  • 1.0.1 – 31 January 2022
  • 1.0.0 – 31 May 2019

Related Resources

License Information