Pat wants to buy four donuts from an ample supply of three types of donuts: glazed, chocolate, and powdered. How many different selections are possible?
Pat想从充足的三种甜甜圈(釉面、巧克力和糖粉)中买四个甜甜圈。有多少种不同的选择?
(D) The number of possible selections is the number of solutions of the equation
$g+c+p=4$
where $g$, $c$, and $p$ represent, respectively, the number of glazed, chocolate, and powdered donuts. The 15 possible solutions to this equation are $(4,0,0)$, $(0,4,0)$, $(0,0,4)$, $(3,0,1)$, $(3,1,0)$, $(1,3,0)$, $(0,3,1)$, $(1,0,3)$, $(0,1,3)$, $(2,2,0)$, $(2,0,2)$, $(0,2,2)$, $(2,1,1)$, $(1,2,1)$, and $(1,1,2)$.
(D)可供选择的方式数等于方程的解的个数:
$g+c+p=4$
其中 $g$、$c$ 和 $p$ 分别表示糖霜甜甜圈、巧克力甜甜圈和糖粉甜甜圈的数量。该方程共有 15 组可能的解,分别为 $(4,0,0)$、$(0,4,0)$、$(0,0,4)$、$(3,0,1)$、$(3,1,0)$、$(1,3,0)$、$(0,3,1)$、$(1,0,3)$、$(0,1,3)$、$(2,2,0)$、$(2,0,2)$、$(0,2,2)$、$(2,1,1)$、$(1,2,1)$ 和 $(1,1,2)$。