Amika wants to buy 4 cupcakes from an infinite supply of three types of cupcakes: chocolate, vanilla & gems-laden. In how many different ways can she buy cupcakes, if :
(1) order of buying the cupcakes is important, and
(2) arbitrary order is permitted
Suppose order is important. first cupcake $3$ ways, second $3$ ways, third in $3$ ways, fourth in $3$ ways, So, $3^4$ in total
if order is not important, it is $\dbinom{3+4-1}{4}$
(this is similar to the stars and bars pattern I guess)