Let PlanePartitions[m_Integer]
be a certain list of objects that I'm able to produce for positive integers $m$, concretely the list of all 3d partitions of a given dimension $m$ (so object means a 3d partition).
For a fixed positive integer $n$, I'd like to build a function f[k_]
of a positive integer $k$ that gives as output the list of all possible $n$-tuples $\{a_1,..a_n\}$ built out of objects $a_i \in \operatorname{PlanePartitions}[m_i]$ with the constraint that $\sum_{i=1}^n m_i = k$, including the case when some of the $a_i$ are empty objects, $a_i=\emptyset$, contributing $m_i=0$ to the sum, and considering the ordering meaningful, namely a tuple $\{...a_i,a_j...\}$ is distinct from the one with $a_i$ and $a_j$ exchanged if $a_i \neq a_j$.
Any idea how to do that?
Edit1: the function PlanePartitions[m_Integer]
is defined in http://mathworld.wolfram.com/PlanePartition.html
Edit2: here's a first attempt, but I'm having some trouble with the empty case.
f[1, k_] := {#} & /@ PlanePartitions[k]
f[n_, k_] := f[n, k] = Flatten[Table[Flatten[Outer[Prepend[#2, #1] &, PlanePartitions[r], f[n - 1, k - r],1,1], 1], {r, 0, k}], 1]
Example: there are three 3d partitions of dimension 2 (call them $a$,$b$,$c$), one of dimension one (call it $W$), and one of dimension zero (the empty one, call it $E$); the desired function, say for $n=2$ and $k=2$, should produce a list of the form
f[2]={{E,a},{E,b},{E,c},{a,E},{b,E},{c,E},{W,W}}}
NN
orA
. $\endgroup$PlanePartitions
. $\endgroup$