Skip to main content
\( \def\negchoose#1#2{\genfrac{[}{]}{0pt}{}{#1}{#2}_{-1}} \newcommand{\mchoose}[2]{\left(\!\binom{#1}{#2}\!\right)} \newcommand{\cycle}[1]{\arraycolsep 5 pt \left(\begin{array}#1\end{array}\right)} \newcommand{\importantarrow}{\Rightarrow} \newcommand{\qchoose}[2]{\left[{#1\atop#2}\right]_q} \newcommand{\bp}{ \begin{enumerate}{\setcounter{enumi}{\value{problemnumber}}}} \newcommand{\ep}{\setcounter{problemnumber}{\value{enumi}} \end{enumerate}} \newcommand{\ignore}[1]{} \renewcommand{\bottomfraction}{.8} \renewcommand{\topfraction}{.8} \newcommand{\apple}{\text{🍎}} \newcommand{\ap}{\apple} \newcommand{\banana}{\text{🍌}} \newcommand{\ba}{\banana} \newcommand{\pear}{\text{🍐}} \newcommand{\pe}{\pear} \DeclareMathOperator{\Fix}{Fix} \DeclareMathOperator{\Orb}{Orb} \newcommand{\F}{\mathcal{F}} \newcommand{\alert}{\fbox} \def\d{\displaystyle} \def\course{Math 228} \newcommand{\f}[1]{\mathfrak #1} \newcommand{\s}[1]{\mathscr #1} \def\N{\mathbb N} \def\B{\mathbf{B}} \def\circleA{(-.5,0) circle (1)} \def\Z{\mathbb Z} \def\circleAlabel{(-1.5,.6) node[above]{$A$}} \def\Q{\mathbb Q} \def\circleB{(.5,0) circle (1)} \def\R{\mathbb R} \def\circleBlabel{(1.5,.6) node[above]{$B$}} \def\C{\mathbb C} \def\circleC{(0,-1) circle (1)} \def\F{\mathbb F} \def\circleClabel{(.5,-2) node[right]{$C$}} \def\A{\mathbb A} \def\twosetbox{(-2,-1.5) rectangle (2,1.5)} \def\X{\mathbb X} \def\threesetbox{(-2,-2.5) rectangle (2,1.5)} \def\E{\mathbb E} \def\O{\mathbb O} \def\U{\mathcal U} \def\pow{\mathcal P} \def\inv{^{-1}} \def\nrml{\triangleleft} \def\st{:} \def\~{\widetilde} \def\rem{\mathcal R} \def\sigalg{$\sigma$-algebra } \def\Gal{\mbox{Gal}} \def\iff{\leftrightarrow} \def\Iff{\Leftrightarrow} \def\land{\wedge} \def\And{\bigwedge} \def\entry{\entry} \def\AAnd{\d\bigwedge\mkern-18mu\bigwedge} \def\Vee{\bigvee} \def\VVee{\d\Vee\mkern-18mu\Vee} \def\imp{\rightarrow} \def\Imp{\Rightarrow} \def\Fi{\Leftarrow} \def\var{\mbox{var}} \def\Th{\mbox{Th}} \def\entry{\entry} \def\sat{\mbox{Sat}} \def\con{\mbox{Con}} \def\iffmodels{\bmodels\models} \def\dbland{\bigwedge \!\!\bigwedge} \def\dom{\mbox{dom}} \def\rng{\mbox{range}} \def\isom{\cong} \DeclareMathOperator{\wgt}{wgt} \newcommand{\vtx}[2]{node[fill,circle,inner sep=0pt, minimum size=4pt,label=#1:#2]{}} \newcommand{\va}[1]{\vtx{above}{#1}} \newcommand{\vb}[1]{\vtx{below}{#1}} \newcommand{\vr}[1]{\vtx{right}{#1}} \newcommand{\vl}[1]{\vtx{left}{#1}} \renewcommand{\v}{\vtx{above}{}} \def\circleA{(-.5,0) circle (1)} \def\circleAlabel{(-1.5,.6) node[above]{$A$}} \def\circleB{(.5,0) circle (1)} \def\circleBlabel{(1.5,.6) node[above]{$B$}} \def\circleC{(0,-1) circle (1)} \def\circleClabel{(.5,-2) node[right]{$C$}} \def\twosetbox{(-2,-1.4) rectangle (2,1.4)} \def\threesetbox{(-2.5,-2.4) rectangle (2.5,1.4)} \def\ansfilename{practice-answers} \def\shadowprops{{fill=black!50,shadow xshift=0.5ex,shadow yshift=0.5ex,path fading={circle with fuzzy edge 10 percent}}} \newcommand{\hexbox}[3]{ \def\x{-cos{30}*\r*#1+cos{30}*#2*\r*2} \def\y{-\r*#1-sin{30}*\r*#1} \draw (\x,\y) +(90:\r) -- +(30:\r) -- +(-30:\r) -- +(-90:\r) -- +(-150:\r) -- +(150:\r) -- cycle; \draw (\x,\y) node{#3}; } \newcommand{\card}[1]{\left| #1 \right|} \newcommand{\twoline}[2]{\begin{pmatrix}#1 \\ #2 \end{pmatrix}} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \)

Section3.4Stirling Numbers of the Second Kind

Let's take a closer look at the Stirling numbers, first introduced in Section 3.1. Recall, we use the notation \(S(k,n)\) to stand for the number of partitions of a \(k\) element set with \(n\) blocks. Here is a brief summary of what we have already discovered.

Directly from the definition, we see that \(S(k,1) = 1\) and \(S(k,k) = 1\text{.}\) From these we can compute the remaining Stirling numbers using the recursion

\begin{equation*} S(k,n) = nS(k-1,n) + S(k-1, n-1). \end{equation*}

This recursion is justified by dividing the partitions of \([k]\) into those which contain \(k\) as a singleton set (there are \(S(k-1, n-1)\) of these) and those that don't (there are \(n\) choices for where \(k\) could for each of the \(S(k-1, n)\) partitions of \([k-1]\) into \(n\) blocks).

From this, we generated Stirling's second triangle.

1
1 1
1 3 1
1 7 6 1
1 15 25 10 1
Activity272

Use the recursion to find the 6th row of the triangle.

In the remainder of this section we will look at ways to compute Stirling numbers directly, and some consequences of the formulas we find.

Subsection3.4.1Formulas for Stirling Numbers (of the second kind)

While we might not have a nice closed formula for all Stirling numbers in terms of \(k\) and \(n\text{,}\) we can give closed formulas for those Stirling numbers close to the edges of the triangle. We have already considered some of these in Activity 198. To get back into the right mindset, start by reproving one of these.

Activity273

Prove \(S(k, k-1) = \binom{k}{2}\text{.}\)

Hint

What are the possible sizes of parts?

The proof of the formula above suggests that looking at the sizes of the blocks might be helpful. Let's see what this might look like with an example.

Activity274

How many ways are there to partition \([5]\) into three sets?

(a)

How many partitions of \([5]\) have two blocks of size 1 and one block of size 3?

(b)

How many partitions of \([5]\) have one block of size 1 and two of size 2?

Hint

Careful here. The answer is NOT \(\binom{4}{2}\binom{4}{2}\text{.}\) Do you see why?

(c)

Are there any other types of partitions we need to consider? What is \(S(5,3)\text{?}\)

(d)

Generalize! Find a formula for \(S(k, k-2)\text{.}\)

(e)

A friend tells you that \(S(k,k-2) = \binom{k}{3} + 3 \binom{k}{4}\text{.}\) Prove this is correct also. If this is the formula you found for the previous part, see the hint.

Hint

If you found this formula for \(S(k,k-2)\) in part (e), then pretend your friend claims that \(S(k, k-2) = \binom{k}{3} + \frac{1}{2}\binom{k}{2}\binom{k-2}{2}\) and prove why that is correct too.

Whenever we want to partition \(k\) items in \(n\) blocks, we can consider cases. We will represent each type of case with a type vector consisting of a sequence \((a_1, a_2, \ldots, a_k)\) where each \(a_i\) is the number of blocks that have size \(i\text{.}\) For example, in partitioning \([5]\) into 3 blocks, the previous activity first asked for the number of partitions with type vector \((2,0,1,0,0)\text{,}\) two blocks of size 1 and one of size 3, and then for the number of partitions with type vector \((1,2,0,0,0)\text{,}\) one block of size 1 and two of size 2. Note that \(\sum_{i=1}^k a_i = n\) and \(\sum_{i=1}^k ia_i = k\text{.}\)

Activity275
(a)

How many partitions of \([6]\) are there into 3 blocks? List all the type vectors and the number of partitions for each.

(b)

Generalize to find a formula for \(S(k,k-3)\text{.}\) Then clean up the formula so it is a linear combination of \(\binom{k}{4}\text{,}\) \(\binom{k}{5}\text{,}\) and \(\binom{k}{6}\text{.}\)

Hint

While you might not get this formula by conisdering type vectors, you should be shooting to prove \(S(k, k-3) = \binom{k}{4} + 10 \binom{k}{5} + 16 \binom{k}{6}\)

Activity276

In how many ways can we partition \(k\) items into \(n\) blocks so that we have \(a_i\) blocks of size \(i\) for each \(i\text{?}\) That is, given the type vector \((a_1, a_2, \ldots, a_k)\text{,}\) how many partitions of \([k]\) into \(n\) blocks have that type vector.

Hint

Suppose we make a list of the \(k\) items. We take the first \(a_1\) elements to be the blocks of size 1. How many elements do we need to take to get \(a_2\) blocks of size two? Which elements does it make sense to choose for this purpose?

Activity277

Describe how to compute \(S(k,n)\) in terms of quantities given by the formula you found in Activity 276.

Activity278

Explain why \(S(k, 2) = 2^{k-1} - 1\text{.}\) Then find another expression for \(S(k,2)\) using type vectors to establish an interesting identity.

Interlude: Multinomial Coefficients

Recall that the Stirling numbers counted the number of ways to distribute 9 distinct sandwiches to three identical sandwich bags. This suggests a more realistic question.

Activity279

In how many ways may the caterer distribute the nine sandwiches into three identical bags so that each bag gets exactly three? Answer this question.

Hint

What if the question asked about six sandwiches and two distinct bags? How does having identical bags change the answer?

Activity280

In how many ways can the sandwiches of Activity 279 be placed into distinct bags so that each bag gets exactly three?

This is an example of a multinomial coefficient. Although these are not directly related to Stirling numbers, we can use the ideas of type vectors to investigate them. Let's do that now.

Activity281

In how many ways may we label the elements of a \(k\)-element set with \(n\) distinct labels (numbered 1 through \(n\)) so that label \(i\) is used \(j_i\) times? (If we think of the labels as \(y_1, y_2, \ldots, y_n\text{,}\) then we can rephrase this question as follows. How many functions are there from a \(k\)-element set \(K\) to a set \(N=\{y_1,y_2,\ldots y_n\}\) so that \(y_i\) is the image of \(j_i\) elements of \(K\text{?}\)) This number is called a multinomial coefficient and denoted by

\begin{equation*} \binom{k}{j_1,j_2,\ldots, j_n}. \end{equation*}
Hint1

What if the \(j_i\)'s don't add to \(k\text{?}\)

Hint2

Think about listing the elements of the \(k\)-element set and labeling the first \(j_1\) elements with label number 1.

Activity282

Explain how to compute the number of functions from a \(k\)-element set \(K\) to an \(n\)-element set \(N\) by using multinomial coefficients.

Hint

The sum principle will help here.

Activity283

Explain how to compute the number of functions from a \(k\)-element set \(K\) onto an \(n\)-element set \(N\) by using multinomial coefficients.

Hint

How are the relevant \(j_i\)'s in the multinomial coefficients you use here different from the \(j_i\)'s in the previous problem.

Activity284

What do multinomial coefficients have to do with expanding the \(k\)th power of a multinomial \(x_1+x_2+\cdots+x_n\text{?}\) This result is called the multinomial theorem.

Hint

Think about how binomial coefficients relate to expanding a power of a binomial and note that the binomial coefficient \(\binom{n}{k}\) and the multinomial coefficient \(\binom{n}{k,n-k}\) are the same.

Subsection3.4.2Identities with Stirling Numbers

The entries in the Pascal Triangle, \(\binom{n}{k}\text{,}\) satisfy the nice recursion \(\binom{n}{k} = \binom{n - 1}{k} + \binom{n - 1}{k - 1}\) and also have a closed formula: \(\binom{n}{k} = \frac{n!}{k!(n - k)!}\text{.}\) Activity 200 gives us a recursion for the Stirling numbers \(S(n,k)\) and, unfortunately, the best we can do for a “closed” formula is the following. 8 This is not really a closed formula since the number of terms in the summation is not fixed.

Activity286

What does Theorem 3.4.1 tell us about \(S(k, 2)\) (which we already know)? What do we get for \(S(k,3)\text{?}\)

Here is another result identity involving Stirling numbers.

Activity287

Prove Theorem 3.4.2

Hint

You have already done this as well, although not with \(x\text{.}\)

It is in this form that James Stirling originally developed these numbers. \(S(k,n)\) is used to convert from powers to binomial coefficients as shown in the following:

The remainder of this section contains some additional activities related to the identities above and Stirling numbers in general.

Activity289

List the sequence of elements that are row sums of the Stirling Triangle.

Activity290

How many subsets \(\{a,b,c\}\) are there of \(\{2,3,4,\ldots\}\) such that \(abc = 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 \cdot 13 \cdot 17\text{?}\)

Activity291

Let \(S = \{2,3,4,\ldots\}\text{.}\) How many ordered triples \((a,b,c)\) are there in \(S\times S \times S\) such that \(abc = 2 \cdot 3 \cdot 5 \cdot 7 \cdot 11 \cdot 13 \cdot 17\text{?}\)

Activity292

Express \(x^3\) as suggested in Theorem 3.4.2. Also, multiply your answer out to verify.

Activity293

Use your results in Activity 292 to express \(x^3\) as a linear combination of the binomial coefficients \(\binom{x}{1}\text{,}\) \(\binom{x}{2}\text{,}\) and \(\binom{x}{3}\text{.}\)

Activity294

Determine the following:

(a)

\(a, b, c\) so that \(n^4 = 24\binom{n}{4} + 6a\binom{n}{3}+2b\binom{n}{2} + c \binom{n}{1}\text{.}\)

(b)

\(a, b, c, d\) so that \(n^5 = 5!\binom{n}{5} + a\binom{n}{4} + b\binom{n}{3} + c \binom{n}{2} + d \binom{n}{1}\text{.}\)

Activity295

Express \(1^4 + 2^4 + 3^4 + \cdots + n^4\) as a polynomial in \(n\text{.}\)

Activity296

Why is \(4^n - 4\cdot 3^n + 6\cdot 2^n - 4\) always divisible by 24?