TITLE: possible pizza orders
QUESTION [6 upvotes]: 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 gettting all 8). How many possibilities are there for your two pizzas?
Would it be ${\large[}4{\large[}{8\choose8}+{8\choose7}+{8\choose6}+{8\choose5}+{8\choose4}+{8\choose3}+{8\choose2}+{8\choose1}+{8\choose0}{\large]}{\large]}^2$

REPLY [4 votes]: Note that this is problem 14 in chapter 1 of Introduction to Probability by Blitzstein and Hwang.
The problem amounts to sampling with replacement where the order doesn't matter, which is similar to problem 13 in and the hint there (use Bose Einstein) applies here too.  This is also known as the "stars and bars" method.
Imagine an order form with $4 \times 2^8$ = 1024 columns for each distinct kind of pizza.  With 2 pizzas there are $\binom{1024+2-1}{2}$ = $\binom{1025}{2}$ unique orders.