Paragraph
  1. \({10 \choose 4}\) combinations. You need to choose 4 of the 10 cookie types. Order doesn’t matter.

  2. \(P(10, 4) = 10 \cdot 9 \cdot 8 \cdot 7\) ways. You are choosing and arranging 4 out of 10 cookies. Order matters now.

  3. \({21 \choose 12}\) choices. You must switch between cookie type 9 times as you make your 12 cookies. The cookies are the stars, the switches between cookie types are the bars.

  4. \(10^{12}\) choices. You have 10 choices for the “1” cookie, 10 choices for the “2” cookie, and so on.

  5. \(10^{12} - \left[{10 \choose 1}9^{12} - {10 \choose 2}8^{12} + \cdots - {10 \choose 10}0^{12} \right]\) choices. We must use PIE to remove all the ways in which one or more cookie type is not selected.

in-context