# Create a table indexed form a list giving a the index specifications

I need to create a table indexed form a list. e.g.:

list={{i, 3}, {j, 4}};


would give the table

Table[..., {i,3}, {j,4}];


Of course I need this because I have to create some complicated table inside a function where I do not know the number of indices i, j, k, ..., but I have a list of that with their extrema. How can I achieve this?

### Edit

I know I have been a bit obscure, I'm only trying to write a function generating all possible plane partitions of a given number. Do you have any suggestions?

• Could you please elaborate on what you are trying to do? It would be useful if you could show a sample input and output. Jun 20 '16 at 22:49
• Table[{i, j} , Evaluate[## & @@ list]]?
– kglr
Jun 20 '16 at 22:50
• Have you seen the MathWorld notebook? Jun 20 '16 at 23:11
• @J.M. I saw that nb but I didn't understand how to get that table just after the graph... I get an error like: 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.
– MaPo
Jun 20 '16 at 23:14
• Table[something,Evaluate[Sequence@@t]]
– Wjx
Jun 21 '16 at 0:07

A not-that-fast solution could be easily written:

f[dat_, part_] :=
Outer[SortBy[#, -# &] & /@ InternalPartitionRagged[##] &,
Permutations@dat, part, 1, 1];
PlanePartitions[n_] :=
Module[{pt = IntegerPartitions@n, inp},
inp = {#, IntegerPartitions@Length@#} & /@ pt;
Select[Flatten[f @@@ inp, 2],
SortBy[#, -# &] & /@ Transpose@t == Transpose@t] &]]


It will partition the number, then choose multiple split method, create results and select what we want~

But efficiency is the great drawback of this method. Time sequence is shown below, and as you can see, when the number gets big, the running time canget quite nasty.

{0.000275014, 0.000390956, 0.000966028, 0.00265924, 0.00912323,
0.0196355, 0.0552106, 0.15279, 0.449698, 1.15818, 3.15831, 8.46536,
26.8032}
`

If I find a better solution, I'll update~