I am trying to understand how to evaluate the arm and leg functions of a Young tableaux using Mathematica. To do so I need the Combinatorica package. Then apparently the command
DualPartition[l_]:=Module[{i},Table[Length[Select[l,(#>=i)&]],{i,1,l[[1]]}]]
DualPartition[{}] = {};
will take as input a Young diagram and will output its dual. I understand that the original Young diagram is defined within the code I include above but due to my lack of experience with Mathematica can you help me understand in detail this command above?
What does the "Module" do and what is $i$ and what is $l$ counting there? And how can I see a specific example of a Young diagram to convince my self, say the Young diagram (2,1) [column, row].
Then the arm and leg functions are given by
get[Y_, i_]:=If[i > Length[Y ], 0, Y [[i]]]
arm[Y_, {i_, j_}]:=get[Y, i] − j
leg[Y_, {i_, j_}]:=get[DualPartition[Y ], j] − i
But I am not sure what "get" of the first line does. Any help with that would also be very useful.
DualPartition
is not compatible with the Young tableaux generated in that package. Where did you get that definition ofDualPartition
from? $\endgroup${{1, 3, 4, 5}, {2}}
(the second element ofTableau[5]
. Then, after passing this toDualPartition
l[[1]]
would be {1, 3, 4, 5} and it would mean that the iteratori
is supposed to run from 1 (a scalar) to {1, 3, 4, 5} (a vector). That's not possible sol[[1]]
must be a scalar and thel
must be a one-dimensional list and can't be a Young diagram as delivered byCombinatorica
'sTableau
. I'm afraid you'll have to ask the author of the paper for an explanation. $\endgroup$