My attempt :-
a+b+c=12 ; I am assuming the groups be distinct for the time being
We need to distribute 1 ball to each group, which would make our equation as follows
x+y+z=9
Now, ways of distributing 9 identical objects into 3 distinct groups could be done in ${11 \choose 2} = 55$ ways
From these 55 ways we would have some cases in which a group gets more than 6 objects and thus violating the condition present in the question
Hence correction for that :- Let me choose one group in ${3 \choose 1}$ ways and give 6 more objects to that particular group, such that now that group in total has 7 objects in it , the remaining 9-6 = 3 identical objects can be distributed into three groups in ${5 \choose 2}$ ways,
Hence the correction will be as :-
$55-({3 \choose 1}*{5 \choose 2}) = 25$ ways
These 25 ways will be such that all groups will be having atleast 1 ball and at most 6 balls in them
From here I know that I need to subtract some more cases as I took my assumption of all groups to be distinct , but I am not sure how to proceed from here, please help me
By manual counting, I know there are 6 cases as follows :-
6,5,1
6,4,2
6,3,3
5,5,2
4,4,4
How should I subtract those 19 cases from the 25 cases I got so far ?
Different Approach
It is a partition question. If each partition,i.e group, should contain at least one ball,then give them one ball.
Now, we had groups each have one ball, then the question turn out to be distributing the rest $9$ identical balls into those three identical groups such that each group can have at most $5$ balls.This means that a group may not get any ball while we distribute the rest $9$ balls.
So, after we give one ball to each group, the question converted into partition of $9$ where a partition can have at most $5$ balls. Right ?
To solve our new partition problem , we will make use of Gaussian Binomial Coefficients
Then according to formula $$r=9,m=3,n=5$$ $$B(5,3,9)=[q^9]\binom{8}{3}_9$$ $$[q^9]\frac{(1-q^8)(1-q^7)(1-q^6)}{(1-q)(1-q^2)(1-q^3)}=6$$
You can check the expansion using wolfram.