The technique of using a generating function is widely used in combinatorics: you have a polynomial where the coefficient of the term of degree n represents how many times n appears in your counting problem. Let’s see a simple example to make it clearer. Let’s say we have 2 standard dice, we roll both and […]