# Counting and Probability

#### WMDhamnekar

Suppose 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 allowed, as is getting all 8) How many possibilities are there for your two pizzas?

Answer: My answer is $\binom{4}{2}+\binom{4}{2}*2*(8+28+56+70+56+28+8+1)=3066$ possibilities are there for ordering my two pizzas.

#### romsek

MHF Helper
You can get 4 sizes.

You can get 0 to 8 toppings . This can be considered an 8 bit field. 1 for the topping is included, 0 for it's not.
This is $2^8=256$ different topping combos.

So for a single pizza there are $4 \cdot 256 = 1024$ different combinations.

Thus for two pizzas there are $1024^2 = 1,048,576$ different two pizza combos.

• 1 person

#### WMDhamnekar

You can get 4 sizes.

You can get 0 to 8 toppings . This can be considered an 8 bit field. 1 for the topping is included, 0 for it's not.
This is $2^8=256$ different topping combos.

So for a single pizza there are $4 \cdot 256 = 1024$ different combinations.

Thus for two pizzas there are $1024^2 = 1,048,576$ different two pizza combos.
Hello,