Wolfram Research

Function Repository Resource:

HookLengths

Source Notebook

Get the list of lists whose entries are the hook lengths of the entries of a Young diagram

Contributed by: George Beck

ResourceFunction["HookLengths"][p]

gives a list of lists of lengths p for a partition p where an entry is the hook length of the corresponding cell in the Young diagram of p.

Details and Options

In the Young diagram of shape p, the hook for a cell c is the set of cells containing c, the cells to the right of c and the cells below c.
The hook length of a cell c is the number of cells in the hook of c.

Examples

Basic Examples

Here is a partition:

In[1]:=
p = {5, 3, 1, 1};

This is its Ferrers diagram:

In[2]:=
ResourceFunction[
ResourceObject[
Association[
   "Name" -> "FerrersDiagram", "UUID" -> "ff9f6ee9-e173-4868-997b-754fe2a50d9a", "ResourceType" -> "Function", "Version" -> "1.0.0", "Description" -> "Displays the Ferrers diagram of a partition \
with dots", "RepositoryLocation" -> URL[
     "https://www.wolframcloud.com/objects/resourcesystem/api/1.0"], "WolframLanguageVersionRequired" -> "10.0", "SymbolName" -> "FunctionRepository`$\
cfb969414cd645eaa8530fdec3494798`FerrersDiagram", "FunctionLocation" -> LocalObject[
     "file:///Users/georgebeck/Library/Wolfram/Objects/Resources/ff9/\
ff9f6ee9-e173-4868-997b-754fe2a50d9a/download/DefinitionData"], "ShortName" -> "FerrersDiagram"], ResourceSystemBase -> "https://www.wolframcloud.com/objects/\
resourcesystem/api/1.0"]]@p
Out[2]=

These are the hook lengths for the shape p:

In[3]:=
ResourceFunction["HookLengths"]@p
Out[3]=

This is used to format a Young diagram:

In[4]:=
formatyoungdiagram[p_] := Module[
  {mat, mmax, nmax},
  mat = PadRight[Table[1, #] & /@ p];
  {mmax, nmax} = Dimensions@mat;
  Frame -> {None, None, Select[Flatten[
      Table[{m, n} -> mat[[m, n]] == 1, {m, mmax}, {n, nmax}]], True == Last@# &]}
  ]

The Young diagram with shape p:

In[5]:=
Grid[Table[" ", #] & /@ p, formatyoungdiagram@p]
Out[5]=

A hook of length 5:

In[6]:=
Grid[PadRight@{{" ", "x", "x", "x", "x"}, {" ", "x", " "}, {" "}, {" "}} /. 0 -> "", formatyoungdiagram@p]
Out[6]=

The hook lengths of p:

In[7]:=
Grid[PadRight@ResourceFunction["HookLengths"]@p /. 0 -> "", formatyoungdiagram@p]
Out[7]=

Applications

The number of standard Young tableaux for the diagram of shape p:

In[8]:=
Total[p]!/Times @@ Flatten[ResourceFunction["HookLengths"]@p]
Out[8]=

Resource History

License Information