Hello, I've encountered some problems while doing some P&C
qns and I would much appreciate if any maths guru can help me out..

1. A painter is given the job of painting the doors of 5
adjacent bedrooms using 5 colours: red, blue, yellow, green and
orange.
If the owner of the house insists that the doors should be
painted with at most 2 colours, find the number of ways which the
painter could have the job done. [4]
Ans: 305
2.There're 12 boys and 8 girls. 2 groups, with 3 people in each
group, are to be formed. Find the number of different ways in which
this can be done if:
(i) there're no restrictions
(ii) members within each group are of the same gender
Ans: (i) 387600; (ii) 21840
3. The teacher would like to take a picture of the class
consisting of 12 boys and 5 girls standing in a row. The teacher
wants the boys to be arranged in order from the shortest to the
tallest but they do not need to stand together. The girls are free
to stand anywhere. How many ways can the class be arranged in a
row? [3]
Ans: 742560
4: In a group of 3 men and 4 women, how many ways can 1 split
them into 3 groups, if each group is to consist of at least 1 man
and at least 1 woman? [2]
Ans: 28
5: There are 17 students in a class seated in a circle. The
students are to find out the names of the persons seated next to
them. Next, each student is required to go round and exchange
handshakes with the rest of the class, excluding the 2 students
seated next to him or her. How many handshakes would have taken
place when the game is over?
- I can work out the answer (119) by manually summing up all the
cases: 14+14+13+12+...., but I would like to understand the basis
behind the answer: (14x17)÷2!=119.. How was the 2! derived?
My workings:
For 1,
5C2 [Choose 2 colours 1st] x 2^5 [Each of the 5 rooms can have 2
colours] = 320
320 - (5C2-5) [minus the repetition of colours chosen] = 315
Where did I overcount/ What's wrong with my subtraction?
For 2,
(i) 20C3x17C3=775200
(Why do I need to ÷2?)
(ii) Ans: 12C3x8C3 (why no need ÷2) + 8C3x5C3÷2 (why need to ÷2)
+ 12C3x9C3÷2 (why need to ÷ 2) = 21840
3: ???
4: 3C1X4C1+2C1X3C1+1C1X2C2 = 19 +2 (since the extra woman can be
in 1st/2nd group)= 21
Thanks a lot.. :) Doing P&C qns can be rather addictive so I
did quite a handful haha..
For question 1, let us consider it from another angle.
If we use 2 paints, there is (2^5 - 2) ways to paint the
doors.
I believe you understand why we need the 2^5, but not why we
need the -2.
Note that 2 of the combinations will result in all the doors
having the same colour of one particular paint. However, we are
concerned with the number of combinations possible with 2 different
paint colour.
Moving on, there are 5C2 ways to select two different paints
from the 5 type of paint available.
Hence, in total there are (5C2) x (2^5 - 2) = 300 ways for us to
use 2 different paints to paint the doors.
On the otherhand, there are only 5 ways if we are to use exactly
only 1 paint, since there are only 5 types of paint.
Hence, we have a total of 300 + 5 = 305 ways in all.
For 2(i), note that the groups are not labelled. Thus, both
groups are interchangable.
For example, the first group having A,B,C in it and the second
group having D,E,F in it is the same as the first group having
D,E,F in it and the second group having A,B,C in it, since we are
not labelling the group.
Hence, we need to divide by 2 to avoid repeating the same
groups, as we are not concern about the order here.
For 2(ii), the reason why we need to divide by 2 for the cases
where both groups are all girls or all boys is because we want to
avoid any repeating, as I have explain in the 2(i).
However, for the one group boy, one group girl case, note that
we are choosing from entirely different sets of people. In the
previous cases, we are recycling the same set of people - E.g.
After getting 3 boys from the set of 12 boys, we get another 3 from
the remaining 9 boys.
In the one group girl one group boy case, we are taking 3 boys
from a set of 12 boys, and 3 girls from a set of unrelated 8
girls.
For 3, I can say it is really an unfriendly question.
First of all, we have 12 boys who are standing in a manner which
cannot be changed.
Now, imagine them to be 12 cones. You can put something between
each cone, as well as at each end of the cones. In short, we have
13 places to put the girls in.
Here is the nasty part which may take a while for you to
understand. I am sorry but I am not thinking or typing very well at
this time in the morning.
We can have:
-all five girls standing apart, separated by the boys
E.g. BBBBGBBBGBBGBGBGB
-two girls sanding together, all three other girls separated by
the boys
-two girls standing together, another two standing together, and
the last standing apart
- three girls standing together, the other two standing away
from each other.
- three girls standing together, the two standing
together
- four girls standing together, one girl standing apart
- five girl standing together
Just to make things worse, when you have:
- one group of 2 girls, 3 groups of 1 girl, there are 4 ways to
arrange the groups
- two groups of 2 girls, 1 group of 1 girl, there are 3 ways to
arrange the groups
- one group of 3 girls, 2 groups of 1 girl, there are 3 ways to
arrange the groups
- one group of 3 girls, one group of 2 girls, there are 2 ways
to arrange the group
- one group of 4 girls, one group of 1 girl, there are 2 ways to
arrange the group
All in all, we have a total of:
(13C5 x 5!) + (13C4 x 5! x 4) + (13C3 x 5! x 3) + (13C3 x 5! x
3) + (13C2 x 5! x 2) + (13C2 x 5! x 2) + (13C1 x 5!) = 742560
For 4), I cannot get the answer, so you will have to wait for my
boss or eagle to come here.
For 5), There are 17 people. Each person will shake the hand of
14 people. Assume that everybody actually does that on their own
initiative, we will have 17 x 14.
However, this means that everyone is shaking the hand of those
who have previously offered to shake hand with them. Hence, there
is a repeat of hand-shaking.
Thus, we have (17 x 14)/2 = 119
Where does the factorial comes from is something which I have no
idea about though (or is unable to recall due to fatigue).