Suppose I have $l$ length of words denoted as $P$, I want to divide this set into four $P=QRST$ including empty set, i.e., $Q=R=S=\phi, T=P$.
For non-empty set decomposition, I can do
p = Permutations[P];
n = Length[P];
pn = IntegerPartitions[n, {4}];
pnn[i_] := Permutations[pn[[i]]];
Tablen = Length[pn];
in = Flatten[Table[pnn[i], {i, 1, Tablen}], 1];
tn = Flatten[Outer[TakeList, p, in, 1], 1];
newn = DeleteDuplicatesBy[tn, Sort /@ # &];
Q = Map[#[[1]] &, tn];
R = Map[#[[2]] &, tn];
S = Map[#[[3]] &, tn];
T = Map[#[[4]] &, tn];
Actually, I can do more general decomposition by replacing {4} -> {m}. But here the problem is in the process of making in and tn, the empty set was not included.
I want to make Q,R,S,T including an empty set. Any ideas?
[This post contains some answer in my previous post, but here I want to include empty set]
Example
$P=\{1,2,3,4\}$
then
$Q= \{ \{ \}, \{1\}, \{2\},\{3\},\{4\},\{1,2\}, ...\} $
$R=\{ \{\}, ....\}$
$S=\{ \{\}, .....\}$
$T=\{\{1,2,3,4\}, ...\}$
where $P=QRST$
P
such that it evaluates. $\endgroup$