permutation and combination infinte supply

536 Views Asked by At

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

2

There are 2 best solutions below

0
On

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)

0
On

The number of different ways she can buy 4 cupcakes is $3^4=81$ ways because she can choose arbitrarily any cupcake from $3$ varieties. But, if order of choosing is unimportant, then it is $\binom{3+4-1}{3}$ which equals $15$. The formula in the general case is taken from combination with repititions