How do you count all unique groups that can be made with items

23 Views Asked by At

assuming you have aabcc and you want to count all the unique groups that can be made with them so:

[empty,a,ab,ac,acc,abc,abcc,aa,aab,aac,aacc,aabc,aabcc,b,bc,bcc,c,cc] 
= 18
2

There are 2 best solutions below

0
On BEST ANSWER

You can take $0$, $1$, or $2$ copies of a, which is $2+1=3$ choices; similarly $2$ for b and $3$ for c. Multiplying, there are $$(2+1)\times(1+1)\times(2+1)=3\times2\times3=18$$ ways to independently choose the number of as, bs, and cs.

0
On

You start with $0,1$, or $2$ $a$'s, (so $3$ options there), followed by $0$ or $1$ $b$ (so $2$ options there), followed by $0,1$, or $2$ $c$'s ($3$ options)

Total: $3 \cdot 2 \cdot 3=18$ options