Function Repository Resource:

ConjugatePartition

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

A partition of 10 and its conjugate:

In[1]:=
p = {6, 3, 1};
cp = ResourceFunction[
  "ConjugatePartition", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][p]
Out[2]=

Show the Ferrers diagrams of the partition and its conjugate together:

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

Some partitions are self-conjugate:

In[4]:=
ResourceFunction[
 "ConjugatePartition", ResourceSystemBase -> "https://www.wolframcloud.com/obj/resourcesystem/api/1.0"][s]
Out[4]=

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