# High School Mathematics Extensions/Supplementary/Basic Counting/Solutions

## Solutions to exercises

### Exercise 1

There would be 4! ways if the letters were all distinct. Since "O" is repeated twice (2! permutations), every different arrangement is counted 2! times; therefore there are

${\displaystyle 4!/2!=12}$

ways.

### Exercise 2

There are thirteen diamonds in the deck; hence, there are

${\displaystyle {13 \choose 5}={\frac {13!}{8!\times 5!}}={\frac {13\times 12\times 11\times 10\times 9}{120}}=1287}$

ways.

### Exercise 3

Since the lettuce is always on top, we just consider all the possible arrangements of ham - cheese - tomato - salami such that the ham is never next to the salami. We count the permutations of the four elements,

${\displaystyle 4!=24}$

and then deduct the permutations in which the ham and the salami are together. That is, the permutations of (ham & salami) - cheese - tomato and (salami & ham) - cheese - tomato:

${\displaystyle 2\times 3!=2\times 6=12}$

Joey can arrange the ingredients in

${\displaystyle 24-12=12}$

different ways.

### Exercise 4

We count the number of ways of choosing three flavours out of ten and discount the number of ways of choosing one flavour, chocolate, and vanilla, that is the number of ways of choosing one flavour out of the eight left:

${\displaystyle {10 \choose 3}-{8 \choose 1}={\frac {10!}{7!\times 3!}}-{\frac {8!}{7!\times 1!}}=120-8=112}$

Rachel can order 112 different ice cream cups.

### Exercise 5

We count the number of combinations of one, two, three, four, and five ingredients out of five available. That is the sum of five terms 5 choose k, where k equals 1, 2, 3, 4, 5:

${\displaystyle {5 \choose 1}+{5 \choose 2}+{5 \choose 3}+{5 \choose 4}+{5 \choose 5}}$

Then we subtract to each term the number of combinations of ham, salami and k - 2 ingredients out of the 3 left (note that 5 choose 1 does not need any deduction):

• ${\displaystyle {5 \choose 1}-0=5-0=5}$
• ${\displaystyle {5 \choose 2}-{3 \choose 0}=10-1=9}$
• ${\displaystyle {5 \choose 3}-{3 \choose 1}=10-3=7}$
• ${\displaystyle {5 \choose 4}-{3 \choose 2}=5-3=2}$
• ${\displaystyle {5 \choose 5}-{3 \choose 3}=1-1=0}$

Joey can make

${\displaystyle 5+9+7+2+0=23}$

different sandwiches.