[Math] Problem 14, Ch. 1 from Blitzstein and Hwang, Intro to Probability

combinatorics

You are ordering two pizzas. A pizza can be small, medium, large or extra large, with any combination of 8 possible toppings (getting no toppings is also allowed, as is getting all of 8). How many possibilities are there for your two pizzas?

My attempt:

Denoting 0:excluding a topping, 1:including a topping, the number of possible combinations of toppings is the same as sampling from the set $\{0,1\}$ with replacement and with ordering, 8 times; there are $2^8=256$ possible toppings combinations.

Choosing the pizzas is the same as sampling from the set {1,2,3,4} with replacement and with ordering, 2 times; there are $4^2=16$ possible pizza combinations.

The 256 possible toppings need to be assigned to 16 pizza combinations. This amounts to sampling from $\{1,2,3,\ldots,256\}$, 16 times without replacement, but with ordering. Thus, there are $n{\cdot}(n-1){\ldots}(n-k+1)=\displaystyle{256{\cdot}255{\cdot}{\ldots}{\cdot}241}$ possibilities.

Assumption: The same topping combination is not allowed for both the pizzas.

Is my line of thinking correct, could someone help validate.

Best Answer

I don't see any reason for assuming that the same topping combination is not allowed for the two pizzas, in the absence of any such stipulation in the question.

Ways of choosing a pizza (size) $= 4$
Ways of choosing toppings for the pizza $= 2^8 = 256$
Thus there are $4\cdot256 = 1024$ types of pizzas that can be ordered.

And since the question mentions your two pizzas,
you can order either two different types or same types in $\binom{1024}{2} + 1024$ ways