
Brandon L. answered 04/21/21
Online Weekend Tutor and HW Help, Math/Programming
Hi Kyla,
So we're told the customer could get either one, two, or three different toppings. Let's consider the first option.
If a customer only selects one topping, and there are five toppings available, he has five options.
Easy. Next up, if he selects two toppings. The first time he has five options. After he picks one, he has four remaining options for his second topping. So 5 initial options that branch into 4 second options each, that's 5*4 = 20.
Something we need to consider here is duplicates. If he picks nuts then sprinkles, it'll be counted as a separate option from picking sprinkles then nuts. To get rid of these duplicates, we'll divide 20 by the factorial of times he's picking (which is 2, so 2! = 2*1 = 2). This gives us 10 options.
Lastly, if he selects three toppings. Applying the same method, he has 5 options the first picking, 4 remaining options the second picking, and 3 remaining options for the third picking. 5*4*3 is 60. Then we divide by the factorial of the number of times we're picking, 3! = 3*2*1 = 6. This gives us another 10 options.
Adding all these options up, we have 25 possible combinations. This method of thinking actually leads us to the combination formula,
C = n!/((n-r)!r!), where C is the number of possible combinations, n is the number of options (5 in our example), and r is the number of times we're picking (1 topping, 2 toppings, or 3 toppings mean r=1, 2, or 3).
Hope this helps!