Stirling number of study notes

This thing is very useful on issues related to number theory and the generating function.

First we look at the definition.

$ \ begin {bmatrix} n \\ m \ end {bmatrix} $ is a first type Stirling number represents $ $ n-th different elements into a $ m $ disordered of circular arrangement of several programs.

$ \ begin {Bmatrix} n \\ m \ end {Bmatrix} $ is a second type of Stirling number represents $ $ n-th different elements into a $ m $ unordered the set number of programs.

Then we can look at it the nature of what fun.


The first is the recursive formula.

$$\begin{bmatrix}n \\ m\end{bmatrix}=\begin{bmatrix}n-1 \\ m-1\end{bmatrix}+(n-1)\begin{bmatrix}n-1 \\ m\end{bmatrix}$$

$$\begin{Bmatrix}n \\ m\end{Bmatrix}=\begin{Bmatrix}n-1 \\ m-1\end{Bmatrix}+m\begin{Bmatrix}n-1 \\ m\end{Bmatrix}$$

Principle is, for the first category, either alone as a circle arranged last element, before or $ n-1 $ elements behind the insertion element.

The second category empathy.


$$\sum_{i=0}^{+\infty}\begin{bmatrix}n \\ i\end{bmatrix}x^i=\prod_{i=0}^{n-1}(x+i)$$

This is a first class generating function Stirling number, we can use mathematical induction to prove that may be derived directly generating function.

Provided $ S_n (x) = \ sum_ {i = 0} ^ n \ begin {bmatrix} n \\ i \ end {bmatrix} x ^ i $, then

$$S_n(x)=\sum_{i=0}^n\begin{bmatrix}n-1 \\ i-1\end{bmatrix}x^i+(n-1)\sum_{i=0}^n\begin{bmatrix}n-1 \\ i\end{bmatrix}x^i$$

$$=xS_{n-1}(x)+(n-1)S_{n-1}(x)$$

$$=(x+n-1)S_{n-1}(x)$$

Proved.


$$\begin{Bmatrix}n \\ m\end{Bmatrix}=\frac{1}{m!}\sum_{i=0}^m(-1)^i\binom{m}{i}(m-i)^n$$

This is a term formula Stirling numbers of the second type, in fact, inclusion and exclusion, enumeration has $ I $ th set is empty, select which sets $ I $, $ n-$ then put different elements to $ $ mi the different collections, then removal of the reference set (divided by $ m! $)

In fact, this is a convolution, it can be $ O (n \ log n) $ determined number of classes of second line of Stirling.

Stirling on how to find the number I wrote a special addition a blog can see.


$$x^k=\sum_{i=0}^ki!\binom{x}{i}\begin{Bmatrix}k \\ i\end{Bmatrix}=\sum_{i=0}^kx^{\underline{i}}\begin{Bmatrix}k \\ i\end{Bmatrix}$$

This is the usual power and the decline of the power of representation, this formula can do some topic.

CF932E

[Funny] GDOI2018 sub-graph

Luogu4827

There is a similar formula:

$$x^k=\sum_{i=0}^k(-1)^{k-i}x^{\overline{i}}\begin{Bmatrix}k \\ i\end{Bmatrix}$$

$$x^{\overline{k}}=\sum_{i=0}^k\begin{bmatrix}k \\ i\end{bmatrix}x^i$$

$$x^{\underline{k}}=\sum_{i=0}^k(-1)^{k-i}\begin{bmatrix}k \\ i\end{bmatrix}x^i$$

(In fact, the second formula above've seen)

There are a number of classes with the topic of the first Stirling (CF960G), I suggest that you think about.

Guess you like

Origin www.cnblogs.com/AThousandMoons/p/10949178.html