<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.33dai.wiki/index.php?action=history&amp;feed=atom&amp;title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3%2F07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94</id>
	<title>06-数学相关/07-组合数与反演 - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.33dai.wiki/index.php?action=history&amp;feed=atom&amp;title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3%2F07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94"/>
	<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;action=history"/>
	<updated>2026-05-20T23:50:22Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=373&amp;oldid=prev</id>
		<title>33DAI：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=373&amp;oldid=prev"/>
		<updated>2026-05-20T18:12:11Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年5月20日 (三) 18:12的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key my_wiki:diff:1.41:old-372:rev-373 --&gt;
&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=372&amp;oldid=prev</id>
		<title>-&gt;Importer：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=372&amp;oldid=prev"/>
		<updated>2026-05-20T16:50:33Z</updated>

		<summary type="html">&lt;p&gt;批量导入三三文档&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年5月20日 (三) 16:50的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>-&gt;Importer</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=273&amp;oldid=prev</id>
		<title>33DAI：​导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=273&amp;oldid=prev"/>
		<updated>2026-05-20T16:25:43Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;zh-Hans-CN&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2026年5月20日 (三) 16:25的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;zh-Hans-CN&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;（没有差异）&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>33DAI</name></author>
	</entry>
	<entry>
		<id>https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=272&amp;oldid=prev</id>
		<title>-&gt;Importer：​批量导入三三文档</title>
		<link rel="alternate" type="text/html" href="https://www.33dai.wiki/index.php?title=06-%E6%95%B0%E5%AD%A6%E7%9B%B8%E5%85%B3/07-%E7%BB%84%E5%90%88%E6%95%B0%E4%B8%8E%E5%8F%8D%E6%BC%94&amp;diff=272&amp;oldid=prev"/>
		<updated>2026-05-20T16:22:29Z</updated>

		<summary type="html">&lt;p&gt;批量导入三三文档&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&amp;gt; 本页面大量引用 [https://oiwiki.org/ OI Wiki]&lt;br /&gt;
&lt;br /&gt;
组合数 &amp;lt;math&amp;gt;C_n^m&amp;lt;/math&amp;gt; 常用符号 &amp;lt;math&amp;gt;\dbinom{n}{m}&amp;lt;/math&amp;gt; 来表示，读作&amp;quot;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 选 &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;&amp;quot;。&lt;br /&gt;
&lt;br /&gt;
== 组合数经典性质 ==&lt;br /&gt;
&lt;br /&gt;
选出 &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; 相当于选出 &amp;lt;math&amp;gt;n-m&amp;lt;/math&amp;gt; 个排除：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dbinom{n}{m}=\dbinom{n}{n-m}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
组合数的递推式（杨辉三角）：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dbinom{n}{m}=\dbinom{n-1}{m}+\dbinom{n-1}{m-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
基础性质（杨辉三角的一行）：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dbinom{n}{0}+\dbinom{n}{1}+\dots+\dbinom{n}{n}=\sum_{i=0}^n\dbinom{n}{i}=2^n&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
范德蒙德恒等式：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\sum_{i=0}^k\dbinom{n}{i}\dbinom{m}{k-i}=\dbinom{m+n}{k}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 二项式定理 ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(a+b)^n=\sum_{i=0}^n\dbinom{n}{i}a^{n-i}b^i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 二项式反演 ==&lt;br /&gt;
&lt;br /&gt;
记 &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; 表示恰好使用 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个不同元素形成特定结构的方案数，&amp;lt;math&amp;gt;g_n&amp;lt;/math&amp;gt; 表示从 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个不同元素中选出 &amp;lt;math&amp;gt;i \geq 0&amp;lt;/math&amp;gt; 个元素形成特定结构的总方案数。&lt;br /&gt;
&lt;br /&gt;
若已知 &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; 求 &amp;lt;math&amp;gt;g_n&amp;lt;/math&amp;gt;：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;g_n = \sum_{i = 0}^{n} \binom{n}{i} f_i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
若已知 &amp;lt;math&amp;gt;g_n&amp;lt;/math&amp;gt; 求 &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt;（二项式反演）：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;f_n = \sum_{i = 0}^{n} \binom{n}{i} (-1)^{n-i} g_i&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 狄利克雷卷积 ==&lt;br /&gt;
&lt;br /&gt;
数论函数 &amp;lt;math&amp;gt;f(n)&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;g(n)&amp;lt;/math&amp;gt; 的 Dirichlet 卷积，记作 &amp;lt;math&amp;gt;f \ast g&amp;lt;/math&amp;gt;，定义为：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;(f \ast g)(n) = \sum_{k\mid n}f(k)g\left(\dfrac{n}{k}\right) = \sum_{k\ell=n}f(k)g(\ell)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 莫比乌斯反演 ==&lt;br /&gt;
&lt;br /&gt;
=== 莫比乌斯函数 ===&lt;br /&gt;
&lt;br /&gt;
莫比乌斯函数 &amp;lt;math&amp;gt;\mu(n)&amp;lt;/math&amp;gt; 定义为：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\mu(n)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
1,&amp;amp;n=1,\\&lt;br /&gt;
0,&amp;amp;n\text{ 是某个质数平方的倍数},\\&lt;br /&gt;
(-1)^k,&amp;amp;n \text{ 是 } k \text{ 个不同质数的乘积}.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 莫比乌斯反演 ===&lt;br /&gt;
&lt;br /&gt;
设 &amp;lt;math&amp;gt;f(n),g(n)&amp;lt;/math&amp;gt; 是两个数论函数：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;f(n) = \sum_{d\mid n}g(d) \iff g(n) = \sum_{d\mid n}\mu\left(\dfrac{n}{d}\right)f(d)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 扩展 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;f(n) = \sum_{n\mid d}g(d) \iff g(n) = \sum_{n\mid d}\mu\left(\dfrac{d}{n}\right)f(d)&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 组合数计算 ==&lt;br /&gt;
&lt;br /&gt;
=== 递推求组合数 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
const int MAXN = 2000;&lt;br /&gt;
int C[MAXN + 5][MAXN + 5];&lt;br /&gt;
&lt;br /&gt;
void init()&lt;br /&gt;
{&lt;br /&gt;
    for (int i = 0; i &amp;lt;= MAXN; i++)&lt;br /&gt;
    {&lt;br /&gt;
        C[i][0] = C[i][i] = 1;&lt;br /&gt;
        for (int j = 1; j &amp;lt; i; j++)&lt;br /&gt;
            C[i][j] = (C[i - 1][j] + C[i - 1][j - 1]) % MOD;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 阶乘逆元求组合数 ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
// fact[i] = i! % MOD, invFact[i] = (i!)^-1 % MOD&lt;br /&gt;
int C(int n, int m)&lt;br /&gt;
{&lt;br /&gt;
    if (n &amp;lt; m || m &amp;lt; 0)&lt;br /&gt;
        return 0;&lt;br /&gt;
    return fact[n] * invFact[m] % MOD * invFact[n - m] % MOD;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:数学相关]]&lt;br /&gt;
[[Category:三三文档]]&lt;/div&gt;</summary>
		<author><name>-&gt;Importer</name></author>
	</entry>
</feed>