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 
preloaded functionality. The package now being loaded may conflict with this. Please see 
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.

  • 2
    $\begingroup$ 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 ... $\endgroup$
    – Szabolcs
    Feb 28, 2014 at 23:59
  • $\begingroup$ Wow, I couldn't have asked for a better, yet more disappointing, answer. $\endgroup$
    – evanb
    Mar 1, 2014 at 0:48
  • 1
    $\begingroup$ @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. $\endgroup$
    – ciao
    Mar 1, 2014 at 2:17
  • $\begingroup$ That's good to know. Maybe I will shoot him an email at some point next week... $\endgroup$
    – evanb
    Mar 1, 2014 at 6:02

2 Answers 2


There are short description and the definition of the Tableaux:

?? 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]

Combinatorica`Private` 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.

(* {{{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

(* {{{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


The Mathematica documentation is fairly minimal


  • $\begingroup$ 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. $\endgroup$
    – Sektor
    Mar 27, 2015 at 10:35
  • $\begingroup$ Alas, I would like to put data into the YT boxes. The question now linked to in the question does a pretty good job. $\endgroup$
    – evanb
    Mar 28, 2015 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.