- #1
dacruick
- 1,042
- 1
Okay so here is the problem. I have 4 layers of a cake, and 4 flavours to use. I can make any layer of the cake any flavour, and can use any flavour any amount of times. Also, it does not matter the order of the flavours in the cake. As in 1 1 2 3 is the same as 1 2 1 3 and 3 2 1 1 and so on.
I also believe I have the answer, but do not know why it is the correct answer. I was told that if n represents the flavours, and k represents the layers, the formula goes as follows:
(n + k - 1)! / (n! * (k-1)!). why is that so?
When I originally tried to tackle this problem the method that I took was take 4 x 4 x 4 x 4 to get the total permutations, and then try and subtract or divide out the amount of cakes that can have repeated permutations. Furthermore, I assume that the equation above is doing the same thing, just in a more refined and probabilistically sound manner.
So to sum this up, I would just like someone to explain to me the logic behind the formula. why 7! and so on. Thank you
I also believe I have the answer, but do not know why it is the correct answer. I was told that if n represents the flavours, and k represents the layers, the formula goes as follows:
(n + k - 1)! / (n! * (k-1)!). why is that so?
When I originally tried to tackle this problem the method that I took was take 4 x 4 x 4 x 4 to get the total permutations, and then try and subtract or divide out the amount of cakes that can have repeated permutations. Furthermore, I assume that the equation above is doing the same thing, just in a more refined and probabilistically sound manner.
So to sum this up, I would just like someone to explain to me the logic behind the formula. why 7! and so on. Thank you