Finding number of distribution without using computer algorithm

How many ways are there to distribute $12$ different object into $4$ groups such that

a-) each pieces can contain at least one and at most $6$ objects

b-) groups can have at most $6$ and at least zero objects

I computed the questions using computer program because it was so long using combination.However , i wonder that is there any mathematical approach to save me from long process ?Thanks in advance.

EDIT : I tried to find each combination separately for example (1,3,3,5),(1,1,5,5) etc but it was so long to write all combinations to distribute these objects , so i need a shortcut or a techniques for it


Solution 1:

$\mathbf{\text{Part a-)}}$ In first glance , exponential generating functions is suitable for mathematical approach. If we firstly think the groups as distinct ,then the E.G.F of each groups is equal to $$\bigg(\frac{x^1}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\frac{x^6}{6!}\bigg).$$

Then ,the number of distributing $12$ distinct objects into $4$ distinct groups is the number of coefficient of $\frac{x^{12}}{12!}$ in the expansion of $$\bigg(\frac{x^1}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\frac{x^6}{6!}\bigg)^4.$$ or find the coefficient of $x^{12}$ and multiply it by $12!$ in the expansion

$$\therefore 12! \times \frac{7643}{259200}=14,124,264.$$

However , the groups were identical , so divide the result by $4!$ to convert distinct groups into identical groups. $$14,124,264 /24 =588,511.$$ $\mathbf{\text{Part b-)}}$ If the groups have at least zero and at most $6$ , then we can solve this dividing into cases such that

CASE I: If only one group has zero , the rest more than zero , less than $6$ ; then apply the same procedure for $3$ groups such that $$12! \times [x^{12}]\bigg(\frac{x^1}{1!}+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\frac{x^5}{5!}+\frac{x^6}{6!}\bigg)^3.$$

expansion

Then, , $$12! \times \frac{61}{69120} =422,730 \rightarrow 422,730/3! =70,455.$$ CASE II : If two groups have zero , the rest more than zero , less than $6$ ; then to make it easy $$\frac{\binom{12}{6}\binom{6}{6}}{2!} =924 /2 =462.$$

At last , sum the result of case $1$ and case $2$ , so $$70,455+462 =70,917$$