Giter Club home page Giter Club logo

Comments (1)

CSMsamuel avatar CSMsamuel commented on August 16, 2024

一个非生成的方法是这样的
第二类 Stirling 数 $S\left( n,k \right)$. 即将 n 个可区分小球放入 k 个不可区分盒子的方法数(不允许盒子为空).

我们记 $A_{i}=\left{ 第i个盒子为空 \right}$,则

$$
k!S\left( n,k \right)=\left| \bar{A}{1}\cap\cdots\cap \bar{A}{k} \right|=\left| S \right|-\left| A_{1}\cup\cdots\cup A_{k} \right|
$$

由于 $\left| A_{i_{1}}\cap A_{i_{2}}\cap\cdots\cap A_{i_{s}} \right|=\left( k-s \right)^{n}$,则由容斥原理即得

$$ \begin{aligned} k!S\left( n,k \right)&=k^{n}-\sum\limits_{i=1}^{k-1}\left( k-i \right)^{n}\binom{k}{i}\left( -1 \right)^{i-1}\\ &=\sum\limits_{i=0}^{k}\left( -1 \right)^{i}\binom{k}{i}\left( k-i \right)^{n}\\ &=\sum\limits_{i=0}^{k}\left( -1 \right)^{k-i}\binom{k}{i}i^{n} \end{aligned} $$

from statistical-learning-method-solutions-manual.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.