My brain is dead. Anyone want to give hints on part b? I had it but then I had to think of something else and I can't remember what I was thinking about previously. A was the easy part, though:
A) Don't think of it as assigning the books to shelves, but rather shelves to books. The shelves can be your "croissants" and your books just the number of possibilities. Label shelves A, B, C, D and then figure out how many combinations of the letters you can put into 12 places. (AAAAAAAAAAAA, AAAAAAAAAAAB...) I don't want to give too much more away, but there is a formula in the section in which you can use on this method directly.
Devise a 2-step algorithm and then use the product rule. First, decide how many books you'll put on each shelf (find # of solutions to x1+x2+x3+x4=12 as in part A). Second, decide what books you actually put in each shelf (think of different arrangements of 12 books). -Arman Suleimenov