Skip to main content
Logo image

In-Class Notes to Accompany Applied Combinatorics

Handout 8.1 Introduction to Ordinary Generating Functions

Formal Power Series.

PAINFUL!

Handing stuff out again.

Suppose you wanted to make a really boring β€œfruit” basket that contains only apples. Let’s also say that you have only \(6\) (identical) apples available. For aesthetic reasons, you insist that the basket contain exactly \(1\text{,}\) \(3\text{,}\) or \(4\) apples.
Peer instruction questions 1–2.
The generating function for the number of fruit baskets with \(n\) apples subject to these rules is
Now we’ve got oranges, too! We have six (identical) oranges to use in fruit baskets, and we don’t care about aesthetics for oranges. (Still only allow 1, 3, or 4 apples.)
How many ways to make a fruit basket with
\begin{align*} (x+x^{3}+x^{4})\amp(1+x+x^{2}+x^{3}+x^{4}+x^{5}+x^{6})\\\\ \amp= x + x^2 + 2 x^3 + 3 x^4 + 3 x^5 + 3 x^6 + 3 x^7 + 2 x^8 + 2 x^9 + x^{10} \end{align*}
Suppose we now have bananas to add and that we must place at least one banana in a fruit basket. This introduces which factor? Peer instruction question 3

Activity 8.1.1.

Find the generating function in which the coefficient on \(x^{n}\) is the number of fruit baskets containing \(n\) pieces of fruit subject to the following restrictions:
  1. Pears: at least \(3\)
  2. Peaches: an even number
  3. Kiwi: at least \(2\) and no more than \(5\)
  4. Grapefruit: either none or at least \(7\)
Peer instruction question 4.

Activity 8.1.3.

Suppose in the country Combinatoria, they use coins with values 1, 2, 5, 10, 50, and 100. If you would like to write a generating function in which the coefficient on \(x^{n}\) is the number of ways to form a collection of coins worth \(n\) subject to the restriction that the number of coins of value \(5\) is one, three, four, or five, what factor would you introduce into your generating function?

My Own Journey with Generating Functions.

OEIS A293499 (New!)
\begin{equation*} C_{n} \sim \frac{4^{n}}{n^{3/2}\sqrt{\pi}} \end{equation*}