Chapter 4 – Applications of generating functions