# Young Tableaux Miscellanea

I have a problem which is mostly neatly described by using Young Tableaux. Mathematica seems to have these Tableaux built in, except that the Tableaux function is only in Combinatorica. When I Needs[Combinatorica] I get a warning suggesting that I look at the Compatability Guide for Combinatorica, which I can't seem to find. Does anyone have a link, or know if any of the Tableaux-related functions are the problematic ones?

The Tableaux function itself is hardly documented at all, and its output is quite tough to read. I am hoping there is a nice built-in way to draw the Tableaux in the nice YT in English notation (longest rows on top) [A custom drawing function is in How to insert a function into OptionsPattern? ]. Is there such a function?

Finally, can anyone explain what the format of the input to Tableaux should be?

Here are some examples that work:

In[1]:= Needs["Combinatorica"]

General::compat: Combinatorica Graph and Permutations functionality has been superseded by
the Compatibility Guide for details.

In[2]:= Tableaux[3]
Out[2]= {{{1, 2, 3}}, {{1, 3}, {2}}, {{1, 2}, {3}}, {{1}, {2}, {3}}}

In[3]:= Tableaux[{3}]
Out[3]= {{{1, 2, 3}}}

In[4]:= Tableaux /@ IntegerPartitions[3]
Out[4]= {{{{1, 2, 3}}}, {{{1, 3}, {2}}, {{1,
2}, {3}}}, {{{1}, {2}, {3}}}}


while something like Tableaux[{1, 2, 3}] gives errors.

Does Tableaux[integer] give all possible tableaux with integer entries?
Does Tableaux[{int1, int2, ..., intk}] give all possible tableaux of k rows of length int1 ... intk respectively? This would explain why Tableaux[{1,2,3}] throws errors---it would be a malformed tableaux.

• Combinatorica documentation is unfortunately not included with Mathematica. The detailed description is in this book. Try to check google books for the relevant page or borrow it from your library, if you can. While Combinatorica is supposed to be obsolete, a significant part of its functionality is not yet built into Mathematica. I'm not familiar with this topic so I can't tell you if this functionality is available elsewhere ... Feb 28, 2014 at 23:59
• Wow, I couldn't have asked for a better, yet more disappointing, answer. Mar 1, 2014 at 0:48
• @evanb: As Szabolcs said, that is the canonical reference, and even it is a bit sparse to be honest (though an excellent book). Steven makes himself quite available (I found this true when I found some inconsistencies in his Algo. book), might be worth a try pinging him, and IIRC you can peruse the source, figure it out from there.
– ciao
Mar 1, 2014 at 2:17
• That's good to know. Maybe I will shoot him an email at some point next week... Mar 1, 2014 at 6:02

There are short description and the definition of the Tableaux:

Quiet@Needs["Combinatorica"];
?? Tableaux


Tableaux[p] constructs all tableaux having a shape given by integer partition p.

Attributes[Tableaux] = {Protected}

Tableaux[s_List] :=
Module[{t = LastLexicographicTableau[s]},
Table[t = NextTableau[t], {NumberOfTableaux[s]}]]

Tableaux[n_Integer?Positive] := Join @@ Tableaux /@ Partitions[n]


CombinatoricaPrivate context was removed for clarity.

Also from Computational Discrete Mathematics:

The list of tableaux of shape {2,2,1}  illustrates the amount of freedom available to tableau structures. The smallest element is always in the upper left-hand corner, but the largest element is free to be the rightmost position of the last row defined by all the distinct parts of the partition.

Tableaux[{2,2,1}]
(* {{{1, 4}, {2, 5}, {3}}, {{1, 3}, {2, 5}, {4}},
{{1, 2}, {3, 5}, {4}}, {{1, 3}, {2, 4}, {5}},{{1, 2}, {3, 4}, {5}}} *)


By iterating through the different integer partitions as shapes, all tableaux of a particular size can be constructed.

Tableaux[3]
(* {{{1, 2, 3}}, {{1, 3}, {2}}, {{1, 2}, {3}}, {{1}, {2}, {3}}} *)


If you're not worried about putting information into the boxes of your Young Tableaux, the FerrersDiagram function will do the job. It takes a partition {a,b,c,...} and prints the Young Diagram in 'dot' form, like in

http://en.wikipedia.org/wiki/Partition_%28number_theory%29#Ferrers_diagram

The Mathematica documentation is fairly minimal

http://reference.wolfram.com/language/Combinatorica/ref/FerrersDiagram.html

• Hi ! Link only answers are usually frowned upon around these parts. If you can provide a minimum working example showcasing the functionality and explaining why it works, now, that would be great. Mar 27, 2015 at 10:35
• Alas, I would like to put data into the YT boxes. The question now linked to in the question does a pretty good job. Mar 28, 2015 at 3:46