In how many ways can 5 boys and 4 girls be arranged on a bench if

(a) Boys and girls are in a separate group
(b) Mary and Phillip wish to stay together
(C) There is no restriction
(d) John and Daniel wish to stay together

3 answers

a) the boys could be on the left as a group or on the right as a group
number of ways = 2(5!)(4!) = ...

b) they can only be together when they stand next to each other near the
middly
number of ways = 2(4!)(1)(1)(3!) = ...

c) no restriction.... number of ways = 9!

d) you do it, let me know how you did it.
I would assume that case b) doesn't depend on case a), in which case Mary and Phillip can be considered as one person (with 2 ways to position them relative to each other), so:
2(8!) ways.
8c8×2