Answers:
=====================================================
Explanation for part (a)
Consider four slots labeled A,B,C,D.
We have
- 18 choices for slot A
- 17 choices for slot B
- 16 choices for slot C
- 15 choices for slot D
We started at 18 and counted down until we filled the four slots. The countdown is because we cannot repeat a color. Multiply out those values to get the answer: 18*17*16*15 = 73440
You can use the nPr permutation formula as an alternative method
in this case n = 18 and r = 4. The exclamation marks indicate factorial.
-----------------------------------
Explanation for part (b)
Let's say we had color labels A,B,C,... all the way up to R which is the 18th letter in the English alphabet. From those 18 letters, we can only pick four. Let's say we pick D,E,F,G.
Focusing solely on the set {D,E,F,G}, we only have one set and the order doesn't matter. So {D,E,F,G} is the same as {D,E,G,F}.
There are 4*3*2*1 = 24 ways to arrange those four items meaning that we'll need to divide the result of part (a) by 24 to get the result of part (b)
73440/24 = 3060
You could use the nCr combination formula to get the same result
where n = 18 and r = 4 are the same from last time.
The connection between nPr and nCr is this
which can be rearranged into
these formulas are handy to help us go back and forth between nCr or nPr.