Help for algebraic structures!

Help for algebraic structures!

Four friends, Jim, Joe, Joss, and Jill, are celebrating Christmas together. Each

brought 3 different presents: one for each of their friends.

(a) In how many ways can they arrange the presents in the form of a circle around the

Christmas tree, if the presents for every person are placed one next to another?

(b) After the four friends have unwrapped some presents, the following presents are left

unwrapped: one from Jim, three from Joe, and three from Joss. How many ways can

they arrange these presents in the form of a circle if no two presents from Joe can be

placed one next to another?