I have 3 pieces of candy to place in 4 lunch boxes. In how many ways can I do this if:
(e) Exactly two of the candies are the same (but the third is different) and all of the lunch boxes are different?
All in 1 4ways
2 the same in 1 box and the odd one in another 4*3=12
2 different in 1 box and the other in another 4*3=12
all in different boxes 4C2*2 = 6*2=12ways
4+12+12+12 = 40ways