<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Etone</id>
	<title>TCS Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://tcs.nju.edu.cn/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Etone"/>
	<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Special:Contributions/Etone"/>
	<updated>2026-06-19T03:13:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Matching_theory&amp;diff=13833</id>
		<title>组合数学 (Fall 2026)/Matching theory</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Matching_theory&amp;diff=13833"/>
		<updated>2026-06-17T04:05:18Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Systems of Distinct Representatives (SDR)== A &amp;#039;&amp;#039;&amp;#039;system of distinct representatives (SDR)&amp;#039;&amp;#039;&amp;#039; (also called a &amp;#039;&amp;#039;&amp;#039;transversal&amp;#039;&amp;#039;&amp;#039;) for a sequence of (not necessarily distinct) sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; is a sequence of &amp;lt;font color=red&amp;gt;&amp;#039;&amp;#039;distinct&amp;#039;&amp;#039;&amp;lt;/font&amp;gt; elements &amp;lt;math&amp;gt;x_1,x_2,\ldots,x_m&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_i\in S_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1,2,\ldots,m&amp;lt;/math&amp;gt;.  === Hall&amp;#039;s marriage theorem === If the sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; have a system of dist...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Systems of Distinct Representatives (SDR)==&lt;br /&gt;
A &#039;&#039;&#039;system of distinct representatives (SDR)&#039;&#039;&#039; (also called a &#039;&#039;&#039;transversal&#039;&#039;&#039;) for a sequence of (not necessarily distinct) sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; is a sequence of &amp;lt;font color=red&amp;gt;&#039;&#039;distinct&#039;&#039;&amp;lt;/font&amp;gt; elements &amp;lt;math&amp;gt;x_1,x_2,\ldots,x_m&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_i\in S_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1,2,\ldots,m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Hall&#039;s marriage theorem ===&lt;br /&gt;
If the sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; have a system of distinct representatives &amp;lt;math&amp;gt;x_1\in S_1,x_2\in S_2,\ldots,x_m\in S_m&amp;lt;/math&amp;gt;, then it is obvious that &amp;lt;math&amp;gt;\left|S_1\cup S_2\cup\cdots\cup S_m\right|\ge |\{x_1,x_2,\ldots,x_m\}|=m&amp;lt;/math&amp;gt;. Moreover, for any subset &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|\ge |\{x_i\mid i\in I\}|=|I|&amp;lt;/math&amp;gt;&lt;br /&gt;
because &amp;lt;math&amp;gt;x_1,x_2,\ldots,x_m&amp;lt;/math&amp;gt; are distinct.&lt;br /&gt;
&lt;br /&gt;
Surprisingly, this obvious necessary condition for the existence of SDR is also sufficient, which is stated by the Hall&#039;s theorem, also called the &#039;&#039;&#039;mariage theorem&#039;&#039;&#039;.&lt;br /&gt;
{{Theorem|Hall&#039;s Theorem|&lt;br /&gt;
:The sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; have a system of distinct representatives (SDR) if and only if&lt;br /&gt;
::&amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|\ge |I|&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The condition that &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|\ge |I|&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m\}&amp;lt;/math&amp;gt; is also called the &#039;&#039;&#039;Hall&#039;s condition&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
We only need to prove the sufficiency of Hall&#039;s condition for the existence of SDR. We do it by induction on &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;. When &amp;lt;math&amp;gt;m=1&amp;lt;/math&amp;gt;, the theorem trivially holds. Now assume the theorem hold for any integer smaller than &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
A subcollection of sets &amp;lt;math&amp;gt;\{S_i\mid i\in I\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;|I|&amp;lt;m\,&amp;lt;/math&amp;gt;, is called a &#039;&#039;&#039;critical family&#039;&#039;&#039; if &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|=|I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Case.1:&#039;&#039;&#039; There is no critical family, i.e. for each &amp;lt;math&amp;gt;I\subset\{1,2,\ldots,m\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|&amp;gt;|I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;S_m&amp;lt;/math&amp;gt; and choose an arbitrary &amp;lt;math&amp;gt;x\in S_m&amp;lt;/math&amp;gt; as its representative. Remove &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; from all other sets by letting &amp;lt;math&amp;gt;S&#039;_i=S_i\setminus \{x\}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;1\le i\le m-1&amp;lt;/math&amp;gt;. Then for all &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m-1\}&amp;lt;/math&amp;gt;, &lt;br /&gt;
:&amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i&#039;\right|\ge \left|\bigcup_{i\in I}S_i\right|-1\ge |I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
Due to the induction hypothesis, &amp;lt;math&amp;gt;S_1,\ldots,S_m&amp;lt;/math&amp;gt; have an SDR, say &amp;lt;math&amp;gt;x_1\in S_1,\ldots,x_{m-1}\in S_{m-1}&amp;lt;/math&amp;gt;. It is obvious that none of them equals &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; because &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; is removed. Thus, &amp;lt;math&amp;gt;x_1,\ldots,x_{m-1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x\,&amp;lt;/math&amp;gt; form an SDR for &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Case.2:&#039;&#039;&#039; There is a critical family, i.e. &amp;lt;math&amp;gt;\exists I\subset\{1,2,\ldots,m\}, |I|&amp;lt;m&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|=|I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;S_{m-k+1},\ldots, S_m&amp;lt;/math&amp;gt; are such a collection of &amp;lt;math&amp;gt;k&amp;lt;m&amp;lt;/math&amp;gt; sets. Hall&#039;s condition certainly holds for these sets. Since &amp;lt;math&amp;gt;k&amp;lt;m&amp;lt;/math&amp;gt;, due to the induction hypothesis, there is an SDR for the sets, say &amp;lt;math&amp;gt;x_{m-k+1}\in S_{m-k+1},\ldots,x_m\in S_m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Again, remove the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; elements from the remaining sets by letting &amp;lt;math&amp;gt;S&#039;_i=S_i\setminus\{x_{m-k+1},\ldots,x_m\}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;1\le i\le m-k&amp;lt;/math&amp;gt;. By the Hall&#039;s condition, &lt;br /&gt;
for any &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m-k\}&amp;lt;/math&amp;gt;, writing that &amp;lt;math&amp;gt;S=\bigcup_{i\in I}S_i\cup\bigcup_{i=m-k+1}^m S_i&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\left|S\right|\ge |I|+k&amp;lt;/math&amp;gt;,&lt;br /&gt;
thus &lt;br /&gt;
:&amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i&#039;\right|\ge |S|-\left|\bigcup_{i=m-k+1}^m S_i\right|\ge |I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
Due to the induction hypothesis, there is an SDR for &amp;lt;math&amp;gt;S_1,\ldots, S_{m-k}&amp;lt;/math&amp;gt;, say &amp;lt;math&amp;gt;x_1\in S_1,\ldots, x_{m-k}\in S_{m-k}&amp;lt;/math&amp;gt;. Combining it with the SDR &amp;lt;math&amp;gt;x_{m-k+1},\ldots, x_{m}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;S_{m-k+1},\ldots, S_{m}&amp;lt;/math&amp;gt;, we have an SDR for &amp;lt;math&amp;gt;S_{1},\ldots, S_{m}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Hall&#039;s theorem is usually stated as a theorem for the existence of matching in a bipartite graph.&lt;br /&gt;
&lt;br /&gt;
In a graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;, a &#039;&#039;&#039;matching&#039;&#039;&#039; &amp;lt;math&amp;gt;M\subseteq E&amp;lt;/math&amp;gt; is an independent set for edges, that is, for any &amp;lt;math&amp;gt;e_1,e_2\in M&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;e_1\neq e_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;e_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;e_2&amp;lt;/math&amp;gt; are not adjacent to the same vertex.&lt;br /&gt;
&lt;br /&gt;
In a bipartite graph &amp;lt;math&amp;gt;G(U,V,E)&amp;lt;/math&amp;gt;, we say &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; is a matching of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; (or a matching of &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;), if every vertex in &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; (or &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;) is adjacent to some edge in &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;, i.e., all vertices in &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; (or &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;) are matched.&lt;br /&gt;
&lt;br /&gt;
In a graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;, for any vertex &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;N(v)&amp;lt;/math&amp;gt; denote the set of neighbors of &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;; and for any vertex set &amp;lt;math&amp;gt;S\subseteq V&amp;lt;/math&amp;gt;, we override the notation as &amp;lt;math&amp;gt;N(S)=\bigcup_{v\in S}N(v)&amp;lt;/math&amp;gt;, i.e. the set of vertices that are adjacent to one of the vertices in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Hall&#039;s Theorem (graph theory form)|&lt;br /&gt;
:A bipartite graph &amp;lt;math&amp;gt;G(U,V,E)&amp;lt;/math&amp;gt; has a matching of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; if and only if&lt;br /&gt;
::&amp;lt;math&amp;gt;\left|N(S)\right|\ge |S|&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;S\subseteq U&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Consider the collection of sets &amp;lt;math&amp;gt;N(u), u\in U&amp;lt;/math&amp;gt;. A matching of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; is an SDR for these sets. Then clearly the theorem is equivalent to Hall&#039;s theorem.&lt;br /&gt;
&lt;br /&gt;
=== Min-max theorems ===&lt;br /&gt;
In combinatorics (and also in other branches of mathematics), there is a family of theorems which relate the minimum of one thing to the maximum of something else. The following are some examples.&lt;br /&gt;
*&#039;&#039;&#039;König-Egerváry theorem&#039;&#039;&#039; (König 1931; Egerváry 1931): in a bipartite graph, the maximum number of edges in a matching equals the minimum number of vertices in a vertex cover.&lt;br /&gt;
*&#039;&#039;&#039;Menger&#039;s theorem&#039;&#039;&#039; (Menger 1927): the minimum number of vertices separating two given vertices in a graph equals the maximum number of vertex-disjoint paths between the two vertices.&lt;br /&gt;
*&#039;&#039;&#039;Dilworth&#039;s theorem&#039;&#039;&#039; (Dilworth 1950): the minimum number of chains which cover a partially ordered set equals the maximum number of elements in an antichain.&lt;br /&gt;
&lt;br /&gt;
== König-Egerváry theorem==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Matching_(graph_theory) &#039;&#039;&#039;matching&#039;&#039;&#039;] in a graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; is a set &amp;lt;math&amp;gt;M\subseteq E&amp;lt;/math&amp;gt; of edges such that no two edges &amp;lt;math&amp;gt;e_1,e_2\in M&amp;lt;/math&amp;gt; shares a vertex. In other words, a matching is just an edge version of independent set.&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Vertex_cover &#039;&#039;&#039;vertex cover&#039;&#039;&#039;] in a graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; is a vertex set &amp;lt;math&amp;gt;C\subseteq V&amp;lt;/math&amp;gt; such that every edge &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt; is adjacent to some &amp;lt;math&amp;gt;u\in C&amp;lt;/math&amp;gt;, that is, all edges in the graph are &amp;quot;covered&amp;quot; by some vertex in the vertex cover &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;König-Egerváry theorem&#039;&#039;&#039; (also called the &#039;&#039;&#039;König&#039;s theorem&#039;&#039;&#039;) states the equality of the sizes of maximum matching and minimum vertex cover.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|König-Egerváry Theorem (graph theory form)|&lt;br /&gt;
:In any bipartite graph, the size of a &#039;&#039;maximum&#039;&#039; matching equals the size of a &#039;&#039;minimum&#039;&#039; vertex cover.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The König-Egerváry theorem can be reformulated in its matrix form. A bipartite graph &amp;lt;math&amp;gt;G(U,V,E)&amp;lt;/math&amp;gt; can be represented as a &amp;lt;math&amp;gt;|U|\times |V|&amp;lt;/math&amp;gt; matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; with 0-1 entries. For any &amp;lt;math&amp;gt;u\in U&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A(u,v)=1&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;. (Note that this definition is different from adjacency matrix for graphs.)&lt;br /&gt;
&lt;br /&gt;
Then, a matching in &amp;lt;math&amp;gt;G(U,V,E)&amp;lt;/math&amp;gt; corresponds to a set of &#039;&#039;&#039;independent 1&#039;s&#039;&#039;&#039; in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;: a set of 1&#039;s that do not share rows or columns. A vertex cover corresponds to a set of rows and columns &#039;&#039;&#039;covering&#039;&#039;&#039; all 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;: a set of rows and columns that every 1-entry in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; belongs to at least one of these rows or columns.&lt;br /&gt;
&lt;br /&gt;
It is easy to see the König-Egerváry theorem for bipartite graphs can be equivalently described as follows:&lt;br /&gt;
&lt;br /&gt;
{{Theorem|König-Egerváry Theorem (matrix form)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; 0-1 matrix. The &#039;&#039;maximum&#039;&#039; number of independent 1&#039;s is equal to the &#039;&#039;minimum&#039;&#039; number of rows and columns required to cover all the 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We give a proof by the Hall&#039;s theorem.&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; denote the maximum number of independent 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; be the minimum number of rows and columns to cover all 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;. Clearly, &amp;lt;math&amp;gt;r\le s&amp;lt;/math&amp;gt;, since any set of &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; independent 1&#039;s requires together &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; rows and columns to cover. &lt;br /&gt;
&lt;br /&gt;
We now prove &amp;lt;math&amp;gt;r\ge s&amp;lt;/math&amp;gt;. Assume that some &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; rows and &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; columns cover all the 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;s=a+b&amp;lt;/math&amp;gt;, i.e. the covering is minimum. Because permuting the rows or the columns change neither &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; nor &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; (as reordering the vertices on either side in a bipartite graph changes nothing to the size of matchings and vertex covers), we may assume that the first &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; rows and the first &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; columns cover the 1&#039;s. Write &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; in the form&lt;br /&gt;
:&amp;lt;math&amp;gt;A=\begin{bmatrix}&lt;br /&gt;
B_{a\times b} &amp;amp;C_{a\times (n-b)}\\&lt;br /&gt;
D_{(m-a)\times b} &amp;amp;E_{(m-a)\times (n-b)}&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;,&lt;br /&gt;
where the submatrix &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; has only zero entries. We will show that there are &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; independent 1&#039;s in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; independent 1&#039;s in &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt;, thus together &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;a+b=s&amp;lt;/math&amp;gt; independent 1&#039;s, which will imply that &amp;lt;math&amp;gt;r\ge s&amp;lt;/math&amp;gt;, as desired.&lt;br /&gt;
&lt;br /&gt;
Define&lt;br /&gt;
:&amp;lt;math&amp;gt;S_i=\{j\mid c_{ij}=1\}&amp;lt;/math&amp;gt;&lt;br /&gt;
It is obvious that &amp;lt;math&amp;gt;S_i\subseteq\{1,2,\ldots,n-b\}&amp;lt;/math&amp;gt;. We claim that the sequence &amp;lt;math&amp;gt;S_1,S_2,\ldots, S_a&amp;lt;/math&amp;gt; has a system of distinct representatives, i.e., we can choose a 1 from each row, no two in the same column. Otherwise, Hall&#039;s theorem tells us that there exists some &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,a\}&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|&amp;lt;|I|&amp;lt;/math&amp;gt;, that is, the 1&#039;s in the rows contained by &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; can be covered by less than &amp;lt;math&amp;gt;|I|&amp;lt;/math&amp;gt; columns. Thus, the 1&#039;s in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; can be covered by &amp;lt;math&amp;gt;a-|I|&amp;lt;/math&amp;gt; and less than &amp;lt;math&amp;gt;|I|&amp;lt;/math&amp;gt; columns, altogether less than &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; rows and columns. Therefore, the 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; can be covered by less than &amp;lt;math&amp;gt;a+b&amp;lt;/math&amp;gt; rows and columns, which contradicts the assumption that the size of the minimum covering of all 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;a+b&amp;lt;/math&amp;gt;. Therefore, we show that &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;a&amp;lt;/math&amp;gt; independent 1&#039;s.&lt;br /&gt;
&lt;br /&gt;
By the same argument, we can show that &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;b&amp;lt;/math&amp;gt; independent 1&#039;s. Since &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; share no rows or columns, the number of independent 1&#039;s in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;r\ge a+b=s&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Dilworth&#039;s theorem ==&lt;br /&gt;
Recall that a [http://en.wikipedia.org/wiki/Partially_ordered_set &#039;&#039;&#039;partially ordered set&#039;&#039;&#039;] (or &#039;&#039;&#039;poset&#039;&#039;&#039;) consists of a set &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; and a binary relation &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; defined on &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;, satisfying&lt;br /&gt;
*&#039;&#039;&#039;reflexivity&#039;&#039;&#039;: &amp;lt;math&amp;gt;x\le x&amp;lt;/math&amp;gt;;&lt;br /&gt;
*&#039;&#039;&#039;antisymmetry&#039;&#039;&#039;: &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y\le x&amp;lt;/math&amp;gt; only if &amp;lt;math&amp;gt;x=y&amp;lt;/math&amp;gt;;&lt;br /&gt;
*&#039;&#039;&#039;transitivity&#039;&#039;&#039;: if &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y\le z&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;x\le z&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Two elements &amp;lt;math&amp;gt;x,y\in P&amp;lt;/math&amp;gt; are said to be &#039;&#039;&#039;comparable&#039;&#039;&#039; if &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y\le x&amp;lt;/math&amp;gt;; and &amp;lt;math&amp;gt;x,y\in P&amp;lt;/math&amp;gt; are &#039;&#039;&#039;incomparable&#039;&#039;&#039; if otherwise.&lt;br /&gt;
&lt;br /&gt;
A poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is a &#039;&#039;&#039;totally ordered set&#039;&#039;&#039;, or a &#039;&#039;&#039;chain&#039;&#039;&#039;, if all pairs of elements in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are comparable. A poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is an &#039;&#039;&#039;antichain&#039;&#039;&#039; if all pairs of elements in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; are incomparable.&lt;br /&gt;
&lt;br /&gt;
Given a poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;, we can partition it into chains. What is the minimum number of chains that we can break &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; into? Dilworth&#039;s theorem tells us that it is equal to the size of the maximum antichain.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Dilworth&#039;s Theorem|&lt;br /&gt;
:Suppose that the largest antichain in the poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; has size &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; can be partitioned into &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; disjoint chains.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; has an antichain &amp;lt;math&amp;gt;|A|&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; can be partitioned into disjoint chains &amp;lt;math&amp;gt;C_1,C_2,\ldots,C_s&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;|A|\le s&amp;lt;/math&amp;gt;, since every chain can pass though an antichain at most once, that is, &amp;lt;math&amp;gt;|C_i\cap A|\le 1&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1,2,\ldots,s&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore, we only need to prove that there exist an antichain &amp;lt;math&amp;gt;A\subseteq P&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;, and a partition of &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; into at most &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; chains.&lt;br /&gt;
&lt;br /&gt;
Define a bipartite graph &amp;lt;math&amp;gt;G(U,V,E)&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;U=V=P&amp;lt;/math&amp;gt;, and for any &amp;lt;math&amp;gt;u\in U&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v\in v&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;u&amp;lt;v&amp;lt;/math&amp;gt; in the poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;. By König-Egerváry theorem, there is a matching &amp;lt;math&amp;gt;M\subseteq E&amp;lt;/math&amp;gt; and a vertex set &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; such that every edge in &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; is adjacent to at least a vertex in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;|M|=|C|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Denote &amp;lt;math&amp;gt;|M|=|C|=m&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; be the set of &#039;&#039;&#039;uncovered&#039;&#039;&#039; elements in poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;, i.e., the elements of &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; that do not correspond to any vertex in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;. Clearly, &amp;lt;math&amp;gt;|A|\ge n-m&amp;lt;/math&amp;gt;. We claim that &amp;lt;math&amp;gt;A\subseteq P&amp;lt;/math&amp;gt; is an antichain. By contradiction, assume there exists &amp;lt;math&amp;gt;x,y\in A&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x&amp;lt;y&amp;lt;/math&amp;gt;. Then, by the definition of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, there exist &amp;lt;math&amp;gt;u_x\in U,v_x\in V&amp;lt;/math&amp;gt; which corresponds to &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;, and  &amp;lt;math&amp;gt;u_y\in U,v_y\in V&amp;lt;/math&amp;gt; which corresponds to &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;u_xv_y\in E&amp;lt;/math&amp;gt;. But since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; includes only those elements whose corresponding vertices are not in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, none of &amp;lt;math&amp;gt;u_x,v_x,u_y,v_y&amp;lt;/math&amp;gt; can be in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, which contradicts the fact that &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is a vertex cover of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; that every edges in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; are adjacent to at least a vertex in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be a family of chains formed by including &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the same chain whenever &amp;lt;math&amp;gt;uv\in M&amp;lt;/math&amp;gt;. A moment thought would tell us that the number of chains in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is equal to the &#039;&#039;&#039;unmatched&#039;&#039;&#039; vertices in &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; (or &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;). Thus, &amp;lt;math&amp;gt;|B|=n-m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Altogether, we construct an antichain of size &amp;lt;math&amp;gt;|A|\ge n-m&amp;lt;/math&amp;gt; and partition the poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;|B|=n-m&amp;lt;/math&amp;gt; disjoint chains. The theorem is proved.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Application: Erdős-Szekeres Theorem ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; be a sequence of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct real numbers.A &#039;&#039;&#039;subsequence&#039;&#039;&#039; of &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;(a_{i_1},a_{i_2},\ldots,a_{i_k})&amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt;i_1&amp;lt;i_2&amp;lt;\cdots&amp;lt;i_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A sequence &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; is &#039;&#039;&#039;increasing&#039;&#039;&#039; if &amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots&amp;lt;a_n&amp;lt;/math&amp;gt;, and &#039;&#039;&#039;decreasing&#039;&#039;&#039; if &amp;lt;math&amp;gt;a_1&amp;gt;a_2&amp;gt;\cdots&amp;gt;a_n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Recall that the Erdős-Szekeres theorem states the existence of long increasing subsequence or decreasing subsequence. Last time we prove this by the pigeonhole principle. Now we use the Dilworth&#039;s theorem to prove it, which is also the original proof due to Erdős-Szekeres.&lt;br /&gt;
{{Theorem|Erdős-Szekeres Theorem|&lt;br /&gt;
:A sequence of more than &amp;lt;math&amp;gt;mn&amp;lt;/math&amp;gt; different real numbers must contain either an increasing subsequence of length &amp;lt;math&amp;gt;m+1&amp;lt;/math&amp;gt;, or a decreasing subsequence of length &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof by Dilworth&#039;s theorem|(Original proof of Erdős-Szekeres)&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_N)&amp;lt;/math&amp;gt; be the sequence of &amp;lt;math&amp;gt;N&amp;gt;mn&amp;lt;/math&amp;gt; distinct real numbers. Define the poset as&lt;br /&gt;
:&amp;lt;math&amp;gt;P=\{(i,a_i)\mid i=1,2,\ldots,N\}&amp;lt;/math&amp;gt;&lt;br /&gt;
and &amp;lt;math&amp;gt;(i,a_i)\le (j,a_j)&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;i\le j&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_i\le a_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A chain &amp;lt;math&amp;gt;(i_1,a_{i_1})&amp;lt;(i_2,a_{i_2})&amp;lt;\cdots&amp;lt;(i_k,a_{i_k})&amp;lt;/math&amp;gt; must have &amp;lt;math&amp;gt;i_1&amp;lt;i_2&amp;lt;\cdots&amp;lt;i_k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;a_{i_1}&amp;lt;a_{i_2}&amp;lt;\cdots&amp;lt;a_{i_k}&amp;lt;/math&amp;gt;. Thus, each chain correspond to an increasing subsequence.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(j_1,a_{j_1}),(j_2,a_{j_2}),\cdots,(j_k,a_{j_k})&amp;lt;/math&amp;gt; be an antichain. Without loss of generality, we can assume that &amp;lt;math&amp;gt;j_1&amp;lt;j_2&amp;lt;\cdots&amp;lt;j_k&amp;lt;/math&amp;gt;. The only case that these elements are non-comparable is that &amp;lt;math&amp;gt;a_{j_1}&amp;gt;a_{j_2}&amp;gt;\cdots&amp;gt;a_{j_k}&amp;lt;/math&amp;gt;, otherwise if &amp;lt;math&amp;gt;a_{j_s}&amp;lt; a_{j_t}&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;s&amp;lt;t&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;(j_s,a_{j_s})&amp;lt;(j_t,a_{j_t})&amp;lt;/math&amp;gt;, which contradicts the fact that it is an antichain. Thus, each antichain corresponds to a decreasing subsequence.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; has an antichain of size &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_N)&amp;lt;/math&amp;gt; has a decreasing subsequence of size &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt;, and we are done.&lt;br /&gt;
&lt;br /&gt;
Alternatively, if the largest antichain in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is of size at most &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, then by Dilworth&#039;s theorem, &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; can be partitioned into no more than &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; disjoint chains, due to pigeonhole principle, one of which must be of length &amp;lt;math&amp;gt;m+1&amp;lt;/math&amp;gt;, which means  &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_N)&amp;lt;/math&amp;gt; has an increasing subsequence of size &amp;lt;math&amp;gt;m+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Application: Hall&#039;s Theorem ===&lt;br /&gt;
To recognize the power of Dilworth&#039;s theorem, we show that it contains Hall&#039;s theorem as a special case!&lt;br /&gt;
{{Theorem|Hall&#039;s Theorem |&lt;br /&gt;
:The sets &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_m&amp;lt;/math&amp;gt; have a system of distinct representatives (SDR) if and only if&lt;br /&gt;
::&amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|\ge |I|&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,m\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof by Dilworth&#039;s theorem|&lt;br /&gt;
As we discussed before, the necessity of Hall&#039;s condition for the existence of SDR is easy. We prove its sufficiency by Dilworth&#039;s theorem.&lt;br /&gt;
&lt;br /&gt;
Denote &amp;lt;math&amp;gt;X=\bigcup_{i=1}^mS_i&amp;lt;/math&amp;gt;. Construct a poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; by letting &amp;lt;math&amp;gt;P=X\cup\{S_1,S_2,\ldots,S_m\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x&amp;lt;S_{i}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;x\in S_{i}&amp;lt;/math&amp;gt;. There are no other comparabilities.&lt;br /&gt;
&lt;br /&gt;
It is obvious that &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is an antichain. We claim it is also the largest one. To prove this, let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; be an arbitrary antichain, and let &amp;lt;math&amp;gt;I=\{i\mid S_i\in A\}&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; contains no elements of &amp;lt;math&amp;gt;\bigcup_{i\in I}S_i&amp;lt;/math&amp;gt;, since if &amp;lt;math&amp;gt;x\in A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x\in S_i\in A&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;x&amp;lt;S_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; cannot be an antichain. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|A|\le |I|+|X|-\left|\bigcup_{i\in I}S_i\right|&amp;lt;/math&amp;gt;&lt;br /&gt;
and by Hall&#039;s condition &amp;lt;math&amp;gt;\left|\bigcup_{i\in I}S_i\right|\ge|I|&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;|A|\le |X|&amp;lt;/math&amp;gt;, as claimed.&lt;br /&gt;
&lt;br /&gt;
Now, Dilworth&#039;s theorem implies that &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; can be partitioned into &amp;lt;math&amp;gt;|X|&amp;lt;/math&amp;gt; chains. Since &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is an antichain and each chain can pass though an antichain on at most one element, each of the &amp;lt;math&amp;gt;|X|&amp;lt;/math&amp;gt; chains contain precisely one &amp;lt;math&amp;gt;x\in X&amp;lt;/math&amp;gt;. And since &amp;lt;math&amp;gt;\{S_1,\ldots,S_m\}&amp;lt;/math&amp;gt; is also an antichain, each of these &amp;lt;math&amp;gt;|X|&amp;lt;/math&amp;gt; chains contain at most one &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt;. Altogether, the &amp;lt;math&amp;gt;|X|&amp;lt;/math&amp;gt; chains are in the form:&lt;br /&gt;
:&amp;lt;math&amp;gt;\{x_1,S_1\},\{x_2,S_2\},\ldots,\{x_m,S_m\},\{x_{m+1}\}\ldots,\{x_{|X|}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Since the only comparabilities in our posets are &amp;lt;math&amp;gt;x\in S_i&amp;lt;/math&amp;gt; and the above chains are disjoint, we have &amp;lt;math&amp;gt;x_1\in S_1, x_2\in S_2,\ldots,x_m\in S_m&amp;lt;/math&amp;gt; as an SDR.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Flow and Cut==&lt;br /&gt;
&lt;br /&gt;
=== Flows ===&lt;br /&gt;
An instance of the maximum flow problem consists of:&lt;br /&gt;
* a directed graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;;&lt;br /&gt;
* two distinguished vertices &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; (the &#039;&#039;&#039;source&#039;&#039;&#039;) and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; (the &#039;&#039;&#039;sink&#039;&#039;&#039;), where the in-degree of &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and the out-degree of &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; are both 0;&lt;br /&gt;
* the &#039;&#039;&#039;capacity function&#039;&#039;&#039;  &amp;lt;math&amp;gt;c:E\rightarrow\mathbb{R}^+&amp;lt;/math&amp;gt; which associates each directed edge &amp;lt;math&amp;gt;(u,v)\in E&amp;lt;/math&amp;gt; a nonnegative real number &amp;lt;math&amp;gt;c_{uv}&amp;lt;/math&amp;gt; called the &#039;&#039;&#039;capacity&#039;&#039;&#039; of the edge.&lt;br /&gt;
&lt;br /&gt;
The quadruple &amp;lt;math&amp;gt;(G,c,s,t)&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;flow network&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
A function &amp;lt;math&amp;gt;f:E\rightarrow\mathbb{R}^+&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;flow&#039;&#039;&#039; (to be specific an &#039;&#039;&#039;&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow&#039;&#039;&#039;) in the network &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; if it satisfies:&lt;br /&gt;
* &#039;&#039;&#039;Capacity constraint:&#039;&#039;&#039; &amp;lt;math&amp;gt;f_{uv}\le c_{uv}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;(u,v)\in E&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &#039;&#039;&#039;Conservation constraint:&#039;&#039;&#039; &amp;lt;math&amp;gt;\sum_{u:(u,v)\in E}f_{uv}=\sum_{w:(v,w)\in E}f_{vw}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;v\in V\setminus\{s,t\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;value&#039;&#039;&#039; of the flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\sum_{v:(s,v)\in E}f_{sv}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Given a flow network, the maximum flow problem asks to find the flow of the maximum value.&lt;br /&gt;
&lt;br /&gt;
The maximum flow problem can be described as the following linear program.&lt;br /&gt;
:&amp;lt;math&amp;gt;\text{maximize} \quad \sum_{v:(s,v)\in E}f_{sv}&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{s.t.} &lt;br /&gt;
&amp;amp;&amp;amp;f_{uv} &amp;amp;\le c_{uv} &amp;amp;\quad&amp;amp; \forall (u,v)\in E\\&lt;br /&gt;
&amp;amp;&amp;amp;\sum_{u:(u,v)\in E}f_{uv}-\sum_{w:(v,w)\in E}f_{vw} &amp;amp;=0 &amp;amp;\quad&amp;amp; \forall v\in V\setminus\{s,t\}\\&lt;br /&gt;
&amp;amp;&amp;amp;f_{uv} &amp;amp;\ge 0 &amp;amp;\quad&amp;amp; \forall (u,v)\in E&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Cuts ===&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;(G(V,E),c,s,t)&amp;lt;/math&amp;gt; be a flow network. Let &amp;lt;math&amp;gt;S\subset V&amp;lt;/math&amp;gt;. We call &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; an &#039;&#039;&#039;&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut&#039;&#039;&#039; if &amp;lt;math&amp;gt;s\in S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t\not\in S&amp;lt;/math&amp;gt;.&lt;br /&gt;
:The &#039;&#039;&#039;value&#039;&#039;&#039; of  the cut (also called the &#039;&#039;&#039;capacity&#039;&#039;&#039; of the cut) is defined as &amp;lt;math&amp;gt;\sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A fundamental fact in flow theory is that cuts always upper bound flows.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;(G(V,E),c,s,t)&amp;lt;/math&amp;gt; be a flow network. Let &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; be an arbitrary flow in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; be an arbitrary &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{v:(s,v)}f_{sv}\le \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:that is, the value of any flow is no greater than the value of any cut.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|By the definition of &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut, &amp;lt;math&amp;gt;s\in S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t\not\in S&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Due to the conservation of flow, &lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{u\in S}\left(\sum_{v:(u,v)\in E}f_{uv}-\sum_{v:(v,u)\in E}f_{vu}\right)=\sum_{v:(s,v)\in E}f_{sv}+\sum_{u\in S\setminus\{s\}}\left(\sum_{v:(u,v)\in E}f_{uv}-\sum_{v:(v,u)\in E}f_{vu}\right)=\sum_{v:(s,v)\in E}f_{sv}\,.&amp;lt;/math&amp;gt;&lt;br /&gt;
On the other hand, summing flow over edges,&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v\in S}\left(\sum_{u:(u,v)\in E}f_{uv}-\sum_{u:(v,u)\in E}f_{vu}\right)=\sum_{u\in S,v\in S\atop (u,v)\in E}\left(f_{uv}-f_{uv}\right)+\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}=\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}\,.&amp;lt;/math&amp;gt;&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)\in E}f_{sv}=\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}\le\sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}\le  \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}\,,&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Augmenting paths ===&lt;br /&gt;
{{Theorem|Definition (Augmenting path)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; be a flow in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. An &#039;&#039;&#039;augmenting path to &amp;lt;math&amp;gt;u_k&amp;lt;/math&amp;gt;&#039;&#039;&#039; is a sequence of distinct vertices &amp;lt;math&amp;gt;P=(u_0,u_1,\cdots, u_k)&amp;lt;/math&amp;gt;, such that &lt;br /&gt;
:* &amp;lt;math&amp;gt;u_0=s\,&amp;lt;/math&amp;gt;;&lt;br /&gt;
:and each pair of consecutive vertices &amp;lt;math&amp;gt;u_{i}u_{i+1}\,&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; corresponds to either a &#039;&#039;&#039;forward edge&#039;&#039;&#039; &amp;lt;math&amp;gt;(u_{i},u_{i+1})\in E&amp;lt;/math&amp;gt; or a &#039;&#039;&#039;reverse edge&#039;&#039;&#039; &amp;lt;math&amp;gt;(u_{i+1},u_{i})\in E&amp;lt;/math&amp;gt;, and &lt;br /&gt;
:* &amp;lt;math&amp;gt;f(u_i,u_{i+1})&amp;lt;c(u_i,u_{i+1})\,&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;u_{i}u_{i+1}\,&amp;lt;/math&amp;gt; corresponds to a forward edge &amp;lt;math&amp;gt;(u_{i},u_{i+1})\in E&amp;lt;/math&amp;gt;, and &lt;br /&gt;
:* &amp;lt;math&amp;gt;f(u_{i+1},u_i)&amp;gt;0\,&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;u_{i}u_{i+1}\,&amp;lt;/math&amp;gt; corresponds to a reverse edge &amp;lt;math&amp;gt;(u_{i+1},u_{i})\in E&amp;lt;/math&amp;gt;.&lt;br /&gt;
:If &amp;lt;math&amp;gt;u_k=t\,&amp;lt;/math&amp;gt;, we simply call &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; an &#039;&#039;&#039;augmenting path&#039;&#039;&#039;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; be a flow in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Suppose there is an augmenting path &amp;lt;math&amp;gt;P=u_0u_1\cdots u_k&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;u_0=s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;u_k=t&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt; be a positive constant satisfying &lt;br /&gt;
*&amp;lt;math&amp;gt;\epsilon \le c(u_{i},u_{i+1})-f(u_i,u_{i+1})&amp;lt;/math&amp;gt; for all forward edges &amp;lt;math&amp;gt;(u_{i},u_{i+1})\in E&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;;&lt;br /&gt;
*&amp;lt;math&amp;gt;\epsilon \le f(u_{i+1},u_i)&amp;lt;/math&amp;gt; for all reverse edges &amp;lt;math&amp;gt;(u_{i+1},u_i)\in E&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;.&lt;br /&gt;
Due to the definition of augmenting path, we can always find such a positive &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Increase &amp;lt;math&amp;gt;f(u_i,u_{i+1})&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; for all forward edges &amp;lt;math&amp;gt;(u_{i},u_{i+1})\in E&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; and decrease &amp;lt;math&amp;gt;f(u_{i+1},u_i)&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; for all reverse edges &amp;lt;math&amp;gt;(u_{i+1},u_i)\in E&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;. Denote the modified flow by &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt;. It can be verified that &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt; satisfies the capacity constraint and conservation constraint thus is still a valid flow. On the other hand, the value of the new flow &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt;&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)\in E}f_{sv}&#039;=\epsilon+\sum_{v:(s,v)\in E}f_{sv}&amp;gt;\sum_{v:(s,v)\in E}f_{sv}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore, the value of the flow can be &amp;quot;augmented&amp;quot; by adjusting the flow on the augmenting path. This immediately implies that if a flow is maximum, then there is no augmenting path. Surprisingly, the converse is also true, thus maximum flows are &amp;quot;characterized&amp;quot; by augmenting paths.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:A flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is maximum if and only if there are no augmenting paths.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|We have already proved the &amp;quot;only if&amp;quot; direction above. Now we prove the &amp;quot;if&amp;quot; direction.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;gt;. Clearly &amp;lt;math&amp;gt;s\in S&amp;lt;/math&amp;gt;, and since there is no augmenting path &amp;lt;math&amp;gt;t\not\in S&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; defines an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut. &lt;br /&gt;
&lt;br /&gt;
We claim that&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}&amp;lt;/math&amp;gt;,&lt;br /&gt;
that is, the value of flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; approach the value of the cut &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; defined above. By the above lemma, this will imply that the current flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is maximum.&lt;br /&gt;
&lt;br /&gt;
To prove this claim, we first observe that&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu}&amp;lt;/math&amp;gt;.&lt;br /&gt;
This identity is implied by the flow conservation constraint, and holds for any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We then claim that &lt;br /&gt;
*&amp;lt;math&amp;gt;f_{uv}=c_{uv}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;u\in S,v\not\in S, (u,v)\in E&amp;lt;/math&amp;gt;; and &lt;br /&gt;
*&amp;lt;math&amp;gt;f_{vu}=0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;u\in S,v\not\in S, (v,u)\in E&amp;lt;/math&amp;gt;.&lt;br /&gt;
If otherwise, then the augmenting path to &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; apending &amp;lt;math&amp;gt;uv&amp;lt;/math&amp;gt; becomes a new augmenting path to &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, which contradicts that &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; includes all vertices to which there exist augmenting paths.&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}f_{uv}-\sum_{u\in S,v\not\in S\atop (v,u)\in E}f_{vu} = \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}&amp;lt;/math&amp;gt;.&lt;br /&gt;
As discussed above, this proves the theorem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Max-Flow Min-Cut ==&lt;br /&gt;
&lt;br /&gt;
=== The max-flow min-cut theorem ===&lt;br /&gt;
{{Theorem|Max-Flow Min-Cut Theorem|&lt;br /&gt;
:In a flow network, the maximum value of any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow equals the minimum value of any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; be a flow with maximum value, so there is no augmenting path.&lt;br /&gt;
&lt;br /&gt;
Again, let &lt;br /&gt;
:&amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
As proved above, &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; forms an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut, and&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv}&amp;lt;/math&amp;gt;,&lt;br /&gt;
that is, the value of flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; equals the value of cut &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Since we know that all &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flows are not greater than any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut, the value of flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; equals the minimum value of any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Flow Integrality Theorem ===&lt;br /&gt;
{{Theorem|Flow Integrality Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;(G,c,s,t)&amp;lt;/math&amp;gt; be a flow network with integral capacity &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;. There exists an integral flow which is maximum.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; be an integral flow of maximum value. If there is an augmenting path, since both &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; are integral, a new flow can be constructed of value 1+the value of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;, contradicting that &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is maximum over all integral flows. Therefore, there is no augmenting path, which means that &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is maximum over all flows, integral or not.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Applications: Menger&#039;s theorem ===&lt;br /&gt;
Given an undirected graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; and two distinct vertices &amp;lt;math&amp;gt;s,t\in V&amp;lt;/math&amp;gt;, a set of edges &amp;lt;math&amp;gt;C\subseteq E&amp;lt;/math&amp;gt; is called an &#039;&#039;&#039;&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut&#039;&#039;&#039;, if deleting edges in &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; disconnects &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A simple path from &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; is called an &#039;&#039;&#039;&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; path&#039;&#039;&#039;. Two paths are said to be &#039;&#039;&#039;edge-disjoint&#039;&#039;&#039; if they do not share any edge.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Menger 1927)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be an arbitrary undirected graph and &amp;lt;math&amp;gt;s,t\in V&amp;lt;/math&amp;gt; be two distinct vertices. The minimum size of any &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut equals the maximum number of edge-disjoint &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; paths.&lt;br /&gt;
}}&lt;br /&gt;
{{proof|&lt;br /&gt;
Construct a directed graph &amp;lt;math&amp;gt;G&#039;(V,E&#039;)&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; as follows: replace every undirected edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;s,t\not\in\{u,v\}&amp;lt;/math&amp;gt; by two directed edges &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(v,u)&amp;lt;/math&amp;gt;; replace every undirected edge &amp;lt;math&amp;gt;sv\in E&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;(s,v)&amp;lt;/math&amp;gt;, and very undirected edge &amp;lt;math&amp;gt;vt\in E&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;(v,t)&amp;lt;/math&amp;gt;. Then assign every directed edge with capacity 1.&lt;br /&gt;
&lt;br /&gt;
It is easy to verify that in the flow network constructed as above, the followings hold:&lt;br /&gt;
*An integral &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow corresponds to a set of &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; paths in the undirected graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, where the value of the flow is the number of &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; paths.&lt;br /&gt;
*An &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut in the flow network corresponds to an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut in the undirected graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; with the same value.&lt;br /&gt;
The Menger&#039;s theorem follows as a direct consequence of the max-flow min-cut theorem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Applications: König-Egerváry theorem ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be a graph. An edge set &amp;lt;math&amp;gt;M\subseteq E&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;matching&#039;&#039;&#039; if no edge in &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; shares any vertex. A vertex set &amp;lt;math&amp;gt;C\subseteq V&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;vertex cover&#039;&#039;&#039; if for any edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, either &amp;lt;math&amp;gt;u\in C&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;v\in C&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (König 1936)|&lt;br /&gt;
:In any bipartite graph &amp;lt;math&amp;gt;G(V_1,V_2,E)&amp;lt;/math&amp;gt;, the size of a &#039;&#039;maximum&#039;&#039; matching equals the size of a &#039;&#039;minimum&#039;&#039; vertex cover.&lt;br /&gt;
}}&lt;br /&gt;
We now show how a reduction of bipartite matchings to flows. &lt;br /&gt;
&lt;br /&gt;
Construct a flow network &amp;lt;math&amp;gt;(G&#039;(V,E&#039;),c,s,t)&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
* &amp;lt;math&amp;gt;V=V_1\cup V_2\cup\{s,t\}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; are two new vertices.&lt;br /&gt;
* For ever &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, add &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;E&#039;&amp;lt;/math&amp;gt;; for every &amp;lt;math&amp;gt;u\in V_1&amp;lt;/math&amp;gt;, add &amp;lt;math&amp;gt;(s,u)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;E&#039;&amp;lt;/math&amp;gt;; and for every &amp;lt;math&amp;gt;v\in V_2&amp;lt;/math&amp;gt;, add &amp;lt;math&amp;gt;(v,t)&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;E&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Let &amp;lt;math&amp;gt;c_{su}=1&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;u\in V_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;c_{vt}=1&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;v\in V_2&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;c_{uv}=\infty&amp;lt;/math&amp;gt; for every bipartite edges &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:The size of a maximum matching in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is equal to the value of a maximum &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{proof|&lt;br /&gt;
Given an integral &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;M=\{uv\in E\mid f_{uv}=1\}&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; must be a matching since for every &amp;lt;math&amp;gt;u\in V_1&amp;lt;/math&amp;gt;. To see this, observe that there is at most one &amp;lt;math&amp;gt;v\in V_2&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;f_{uv}=1&amp;lt;/math&amp;gt;, because of that &amp;lt;math&amp;gt;f_{su}\le c_{su}=1&amp;lt;/math&amp;gt; and conservation of flows. The same holds for vertices in &amp;lt;math&amp;gt;V_2&amp;lt;/math&amp;gt; by the same argument. Therefore, each flow corresponds to a matching.&lt;br /&gt;
&lt;br /&gt;
Given a matching &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; in bipartite graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, define an integral flow &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; as such: for &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f_{uv}=1&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;uv\in M&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f_{uv}=0&amp;lt;/math&amp;gt; if otherwise; for &amp;lt;math&amp;gt;u\in V_1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f_{su}=1&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;uv\in M&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f_{su}=0&amp;lt;/math&amp;gt; if otherwise; for &amp;lt;math&amp;gt;v\in V_2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f_{vt}=1&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;uv\in M&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;f_{vt}=0&amp;lt;/math&amp;gt; if otherwise.&lt;br /&gt;
&lt;br /&gt;
It is easy to check that &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is valid &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; flow in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;. Therefore, there is an one-one correspondence between flows in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; and matchings in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. The lemma follows naturally.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We then establish a correspondence between &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cuts in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; and vertex covers in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:The size of a minimum vertex cover in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is equal to the value of a minimum &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut of minimum capacity in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;\sum_{u\in S, v\not\in S\atop (u,v)\in E&#039;}c_{uv}&amp;lt;/math&amp;gt; must be finite since &amp;lt;math&amp;gt;S=\{s\}&amp;lt;/math&amp;gt; gives us an &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut whose capacity is &amp;lt;math&amp;gt;|V_1|&amp;lt;/math&amp;gt; which is finite. Therefore, no edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;u\in V_1\cap S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v\in V_2\setminus S&amp;lt;/math&amp;gt;, i.e., for all &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, either &amp;lt;math&amp;gt;u\in V_1\setminus S&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;v\in V_2\cap S&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;(V_1\setminus S)\cup(V_2\cap S)&amp;lt;/math&amp;gt; is a vertex cover in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, whose size is&lt;br /&gt;
:&amp;lt;math&amp;gt;|(V_1\setminus S)\cup(V_2\cap S)|=|V_1\setminus S|+|V_2\cap S|=\sum_{u\in V_1\setminus S}c_{su}+\sum_{v\in V_2\cap S}c_{ut}=\sum_{u\in S,v\not\in S\atop (u,v)\in E&#039;}c_{uv}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The last term is the capacity of the minimum &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; cut &amp;lt;math&amp;gt;(S,\bar{S})&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The König-Egerváry theorem then holds as a consequence of the max-flow min-cut theorem.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13832</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13832"/>
		<updated>2026-06-17T04:04:50Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/05/22)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第三次作业已发布&amp;lt;/font&amp;gt;，请在 2026/06/03 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A3.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 3|Problem Set 3]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2026/ExtremalGraphs.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal set theory|Extremal set theory | 极值集合论]]（[http://tcs.nju.edu.cn/slides/comb2026/ExtremalSets.pdf slides]）&lt;br /&gt;
#* [https://mathweb.ucsd.edu/~ronspubs/90_03_erdos_ko_rado.pdf Old and new proofs of the Erdős–Ko–Rado theorem] by Frankl and Graham&lt;br /&gt;
#* An [http://tcs.nju.edu.cn/slides/comb2026/sunflower-note.pdf LLM-generated lecture note] on Alweiss-Lovet-Wu-Zhang&#039;s improvement over the sunflower lemma, with simplified proofs by Rao-Tao&lt;br /&gt;
# [[组合数学 (Fall 2026)/Ramsey theory|Ramsey theory | Ramsey理论]]（[http://tcs.nju.edu.cn/slides/comb2026/Ramsey.pdf slides]）&lt;br /&gt;
# [[组合数学 (Fall 2026)/Matching theory|Matching theory | 匹配论]]（[http://tcs.nju.edu.cn/slides/comb2026/Matchings.pdf slides]）&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Ramsey_theory&amp;diff=13754</id>
		<title>组合数学 (Fall 2026)/Ramsey theory</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Ramsey_theory&amp;diff=13754"/>
		<updated>2026-05-20T13:33:09Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Ramsey&amp;#039;s Theorem == === Ramsey&amp;#039;s theorem for graph === {{Theorem|Ramsey&amp;#039;s Theorem| :Let &amp;lt;math&amp;gt;k,\ell&amp;lt;/math&amp;gt; be positive integers. Then there exists an integer &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; satisfying: :If &amp;lt;math&amp;gt;n\ge R(k,\ell)&amp;lt;/math&amp;gt;, for any coloring of edges of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; with two colors red and blue, there exists a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; or a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt;. }} {{Proof| We show that &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is finite by induction on &amp;lt;math&amp;gt;k+\ell&amp;lt;/math&amp;gt;. For the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Ramsey&#039;s Theorem ==&lt;br /&gt;
=== Ramsey&#039;s theorem for graph ===&lt;br /&gt;
{{Theorem|Ramsey&#039;s Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;k,\ell&amp;lt;/math&amp;gt; be positive integers. Then there exists an integer &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; satisfying:&lt;br /&gt;
:If &amp;lt;math&amp;gt;n\ge R(k,\ell)&amp;lt;/math&amp;gt;, for any coloring of edges of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; with two colors red and blue, there exists a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; or a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We show that &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is finite by induction on &amp;lt;math&amp;gt;k+\ell&amp;lt;/math&amp;gt;. For the base case, it is easy to verify that&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,1)=R(1,\ell)=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
For general &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;, we will show that &lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,\ell)\le R(k,\ell-1)+R(k-1,\ell)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Suppose we have a two coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;n=R(k,\ell-1)+R(k-1,\ell)&amp;lt;/math&amp;gt;. Take an arbitrary vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, and split &amp;lt;math&amp;gt;V\setminus\{v\}&amp;lt;/math&amp;gt; into two subsets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, where&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
S&amp;amp;=\{u\in V\setminus\{v\}\mid uv \text{ is blue }\}\\&lt;br /&gt;
T&amp;amp;=\{u\in V\setminus\{v\}\mid uv \text{ is red }\}&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
Since &lt;br /&gt;
:&amp;lt;math&amp;gt;|S|+|T|+1=n=R(k,\ell-1)+R(k-1,\ell)&amp;lt;/math&amp;gt;,&lt;br /&gt;
we have either &amp;lt;math&amp;gt;|S|\ge R(k,\ell-1)&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;|T|\ge R(k-1,\ell)&amp;lt;/math&amp;gt;. By symmetry, suppose &amp;lt;math&amp;gt;|S|\ge R(k,\ell-1)&amp;lt;/math&amp;gt;. By induction hypothesis, the complete subgraph defined on &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; has either a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;, in which case we are done; or a blue &amp;lt;math&amp;gt;K_{\ell-1}&amp;lt;/math&amp;gt;, in which case the complete subgraph defined on &amp;lt;math&amp;gt;S\cup{v}&amp;lt;/math&amp;gt; must have a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt; since all edges from &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; to vertices in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; are blue.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Ramsey&#039;s Theorem (graph, multicolor)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;r, k_1,k_2,\ldots,k_r&amp;lt;/math&amp;gt; be positive integers. Then there exists an integer &amp;lt;math&amp;gt;R(r;k_1,k_2,\ldots,k_r)&amp;lt;/math&amp;gt; satisfying:&lt;br /&gt;
:For any &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-coloring of a complete graph of &amp;lt;math&amp;gt;n\ge R(r;k_1,k_2,\ldots,k_r)&amp;lt;/math&amp;gt; vertices, there exists a monochromatic &amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;-clique with the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th color for some &amp;lt;math&amp;gt;i\in\{1,2,\ldots,r\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma (the &amp;quot;mixing color&amp;quot; trick)|&lt;br /&gt;
:&amp;lt;math&amp;gt;R(r;k_1,k_2,\ldots,k_r)\le R(r-1;k_1,k_2,\ldots,k_{r-2},R(2;k_{r-1},k_r))&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We transfer the &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-coloring to &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-coloring by identifying the &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;th and the &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;th colors. &lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;n\ge R(r-1;k_1,k_2,\ldots,k_{r-2},R(2;k_{r-1},k_r))&amp;lt;/math&amp;gt;, then for any &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt;, there either exist an &amp;lt;math&amp;gt;i\in\{1,2,\ldots,r-2\}&amp;lt;/math&amp;gt; and a &amp;lt;math&amp;gt;k_i&amp;lt;/math&amp;gt;-clique which is monochromatically colored with the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th color; or exists clique of &amp;lt;math&amp;gt;R(2;k_{r-1},k_r)&amp;lt;/math&amp;gt; vertices which is monochromatically colored with the mixed color of the original &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;th and &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;th colors, which again implies that there exists either a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-clique which is monochromatically colored with the original &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;th color, or a &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;-clique which is monochromatically colored with the original &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;th color. This implies the recursion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ramsey number ===&lt;br /&gt;
The smallest number &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; satisfying the condition in the Ramsey theory is called the &#039;&#039;&#039;Ramsey number&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Alternatively, we can define &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; as the smallest &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; such that if &amp;lt;math&amp;gt;n\ge N&amp;lt;/math&amp;gt;, for any 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; in red and blue, there is either a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; or a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt;. The Ramsey theorem is stated as:&lt;br /&gt;
:&amp;quot;&#039;&#039;&amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is finite for any positive integers &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;.&#039;&#039;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The core of the inductive proof of the Ramsey theorem is the following recursion&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
R(k,1) &amp;amp;=R(1,\ell)=1\\&lt;br /&gt;
R(k,\ell) &amp;amp;\le R(k,\ell-1)+R(k-1,\ell).&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From this recursion, we can deduce an upper bound for the Ramsey number.&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,\ell)\le{k+\ell-2\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|It is easy to verify the bound by induction.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
------&lt;br /&gt;
&lt;br /&gt;
The following theorem is due to Spencer in 1975, which is the best known lower bound for diagonal Ramsey number.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Spencer 1975)|&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,k)\ge Ck2^{k/2}&amp;lt;/math&amp;gt; for some constant &amp;lt;math&amp;gt;C&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Its proof uses the Lovász local lemma in the probabilistic method.&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Lovász Local Lemma (symmetric case)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; be a set of events, and assume that the following hold:&lt;br /&gt;
:#for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Pr[A_i]\le p&amp;lt;/math&amp;gt;;&lt;br /&gt;
:# each event &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; is independent of all but at most &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt; other events, and&lt;br /&gt;
:::&amp;lt;math&amp;gt;ep(d+1)\le 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We can use the local lemma to prove a lower bound for the diagonal Ramsey number.&lt;br /&gt;
{{Proof|&lt;br /&gt;
To prove a lower bound &amp;lt;math&amp;gt;R(k,k)&amp;gt;n&amp;lt;/math&amp;gt;, it is sufficient to show that there exists a 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; without a monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;. We prove this by the probabilistic method.&lt;br /&gt;
&lt;br /&gt;
Pick a random 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; by coloring each edge uniformly and independently with one of the two colors. For any set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, let &amp;lt;math&amp;gt;A_S&amp;lt;/math&amp;gt; denote the event that &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; forms a monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;. It is easy to see that &amp;lt;math&amp;gt;\Pr[A_s]=2^{1-{k\choose 2}}=p&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; of vertices, &amp;lt;math&amp;gt;A_S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;A_T&amp;lt;/math&amp;gt; are dependent if and only if &amp;lt;math&amp;gt;|S\cap T|\ge 2&amp;lt;/math&amp;gt;. For each &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, the number of &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|S\cap T|\ge 2&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;{k\choose 2}{n\choose k-2}&amp;lt;/math&amp;gt;, so the max degree of the dependency graph is &amp;lt;math&amp;gt;d\le{k\choose 2}{n\choose k-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;n=Ck2^{k/2}&amp;lt;/math&amp;gt; for some appropriate constant &amp;lt;math&amp;gt;C&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\mathrm{e}p(d+1)&lt;br /&gt;
&amp;amp;\le \mathrm{e}2^{1-{k\choose 2}}\left({k\choose 2}{n\choose k-2}+1\right)\\&lt;br /&gt;
&amp;amp;\le 2^{3-{k\choose 2}}{k\choose 2}{n\choose k-2}\\&lt;br /&gt;
&amp;amp;\le 1&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Applying the local lemma, the probability that there is no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; is &lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{S\in{[n]\choose k}}\overline{A_S}\right]&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore, there exists a 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; which has no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;, which means&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,k)&amp;gt;n=Ck2^{k/2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;\Omega\left(k2^{k/2}\right)\le R(k,k)\le{2k-2\choose k-1}=O\left(k^{-1/2}4^{k}\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! &#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&#039;&#039;,&#039;&#039;&amp;lt;math&amp;gt;l&amp;lt;/math&amp;gt;&#039;&#039;&lt;br /&gt;
! 1&lt;br /&gt;
! 2&lt;br /&gt;
! 3&lt;br /&gt;
! 4&lt;br /&gt;
! 5&lt;br /&gt;
! 6&lt;br /&gt;
! 7&lt;br /&gt;
! 8&lt;br /&gt;
! 9&lt;br /&gt;
! 10&lt;br /&gt;
|-&lt;br /&gt;
! 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
| 1&lt;br /&gt;
|-&lt;br /&gt;
! 2&lt;br /&gt;
| 1&lt;br /&gt;
| 2&lt;br /&gt;
| 3&lt;br /&gt;
| 4&lt;br /&gt;
| 5&lt;br /&gt;
| 6&lt;br /&gt;
| 7&lt;br /&gt;
| 8&lt;br /&gt;
| 9&lt;br /&gt;
| 10&lt;br /&gt;
|-&lt;br /&gt;
! 3&lt;br /&gt;
| 1&lt;br /&gt;
| 3&lt;br /&gt;
| 6&lt;br /&gt;
| 9&lt;br /&gt;
| 14&lt;br /&gt;
| 18&lt;br /&gt;
| 23&lt;br /&gt;
| 28&lt;br /&gt;
| 36&lt;br /&gt;
| 40–43&lt;br /&gt;
|-&lt;br /&gt;
! 4&lt;br /&gt;
| 1&lt;br /&gt;
| 4&lt;br /&gt;
| 9&lt;br /&gt;
| 18&lt;br /&gt;
| 25&lt;br /&gt;
| 35–41&lt;br /&gt;
| 49–61&lt;br /&gt;
| 56–84&lt;br /&gt;
| 73–115&lt;br /&gt;
| 92–149&lt;br /&gt;
|-&lt;br /&gt;
! 5&lt;br /&gt;
| 1&lt;br /&gt;
| 5&lt;br /&gt;
| 14&lt;br /&gt;
| 25&lt;br /&gt;
| 43–49&lt;br /&gt;
| 58–87&lt;br /&gt;
| 80–143&lt;br /&gt;
| 101–216&lt;br /&gt;
| 125–316&lt;br /&gt;
| 143–442&lt;br /&gt;
|-&lt;br /&gt;
! 6&lt;br /&gt;
| 1&lt;br /&gt;
| 6&lt;br /&gt;
| 18&lt;br /&gt;
| 35–41&lt;br /&gt;
| 58–87&lt;br /&gt;
| 102–165&lt;br /&gt;
| 113–298&lt;br /&gt;
| 127–495&lt;br /&gt;
| 169–780&lt;br /&gt;
| 179–1171&lt;br /&gt;
|-&lt;br /&gt;
! 7&lt;br /&gt;
| 1&lt;br /&gt;
| 7&lt;br /&gt;
| 23&lt;br /&gt;
| 49–61&lt;br /&gt;
| 80–143&lt;br /&gt;
| 113–298&lt;br /&gt;
| 205–540&lt;br /&gt;
| 216–1031&lt;br /&gt;
| 233–1713&lt;br /&gt;
| 289–2826&lt;br /&gt;
|-&lt;br /&gt;
! 8&lt;br /&gt;
| 1&lt;br /&gt;
| 8&lt;br /&gt;
| 28&lt;br /&gt;
| 56–84&lt;br /&gt;
| 101–216&lt;br /&gt;
| 127–495&lt;br /&gt;
| 216–1031&lt;br /&gt;
| 282–1870&lt;br /&gt;
| 317–3583&lt;br /&gt;
| 317-6090&lt;br /&gt;
|-&lt;br /&gt;
! 9&lt;br /&gt;
| 1&lt;br /&gt;
| 9&lt;br /&gt;
| 36&lt;br /&gt;
| 73–115&lt;br /&gt;
| 125–316&lt;br /&gt;
| 169–780&lt;br /&gt;
| 233–1713&lt;br /&gt;
| 317–3583&lt;br /&gt;
| 565–6588&lt;br /&gt;
| 580–12677&lt;br /&gt;
|-&lt;br /&gt;
! 10&lt;br /&gt;
| 1&lt;br /&gt;
| 10&lt;br /&gt;
| 40–43&lt;br /&gt;
| 92–149&lt;br /&gt;
| 143–442&lt;br /&gt;
| 179–1171&lt;br /&gt;
| 289–2826&lt;br /&gt;
| 317-6090&lt;br /&gt;
| 580–12677&lt;br /&gt;
| 798–23556&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Ramsey&#039;s theorem for hypergraph ===&lt;br /&gt;
{{Theorem|Ramsey&#039;s Theorem (hypergraph, multicolor)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;r, t, k_1,k_2,\ldots,k_r&amp;lt;/math&amp;gt; be positive integers. Then there exists an integer &amp;lt;math&amp;gt;R_t(r;k_1,k_2,\ldots,k_r)&amp;lt;/math&amp;gt; satisfying:&lt;br /&gt;
:For any &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-coloring of &amp;lt;math&amp;gt;{[n]\choose t}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;n\ge R_t(r;k_1,k_2,\ldots,k_r)&amp;lt;/math&amp;gt;,  there exist an &amp;lt;math&amp;gt;i\in\{1,2,\ldots,r\}&amp;lt;/math&amp;gt; and  a subset &amp;lt;math&amp;gt;X\subseteq [n]&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|\ge k_i&amp;lt;/math&amp;gt; such that all members of &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; are colored with the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th color.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;n\rightarrow(k_1,k_2,\ldots,k_r)^t&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma (the &amp;quot;mixing color&amp;quot; trick)|&lt;br /&gt;
:&amp;lt;math&amp;gt;R_t(r;k_1,k_2,\ldots,k_r)\le R_t(r-1;k_1,k_2,\ldots,k_{r-2},R_t(2;k_{r-1},k_r))&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is then sufficient to prove the Ramsey&#039;s theorem for the two-coloring of a hypergraph, that is, to prove &amp;lt;math&amp;gt;R_t(k,\ell)=R_t(2;k,\ell)&amp;lt;/math&amp;gt; is finite.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:&amp;lt;math&amp;gt;R_t(k,\ell)\le R_{t-1}(R_t(k-1,\ell),R_t(k,\ell-1))+1&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;n=R_{t-1}(R_t(k-1,\ell),R_t(k,\ell-1))+1&amp;lt;/math&amp;gt;. Denote &amp;lt;math&amp;gt;[n]=\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;f:{[n]\choose t}\rightarrow\{{\color{red}\text{red}},{\color{blue}\text{blue}}\}&amp;lt;/math&amp;gt; be an arbitrary 2-coloring of &amp;lt;math&amp;gt;{[n]\choose t}&amp;lt;/math&amp;gt;. It is then sufficient to show that there either exists an &amp;lt;math&amp;gt;X\subseteq[n]&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|=k&amp;lt;/math&amp;gt; such that all members of &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; are colored red by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;; or exists an &amp;lt;math&amp;gt;X\subseteq[n]&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|=\ell&amp;lt;/math&amp;gt; such that all members of &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; are colored blue by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We remove &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; and define a new coloring &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;{[n-1]\choose t-1}&amp;lt;/math&amp;gt; by&lt;br /&gt;
:&amp;lt;math&amp;gt;f&#039;(A)=f(A\cup\{n\})&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;A\in{[n-1]\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
By the choice of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and by symmetry, there exists a subset &amp;lt;math&amp;gt;S\subseteq[n-1]&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|=R_t(k-1,\ell)&amp;lt;/math&amp;gt; such that all members of &amp;lt;math&amp;gt;{S\choose t-1}&amp;lt;/math&amp;gt; are colored with red by &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt;. Then there either exists an &amp;lt;math&amp;gt;X\subseteq S&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|=\ell&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; is colored all blue by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;, in which case we are done; or exists an &amp;lt;math&amp;gt;X\subseteq S&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|X|=k-1&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; is colored all red by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;. Next we prove that in the later case &amp;lt;math&amp;gt;{X\cup{n}\choose t}&amp;lt;/math&amp;gt; is all red, which will close our proof. Since all &amp;lt;math&amp;gt;A\in{S\choose t-1}&amp;lt;/math&amp;gt; are colored with red by &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt;, then by our definition of &amp;lt;math&amp;gt;f&#039;&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(A\cup\{n\})={\color{red}\text{red}}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;A\in {X\choose t-1}\subseteq{S\choose t-1}&amp;lt;/math&amp;gt;. Recalling that &amp;lt;math&amp;gt;{X\choose t}&amp;lt;/math&amp;gt; is colored all red by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;{X\cup\{n\}\choose t}&amp;lt;/math&amp;gt; is colored all red by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; and we are done.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==  Applications of Ramsey Theorem ==&lt;br /&gt;
=== The &amp;quot;Happy Ending&amp;quot; problem ===&lt;br /&gt;
{{Theorem|The happy ending problem|&lt;br /&gt;
:Any set of 5 points in the plane, no three on a line, has a subset of 4 points that form the vertices of a convex quadrilateral.&lt;br /&gt;
}}&lt;br /&gt;
See the article&lt;br /&gt;
[http://www.maa.org/mathland/mathtrek_10_3_00.html] for the proof.&lt;br /&gt;
&lt;br /&gt;
We say a set of points in the plane in [http://en.wikipedia.org/wiki/General_position &#039;&#039;&#039;general positions&#039;&#039;&#039;] if no three of the points are on the same line.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Erdős-Szekeres 1935)|&lt;br /&gt;
:For any positive integer &amp;lt;math&amp;gt;m\ge 3&amp;lt;/math&amp;gt;, there is an &amp;lt;math&amp;gt;N(m)&amp;lt;/math&amp;gt; such that any set of at least &amp;lt;math&amp;gt;N(m)&amp;lt;/math&amp;gt; points in general position in the plane (i.e., no three of the points are on a line) contains &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; points that are the vertices of a convex &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-gon.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;N(m)=R_3(m,m)&amp;lt;/math&amp;gt;. For &amp;lt;math&amp;gt;n\ge N(m)&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; be an arbitrary set of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; points in the plane, no three of which are on a line. Define a 2-coloring of the 3-subsets of points &amp;lt;math&amp;gt;f:{X\choose 3}\rightarrow\{0,1\}&amp;lt;/math&amp;gt; as follows: for any &amp;lt;math&amp;gt;\{a,b,c\}\in{X\choose 3}&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;\triangle_{abc}\subset X&amp;lt;/math&amp;gt; be the set of points covered by the triangle &amp;lt;math&amp;gt;abc&amp;lt;/math&amp;gt;; and &amp;lt;math&amp;gt;f(\{a,b,c\})=|\triangle_{abc}|\bmod 2&amp;lt;/math&amp;gt;, that is, &amp;lt;math&amp;gt;f(\{a,b,c\})&amp;lt;/math&amp;gt; indicates the oddness of the number of points covered by the triangle &amp;lt;math&amp;gt;abc&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Since &amp;lt;math&amp;gt;|X|\ge R_3(m,m)&amp;lt;/math&amp;gt;, there exists a &amp;lt;math&amp;gt;Y\subseteq X&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;|Y|=m&amp;lt;/math&amp;gt; and all members of &amp;lt;math&amp;gt;{Y\choose 3}&amp;lt;/math&amp;gt; are colored with the same value by &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
We claim that the &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; points in &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; are the vertices of a convex &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-gon. If otherwise, by the definition of convexity, there exist &amp;lt;math&amp;gt;\{a,b,c,d\}\subseteq Y&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;d\in\triangle_{abc}&amp;lt;/math&amp;gt;. Since no three points are in the same line, &lt;br /&gt;
:&amp;lt;math&amp;gt;\triangle_{abc}=\triangle_{abd}\cup\triangle_{acd}\cup\triangle_{bcd}\cup\{d\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
where all unions are disjoint. Then &amp;lt;math&amp;gt;|\triangle_{abc}|=|\triangle_{abd}|+|\triangle_{acd}|+|\triangle_{bcd}|+1&amp;lt;/math&amp;gt;, which implies that &amp;lt;math&amp;gt;f(\{a,b,c\}), f(\{a,b,d\}), f(\{a,c,d\}), f(\{b,c,d\})\,&amp;lt;/math&amp;gt; cannot be equal, contradicting that all members of &amp;lt;math&amp;gt;{Y\choose 3}&amp;lt;/math&amp;gt; have the same color.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Yao&#039;s lower bound for implicit data structures ===&lt;br /&gt;
We consider the following fundamental problem of &#039;&#039;&#039;membership query&#039;&#039;&#039;.&lt;br /&gt;
{{Theorem|Membership Query|&lt;br /&gt;
:&#039;&#039;&#039;Input&#039;&#039;&#039;: A data set &amp;lt;math&amp;gt;S\subset U&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; is a data universe of size &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&#039;&#039;&#039;Query&#039;&#039;&#039;: a data item (also called a &#039;&#039;&#039;key&#039;&#039;&#039;) &amp;lt;math&amp;gt;x\in U&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&#039;&#039;&#039;Answer&#039;&#039;&#039;: Whether &amp;lt;math&amp;gt;x\in S&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
This is a basic problem for data structures. People want to design efficient data structures to store the data set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; so that the query &amp;quot;Is &amp;lt;math&amp;gt;x\in S&amp;lt;/math&amp;gt;?&amp;quot; can be efficiently answered by accessing the data structure as little as possible in the worst case.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;sorted table&#039;&#039;&#039; for a data set &amp;lt;math&amp;gt;S\subset [N]&amp;lt;/math&amp;gt; is a natural data structure in which the elements of &amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;x_1&amp;lt;x_2&amp;lt;\cdots&amp;lt;x_n&amp;lt;/math&amp;gt;, are stored in an array, one element &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; in each entry, in the increasing order.&lt;br /&gt;
For a sorted table, the membership query problem can be solved via &#039;&#039;&#039;binary search&#039;&#039;&#039; within &amp;lt;math&amp;gt;\Omega(\log_2 n)&amp;lt;/math&amp;gt; memory accesses in the worst case. The following [https://dl.acm.org/doi/pdf/10.1145/322261.322274 fundamental result of Andrew Chi-Chih Yao (姚期智)] shows that this is the best possible for sorted tables. The proof is an elegant application of the &#039;&#039;&#039;adversarial argument&#039;&#039;&#039;(对手论证).&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma (Yao 1981)|&lt;br /&gt;
:Suppose that &amp;lt;math&amp;gt;n\ge 2&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;N\ge 2n-1&amp;lt;/math&amp;gt;, the data universe is &amp;lt;math&amp;gt;U=[N]&amp;lt;/math&amp;gt;, and the size of the data set is &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
:If the data structure is a &#039;&#039;&#039;sorted table&#039;&#039;&#039;, any search algorithm requires at least &amp;lt;math&amp;gt;\lceil\log_2 (n+1)\rceil&amp;lt;/math&amp;gt; accesses to the data structure in the worst case.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We will show by an adversarial argument that &amp;lt;math&amp;gt;\lceil\log_2 (n+1)\rceil&amp;lt;/math&amp;gt; accesses are required to search for the key value &amp;lt;math&amp;gt;x=n&amp;lt;/math&amp;gt; in the universe &amp;lt;math&amp;gt;[N]=\{1,2,\ldots,N\}&amp;lt;/math&amp;gt;. The construction of the adversarial data set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is by induction on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;n=2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;N\ge 2n-1=3&amp;lt;/math&amp;gt; it is easy to see that 2 memory accesses are required to make sure whether the key value &amp;lt;math&amp;gt;n=2&amp;lt;/math&amp;gt; presents in a sorted table containing 2 keys out of a data universe of size 3, in the worst case.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;n&amp;gt;2&amp;lt;/math&amp;gt;. Assume the induction hypothesis for all smaller &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. We will prove it for the size of data set &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, size of universe &amp;lt;math&amp;gt;N\ge 2n-1&amp;lt;/math&amp;gt; and the search key &amp;lt;math&amp;gt;x=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose that the first access position is &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. The adversary chooses the table content &amp;lt;math&amp;gt;T[k]&amp;lt;/math&amp;gt;. The adversary&#039;s strategy is:&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
T[k]=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
k &amp;amp; k\le \frac{n}{2},\\&lt;br /&gt;
N-(n-k) &amp;amp; k&amp;gt; \frac{n}{2}.&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
By symmetry, suppose it is the first case that &amp;lt;math&amp;gt;k\le \frac{n}{2}&amp;lt;/math&amp;gt;.  Then the key &amp;lt;math&amp;gt;x=n&amp;lt;/math&amp;gt; may be in any position &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\frac{n}{2}+1\le i\le n&amp;lt;/math&amp;gt;. In fact, &amp;lt;math&amp;gt;T\left[ \left\lceil \frac{n}{2}\right\rceil +1\right]&amp;lt;/math&amp;gt; through &amp;lt;math&amp;gt;T[n]&amp;lt;/math&amp;gt; is a sorted table of size &amp;lt;math&amp;gt;n&#039;=\left\lfloor \frac{n}{2}\right\rfloor&amp;lt;/math&amp;gt; which may contain any &amp;lt;math&amp;gt;n&#039;&amp;lt;/math&amp;gt;-subset of &amp;lt;math&amp;gt;\left\{\left\lceil \frac{n}{2}\right\rceil+1, \left\lceil \frac{n}{2}\right\rceil+2,\ldots,N\right\}&amp;lt;/math&amp;gt;, and hence, in particular, any &amp;lt;math&amp;gt;n&#039;&amp;lt;/math&amp;gt;-subset of the new universe&lt;br /&gt;
:&amp;lt;math&amp;gt;U&#039;=\left\{\left\lceil \frac{n}{2}\right\rceil+1, \left\lceil \frac{n}{2}\right\rceil+2,\ldots,N-\left\lceil \frac{n}{2}\right\rceil\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The size &amp;lt;math&amp;gt;N&#039;&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;U&#039;&amp;lt;/math&amp;gt; satisfies&lt;br /&gt;
:&amp;lt;math&amp;gt;N&#039;=N-2\left\lceil \frac{n}{2}\right\rceil\ge 2(n-1)-2\left\lceil \frac{n}{2}\right\rceil \ge 2\left\lfloor \frac{n}{2}\right\rfloor-1= 2n&#039;-1&amp;lt;/math&amp;gt;,&lt;br /&gt;
and the desired key &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; has the relative value &amp;lt;math&amp;gt;x&#039;=n- \left\lceil \frac{n}{2}\right\rceil=\left\lfloor \frac{n}{2}\right\rfloor=n&#039;&amp;lt;/math&amp;gt; in the new universe &amp;lt;math&amp;gt;U&#039;&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
By the induction hypothesis, &amp;lt;math&amp;gt;\lceil\log_2 (n&#039;+1)\rceil&amp;lt;/math&amp;gt; more memory accesses will be required. Hence the total number of memory accesses is at least &lt;br /&gt;
:&amp;lt;math&amp;gt;1+\lceil\log_2 (n&#039;+1)\rceil=1+\left\lceil\log_2 \left(\left\lfloor \frac{n}{2}\right\rfloor+1\right)\right\rceil\ge \lceil\log_2 (n+1)\rceil&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the first access is &amp;lt;math&amp;gt;k&amp;gt; \frac{n}{2}&amp;lt;/math&amp;gt;, we symmetrically get that &amp;lt;math&amp;gt;T[1]&amp;lt;/math&amp;gt; through &amp;lt;math&amp;gt;T\left[\left\lfloor \frac{n}{2}\right\rfloor\right]&amp;lt;/math&amp;gt; is a sorted table of size &amp;lt;math&amp;gt;n&#039;=\left\lfloor \frac{n}{2}\right\rfloor&amp;lt;/math&amp;gt; which may contain any &amp;lt;math&amp;gt;n&#039;&amp;lt;/math&amp;gt;-subset of the universe&lt;br /&gt;
:&amp;lt;math&amp;gt;U&#039;=\left\{\left\lceil \frac{n}{2}\right\rceil+1, \left\lceil \frac{n}{2}\right\rceil+2,\ldots,N-\left\lceil \frac{n}{2}\right\rceil\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The rest is the same as before. This completes the induction.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We have seen that on a sorted table, there is no search algorithm outperforming the binary search in the worst case.&lt;br /&gt;
Our question is:&lt;br /&gt;
:&#039;&#039;Is there any other order than the increasing order, on which there is a better search algorithm?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
An &#039;&#039;&#039;implicit data structure&#039;&#039;&#039; use no extra space in addition to the original data set, thus a data structure can only be represented &#039;&#039;implicitly&#039;&#039; by the order of the data items in the table. That is, each data set is stored as a permutation of the set. Formally, an implicit data structure is described by a function&lt;br /&gt;
:&amp;lt;math&amp;gt;f:{U\choose n}\rightarrow[n!]&amp;lt;/math&amp;gt;,&lt;br /&gt;
where each &amp;lt;math&amp;gt;\pi\in[n!]&amp;lt;/math&amp;gt; specify a permutation of the sorted table, and a data set &amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;x_1&amp;lt;x_2&amp;lt;\cdots&amp;lt;x_n&amp;lt;/math&amp;gt; is stored as an array &amp;lt;math&amp;gt;(x_{\pi(1)},x_{\pi(2)},\ldots,x_{\pi(n)}\}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;\pi=f(S)&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Thus, the sorted table is the simplest implicit data structure, in which &amp;lt;math&amp;gt;f(S)&amp;lt;/math&amp;gt; always gives the identity permutation for all &amp;lt;math&amp;gt;S\in{U\choose n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We observe that if &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; maps all data sets &amp;lt;math&amp;gt;S\in{U\choose n}&amp;lt;/math&amp;gt; to the same permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;, then the data structure is equivalent to the sorted table, under the bijection that the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th entry in the sorted table corresponds to the &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;th entry of the actual array, where the same &amp;lt;math&amp;gt;\Omega(\log_2 n)&amp;lt;/math&amp;gt; lower bound applies.&lt;br /&gt;
&lt;br /&gt;
This observation can be generalized and made formal as follows.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Observation|&lt;br /&gt;
:If there is a sub-universe &amp;lt;math&amp;gt;X\subseteq U&amp;lt;/math&amp;gt; such that for every data set &amp;lt;math&amp;gt;S\in {X\choose n}&amp;lt;/math&amp;gt;, the implicit data structure &amp;lt;math&amp;gt;f(S)=\pi&amp;lt;/math&amp;gt; stores the data set using the the same permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;, i.e.&lt;br /&gt;
::&amp;lt;math&amp;gt;f\left({X\choose n}\right)=\{\pi\}&amp;lt;/math&amp;gt;&lt;br /&gt;
:then this implicit data structure is equivalent to the sorted table for all data sets from the new universe &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;, under the bijection that the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th entry in the sorted table corresponds to the &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt;th entry of the array.&lt;br /&gt;
:Therefore, if &amp;lt;math&amp;gt;|X|\ge 2n&amp;lt;/math&amp;gt;, then the same &amp;lt;math&amp;gt;\Omega(\log_2 n)&amp;lt;/math&amp;gt; lower bound for searching in a sorted table applies.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Due to Ramsey theorem, for sufficiently large &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; which satisfies &amp;lt;math&amp;gt;N\ge R_{n}(n!;2n)&amp;lt;/math&amp;gt;, for any &amp;lt;math&amp;gt;f:{U\choose n}\rightarrow[n!]&amp;lt;/math&amp;gt;, there is an &amp;lt;math&amp;gt;X\subseteq U&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;|X|\ge 2n&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;\left|f\left({X\choose n}\right)\right|=1&amp;lt;/math&amp;gt;, which guarantees the existence of the sub-universe &amp;lt;math&amp;gt;X\subseteq U&amp;lt;/math&amp;gt; required in the above observation for (wildly) large universe sizes &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, which implies the following lower bound for implicit data structures.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Yao 1981)|&lt;br /&gt;
:Suppose that &amp;lt;math&amp;gt;n\ge 2&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;N\ge 2n&amp;lt;/math&amp;gt;, the data universe is &amp;lt;math&amp;gt;U=[N]&amp;lt;/math&amp;gt;, and the size of the data set is &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
:For any &#039;&#039;&#039;implicit data structure&#039;&#039;&#039;, if &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; is sufficiently large, then any search algorithm requires at least &amp;lt;math&amp;gt;\lfloor\log_2 n\rfloor&amp;lt;/math&amp;gt; accesses to the data structure in the worst case.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Linial&#039;s lower bound for local computation===&lt;br /&gt;
In the studies of &#039;&#039;&#039;local computation&#039;&#039;&#039; (initiated by [https://www.cs.huji.ac.il/~nati/PAPERS/locality_dist_graph_algs.pdf Linial] and [https://www.wisdom.weizmann.ac.il/~naor/PAPERS/lcl.pdf Naor and Stockmeyer]), people wants to answer questions like:&lt;br /&gt;
::&#039;&#039;Can locally defined problems be computed locally?&#039;&#039;&lt;br /&gt;
In general, the answer is no to the above question. A famous example is Linial&#039;s lower bound for &#039;&#039;&#039;maximal independent set&#039;&#039;&#039; (&#039;&#039;&#039;MIS&#039;&#039;&#039;) in a ring.&lt;br /&gt;
&lt;br /&gt;
Consider a very simple distributed network, a ring that contains &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; nodes, where each node is assigned a unique ID from &amp;lt;math&amp;gt;[n]=\{1,2,\ldots, n\}&amp;lt;/math&amp;gt;. The labeled network is then described by a tuple &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; of IDs, which is a permutation of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;a_i\in [n]&amp;lt;/math&amp;gt; gives the ID of the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th node in the ring.&lt;br /&gt;
&lt;br /&gt;
In a distributed algorithm, in each round, every node communicates with its 2 neighbors in the ring, and when the algorithm terminates, each node returns its local output. For example, in the MIS problem, the goal of the algorithm is to construct a maximal independent set: upon termination, each node returns a bit to indicate whether the node is in the constructed independent set. And the output gives a correct MIS as long as it satisfies both the followings: &lt;br /&gt;
* there are no two consecutive nodes in the ring both outputting 1;&lt;br /&gt;
* there are no three consecutive nodes in the ring all outputting 0.&lt;br /&gt;
This is clearly a locally defined problem. In fact, it is a constraint satisfaction problem (CSP) where each constraint only involves 1-local or 2-local neighborhood.&lt;br /&gt;
&lt;br /&gt;
We are interested in the distributed algorithms that can always produce the correct answer, and want to prove a lower bound for the number of rounds required in the worst case by such distributed algorithms.&lt;br /&gt;
&lt;br /&gt;
As a local distributed algorithm, each node &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; initially does not know anything beyond its local information, which is just its own ID &amp;lt;math&amp;gt;a_i\in [n]&amp;lt;/math&amp;gt;. &lt;br /&gt;
And after &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; rounds, information-theoretically, each node &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; can at best know all information within its &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;-local neighborhood, which is represented by the &amp;lt;math&amp;gt;(2t-1)&amp;lt;/math&amp;gt;-tuple &amp;lt;math&amp;gt;(a_{i-t},\ldots,a_{i-1},a_i,a_{i+1},\ldots a_{i+t})&amp;lt;/math&amp;gt;, with the addition/subtraction modulo &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; along the ring.&lt;br /&gt;
&lt;br /&gt;
This suggests us to define such a computational model for local distributed algorithms: any &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;-round local algorithm is described by a function&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{L}:[n]^{2t+1}\to\{0,1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
For the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;th node in the ring, its output is given by &amp;lt;math&amp;gt;\mathcal{L}(a_{i-t},\ldots,a_{i-1},a_i,a_{i+1},\ldots a_{i+t})&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt; represents the ID of the &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;th node in the ring, with the addition/subtraction modulo &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As a correct algorithm for constructing MIS, it must hold that any three consecutive nodes can never output the same value. We then have the following lower bound for &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; for such algorithms.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Linial 1992)|&lt;br /&gt;
:For any &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;-round local algorithm for maximal independent set (MIS) on a ring of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; nodes, it holds that&lt;br /&gt;
:: &amp;lt;math&amp;gt;t=\Omega(\log^*n)&amp;lt;/math&amp;gt;&lt;br /&gt;
:where &amp;lt;math&amp;gt;\log^*n&amp;lt;/math&amp;gt; represents the [https://en.wikipedia.org/wiki/Iterated_logarithm iterated logarithm], which is the number of times the logarithm function must be iteratively applied to &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; before the result is less than or equal to 1.&lt;br /&gt;
}}&lt;br /&gt;
This lower bound shows that even on very simple network like ring, some very basic locally defined problem (MIS) cannot be computed locally (within constant locality).&lt;br /&gt;
&lt;br /&gt;
The original proof of Linial relies on chromatic number of so-called neighborhood graphs. Here we give an alternative proof based on Ramsey theorem found by Baruch Awerbuch.&lt;br /&gt;
{{Proof|&lt;br /&gt;
As we discussed earlier, any &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;-round local algorithm can be represented by a mapping&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{L}:[n]^{2t+1}\to\{0,1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
It can naturally defines a 2-coloring:&lt;br /&gt;
:&amp;lt;math&amp;gt;f:{[n]\choose {2t+1}}\to\{0,1\}&amp;lt;/math&amp;gt;&lt;br /&gt;
by the following construction: for any &amp;lt;math&amp;gt;\{a_1,a_2,\ldots,a_{2t+1}\}\subseteq [n]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots&amp;lt;a_{2t+1}&amp;lt;/math&amp;gt;, we define&lt;br /&gt;
:&amp;lt;math&amp;gt;f(\{a_1,a_2,\ldots,a_{2t+1}\})=\mathcal{L}(a_1,a_2,\ldots,a_{2t+1})&amp;lt;/math&amp;gt;.&lt;br /&gt;
By Ramsey theorem, for &amp;lt;math&amp;gt;n\ge R_{2t+1}(2;2t+3,2t+3)&amp;lt;/math&amp;gt;, there exists a subset &amp;lt;math&amp;gt;\{a_1,a_2,\ldots,a_{2t+3}\}\subseteq [n]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots&amp;lt;a_{2t+3}&amp;lt;/math&amp;gt;, such that &lt;br /&gt;
:&amp;lt;math&amp;gt;\left|f\left({S\choose {2t+1}}\right)\right|=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
By our construction of &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;, this means&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{L}(a_1,a_2,\ldots,a_{2t+1})=\mathcal{L}(a_2,a_3,\ldots,a_{2t+2})=\mathcal{L}(a_3,a_4,\ldots,a_{2t+3})&amp;lt;/math&amp;gt;,&lt;br /&gt;
which contradicts to that the output of &amp;lt;math&amp;gt;\mathcal{L}&amp;lt;/math&amp;gt; should indicate an MIS, on any ring with &amp;lt;math&amp;gt;2t+3&amp;lt;/math&amp;gt; consecutive nodes labeled as &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_{2t+3})&amp;lt;/math&amp;gt;, because on such rings, there would be 3 consecutive nodes with the same output bit.&lt;br /&gt;
&lt;br /&gt;
Therefore, any &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;-round local algorithm that can always correctly produce an MIS on a ring, must satisfies that&lt;br /&gt;
:&amp;lt;math&amp;gt;n&amp;lt;R_{2t+1}(2;2t+3,2t+3)\le \underbrace{2^{2^{\unicode{x22F0}^{2}}}}_{ct}&amp;lt;/math&amp;gt;,&lt;br /&gt;
for some constant &amp;lt;math&amp;gt;c&amp;gt;0&amp;lt;/math&amp;gt;, whose inverse function gives the lower bound&lt;br /&gt;
:&amp;lt;math&amp;gt;t=\Omega(\log^*n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13753</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13753"/>
		<updated>2026-05-20T13:32:42Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2026/ExtremalGraphs.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal set theory|Extremal set theory | 极值集合论]]（[http://tcs.nju.edu.cn/slides/comb2026/ExtremalSets.pdf slides]）&lt;br /&gt;
#* [https://mathweb.ucsd.edu/~ronspubs/90_03_erdos_ko_rado.pdf Old and new proofs of the Erdős–Ko–Rado theorem] by Frankl and Graham&lt;br /&gt;
#* An [http://tcs.nju.edu.cn/slides/comb2026/sunflower-note.pdf LLM-generated lecture note] on Alweiss-Lovet-Wu-Zhang&#039;s improvement over the sunflower lemma, with simplified proofs by Rao-Tao&lt;br /&gt;
# [[组合数学 (Fall 2026)/Ramsey theory|Ramsey theory | Ramsey理论]]（[http://tcs.nju.edu.cn/slides/comb2026/Ramsey.pdf slides]）&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Extremal_set_theory&amp;diff=13736</id>
		<title>组合数学 (Fall 2026)/Extremal set theory</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Extremal_set_theory&amp;diff=13736"/>
		<updated>2026-05-13T08:49:22Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Sunflowers == An set system is a &amp;#039;&amp;#039;&amp;#039;sunflower&amp;#039;&amp;#039;&amp;#039; if all its member sets intersect at the same set of elements. {{Theorem|Definition (sunflower)| : A set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is a &amp;#039;&amp;#039;&amp;#039;sunflower&amp;#039;&amp;#039;&amp;#039; of size &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; with a &amp;#039;&amp;#039;&amp;#039;core&amp;#039;&amp;#039;&amp;#039; &amp;lt;math&amp;gt;C\subseteq X&amp;lt;/math&amp;gt; if  ::&amp;lt;math&amp;gt;\forall S,T\in\mathcal{F}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;S\neq T&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;S\cap T=C&amp;lt;/math&amp;gt;. }} Note that we do not require the core to be nonempty, thus a family of disjoint sets is...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sunflowers ==&lt;br /&gt;
An set system is a &#039;&#039;&#039;sunflower&#039;&#039;&#039; if all its member sets intersect at the same set of elements.&lt;br /&gt;
{{Theorem|Definition (sunflower)|&lt;br /&gt;
: A set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is a &#039;&#039;&#039;sunflower&#039;&#039;&#039; of size &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; with a &#039;&#039;&#039;core&#039;&#039;&#039; &amp;lt;math&amp;gt;C\subseteq X&amp;lt;/math&amp;gt; if &lt;br /&gt;
::&amp;lt;math&amp;gt;\forall S,T\in\mathcal{F}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;S\neq T&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;S\cap T=C&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
Note that we do not require the core to be nonempty, thus a family of disjoint sets is also a sunflower (with the core &amp;lt;math&amp;gt;\emptyset&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
The next result due to Erdős and Rado, called the sunflower lemma, is a famous result in extremal set theory, and has some important applications in Boolean circuit complexity.&lt;br /&gt;
{{Theorem|Sunflower Lemma (Erdős-Rado)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;k!(r-1)^k&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; contains a sunflower of size  &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We proceed by induction on &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. For &amp;lt;math&amp;gt;k=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathcal{F}\subseteq{X\choose 1}&amp;lt;/math&amp;gt;, thus all sets in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; are disjoint. And since &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;r-1&amp;lt;/math&amp;gt;, we can choose &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; of these sets and form a sunflower.&lt;br /&gt;
&lt;br /&gt;
Now let &amp;lt;math&amp;gt;k\ge 2&amp;lt;/math&amp;gt; and assume the lemma holds for all smaller &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. Take a maximal family &amp;lt;math&amp;gt;\mathcal{G}\subseteq \mathcal{F}&amp;lt;/math&amp;gt; whose members are disjoint, i.e. for any &amp;lt;math&amp;gt;S,T\in \mathcal{G}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;S\neq T&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;S\cap T=\emptyset&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;|\mathcal{G}|\ge r&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; is a sunflower of size at least &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and we are done.&lt;br /&gt;
&lt;br /&gt;
Assume that &amp;lt;math&amp;gt;|\mathcal{G}|\le r-1&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;Y=\bigcup_{S\in\mathcal{G}}S&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;|Y|=k|\mathcal{G}|\le k(r-1)&amp;lt;/math&amp;gt; (since all members of &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt;) are disjoint). We claim that &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; intersets all members of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, since if otherwise, there exists an &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;S\cap Y=\emptyset&amp;lt;/math&amp;gt;, then we can enlarge &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; by adding &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; and still have all members of &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; disjoint, which contradicts the assumption that &amp;lt;math&amp;gt;\mathcal{G}&amp;lt;/math&amp;gt; is the maximum of such families.&lt;br /&gt;
&lt;br /&gt;
By the pigeonhole principle, some elements &amp;lt;math&amp;gt;y\in Y&amp;lt;/math&amp;gt; must contained in at least&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{|\mathcal{F}|}{|Y|}&amp;gt;\frac{k!(r-1)^k}{k(r-1)}=(k-1)!(r-1)^{k-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
members of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;. We delete this &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; from these sets and consider the family &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{H}=\{S\setminus\{y\}\mid S\in\mathcal{F}\wedge y\in S\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We have &amp;lt;math&amp;gt;\mathcal{H}\subseteq {X\choose k-1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|\mathcal{H}|&amp;gt;(k-1)!(r-1)^{k-1}&amp;lt;/math&amp;gt;, thus by the induction hypothesis, &amp;lt;math&amp;gt;\mathcal{H}&amp;lt;/math&amp;gt;contains a sunflower of size &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;. Adding &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; to the members of this sunflower, we get the desired sunflower in the original family &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==The Erdős–Ko–Rado Theorem ==&lt;br /&gt;
A set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;intersecting&#039;&#039;&#039;, if for any &amp;lt;math&amp;gt;S,T\in\mathcal{F}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;S\cap T\neq\emptyset&amp;lt;/math&amp;gt;. A natural question of extremal favor is: &amp;quot;how large can an intersecting family be?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Assume &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;. When &amp;lt;math&amp;gt;n&amp;lt;2k&amp;lt;/math&amp;gt;, every pair of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subsets of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; intersects. So the non-trivial case is when &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;. The famous Erdős–Ko–Rado theorem gives the largest possible cardinality of a nontrivially intersecting family. &lt;br /&gt;
&lt;br /&gt;
According to Erdős, the theorem itself was proved in 1938, but was not published until 23 years later.&lt;br /&gt;
{{Theorem|Erdős–Ko–Rado theorem (proved in 1938, published in 1961)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\mathcal{F}|\le{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Katona&#039;s proof ===&lt;br /&gt;
We first introduce a proof discovered by Katona in 1972. The proof uses double counting.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; be a &#039;&#039;&#039;cyclic permutation&#039;&#039;&#039; of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;, that is, we think of assigning &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; in a circle and ignore the rotations of the circle. It is easy to see that there are &amp;lt;math&amp;gt;(n-1)!&amp;lt;/math&amp;gt; cyclic permutations of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set (each cyclic permutation corresponds to &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; permutations).&lt;br /&gt;
Let &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{G}_\pi=\{\{\pi_{(i+j)\bmod n}\mid j\in[k]\}\mid i\in [n]\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next lemma states the following observation: in a circle of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; points, supposed &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;, there can be at most &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; arcs, each consisting of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; points, such that every pair of arcs share at least one point.&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, then for any cyclic permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;, it holds that &amp;lt;math&amp;gt;|\mathcal{G}_\pi\cap\mathcal{F}|\le k&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Fix a cyclic permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;A_i=\{\pi_{(i+j+n)\bmod n}\mid j\in[k]\}&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;\mathcal{G}_\pi&amp;lt;/math&amp;gt; can be written as &amp;lt;math&amp;gt;\mathcal{G}_\pi=\{A_i\mid i\in [n]\}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Suppose that &amp;lt;math&amp;gt;A_t\in\mathcal{F}&amp;lt;/math&amp;gt;. Since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, the only sets &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; that can be in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; other than &amp;lt;math&amp;gt;A_t&amp;lt;/math&amp;gt; itself are the &amp;lt;math&amp;gt;2k-2&amp;lt;/math&amp;gt; sets &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;t-(k-1)\le i\le t+k-1, i\neq t&amp;lt;/math&amp;gt;. We partition these sets into &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; pairs &amp;lt;math&amp;gt;\{A_i,A_{i+k}\}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;t-(k-1)\le i\le t-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that for &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;, it holds that &amp;lt;math&amp;gt;A_i\cap C_{i+k}=\emptyset&amp;lt;/math&amp;gt;. Since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; can contain at most one set of each such pair. The lemma follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The Katona&#039;s proof of Erdős–Ko–Rado theorem is done by counting in two ways the pairs of member &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; and cyclic permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which contain &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; as a continuous path on the circle (i.e., an arc).&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Katona&#039;s proof of Erdős–Ko–Rado theorem|(double counting)&lt;br /&gt;
Let &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{R}=\{(S,\pi)\mid \pi \text{ is a cyclic permutation of }X, \text{and }S\in\mathcal{F}\cap\mathcal{G}_\pi\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We count &amp;lt;math&amp;gt;\mathcal{R}&amp;lt;/math&amp;gt; in two ways.&lt;br /&gt;
&lt;br /&gt;
First, due to the lemma, &amp;lt;math&amp;gt;|\mathcal{F}\cap\mathcal{G}_\pi|\le k&amp;lt;/math&amp;gt; for any cyclic permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;. There are &amp;lt;math&amp;gt;(n-1)!&amp;lt;/math&amp;gt; cyclic permutations in total. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{R}|=\sum_{\text{cyclic }\pi}|\mathcal{F}\cap\mathcal{G}_\pi|\le k(n-1)!&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Next, for each &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt;, the number of cyclic permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; in which &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is continuous is &amp;lt;math&amp;gt;|S|!(n-|S|)!=k!(n-k)!&amp;lt;/math&amp;gt;. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{R}|=\sum_{S\in\mathcal{F}}k!(n-k)!=|\mathcal{F}|k!(n-k)!&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Altogether, we have &lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|\le\frac{k(n-1)!}{k!(n-k)!}=\frac{(n-1)!}{(k-1)!(n-k)!}={n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Erdős&#039; shifting technique ===&lt;br /&gt;
We now introduce the original proof of the Erdős–Ko–Rado theorem, which uses a technique called &#039;&#039;&#039;shifting&#039;&#039;&#039; (originally called &#039;&#039;&#039;compression&#039;&#039;&#039;).&lt;br /&gt;
&lt;br /&gt;
Without loss of generality, we assume &amp;lt;math&amp;gt;X=[n]&amp;lt;/math&amp;gt;, and restate the Erdős–Ko–Rado theorem as follows.&lt;br /&gt;
{{Theorem|Erdős–Ko–Rado theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {[n]\choose k}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, then &amp;lt;math&amp;gt;|\mathcal{F}|\le{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We define a &#039;&#039;&#039;shift operator&#039;&#039;&#039; for the set family.&lt;br /&gt;
{{Theorem|Definition (shift operator)|&lt;br /&gt;
: Assume &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^{[n]}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;0\le i&amp;lt;j\le n-1&amp;lt;/math&amp;gt;. Define the &#039;&#039;&#039;&amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shift&#039;&#039;&#039; &amp;lt;math&amp;gt;S_{ij}&amp;lt;/math&amp;gt; as an operator on &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
:*for each &amp;lt;math&amp;gt;T\in\mathcal{F}&amp;lt;/math&amp;gt;, write &amp;lt;math&amp;gt;T_{ij}=(T\setminus\{j\})\cup\{i\} &amp;lt;/math&amp;gt;, and let&lt;br /&gt;
::&amp;lt;math&amp;gt;S_{ij}(T)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
T_{ij} &amp;amp; \mbox{if }j\in T, i\not\in T, \mbox{ and }T_{ij} \not\in\mathcal{F},\\&lt;br /&gt;
T &amp;amp; \mbox{otherwise;}&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:* let &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})=\{S_{ij}(T)\mid T\in \mathcal{F}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is easy to verify the following propositions of shifts.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
# &amp;lt;math&amp;gt;|S_{ij}(T)|=|T|\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|S_{ij}(\mathcal{F})|=\mathcal{F}&amp;lt;/math&amp;gt;;&lt;br /&gt;
# if &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting, then so is &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
(1) is quite obvious. Now we prove (2).&lt;br /&gt;
&lt;br /&gt;
Consider any &amp;lt;math&amp;gt;A,B\in\mathcal{F}&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;A\cap B&amp;lt;/math&amp;gt; includes any element other than &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; are still intersecting after &amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shift. Thus without loss of generality, we may consider the only unsafe case where &amp;lt;math&amp;gt;A\cap B=\{j\}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is successfully shifted to &amp;lt;math&amp;gt;B_{ij}=(B\setminus\{j\})\cup\{i\}&amp;lt;/math&amp;gt; but &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; fails to shift to &amp;lt;math&amp;gt;A_{ij}=(A\setminus\{j\})\cup\{i\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Since  &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is successfully shifted to &amp;lt;math&amp;gt;B_{ij}&amp;lt;/math&amp;gt;, we know that it must hold that &amp;lt;math&amp;gt;i\not\in B&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B_{ij}\not\in\mathcal{F}&amp;lt;/math&amp;gt;. And the only two reasons for which &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; may fail to shift to &amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt; are: (1) &amp;lt;math&amp;gt;i\in A&amp;lt;/math&amp;gt; and (2) &amp;lt;math&amp;gt;i\not\in A&amp;lt;/math&amp;gt; but &amp;lt;math&amp;gt;A_{ij}\in\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Case.1: &amp;lt;math&amp;gt;i\in A&amp;lt;/math&amp;gt;. In this case, since &amp;lt;math&amp;gt;i\in B_{ij}&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;S_{ij}(A)\cap S_{ij}(B)=A\cap B_{ij}=\{i\}&amp;lt;/math&amp;gt;, i.e. &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is still intersecting with &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; after shifting.&lt;br /&gt;
&lt;br /&gt;
Case.2: &amp;lt;math&amp;gt;i\not\in A&amp;lt;/math&amp;gt; but &amp;lt;math&amp;gt;A_{ij}\in\mathcal{F}&amp;lt;/math&amp;gt;. In this case, it is easy to verify that &amp;lt;math&amp;gt;A_{ij}\cap B=(A\cap B)\setminus\{j\}=\emptyset&amp;lt;/math&amp;gt;. Recall that we assume &amp;lt;math&amp;gt;A_{ij}\in\mathcal{F}&amp;lt;/math&amp;gt;. This contradicts to that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting.&lt;br /&gt;
&lt;br /&gt;
In conclusion, in all cases, &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})&amp;lt;/math&amp;gt; remains intersecting.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Repeatedly applying &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;0\le i&amp;lt;j\le n-1&amp;lt;/math&amp;gt;, since we only replace elements by smaller elements, eventually &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; will stop changing, that is, &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})=\mathcal{F}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;0\le i&amp;lt;j\le n-1&amp;lt;/math&amp;gt;. We call such an &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; &#039;&#039;&#039;shifted&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The idea behind the shifting technique is very natural: by applying shifting, all intersecting families are transformed to some &#039;&#039;special forms&#039;&#039;, and we only need to prove the theorem for these special form of intersecting families.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof of Erdős-Ko-Rado theorem| (The original proof of Erdős-Ko-Rado by shifting)&lt;br /&gt;
By the above lemma, it is sufficient to prove the Erdős-Ko-Rado theorem holds for shifted &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;. We assume that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is shifted.&lt;br /&gt;
&lt;br /&gt;
First, it is trivial to see that the theorem holds for &amp;lt;math&amp;gt;k=1&amp;lt;/math&amp;gt; (no matter whether shifted).&lt;br /&gt;
&lt;br /&gt;
Next, we show that the theorem holds when &amp;lt;math&amp;gt;n=2k&amp;lt;/math&amp;gt;  (no matter whether shifted). For any &amp;lt;math&amp;gt;S\in{X\choose k}&amp;lt;/math&amp;gt;, both &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;X\setminus S&amp;lt;/math&amp;gt; are in &amp;lt;math&amp;gt;{X\choose k}&amp;lt;/math&amp;gt;, but at most one of them can be in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|\le\frac{1}{2}{n\choose k}=\frac{n!}{2k!(n-k)!}=\frac{(n-1)!}{(k-1)!(n-k)!}={n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We then apply the induction on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. For &amp;lt;math&amp;gt;n&amp;gt; 2k&amp;lt;/math&amp;gt;, the induction hypothesis is stated as:&lt;br /&gt;
* the Erdős-Ko-Rado theorem holds for any smaller &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
Define&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{F}_0=\{S\in\mathcal{F}\mid n\not\in S\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}_1=\{S\in\mathcal{F}\mid n\in S\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Clearly, &amp;lt;math&amp;gt;\mathcal{F}_0\subseteq{[n-1]\choose k}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}_0&amp;lt;/math&amp;gt; is intersecting. Due to the induction hypothesis, &amp;lt;math&amp;gt;|\mathcal{F}_0|\le{n-2\choose k-1}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
In order to apply the induction, we let&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{F}_1&#039;=\{S\setminus\{n\}\mid S\in\mathcal{F}_1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Clearly, &amp;lt;math&amp;gt;\mathcal{F}_1&#039;\subseteq{[n-1]\choose k-1}&amp;lt;/math&amp;gt;. If only it is also intersecting, we can apply the induction hypothesis, and indeed it is. To see this, by contradiction we assume that &amp;lt;math&amp;gt;\mathcal{F}_1&#039;&amp;lt;/math&amp;gt; is not intersecting. Then there must exist &amp;lt;math&amp;gt;A,B\in\mathcal{F}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;A\cap B=\{n\}&amp;lt;/math&amp;gt;, which means that &amp;lt;math&amp;gt;|A\cup B|\le 2k-1&amp;lt;n-1&amp;lt;/math&amp;gt;. Thus, there is some &amp;lt;math&amp;gt;0\le i\le n-1&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;i\not\in A\cup B&amp;lt;/math&amp;gt;. Since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is shifted, &amp;lt;math&amp;gt;A_{in}=A\setminus\{n\}\cup\{i\}\in\mathcal{F}&amp;lt;/math&amp;gt;. On the other hand it can be verified that &amp;lt;math&amp;gt;A_{in}\cap B=\emptyset&amp;lt;/math&amp;gt;, which contradicts that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is intersecting. &lt;br /&gt;
&lt;br /&gt;
Thus, &amp;lt;math&amp;gt;\mathcal{F}_1&#039;\subseteq{[n-1]\choose k-1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}_1&#039;&amp;lt;/math&amp;gt; is intersecting. Due to the induction hypothesis, &amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|\le{n-2\choose k-2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Combining these together,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|=|\mathcal{F}_0|+|\mathcal{F}_1|=|\mathcal{F}_0|+|\mathcal{F}_1&#039;|\le {n-2\choose k-1}+{n-2\choose k-2}={n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Sperner system ==&lt;br /&gt;
A set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; with the relation &amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt; define a poset. Thus, a &#039;&#039;&#039;chain&#039;&#039;&#039; is a sequence &amp;lt;math&amp;gt;S_1\subseteq S_2\subseteq\cdots\subseteq S_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is an &#039;&#039;&#039;antichain&#039;&#039;&#039; (also called a &#039;&#039;&#039;Sperner system&#039;&#039;&#039;) if for all &amp;lt;math&amp;gt;S,T\in\mathcal{F}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;S\neq T&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;S\not\subseteq T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-uniform &amp;lt;math&amp;gt;{X\choose k}&amp;lt;/math&amp;gt; is an antichain. Let &amp;lt;math&amp;gt;n=|X|&amp;lt;/math&amp;gt;. The size of &amp;lt;math&amp;gt;{X\choose k}&amp;lt;/math&amp;gt; is maximized when &amp;lt;math&amp;gt;k=\lfloor n/2\rfloor&amp;lt;/math&amp;gt;. We wonder whether this is also the largest possible size of any antichain &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In 1928, Emanuel Sperner proved a theorem saying that it is indeed the largest possible antichain. This result, called Sperner&#039;s theorem today, initiated the studies of extremal set theory.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Sperner 1928)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain, then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\mathcal{F}|\le{n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== First proof (shadows)===&lt;br /&gt;
We first introduce the original proof by Sperner, which uses concepts called &#039;&#039;&#039;shadows&#039;&#039;&#039; and &#039;&#039;&#039;shades&#039;&#039;&#039; of set systems.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;|X|=n\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;k&amp;lt;n\,&amp;lt;/math&amp;gt;. &lt;br /&gt;
:The &#039;&#039;&#039;shade&#039;&#039;&#039; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is defined to be&lt;br /&gt;
::&amp;lt;math&amp;gt;\nabla\mathcal{F}=\left\{T\in {X\choose k+1}\,\,\bigg|\,\, \exists S\in\mathcal{F}\mbox{ such that } S\subset T\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Thus the shade &amp;lt;math&amp;gt;\nabla\mathcal{F}&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; consists of all subsets of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; which can be obtained by adding an element to a set in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Similarly, the &#039;&#039;&#039;shadow&#039;&#039;&#039; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is defined to be&lt;br /&gt;
::&amp;lt;math&amp;gt;\Delta\mathcal{F}=\left\{T\in {X\choose k-1}\,\,\bigg|\,\, \exists S\in\mathcal{F}\mbox{ such that } T\subset S\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Thus the shadow &amp;lt;math&amp;gt;\Delta\mathcal{F}&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; consists of all subsets of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; which can be obtained by removing an element from a set in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next lemma bounds the effects of shadows and shades on the sizes of set systems.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma (Sperner)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;|X|=n\,&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
&amp;amp;|\nabla\mathcal{F}|\ge\frac{n-k}{k+1}|\mathcal{F}| &amp;amp;\text{ if } k&amp;lt;n\\&lt;br /&gt;
&amp;amp;|\Delta\mathcal{F}|\ge\frac{k}{n-k+1}|\mathcal{F}| &amp;amp;\text{ if } k&amp;gt;0.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
The lemma is proved by double counting. We prove the inequality of &amp;lt;math&amp;gt;|\nabla\mathcal{F}|&amp;lt;/math&amp;gt;. Assume that &amp;lt;math&amp;gt;0\le k&amp;lt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Define&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{R}=\{(S,T)\mid S\in\mathcal{F}, T\in\nabla\mathcal{F}, S\subset T\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We estimate &amp;lt;math&amp;gt;|\mathcal{R}|&amp;lt;/math&amp;gt; in two ways. &lt;br /&gt;
&lt;br /&gt;
For each &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt;, there are &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; different &amp;lt;math&amp;gt;T\in\nabla\mathcal{F}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;S\subset T&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{R}|=(n-k)|\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
For each &amp;lt;math&amp;gt;T\in\nabla\mathcal{F}&amp;lt;/math&amp;gt;, there are &amp;lt;math&amp;gt;k+1&amp;lt;/math&amp;gt; ways to choose an &amp;lt;math&amp;gt;S\subset T&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|S|=k&amp;lt;/math&amp;gt;, some of which may not be in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{R}|\le (k+1)|\nabla\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Altogether, we show that &amp;lt;math&amp;gt;|\nabla\mathcal{F}|\ge\frac{n-k}{k+1}|\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The inequality of &amp;lt;math&amp;gt;|\Delta\mathcal{F}|&amp;lt;/math&amp;gt; can be proved in the same way.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
An immediate corollary of the previous lemma is as follows.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition 1|&lt;br /&gt;
:If &amp;lt;math&amp;gt;k\le \frac{n-1}{2}&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;|\nabla\mathcal{F}|\ge|\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
:If &amp;lt;math&amp;gt;k\ge \frac{n-1}{2}&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;|\Delta\mathcal{F}|\ge|\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The idea of Sperner&#039;s proof is pretty clear: &lt;br /&gt;
* we &amp;quot;push up&amp;quot; all the sets in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;&amp;lt;\frac{n-1}{2}&amp;lt;/math&amp;gt; replacing them by their shades; &lt;br /&gt;
* and also &amp;quot;push down&amp;quot; all the sets in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;\ge\frac{n+1}{2}&amp;lt;/math&amp;gt; replacing them by their shadows. &lt;br /&gt;
Repeat this process we end up with a set system &amp;lt;math&amp;gt;\mathcal{F}\subseteq{X\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;. We need to show that this process does not decrease the size of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition 2|&lt;br /&gt;
:Suppose that &amp;lt;math&amp;gt;\mathcal{F}\subseteq2^X&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;\mathcal{F}_k=\mathcal{F}\cap{X\choose k}&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;k_\min&amp;lt;/math&amp;gt; be the smallest &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|\mathcal{F}_k|&amp;gt;0&amp;lt;/math&amp;gt;, and let&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{F}&#039;=\begin{cases}&lt;br /&gt;
\mathcal{F}\setminus\mathcal{F}_{k_\min}\cup \nabla\mathcal{F}_{k_\min} &amp;amp; \mbox{if }k_\min&amp;lt;\frac{n-1}{2},\\&lt;br /&gt;
\mathcal{F} &amp;amp; \mbox{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:Similarly, let &amp;lt;math&amp;gt;k_\max&amp;lt;/math&amp;gt; be the largest &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|\mathcal{F}_k|&amp;gt;0&amp;lt;/math&amp;gt;, and let&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\mathcal{F}&#039;&#039;=\begin{cases}&lt;br /&gt;
\mathcal{F}\setminus\mathcal{F}_{k_\max}\cup \Delta\mathcal{F}_{k_\max} &amp;amp; \mbox{if }k_\max\ge\frac{n+1}{2},\\&lt;br /&gt;
\mathcal{F} &amp;amp; \mbox{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain, &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}&#039;&#039;&amp;lt;/math&amp;gt; are antichains, and we have &amp;lt;math&amp;gt;|\mathcal{F}&#039;|\ge|\mathcal{F}|&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|\mathcal{F}&#039;&#039;|\ge|\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We show that &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt; is an antichain and &amp;lt;math&amp;gt;|\mathcal{F}&#039;|\ge|\mathcal{F}|&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
First, observe that &amp;lt;math&amp;gt;\nabla\mathcal{F}_k\cap\mathcal{F}=\emptyset&amp;lt;/math&amp;gt;, otherwise &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; cannot be an antichain, and due to Proposition 1, &amp;lt;math&amp;gt;|\nabla\mathcal{F}_k|\ge|\mathcal{F}_k|&amp;lt;/math&amp;gt; when &amp;lt;math&amp;gt;k\le \frac{n-1}{2}&amp;lt;/math&amp;gt;, so &amp;lt;math&amp;gt;|\mathcal{F}&#039;|=|\mathcal{F}|-|\mathcal{F}_k|+|\nabla\mathcal{F}_k|\ge |\mathcal{F}|&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Now we prove that &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt; is an antichain . By contradiction, assume that there are &amp;lt;math&amp;gt;S, T\in \mathcal{F}&#039;&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;S\subset T&amp;lt;/math&amp;gt;. One of the &amp;lt;math&amp;gt;S,T&amp;lt;/math&amp;gt; must be in &amp;lt;math&amp;gt;\nabla\mathcal{F}_{k_\min}&amp;lt;/math&amp;gt;, or otherwise &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; cannot be an antichain. Recall that &amp;lt;math&amp;gt;k_\min&amp;lt;/math&amp;gt; is the smallest &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|\mathcal{F}_k|&amp;gt;0&amp;lt;/math&amp;gt;, thus it must be &amp;lt;math&amp;gt;S\in \nabla\mathcal{F}_{k_\min}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;T\in\mathcal{F}&amp;lt;/math&amp;gt;. This implies that there is an &amp;lt;math&amp;gt;R\in \mathcal{F}_{k_\min}\subseteq \mathcal{F}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;R\subset S\subset T&amp;lt;/math&amp;gt;, which contradicts that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain.&lt;br /&gt;
&lt;br /&gt;
The statement for &amp;lt;math&amp;gt;\mathcal{F}&#039;&#039;&amp;lt;/math&amp;gt; can be proved in the same way.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Applying the above process, we prove the Sperner&#039;s theorem.&lt;br /&gt;
{{Prooftitle|Proof of Sperner&#039;s theorem | (original proof of Sperner)&lt;br /&gt;
Let &amp;lt;math&amp;gt;\mathcal{F}_k=\{S\in\mathcal{F}\mid |S|=k\}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;0\le k\le n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We change &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; as follows: &lt;br /&gt;
* for the smallest &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|\mathcal{F}_k|&amp;gt;0&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;k&amp;lt;\frac{n-1}{2}&amp;lt;/math&amp;gt;, replace &amp;lt;math&amp;gt;\mathcal{F}_k&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\nabla\mathcal{F}_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Due to Proposition 2, this procedure preserves &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; as an antichain and does not decrease &amp;lt;math&amp;gt;|\mathcal{F}|&amp;lt;/math&amp;gt;. Repeat this procedure, until &amp;lt;math&amp;gt;|\mathcal{F}_k|=0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k&amp;lt;\frac{n-1}{2}&amp;lt;/math&amp;gt;, that is, there is no member set of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; has size less than &amp;lt;math&amp;gt;\frac{n-1}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We then define another symmetric procedure:&lt;br /&gt;
* for the largest &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|\mathcal{F}_k|&amp;gt;0&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;k\ge\frac{n+1}{2}&amp;lt;/math&amp;gt;, replace &amp;lt;math&amp;gt;\mathcal{F}_k&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\Delta\mathcal{F}_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
Also due to Proposition 2, this procedure preserves &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; as an antichain and does not decrease &amp;lt;math&amp;gt;|\mathcal{F}|&amp;lt;/math&amp;gt;. After repeatedly applying this procedure, &amp;lt;math&amp;gt;|\mathcal{F}_k|=0&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k\ge\frac{n+1}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
The resulting &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\mathcal{F}\subseteq{X\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;, and since &amp;lt;math&amp;gt;|\mathcal{F}|&amp;lt;/math&amp;gt; is never decreased, for the original &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|\le {n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Second proof (counting)===&lt;br /&gt;
We now introduce an elegant proof due to Lubell. The proof uses a counting argument, and tells more information than just the size of the set system.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof of Sperner&#039;s theorem | (Lubell 1966)&lt;br /&gt;
Let &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; be a permutation of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;. We say that an &amp;lt;math&amp;gt;S\subseteq X&amp;lt;/math&amp;gt; &#039;&#039;&#039;prefixes&#039;&#039;&#039; &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;S=\{\pi_1,\pi_2,\ldots, \pi_{|S|}\}&amp;lt;/math&amp;gt;, that is, &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is precisely the set of the first &amp;lt;math&amp;gt;|S|&amp;lt;/math&amp;gt; elements in the permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Fix an &amp;lt;math&amp;gt;S\subseteq X&amp;lt;/math&amp;gt;. It is easy to see that the number of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; prefixed by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;|S|!(n-|S|)!&amp;lt;/math&amp;gt;.  Also, since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain, no permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; can be prefixed by more than one members of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, otherwise one of the member sets must contain the other, which contradicts that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain. Thus, the number of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; prefixed by some &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt; is &lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}|S|!(n-|S|)!&amp;lt;/math&amp;gt;,&lt;br /&gt;
which cannot be larger than the total number of permutations, &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt;, therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}|S|!(n-|S|)!\le n!&amp;lt;/math&amp;gt;.&lt;br /&gt;
Dividing both sides by &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt;, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}=\sum_{S\in\mathcal{F}}\frac{|S|!(n-|S|)!}{n!}\le 1&amp;lt;/math&amp;gt;,&lt;br /&gt;
where &amp;lt;math&amp;gt;{n\choose |S|}\le {n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;, so&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\ge \frac{|\mathcal{F}|}{{n\choose \lfloor n/2\rfloor}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Combining this with the above inequality, we prove the Sperner&#039;s theorem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== The LYM inequality ===&lt;br /&gt;
Lubell&#039;s proof proves the following inequality:&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\le 1&amp;lt;/math&amp;gt;&lt;br /&gt;
which is actually stronger than Sperner&#039;s original statement that &amp;lt;math&amp;gt;|\mathcal{F}|\le{n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This inequality is independently discovered by Lubell-Yamamoto, Meschalkin, and Bollobás, and is called the LYM inequality today.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Lubell, Yamamoto 1954; Meschalkin 1963)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain, then&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\le 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In Lubell&#039;s counting argument proves the LYM inequality, which implies the Sperner&#039;s theorem. Here we give another proof of the LYM inequality by the probabilistic method,  due to Noga Alon.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Third proof (the probabilistic method)| (Due to Alon.)&lt;br /&gt;
Let &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; be a uniformly random permutation of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;. Define a random maximal chain by&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{C}_\pi=\{\{\pi_i\mid 1\le i\le k\}\mid 0\le k\le n\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
For any &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;X_S&amp;lt;/math&amp;gt; be the 0-1 random variable which indicates whether &amp;lt;math&amp;gt;S\in\mathcal{C}_\pi&amp;lt;/math&amp;gt;, that is&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
X_S=\begin{cases}&lt;br /&gt;
1 &amp;amp; \mbox{if }S\in\mathcal{C}_\pi,\\&lt;br /&gt;
0 &amp;amp; \mbox{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Note that for a uniformly random &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathcal{C}_\pi&amp;lt;/math&amp;gt; has exact one member set of size &amp;lt;math&amp;gt;|S|&amp;lt;/math&amp;gt;, uniformly distributed over &amp;lt;math&amp;gt;{X\choose |S|}&amp;lt;/math&amp;gt;, thus&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[X_S]=\Pr[S\in\mathcal{C}_\pi]=\frac{1}{{n\choose |S|}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Let &amp;lt;math&amp;gt;X=\sum_{S\in\mathcal{F}}X_S&amp;lt;/math&amp;gt;. Note that &amp;lt;math&amp;gt;X=|\mathcal{F}\cap\mathcal{C}_\pi|&amp;lt;/math&amp;gt;. By the linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[X]=\sum_{S\in\mathcal{F}}\mathbf{E}[X_S]=\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
On the other hand, since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is an antichain, it can never intersect a chain at more than one elements, thus we always have &amp;lt;math&amp;gt;X=|\mathcal{F}\cap\mathcal{C}_\pi|\le 1&amp;lt;/math&amp;gt;. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\le \mathbf{E}[X] \le 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The Sperner&#039;s theorem is an immediate consequence of the LYM inequality.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\le 1&amp;lt;/math&amp;gt; implies that &amp;lt;math&amp;gt;|\mathcal{F}|\le{n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
It holds that &amp;lt;math&amp;gt;{n\choose k}\le {n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;1\ge \sum_{S\in\mathcal{F}}\frac{1}{{n\choose |S|}}\ge \frac{|\mathcal{F}|}{{n\choose \lfloor n/2\rfloor}}&amp;lt;/math&amp;gt;,&lt;br /&gt;
which implies that &amp;lt;math&amp;gt;|\mathcal{F}|\le {n\choose \lfloor n/2\rfloor}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Sauer&#039;s lemma and VC-dimension ==&lt;br /&gt;
&lt;br /&gt;
=== Shattering and the VC-dimension ===&lt;br /&gt;
{{Theorem|Definition (shatter)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; be set family and let &amp;lt;math&amp;gt;R\subseteq X&amp;lt;/math&amp;gt; be a subset. The &#039;&#039;&#039;trace&#039;&#039;&#039; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;, denoted &amp;lt;math&amp;gt;\mathcal{F}|_R&amp;lt;/math&amp;gt; is defined as&lt;br /&gt;
::&amp;lt;math&amp;gt;\mathcal{F}|_R=\{S\cap R\mid S\in\mathcal{F}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:We say that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; &#039;&#039;&#039;shatters&#039;&#039;&#039; &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;\mathcal{F}|_R=2^R&amp;lt;/math&amp;gt;, i.e. for all &amp;lt;math&amp;gt;T\subseteq R&amp;lt;/math&amp;gt;, there exists an &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;T=S\cap R&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/VC_dimension &#039;&#039;&#039;VC dimension&#039;&#039;&#039;] is defined by the power of a family to shatter a set.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition (VC-dimension)|&lt;br /&gt;
:The &#039;&#039;&#039;Vapnik–Chervonenkis dimension&#039;&#039;&#039; (&#039;&#039;&#039;VC-dimension&#039;&#039;&#039;) of a set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt;, denoted &amp;lt;math&amp;gt;\text{VC-dim}(\mathcal{F})&amp;lt;/math&amp;gt;, is the size of the largest &amp;lt;math&amp;gt;R\subseteq X&amp;lt;/math&amp;gt; shattered by &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is a core concept in [http://en.wikipedia.org/wiki/Computational_learning_theory computational learning theory].&lt;br /&gt;
&lt;br /&gt;
Each subset &amp;lt;math&amp;gt;S\subseteq X&amp;lt;/math&amp;gt; can be equivalently represented by its characteristic function &amp;lt;math&amp;gt;f_S:X\rightarrow\{0,1\}&amp;lt;/math&amp;gt;, such that for each &amp;lt;math&amp;gt;x\in X&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;f_S(x)=\begin{cases}&lt;br /&gt;
1 &amp;amp; x\in S\\&lt;br /&gt;
0 &amp;amp; x\not\in S.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then a set family &amp;lt;math&amp;gt;\mathcal{F}\subseteq2^X&amp;lt;/math&amp;gt; corresponds to a collection of boolean functions &amp;lt;math&amp;gt;\{f_S\mid S\in\mathcal{F}\}&amp;lt;/math&amp;gt;, which is a subset of all Boolean functions in the form &amp;lt;math&amp;gt;f:X\rightarrow\{0,1\}&amp;lt;/math&amp;gt;. We wonder on how large a subdomain &amp;lt;math&amp;gt;Y\subseteq X&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; includes all the &amp;lt;math&amp;gt;2^{|Y|}&amp;lt;/math&amp;gt; mappings &amp;lt;math&amp;gt;Y\rightarrow\{0,1\}&amp;lt;/math&amp;gt;. The largest size of such subdomain is the VC-dimension. It measures how complicated a collection of boolean functions (or equivalently a set family) is.&lt;br /&gt;
&lt;br /&gt;
=== Sauer&#039;s Lemma ===&lt;br /&gt;
The definition of the VC-dimension involves enumerating all subsets, thus is difficult to analyze in general. The following famous result state a very simple sufficient condition to lower bound the VC-dimension, regarding only the size of the family. The lemma is due to Sauer, and independently due to Shelah and Perles. A slightly weaker version is found by Vapnik and Chervonenkis, who use the framework to develop a theory of classifications.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Sauer&#039;s Lemma (Sauer; Shelah-Perles; Vapnik-Chervonenkis)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;\sum_{1\le i&amp;lt;k}{n\choose i}&amp;lt;/math&amp;gt;, then there exists an &amp;lt;math&amp;gt;R\in{X\choose k}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; shatters &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
In other words, for any set family &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;\sum_{1\le i&amp;lt;k}{n\choose i}&amp;lt;/math&amp;gt;, its VC-dimension &amp;lt;math&amp;gt;\text{VC-dim}(\mathcal{F})\ge k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Hereditary family ===&lt;br /&gt;
We note the Sauer&#039;s lemma is especially easy to prove for a special type of set families, called the &#039;&#039;&#039;hereditary&#039;&#039;&#039; families.&lt;br /&gt;
{{Theorem|Definition (hereditary family)|&lt;br /&gt;
:A set system &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is said to be &#039;&#039;&#039;hereditary&#039;&#039;&#039; (also called an &#039;&#039;&#039;ideal&#039;&#039;&#039; or an &#039;&#039;&#039;abstract simplicial complex&#039;&#039;&#039;), if&lt;br /&gt;
::&amp;lt;math&amp;gt;S\subseteq T\in\mathcal{F}&amp;lt;/math&amp;gt; implies &amp;lt;math&amp;gt;S\in\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
In other words, for a hereditary family &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;R\in\mathcal{F}&amp;lt;/math&amp;gt;, then all subsets of &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; are also in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;. An immediate consequence is the following proposition.&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; be a hereditary family. If &amp;lt;math&amp;gt;R\in\mathcal{F}&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; shatters &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Therefore, it is very easy to prove the Sauer&#039;s lemma for hereditary families: &lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:For &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is hereditary and &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;\sum_{1\le i&amp;lt;k}{n\choose i}&amp;lt;/math&amp;gt; then there exists an &amp;lt;math&amp;gt;R\in{X\choose k}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; shatters &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is hereditary, we only need to show that there exists an &amp;lt;math&amp;gt;R\in\mathcal{F}&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;|R|\ge k&amp;lt;/math&amp;gt;, which must be true, because if all members of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; are of sizes &amp;lt;math&amp;gt;&amp;lt;k&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;|\mathcal{F}|\le\left|\bigcup_{1\le i&amp;lt;k}{X\choose k}\right|=\sum_{1\le i&amp;lt;k}{n\choose i}&amp;lt;/math&amp;gt;, a contradiction.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To prove the Sauer&#039;s lemma for general non-hereditary families, we can use some way to reduce arbitrary families to hereditary families. Here we apply the shifting technique to achieve this.&lt;br /&gt;
&lt;br /&gt;
=== Down-shifts ===&lt;br /&gt;
Note that we work on &amp;lt;math&amp;gt;\mathcal{F}\subseteq2^X&amp;lt;/math&amp;gt;, instead of &amp;lt;math&amp;gt;\mathcal{F}\subseteq{X\choose k}&amp;lt;/math&amp;gt; like in the Erdős–Ko–Rado theorem, so we do not need to preserve the size of member sets. Instead, we need to reduce an arbitrary family to a hereditary one, thus we use a shift operator which replaces a member set by a subset of it.&lt;br /&gt;
{{Theorem|Definition (down-shifts)|&lt;br /&gt;
: Assume &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^{[n]}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt;. Define the &#039;&#039;&#039;down-shift&#039;&#039;&#039; operator &amp;lt;math&amp;gt;S_{i}&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
:* for each &amp;lt;math&amp;gt;T\in\mathcal{F}&amp;lt;/math&amp;gt;, let&lt;br /&gt;
::&amp;lt;math&amp;gt;S_{i}(T)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
T\setminus\{i\} &amp;amp; \mbox{if }i\in T \mbox{ and }T\setminus\{i\} \not\in\mathcal{F},\\&lt;br /&gt;
T &amp;amp; \mbox{otherwise;}&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:* let &amp;lt;math&amp;gt;S_{i}(\mathcal{F})=\{S_{i}(T)\mid T\in \mathcal{F}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Repeatedly applying &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt;, due to the finiteness, eventually &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is not changed by any &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt;. We call such a family &#039;&#039;&#039;down-shifted&#039;&#039;&#039;. A family &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is down-shifted if and only if &amp;lt;math&amp;gt;S_i(\mathcal{F})=\mathcal{F}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt;. It is then easy to see that a down-shifted &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; must be hereditary.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:If &amp;lt;math&amp;gt;\mathcal{F}\subseteq2^X&amp;lt;/math&amp;gt; is down-shifted, then &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is hereditary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In order to use down-shift to prove the Sauer&#039;s lemma, we need to make sure that down-shift does not decrease &amp;lt;math&amp;gt;|\mathcal{F}|&amp;lt;/math&amp;gt; and does not increase the VC-dimension &amp;lt;math&amp;gt;\text{VC-dim}(\mathcal{F})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
# &amp;lt;math&amp;gt;|S_{i}(\mathcal{F})|=\mathcal{F}&amp;lt;/math&amp;gt;;&lt;br /&gt;
# &amp;lt;math&amp;gt;|S_i(\mathcal{F})|_R|\le |\mathcal{F}|_R|&amp;lt;/math&amp;gt;, thus if &amp;lt;math&amp;gt;S_{i}(\mathcal{F})&amp;lt;/math&amp;gt; shatters an &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;, so does &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
(1) is immediate. (2) is proved by case analysis. We omit the proof.&lt;br /&gt;
&lt;br /&gt;
;Proof of Sauer&#039;s lemma&lt;br /&gt;
Now we can prove the Sauer&#039;s lemma for arbitrary &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^{[n]}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For any &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^{[n]}&amp;lt;/math&amp;gt;, repeatedly apply &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i\in&amp;lt;/math&amp;gt; till the family is down-shifted, which is denoted by &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt;. We have proved that &amp;lt;math&amp;gt;|\mathcal{F}&#039;|=|\mathcal{F}|&amp;gt;\sum_{1\le i&amp;lt;k}{n\choose i}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt; is hereditary, thus as argued before, here exists an &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; shattered by &amp;lt;math&amp;gt;\mathcal{F}&#039;&amp;lt;/math&amp;gt;. By the above proposition, &amp;lt;math&amp;gt;|\mathcal{F}&#039;|_R|\le |\mathcal{F}|_R|&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; also shatters &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;. The lemma is proved.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\square&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== The Kruskal–Katona Theorem ==&lt;br /&gt;
The &#039;&#039;&#039;shadow&#039;&#039;&#039; of a set system &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, denoted &amp;lt;math&amp;gt;\Delta\mathcal{F}&amp;lt;/math&amp;gt;, consists of all sets  which can be obtained by removing an element from a set in &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt;. The &#039;&#039;&#039;shadow&#039;&#039;&#039; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is defined to be&lt;br /&gt;
::&amp;lt;math&amp;gt;\Delta\mathcal{F}=\left\{T\in {X\choose k-1}\,\,\bigg|\,\, \exists S\in\mathcal{F}\mbox{ such that } T\subset S\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The shadow contains rich information about the set system. An extremal question is: for a system of fixed number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets, how small can its shadow be? The Kruskal–Katona theorem gives an answer to this question.&lt;br /&gt;
&lt;br /&gt;
To state the result of the Kruskal–Katona theorem, we need to introduce the concepts of the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation of numbers and the colex order of sets.&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation of a number ===&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:Given positive integers &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, there exists a unique representation of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; in the form&lt;br /&gt;
::&amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}=\sum_{\ell=t}^k{m_\ell\choose \ell}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:where &amp;lt;math&amp;gt;m_k&amp;gt;m_{k-1}&amp;gt;\cdots&amp;gt;m_t\ge t\ge 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:This representation of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade&#039;&#039;&#039; (or a &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-binomial&#039;&#039;&#039;) representation of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;. &lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
In fact, the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation &amp;lt;math&amp;gt;(m_k,m_{k-1},\ldots,m_t)&amp;lt;/math&amp;gt; of an &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; can be found by the following simple greedy algorithm:&lt;br /&gt;
----&lt;br /&gt;
:&amp;lt;math&amp;gt;\ell=k;&amp;lt;/math&amp;gt;&lt;br /&gt;
:while (&amp;lt;math&amp;gt;m&amp;gt;0&amp;lt;/math&amp;gt;) do&lt;br /&gt;
::let &amp;lt;math&amp;gt;m_\ell&amp;lt;/math&amp;gt; be the largest integer for which &amp;lt;math&amp;gt;{m_\ell\choose \ell}\le m;&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;m=m-m_\ell;&amp;lt;/math&amp;gt;&lt;br /&gt;
::&amp;lt;math&amp;gt;\ell=\ell-1;&amp;lt;/math&amp;gt;&lt;br /&gt;
----&lt;br /&gt;
We then show that the above algorithm constructs a sequence &amp;lt;math&amp;gt;(m_k,m_{k-1},\ldots,m_t)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;m_k&amp;gt;m_{k-1}&amp;gt;\cdots&amp;gt;m_t\ge t\ge 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose the current &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; and the current &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;. To see that &amp;lt;math&amp;gt;m_{\ell-1}&amp;lt; m_\ell&amp;lt;/math&amp;gt;, we suppose otherwise &amp;lt;math&amp;gt;m_{\ell-1}\ge m_\ell&amp;lt;/math&amp;gt;. Then &lt;br /&gt;
:&amp;lt;math&amp;gt;m\ge {m_\ell\choose \ell}+{m_{\ell-1}\choose \ell-1}\ge{m_\ell\choose \ell}+{m_{\ell}\choose \ell-1}={1+m_{\ell}\choose \ell}&amp;lt;/math&amp;gt;&lt;br /&gt;
contradicting the maximality of &amp;lt;math&amp;gt;m_\ell&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;m_\ell&amp;gt;m_{\ell-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The algorithm continues reducing &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; to smaller nonnegative values, and eventually reaches a stage where the choice of &amp;lt;math&amp;gt;m_t&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;t\ge 2&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;{m_t\choose t}&amp;lt;/math&amp;gt; equals the current &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;; or gets right down to choosing &amp;lt;math&amp;gt;m_1&amp;lt;/math&amp;gt; as the integer such that &amp;lt;math&amp;gt;m_1={m_1\choose 1}&amp;lt;/math&amp;gt; equals the current &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore,  &amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;m_k&amp;gt;m_{k-1}&amp;gt;\cdots&amp;gt;m_t\ge t\ge 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The uniqueness of the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation follows by the induction on &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
When &amp;lt;math&amp;gt;k=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; has a unique &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation &amp;lt;math&amp;gt;m={m\choose 1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For general &amp;lt;math&amp;gt;k&amp;gt;1&amp;lt;/math&amp;gt;, suppose that every nonnegative integer &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; has a unique &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-cascade representation.&lt;br /&gt;
&lt;br /&gt;
Suppose then that &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; has two &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representations:&lt;br /&gt;
:&amp;lt;math&amp;gt;m={a_k\choose k}+{a_{k-1}\choose k-1}+\cdots+{a_t\choose t}={b_k\choose k}+{b_{k-1}\choose k-1}+\cdots+{b_r\choose r}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We then show that it must hold that &amp;lt;math&amp;gt;a_k=b_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
If &amp;lt;math&amp;gt;a_k\neq b_k&amp;lt;/math&amp;gt;, WLOG, suppose that &amp;lt;math&amp;gt;a_k&amp;lt;b_k&amp;lt;/math&amp;gt;. We obtain&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
m&amp;amp;&lt;br /&gt;
={a_k\choose k}+{a_{k-1}\choose k-1}+\cdots+{a_t\choose t}\\&lt;br /&gt;
&amp;amp;\le {a_k\choose k}+{a_{k}-1\choose k-1}+\cdots+{a_k-(k-t)\choose t}+\cdots+{a_k-k+1\choose 1}\\&lt;br /&gt;
&amp;amp;={a_k+1\choose k}-1,&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
where the last equation is got by repeatedly applying the identity&lt;br /&gt;
:&amp;lt;math&amp;gt;{n\choose k}+{n\choose k-1}={n+1\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We then obtain &lt;br /&gt;
:&amp;lt;math&amp;gt;m&amp;lt;{a_k+1\choose k}\le{b_k\choose k}\le m&amp;lt;/math&amp;gt;, &lt;br /&gt;
which is a contradiction. Therefore, &amp;lt;math&amp;gt;a_k=b_k&amp;lt;/math&amp;gt;, and by the induction hypothesis, the remaining value &amp;lt;math&amp;gt;m-a_k=m-b_k&amp;lt;/math&amp;gt; has a unique &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-cascade representation, so &amp;lt;math&amp;gt;a_i=b_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Co-lexicographic order of subsets ===&lt;br /&gt;
The co-lexicographic order of sets plays a particularly important role in the investigation of the size of the shadow of a system of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets.&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
: The &#039;&#039;&#039;co-lexicographic (colex) order&#039;&#039;&#039; (also called the &#039;&#039;&#039;reverse lexicographic order&#039;&#039;&#039;) of sets is defined as follows: for any &amp;lt;math&amp;gt;A,B\subseteq [n]&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A\neq B&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;A&amp;lt;B&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;\max A\setminus B &amp;lt; \max B\setminus A&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We can sort sets in colex order by first writing each set as a tuple, whose elements are in decreasing order, and then sorting the tuples in the lexicographic order of tuples.&lt;br /&gt;
&lt;br /&gt;
For example, &amp;lt;math&amp;gt;{[5]\choose 3}&amp;lt;/math&amp;gt; in colex order is&lt;br /&gt;
 {3,2,1}&lt;br /&gt;
 {4,2,1}&lt;br /&gt;
 {4,3,1}&lt;br /&gt;
 {4,3,2}&lt;br /&gt;
 {5,2,1}&lt;br /&gt;
 {5,3,1}&lt;br /&gt;
 {5,3,2}&lt;br /&gt;
 {5,4,1}&lt;br /&gt;
 {5,4,2}&lt;br /&gt;
 {5,4,3}&lt;br /&gt;
&lt;br /&gt;
We find that the first &amp;lt;math&amp;gt;{n\choose 3}&amp;lt;/math&amp;gt; sets in this order for &amp;lt;math&amp;gt;n=3,4,5&amp;lt;/math&amp;gt;, form precisely &amp;lt;math&amp;gt;{[n]\choose 3}&amp;lt;/math&amp;gt;. And if we write the colex order of &amp;lt;math&amp;gt;{[6]\choose 3}&amp;lt;/math&amp;gt;, the above colex order of &amp;lt;math&amp;gt;{[5]\choose 3}&amp;lt;/math&amp;gt; appears as a prefix of that order. Elaborating on this, we have:&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt; be the first &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; sets in the colex order of &amp;lt;math&amp;gt;{\mathbb{N}\choose k}&amp;lt;/math&amp;gt;. Then &lt;br /&gt;
::&amp;lt;math&amp;gt;\mathcal{R}\left({n\choose k},k\right)={[n]\choose k}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:that is, the first &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; sets in the colex order of all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets of natural numbers is precisely &amp;lt;math&amp;gt;{[n]\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This proposition says that the sets in &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt; is highly overlapped, which suggests that &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt; may have small shadow. The size of the shadow of &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt; is closely related to the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:Suppose the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; is &lt;br /&gt;
::&amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\Delta\mathcal{R}(m,k)|={m_k\choose k-1}+{m_{k-1}\choose k-2}+\cdots+{m_t\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Given &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and its &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-cascade representation &amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}&amp;lt;/math&amp;gt;, the &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt; is constructed as:&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_k]\choose k}&amp;lt;/math&amp;gt;;&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_{k-1}]\choose k-1}&amp;lt;/math&amp;gt;, unioned with &amp;lt;math&amp;gt;\{1+m_k\}\,&amp;lt;/math&amp;gt;;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vdots&amp;lt;/math&amp;gt;&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_{t}]\choose t}&amp;lt;/math&amp;gt;, unioned with &amp;lt;math&amp;gt;\{1+m_k,1+m_{k-1},\ldots,1+m_{t+1}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The shadow &amp;lt;math&amp;gt;\Delta\mathcal{R}(m,k)&amp;lt;/math&amp;gt; is the collection of all &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-sets contained by the above sets, which are&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_k]\choose k-1}&amp;lt;/math&amp;gt;;&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_{k-1}]\choose k-2}&amp;lt;/math&amp;gt;, unioned with &amp;lt;math&amp;gt;\{1+m_k\}\,&amp;lt;/math&amp;gt;;&lt;br /&gt;
::&amp;lt;math&amp;gt;\vdots&amp;lt;/math&amp;gt;&lt;br /&gt;
* all sets in &amp;lt;math&amp;gt;{[m_{t}]\choose t-1}&amp;lt;/math&amp;gt;, unioned with &amp;lt;math&amp;gt;\{1+m_k,1+m_{k-1},\ldots,1+m_{t+1}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{R}(m,k)|={m_k\choose k-1}+{m_{k-1}\choose k-2}+\cdots+{m_t\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== The Kruskal–Katona theorem ===&lt;br /&gt;
The Kruskal–Katona theorem states that among all systems of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets, &amp;lt;math&amp;gt;\mathcal{R}(m,k)&amp;lt;/math&amp;gt;, i.e., the first &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets in the colex order, has the smallest shadow.&lt;br /&gt;
&lt;br /&gt;
The theorem is proved independently by Joseph Kruskal in 1963 and G.O.H. Katona in 1966, and is a fundamental result in finite set theory and combinatorial topology.&lt;br /&gt;
{{Theorem|Theorem (Kruskal 1963, Katona 1966)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|\mathcal{F}|=m&amp;lt;/math&amp;gt;, and suppose that&lt;br /&gt;
::&amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:where &amp;lt;math&amp;gt;m_k&amp;gt;m_{k-1}&amp;gt;\cdots&amp;gt;m_t\ge t\ge 1&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\Delta\mathcal{F}|\ge {m_k\choose k-1}+{m_{k-1}\choose k-2}+\cdots+{m_t\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;-vector of a set system &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^X&amp;lt;/math&amp;gt; is a vector &amp;lt;math&amp;gt;(|\mathcal{F}_0|,|\mathcal{F}_1|,\ldots,|\mathcal{F}_n|)&amp;lt;/math&amp;gt; where&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{F}_k=\{S\mid S\in\mathcal{F}, |S|=k\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
i.e., the &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;-vector gives the number of member sets of each size.&lt;br /&gt;
&lt;br /&gt;
In a hereditary family (also called an [http://en.wikipedia.org/wiki/Abstract_simplicial_complex abstract simplicial complex]), &amp;lt;math&amp;gt;\mathcal{F}_k&amp;lt;/math&amp;gt; is formed by the shadow of &amp;lt;math&amp;gt;\mathcal{F}_{k+1}&amp;lt;/math&amp;gt; as well as some additional &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-sets introduced in this level. The Kruskal-Katona theorem gives a lower bound on &amp;lt;math&amp;gt;|\mathcal{F}_i|&amp;lt;/math&amp;gt;, given the &amp;lt;math&amp;gt;|\mathcal{F}_{i-1}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The original proof of the theorem is rather complicated. In the following years, several different proofs were discovered. Here we present a proof dueto Frankl by the shifting technique.&lt;br /&gt;
&lt;br /&gt;
;Frankl&#039;s shifting proof of Kruskal-Katonal theorem (Frankl 1984)&lt;br /&gt;
&lt;br /&gt;
We take the classic &amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shift operator &amp;lt;math&amp;gt;S_{ij}&amp;lt;/math&amp;gt; defined in the original proof of the Erdős-Ko-Rado theorem.&lt;br /&gt;
{{Theorem|Definition (&amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shift)|&lt;br /&gt;
: Assume &amp;lt;math&amp;gt;\mathcal{F}\subseteq 2^{[n]}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;0\le i&amp;lt;j\le n-1&amp;lt;/math&amp;gt;. Define the &#039;&#039;&#039;&amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shift&#039;&#039;&#039; &amp;lt;math&amp;gt;S_{ij}&amp;lt;/math&amp;gt; as an operator on &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
:*for each &amp;lt;math&amp;gt;T\in\mathcal{F}&amp;lt;/math&amp;gt;, write &amp;lt;math&amp;gt;T_{ij}=(T\setminus\{j\})\cup\{i\} &amp;lt;/math&amp;gt;, and let&lt;br /&gt;
::&amp;lt;math&amp;gt;S_{ij}(T)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
T_{ij} &amp;amp; \mbox{if }j\in T, i\not\in T, \mbox{ and }T_{ij} \not\in\mathcal{F},\\&lt;br /&gt;
T &amp;amp; \mbox{otherwise;}&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:* let &amp;lt;math&amp;gt;S_{ij}(\mathcal{F})=\{S_{ij}(T)\mid T\in \mathcal{F}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is immediate that shifting does not change the size of the set or the size of the system, i.e., &amp;lt;math&amp;gt;|S_{ij}(T)|=|T|\,&amp;lt;/math&amp;gt; and  &amp;lt;math&amp;gt;|S_{ij}(\mathcal{F})|=\mathcal{F}&amp;lt;/math&amp;gt;. And due to the finiteness, repeatedly applying &amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shifts for any &amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt;, eventually &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; does not changing any more. We called such an &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; with  &amp;lt;math&amp;gt;\mathcal{F}=S_{ij}(\mathcal{F})&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt; &#039;&#039;&#039;shifted&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
In order to make the shifting technique work for shadows, we have to prove that shifting does not increase the size of the shadow.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta S_{ij}(\mathcal{F})\subseteq S_{ij}(\Delta\mathcal{F})&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We abuse the notation &amp;lt;math&amp;gt;\Delta&amp;lt;/math&amp;gt; and let &amp;lt;math&amp;gt;\Delta A=\Delta\{A\}&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is a set instead of a set system.&lt;br /&gt;
&lt;br /&gt;
It is sufficient to show that for any &amp;lt;math&amp;gt;A\in\mathcal{F}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Delta S_{ij}(A)\subseteq S_{ij}(\Delta\mathcal{F})&amp;lt;/math&amp;gt;, which can be proved by case analysis. We omit the proof.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
An immediate corollary of the above proposition is that the &amp;lt;math&amp;gt;(i,j)&amp;lt;/math&amp;gt;-shifts &amp;lt;math&amp;gt;S_{ij}&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt; do not increase the size of the shadow.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Corollary|&lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta S_{ij}(\mathcal{F})|\le |\Delta\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
By the above proposition, &amp;lt;math&amp;gt;|\Delta S_{ij}(\mathcal{F})|\le|S_{ij}(\Delta\mathcal{F})|&amp;lt;/math&amp;gt;, and we know that &amp;lt;math&amp;gt;S_{ij}&amp;lt;/math&amp;gt; does not change the cardinality of a set family, that is, &amp;lt;math&amp;gt;|S_{ij}(\Delta\mathcal{F})|=|\Delta\mathcal{F}|&amp;lt;/math&amp;gt;, therefore &amp;lt;math&amp;gt;\Delta S_{ij}(\mathcal{F})|\le|\Delta\mathcal{F}|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Proof of Kruskal-Katona theorem&lt;br /&gt;
We know that shifts never enlarge the shadow, thus it is sufficient to prove the theorem for shifted &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;. We then assume &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is shifted.&lt;br /&gt;
&lt;br /&gt;
Apply induction on &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; and for given &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. The theorem holds trivially for the case that &amp;lt;math&amp;gt;k=1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; is arbitrary.&lt;br /&gt;
&lt;br /&gt;
Define &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{F}_0=\{A\in\mathcal{F}\mid 1\not\in A\}&amp;lt;/math&amp;gt;, &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{F}_1=\{A\in\mathcal{F}\mid 1\in A\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
And let &amp;lt;math&amp;gt;\mathcal{F}_1&#039;=\{A\setminus\{1\}\mid A\in\mathcal{F}_1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Clearly &amp;lt;math&amp;gt;\mathcal{F}_0,\mathcal{F}_1\subseteq{X\choose k}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mathcal{F}_1&#039;\subseteq{X\choose k-1}&amp;lt;/math&amp;gt;, and&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|=|\mathcal{F}_0|+|\mathcal{F}_1|=|\mathcal{F}_0|+|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Our induction is based on the following observation regarding the size of the shadow.&lt;br /&gt;
{{Theorem|Lemma 1|&lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{F}|\ge|\Delta\mathcal{F}_1&#039;|+|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Obviously &amp;lt;math&amp;gt;\mathcal{F}\supseteq\mathcal{F}_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta\mathcal{F}\supseteq\Delta\mathcal{F}_1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\Delta\mathcal{F}_1&lt;br /&gt;
&amp;amp;=\left\{A\in{X\choose k-1}\,\,\bigg|\,\, \exists B\in\mathcal{F}_1, A\subset B\right\}\\&lt;br /&gt;
&amp;amp;=\left\{A\in{X\choose k-1}\,\,\bigg|\,\, 1\in A, \exists B\in\mathcal{F}_1, A\subset B\right\}\\&lt;br /&gt;
&amp;amp;\quad\, \cup \left\{A\in{X\choose k-1}\,\,\bigg|\,\, 1\not\in A, \exists B\in\mathcal{F}_1, A\subset B\right\}\\&lt;br /&gt;
&amp;amp;=\{S\cup\{1\}\mid S\in\Delta\mathcal{F}_1&#039;\}\cup\mathcal{F}_1&#039;.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
The union is taken over two disjoint families. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{F}|\ge|\Delta\mathcal{F}_1|=|\Delta\mathcal{F}_1&#039;|+|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following property of shifted &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is essential for our proof.&lt;br /&gt;
{{Theorem|Lemma 2|&lt;br /&gt;
:For shifted &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt;, it holds that &amp;lt;math&amp;gt;\Delta\mathcal{F}_0\subseteq \mathcal{F}_1&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
If &amp;lt;math&amp;gt;A\in\Delta\mathcal{F}_0&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;A\cup\{j\}\in\mathcal{F}_0\subseteq\mathcal{F}&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;j&amp;gt;1&amp;lt;/math&amp;gt; so that, since &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is shifted, applying the &amp;lt;math&amp;gt;(1,j)&amp;lt;/math&amp;gt;-shift &amp;lt;math&amp;gt;S_{1j}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A\cup\{1\}\in\mathcal{F}&amp;lt;/math&amp;gt;, thus, &amp;lt;math&amp;gt;A\in\mathcal{F}_1&#039;&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We then bound the size of &amp;lt;math&amp;gt;\mathcal{F}_1&#039;&amp;lt;/math&amp;gt; as:&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma 3|&lt;br /&gt;
:If &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is shifted, then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|\ge{m_k-1\choose k-1}+{m_{k-1}-1\choose k-2}+\cdots+{m_t-1\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
By contradiction, assume that&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|&amp;lt;{m_k-1\choose k-1}+{m_{k-1}-1\choose k-2}+\cdots+{m_t-1\choose t-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Then by &amp;lt;math&amp;gt;|\mathcal{F}|=|\mathcal{F}_0|+|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;, it holds that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
|\mathcal{F}_0| &amp;amp;=m-|\mathcal{F}_1&#039;|\\&lt;br /&gt;
&amp;amp;&amp;gt;\left\{{m_k\choose k}- {m_k-1\choose k-1}\right\}+\cdots+\left\{{m_t\choose t}- {m_t-1\choose t-1}\right\}\\&lt;br /&gt;
&amp;amp;={m_k-1\choose k}+\cdots+{m_t-1\choose t},&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
so that, by the induction hypothesis, &lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{F}_0|\ge{m_k-1\choose k-1}+{m_{k-1}-1\choose k-1}+\cdots+{m_t-1\choose t-1}&amp;gt;|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;.&lt;br /&gt;
On the other hand, by Lemma 2, &amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|\ge|\Delta\mathcal{F}_0|&amp;lt;/math&amp;gt;. Thus &amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|\ge|\Delta\mathcal{F}_0|&amp;gt;|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;, a contradiction.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Now we officially apply the induction. By Lemma 1, &lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{F}|\ge|\Delta\mathcal{F}_1&#039;|+|\mathcal{F}_1&#039;|&amp;lt;/math&amp;gt;.&lt;br /&gt;
Note that &amp;lt;math&amp;gt;\mathcal{F}_1&#039;\subseteq{X\choose k-1}&amp;lt;/math&amp;gt;, and due to Lemma 3, &lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}_1&#039;|\ge{m_k-1\choose k-1}+{m_{k-1}-1\choose k-2}+\cdots+{m_t-1\choose t-1}&amp;lt;/math&amp;gt;, &lt;br /&gt;
thus by the induction hypothesis, &lt;br /&gt;
:&amp;lt;math&amp;gt;|\Delta\mathcal{F}_1&#039;|\ge{m_k-1\choose k-2}+{m_{k-1}-1\choose k-3}+\cdots+{m_t-1\choose t-2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
Combining them together, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
|\Delta\mathcal{F}|&lt;br /&gt;
&amp;amp;\ge |\Delta\mathcal{F}_1&#039;|+|\mathcal{F}_1&#039;|\\&lt;br /&gt;
&amp;amp;\ge {m_k-1\choose k-2}+\cdots+{m_t-1\choose t-2}+{m_k-1\choose k-1}+\cdots+{m_t-1\choose t-1}\\&lt;br /&gt;
&amp;amp;= {m_k\choose k-1}+{m_{k-1}\choose k-2}+\cdots+{m_t\choose t-1}.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;\square&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Shadows of specific sizes ===&lt;br /&gt;
The definition of shadow can be generalized to the subsets of any size.&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:The &#039;&#039;&#039;&amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-shadow&#039;&#039;&#039; of &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; is defined as&lt;br /&gt;
::&amp;lt;math&amp;gt;\Delta_r\mathcal{F}=\left\{S\mid |S|=r\text{ and }\exists T\in\mathcal{F}, S\subseteq T\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
And the general version of the Kruskal-Katona theorem can be deduced.&lt;br /&gt;
{{Theorem|Kruskal-Katona Theorem (general version)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|\mathcal{F}|=m&amp;lt;/math&amp;gt;, and suppose that&lt;br /&gt;
::&amp;lt;math&amp;gt;m={m_k\choose k}+{m_{k-1}\choose k-1}+\cdots+{m_t\choose t}&amp;lt;/math&amp;gt;&lt;br /&gt;
:where &amp;lt;math&amp;gt;m_k&amp;gt;m_{k-1}&amp;gt;\cdots&amp;gt;m_t\ge t\ge 1&amp;lt;/math&amp;gt;. Then for all &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le r\le k&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\left|\Delta_r\mathcal{F}\right|\ge {m_k\choose r}+{m_{k-1}\choose r-1}+\cdots+{m_t\choose t-k+r}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Note that for &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\Delta_r\mathcal{F}=\underbrace{\Delta\cdots\Delta}_{k-r}\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The theorem follows by repeatedly applying the Kruskal-Katona theorem for &amp;lt;math&amp;gt;\Delta\mathcal{F}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== The Erdős–Ko–Rado theorem, revisited===&lt;br /&gt;
To demonstrate the power of the Krulskal-Katona theorem, we show that it actually includes the Erdős–Ko–Rado theorem as a special case. The following elegant proof of the Erdős–Ko–Rado theorem is due to Daykin and Clements independently.&lt;br /&gt;
{{Theorem|Erdős–Ko–Rado Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathcal{F}\subseteq {X\choose k}&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;|X|=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n\ge 2k&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;S\cap T\neq\emptyset&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;S,T\in\mathcal{F}&amp;lt;/math&amp;gt;, then&lt;br /&gt;
::&amp;lt;math&amp;gt;|\mathcal{F}|\le{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof by the Kruskal-Katona theorem|(Daykin 1974, Clements 1976)&lt;br /&gt;
By contradiction, suppose that &amp;lt;math&amp;gt;|\mathcal{F}|&amp;gt;{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We define the dual system &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathcal{G}=\{\bar{S}\mid S\in\mathcal{F}\}&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\bar{S}=X\setminus S&amp;lt;/math&amp;gt;.&lt;br /&gt;
For any &amp;lt;math&amp;gt;S,T\in\mathcal{F}&amp;lt;/math&amp;gt;, the condition &amp;lt;math&amp;gt;S\cap T\neq \emptyset&amp;lt;/math&amp;gt; is equivalent to &amp;lt;math&amp;gt;S\not\subseteq \bar{T}&amp;lt;/math&amp;gt;, so &amp;lt;math&amp;gt;\mathcal{F}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\Delta_k\mathcal{G}&amp;lt;/math&amp;gt; are disjoint, thus&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|+|\Delta_k\mathcal{G}|\le{n\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Clearly, &amp;lt;math&amp;gt;\mathcal{G}\subseteq {X\choose n-k}&amp;lt;/math&amp;gt; and &lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{G}|=|\mathcal{F}|&amp;gt;{n-1\choose k-1}={n-1\choose n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
By the Kruskal-Katona theorem, &amp;lt;math&amp;gt;|\Delta_k\mathcal{G}|\ge{n-1\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;|\mathcal{F}|+|\Delta_k\mathcal{G}|&amp;gt;{n-1\choose k-1}+{n-1\choose k}={n\choose k}&amp;lt;/math&amp;gt;,&lt;br /&gt;
a contradiction.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13735</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13735"/>
		<updated>2026-05-13T08:48:27Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2026/ExtremalGraphs.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal set theory|Extremal set theory | 极值集合论]]（[http://tcs.nju.edu.cn/slides/comb2026/ExtremalSets.pdf slides]）&lt;br /&gt;
#* [https://mathweb.ucsd.edu/~ronspubs/90_03_erdos_ko_rado.pdf Old and new proofs of the Erdős–Ko–Rado theorem] by Frankl and Graham&lt;br /&gt;
#* An [http://tcs.nju.edu.cn/slides/comb2026/sunflower-note.pdf LLM-generated lecture note] on Alweiss-Lovet-Wu-Zhang&#039;s improvement over the sunflower lemma, with simplified proofs by Rao-Tao&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13734</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13734"/>
		<updated>2026-05-13T08:46:57Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2026/ExtremalGraphs.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal set theory|Extremal set theory | 极值集合论]]（[http://tcs.nju.edu.cn/slides/comb2026/ExtremalSets.pdf slides]）&lt;br /&gt;
#* [https://mathweb.ucsd.edu/~ronspubs/90_03_erdos_ko_rado.pdf Old and new proofs of the Erdős–Ko–Rado theorem] by Frankl and Graham&lt;br /&gt;
#* A [http://tcs.nju.edu.cn/slides/comb2026/sunflower-note.pdf note] generated by ChatGPT on Alweiss-Lovet-Wu-Zhang&#039;s improved bound on the sunflower lemma, simplified by Rao-Tao&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13733</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13733"/>
		<updated>2026-05-13T08:42:49Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2026/ExtremalGraphs.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Extremal_graph_theory&amp;diff=13718</id>
		<title>组合数学 (Fall 2026)/Extremal graph theory</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Extremal_graph_theory&amp;diff=13718"/>
		<updated>2026-05-06T05:01:32Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Forbidden Cliques == Extremal graph theory studies the problems like  &amp;quot;how many edges that a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; can have, if &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has some property?&amp;quot; === Mantel&amp;#039;s theorem === We consider a typical extremal problem for graphs: the largest possible number of edges of &amp;#039;&amp;#039;&amp;#039;triangle-free&amp;#039;&amp;#039;&amp;#039; graphs, i.e. graphs contains no &amp;lt;math&amp;gt;K_3&amp;lt;/math&amp;gt;.  {{Theorem|Theorem (Mantel 1907)| :Suppose &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; is graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertice without triangles. Then &amp;lt;m...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Forbidden Cliques ==&lt;br /&gt;
Extremal graph theory studies the problems like  &amp;quot;how many edges that a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; can have, if &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has some property?&amp;quot;&lt;br /&gt;
=== Mantel&#039;s theorem ===&lt;br /&gt;
We consider a typical extremal problem for graphs: the largest possible number of edges of &#039;&#039;&#039;triangle-free&#039;&#039;&#039; graphs, i.e. graphs contains no &amp;lt;math&amp;gt;K_3&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Mantel 1907)|&lt;br /&gt;
:Suppose &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; is graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertice without triangles. Then &amp;lt;math&amp;gt;|E|\le\frac{n^2}{4}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We give three different proofs of the theorem. The first one uses induction and an argument based on pigeonhole principle. The second proof uses the famous Cauchy-Schwarz inequality in analysis. And the third proof uses another famous inequality: the inequality of the arithmetic and geometric mean.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|First proof. (pigeonhole principle)|&lt;br /&gt;
We prove an equivalent theorem: Any &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|V|=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|E|&amp;gt;\frac{n^2}{4}&amp;lt;/math&amp;gt; must have a triangle.&lt;br /&gt;
&lt;br /&gt;
Use induction on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. The theorem holds trivially for &amp;lt;math&amp;gt;n\le 3&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Induction hypothesis: assume the theorem hold for &amp;lt;math&amp;gt;|V|\le n-1&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices, without loss of generality, assume that &amp;lt;math&amp;gt;|E|=\frac{n^2}{4}+1&amp;lt;/math&amp;gt;, we will show that &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; must contain a triangle. Take a &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; be the subgraph of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; induced by &amp;lt;math&amp;gt;V\setminus \{u,v\}&amp;lt;/math&amp;gt;. Clearly, &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;n-2&amp;lt;/math&amp;gt; vertices.&lt;br /&gt;
:&#039;&#039;&#039;Case.1:&#039;&#039;&#039; If &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;&amp;gt;\frac{(n-2)^2}{4}&amp;lt;/math&amp;gt; edges, then by the induction hypothesis, &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; has a triangle.&lt;br /&gt;
:&#039;&#039;&#039;Case.2:&#039;&#039;&#039; If &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\le\frac{(n-2)^2}{4}&amp;lt;/math&amp;gt; edges, then at least &amp;lt;math&amp;gt;\left(\frac{n^2}{4}+1\right)-\frac{(n-2)^2}{4}-1=n-1&amp;lt;/math&amp;gt; edges are between &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{u,v\}&amp;lt;/math&amp;gt;. By pigeonhole principle, there must be a vertex in &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; that is adjacent to both &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;. Thus, &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has a triangle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Second proof. (Cauchy-Schwarz inequality)|(Mantel&#039;s original proof)&lt;br /&gt;
For any edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, no vertex can be a neighbor of both &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, or otherwise there will be a triangle. Thus, for any edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;d_u+d_v\le n&amp;lt;/math&amp;gt;. It follows that&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{uv\in E}(d_u+d_v)\le n|E|&amp;lt;/math&amp;gt;.&lt;br /&gt;
Note that &amp;lt;math&amp;gt;d(v)&amp;lt;/math&amp;gt; appears exactly &amp;lt;math&amp;gt;d_v&amp;lt;/math&amp;gt; times in the sum, so that&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{uv\in E}(d_u+d_v)=\sum_{v\in V}d_v^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
Applying Chauchy-Schwarz inequality,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
n|E|\ge \sum_{uv\in E}(d_u+d_v)=\sum_{v\in V}d_v^2\ge\frac{\left(\sum_{v\in V}d_v\right)^2}{n}=\frac{4|E|^2}{n},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where the last equation is due to Euler&#039;s equality &amp;lt;math&amp;gt;\sum_{v\in V}d_v=2|E|&amp;lt;/math&amp;gt;. The theorem follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Third proof. (inequality of the arithmetic and geometric mean)|&lt;br /&gt;
Assume that &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;|V|=n&amp;lt;/math&amp;gt; vertices and is triangle-free.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; be the largest independent set in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; and let &amp;lt;math&amp;gt;\alpha=|A|&amp;lt;/math&amp;gt;. &lt;br /&gt;
Since &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is triangle-free, for very vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, all its neighbors must form an independent set, thus &amp;lt;math&amp;gt;d(v)\le \alpha&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;B=V\setminus A&amp;lt;/math&amp;gt; and let &amp;lt;math&amp;gt;\beta=|B|&amp;lt;/math&amp;gt;.&lt;br /&gt;
Since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is an independent set, all edges in &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; must have at least one endpoint in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. Counting the edges in &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; according to their endpoints in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, we obtain &amp;lt;math&amp;gt;|E|\le\sum_{v\in B}d_v&amp;lt;/math&amp;gt;. By the inequality of the arithmetic and geometric mean,&lt;br /&gt;
:&amp;lt;math&amp;gt;|E|\le\sum_{v\in B}d_v\le\alpha\beta\le\left(\frac{\alpha+\beta}{2}\right)^2=\frac{n^2}{4}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Turán&#039;s theorem ===&lt;br /&gt;
The famous Turán&#039;s theorem generalizes the Mantel&#039;s theorem for triangles to cliques of any specific size. This theorem is one of the most important results in extremal combinatorics, which initiates the studies of extremal graph theory.&lt;br /&gt;
{{Theorem|Theorem (Turán 1941)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be a graph with &amp;lt;math&amp;gt;|V|=n&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has no &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique, &amp;lt;math&amp;gt;r\ge 2&amp;lt;/math&amp;gt;, then&lt;br /&gt;
::&amp;lt;math&amp;gt;|E|\le\frac{r-2}{2(r-1)}n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We give an example of graphs with many edges which does not contain &amp;lt;math&amp;gt;K_r&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Partition &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;r-1&amp;lt;/math&amp;gt; disjoint classes &amp;lt;math&amp;gt;V=V_1\cup V_2\cup\cdots\cup V_{r-1}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;n_i=|V_i|&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;n_1+n_2+\cdots+n_{r-1}=n&amp;lt;/math&amp;gt;. For every two vertice &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;u\in V_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v\in V_j&amp;lt;/math&amp;gt; for distinct &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;V_j&amp;lt;/math&amp;gt;. The resulting graph is a &#039;&#039;&#039;complete &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-partite graph&#039;&#039;&#039;, denoted &amp;lt;math&amp;gt;K_{n_1,n_2,\ldots,n_{r-1}}&amp;lt;/math&amp;gt;. It is obvious that any &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-partite graph contains no &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique since only those vertices from different classes can be adjacent. &lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;K_{n_1,n_2,\ldots,n_{r-1}}&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\sum_{i&amp;lt;j}n_i n_j\,&amp;lt;/math&amp;gt; edges, which is maximized when the numbers &amp;lt;math&amp;gt;n_i&amp;lt;/math&amp;gt; are divided as evenly as possible, that is, if &amp;lt;math&amp;gt;n_i\in\left\{\left\lfloor\frac{n}{r-1}\right\rfloor,\left\lceil\frac{n}{r-1}\right\rceil\right\}&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;1\le i\le r-1&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:We call a complete multipartite graph &amp;lt;math&amp;gt;K_{n_1,n_2,\ldots,n_{r-1}}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;n_i\in\left\{\left\lfloor\frac{n}{r-1}\right\rfloor,\left\lceil\frac{n}{r-1}\right\rceil\right\}&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; a &#039;&#039;&#039; Turán graph&#039;&#039;&#039;, denoted &amp;lt;math&amp;gt;T(n,r-1)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
;Example:Turán graph &amp;lt;math&amp;gt;T(13,4)&amp;lt;/math&amp;gt;&lt;br /&gt;
[[File:Turan 13-4.svg|center|260px|Turán graph &amp;lt;math&amp;gt;T(13,4)&amp;lt;/math&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
Turán&#039;s theorem has been proved for many times by different mathematicians, with different tools. We show just a few.&lt;br /&gt;
&lt;br /&gt;
The first proof uses induction;  the second proof uses a technique called &amp;quot;weight shifting&amp;quot;; and the third proof uses the probabilistic method. All of them are very powerful and frequently used proof techniques.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|First proof. (induction)|(Turán&#039;s original proof)&lt;br /&gt;
&lt;br /&gt;
Induction on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. It is easy to verify that the theorem holds for &amp;lt;math&amp;gt;n&amp;lt;r&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; be a graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices without &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-cliques where &amp;lt;math&amp;gt;n\ge r&amp;lt;/math&amp;gt;. Suppose that &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has a maximum number of edges among such graphs. &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; certainly has &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-cliques, since otherwise we could add edges to &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-clique and let &amp;lt;math&amp;gt;B=V\setminus A&amp;lt;/math&amp;gt;. Clearly &amp;lt;math&amp;gt;|A|=r-1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|B|=n-r+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the  induction hypothesis, since &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; has no &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-cliques, &amp;lt;math&amp;gt;|E(B)|\le\frac{r-2}{2(r-1)}(n-r+1)^2&amp;lt;/math&amp;gt;. And &amp;lt;math&amp;gt;E(A)={r-1\choose 2}&amp;lt;/math&amp;gt;. Since &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has no &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique, every &amp;lt;math&amp;gt;v\in B&amp;lt;/math&amp;gt; is adjacent to at most &amp;lt;math&amp;gt;r-2&amp;lt;/math&amp;gt; vertices in &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, since otherwise &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; would form an &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique. We obtain that the number edges crossing between &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;|E(A,B)|\le (r-2)|B|=(r-2)(n-r+1)&amp;lt;/math&amp;gt;. Combining everything together,&lt;br /&gt;
:&amp;lt;math&amp;gt;|E|=|E(A)|+|E(B)|+|E(A,B)|\le {r-1\choose 2}+\frac{r-2}{2(r-1)}(n-r+1)^2+(r-2)(n-r+1)=\frac{r-2}{2(r-1)}n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Second proof. (weight shifting)|(due to Motzkin and Straus)&lt;br /&gt;
&lt;br /&gt;
Assign each vertex &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; a nonnegative weight &amp;lt;math&amp;gt;w_v\ge 0&amp;lt;/math&amp;gt;, and assume that &amp;lt;math&amp;gt;\sum_{v\in V}w_v=1&amp;lt;/math&amp;gt;. We try to maximize the quantity&lt;br /&gt;
:&amp;lt;math&amp;gt;S=\sum_{uv\in E}w_uw_v&amp;lt;/math&amp;gt;.&lt;br /&gt;
Let &amp;lt;math&amp;gt;W_u=\sum_{v:v\sim u}w_v\,&amp;lt;/math&amp;gt; be the sum of the weights of &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;&#039;s neighbors.&lt;br /&gt;
Note that &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; can also be computed as &amp;lt;math&amp;gt;S=\frac{1}{2}\sum_{u\in V}w_uW_u&amp;lt;/math&amp;gt;.&lt;br /&gt;
For any nonadjacent pair of vertices &amp;lt;math&amp;gt;u\not\sim v&amp;lt;/math&amp;gt;, supposed that &amp;lt;math&amp;gt;W_u\ge W_v&amp;lt;/math&amp;gt;, then for any &amp;lt;math&amp;gt;\epsilon\ge 0&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;(w_u+\epsilon)W_u+(w_v-\epsilon)W_v\ge w_uW_u+w_vW_v&amp;lt;/math&amp;gt;.&lt;br /&gt;
This means that we do not decrease &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; by shifting all of the weight of the vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; to the vertex &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;. It follows that &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is maximized when all of the weight is concentrated on a complete subgraph, i.e., a clique.&lt;br /&gt;
&lt;br /&gt;
Now if &amp;lt;math&amp;gt;w_u&amp;gt;w_v&amp;gt;0&amp;lt;/math&amp;gt;, then choose &amp;lt;math&amp;gt;\epsilon&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;0&amp;lt;\epsilon&amp;lt;w_u-w_v&amp;lt;/math&amp;gt; and change &amp;lt;math&amp;gt;w_u&#039;=w_u-\epsilon&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;w_v&#039;=w_v+\epsilon&amp;lt;/math&amp;gt;. This changes &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;S&#039;=S+\epsilon(w_u-w_v)-\epsilon^2&amp;gt;S&amp;lt;/math&amp;gt;. Thus, the maximal value of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;  is attained when all nonzero weights are equal and concentrated on a clique.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has at most an &amp;lt;math&amp;gt;(r-1)&amp;lt;/math&amp;gt;-clique, thus &amp;lt;math&amp;gt;S\le{r-1\choose 2}\frac{1}{(r-1)^2}=\frac{r-2}{2(r-1)}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
As we argued above, this inequality hold for any nonnegative weight assignments with &amp;lt;math&amp;gt;\sum_{v\in V}w_v=1&amp;lt;/math&amp;gt;. In particular, for the case that all &amp;lt;math&amp;gt;w_v=\frac{1}{n}&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;S=\sum_{uv\in E}w_uw_v=\frac{|E|}{n^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{|E|}{n^2}\le \frac{r-2}{2(r-1)}&amp;lt;/math&amp;gt;,&lt;br /&gt;
which implies the theorem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Third proof. (the probabilistic method)|(due to Alon and Spencer)&lt;br /&gt;
&lt;br /&gt;
Write &amp;lt;math&amp;gt;\omega(G)&amp;lt;/math&amp;gt; for the number of vertices in a largest clique, called the &#039;&#039;&#039;clique number&#039;&#039;&#039; of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. &lt;br /&gt;
:&#039;&#039;&#039;Claim:&#039;&#039;&#039; &amp;lt;math&amp;gt;\omega(G)\ge\sum_{v\in V}\frac{1}{n-d_v}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We prove this by the probabilistic method. Fix a random ordering of vertices in &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;, say &amp;lt;math&amp;gt;v_1,v_2,\ldots,v_n&amp;lt;/math&amp;gt;. We construct a clique as follows:&lt;br /&gt;
*for &amp;lt;math&amp;gt;i=1,2,\ldots, n&amp;lt;/math&amp;gt;, add &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; iff all vertices in current &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; are adjacent to &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is obvious that an &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; constructed in this way is a clique. We now show that &amp;lt;math&amp;gt;\mathbf{E}[|S|]\ge\sum_{v\in V}\frac{1}{n-d_v}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;X_v&amp;lt;/math&amp;gt; be the random variable that indicates whether &amp;lt;math&amp;gt;v\in S&amp;lt;/math&amp;gt;, i.e.,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
X_v=\begin{cases}&lt;br /&gt;
1 &amp;amp; v\in S,\\&lt;br /&gt;
0 &amp;amp; \mbox{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Note that a vertex &amp;lt;math&amp;gt;v\in S&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is ranked before all its &amp;lt;math&amp;gt;n-d_v-1&amp;lt;/math&amp;gt; non-neighbors in the random ordering. The probability that this event occurs is &amp;lt;math&amp;gt;\frac{1}{n-d_v}&amp;lt;/math&amp;gt;. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[X_v]=\Pr[v\in S]\ge\frac{1}{n-d_v}.&amp;lt;/math&amp;gt;&lt;br /&gt;
Observe that &amp;lt;math&amp;gt;|S|=\sum_{v\in V}X_v&amp;lt;/math&amp;gt;. Due to linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[|S|]=\sum_{v\in V}\mathbf{E}[X_v]\ge\sum_{v\in V}\frac{1}{n-d_v}&amp;lt;/math&amp;gt;.&lt;br /&gt;
There must exists a clique of at least such size, so that &amp;lt;math&amp;gt;\omega(G)\ge\sum_{v\in V}\frac{1}{n-d_v}&amp;lt;/math&amp;gt;. The claim is proved.&lt;br /&gt;
&lt;br /&gt;
Apply the Cauchy-Schwarz inequality&lt;br /&gt;
:&amp;lt;math&amp;gt;\left(\sum_{v\in V}a_vb_v\right)^2\le\left(\sum_{v\in V}^na_v^2\right)\left(\sum_{v\in V}^nb_v^2\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Set &amp;lt;math&amp;gt;a_v=\sqrt{n-d_v}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b_v=\frac{1}{\sqrt{n-d_v}}&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;a_vb_v=1&amp;lt;/math&amp;gt; and so&lt;br /&gt;
:&amp;lt;math&amp;gt;n^2\le\sum_{v\in V}(n-d_v)\sum_{v\in V}\frac{1}{n-d_v}\le\omega(G)\sum_{v\in V}(n-d_v).&amp;lt;/math&amp;gt;&lt;br /&gt;
By the assumption of Turán&#039;s theorem, &amp;lt;math&amp;gt;\omega(G)\le r-1&amp;lt;/math&amp;gt;. Recall the handshaking lemma &amp;lt;math&amp;gt;2|E|=\sum_{v\in V}d_v&amp;lt;/math&amp;gt;. The above inequality gives us&lt;br /&gt;
:&amp;lt;math&amp;gt;n^2\le (r-1)(n^2-2|E|)&amp;lt;/math&amp;gt;,&lt;br /&gt;
which implies the theorem.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Our last proof uses the idea of vertex duplication. It does not only prove the edge bound of Turán&#039;s theorem, but also shows that Turán graphs are the &amp;lt;font color=red&amp;gt;only&amp;lt;/font&amp;gt; possible extremal graphs.&lt;br /&gt;
{{Prooftitle|Fourth proof.|&lt;br /&gt;
Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be a &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique-free graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices with a maximum number of edges.&lt;br /&gt;
:&#039;&#039;&#039;Claim:&#039;&#039;&#039; &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; does not contain three vertices &amp;lt;math&amp;gt;u,v,w&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; but &amp;lt;math&amp;gt;uw\not\in E, vw\not\in E&amp;lt;/math&amp;gt;.&lt;br /&gt;
Suppose otherwise. There are two cases.&lt;br /&gt;
* &#039;&#039;&#039;Case.1:&#039;&#039;&#039; &amp;lt;math&amp;gt;d(w)&amp;lt;d(u)&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;d(w)&amp;lt;d(v)&amp;lt;/math&amp;gt;. Without loss of generality, suppose that &amp;lt;math&amp;gt;d(w)&amp;lt;d(u)&amp;lt;/math&amp;gt;. We duplicate &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; by creating a new vertex &amp;lt;math&amp;gt;u&#039;&amp;lt;/math&amp;gt; which has exactly the same neighbors as &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; (but &amp;lt;math&amp;gt;uu&#039;&amp;lt;/math&amp;gt; is not an edge). Such duplication will not increase the clique size. We then remove &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt;. The resulting graph &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; is still &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique-free, and has &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices. The number of edges in &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; is&lt;br /&gt;
::&amp;lt;math&amp;gt;|E(G&#039;)|=|E(G)|+d(u)-d(w)&amp;gt;|E(G)|\,&amp;lt;/math&amp;gt;,&lt;br /&gt;
:which contradicts the assumption that &amp;lt;math&amp;gt;|E(G)|&amp;lt;/math&amp;gt; is maximal.&lt;br /&gt;
* &#039;&#039;&#039;Case.2:&#039;&#039;&#039; &amp;lt;math&amp;gt;d(w)\ge d(u)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;d(w)\ge d(v)&amp;lt;/math&amp;gt;. Duplicate &amp;lt;math&amp;gt;w&amp;lt;/math&amp;gt; twice and delete &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;. The new graph &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; has no &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-clique, and the number of edges is&lt;br /&gt;
::&amp;lt;math&amp;gt;|E(G&#039;)|=|E(G)|+2d(w)-(d(u)+d(v)+1)&amp;gt;|E(G)|\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Contradiction again.&lt;br /&gt;
&lt;br /&gt;
The claim implies that &amp;lt;math&amp;gt;uv\not\in E&amp;lt;/math&amp;gt; defines an equivalence relation on vertices (to be more precise, it guarantees the transitivity of the relation, while the reflexivity and symmetry hold directly). Graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; must be a complete multipartite graph &amp;lt;math&amp;gt;K_{n_1,n_2,\ldots,n_{r-1}}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;n_1+n_2+\cdots +n_{r-1}=n&amp;lt;/math&amp;gt;. Optimize the edge number, we have the Turán graph.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Forbidden Cycles ==&lt;br /&gt;
Another direction to generalize Mantel&#039;s theorem other than Turán&#039;s theorem is to see a triangle as a 3-cycle rather than 3-clique. We then ask for the extremal bound for graphs without certain cycle structures.&lt;br /&gt;
Recall that the &#039;&#039;&#039;girth&#039;&#039;&#039; of a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is the length of the shortest cycle in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. A graph is triangle-free if and only if its girth &amp;lt;math&amp;gt;g(G)\ge 4&amp;lt;/math&amp;gt;.&lt;br /&gt;
Matel&#039;s theorem can be seen as a bound on the edge number of graphs with girth &amp;lt;math&amp;gt;g(G)\ge 4&amp;lt;/math&amp;gt;. The next theorem extends this bound to the graphs with &amp;lt;math&amp;gt;g(G)\ge 5&amp;lt;/math&amp;gt;, i.e., graphs without triangles and quadrilaterals (&amp;quot;squares&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be a graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices. If girth &amp;lt;math&amp;gt;g(G)\ge 5&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;|E|\le\frac{1}{2}n\sqrt{n-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;g(G)\ge 5&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;v_1,v_2,\ldots,v_d&amp;lt;/math&amp;gt; be the neighbors of a vertex &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;d=d(u)&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;S_i=\{v\in V\mid v\sim v_i\wedge v\neq u\}&amp;lt;/math&amp;gt; be the set of neighbors of &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt; other than &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
* For any &amp;lt;math&amp;gt;v_i,v_j&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;v_iv_j\not\in E&amp;lt;/math&amp;gt; since &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has no triangle. Thus, &amp;lt;math&amp;gt;S_i\cap\{u,v_1,v_2,\ldots,v_d\}=\emptyset&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;.&lt;br /&gt;
* No vertex other than &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; can be adjacent to more than one vertices in &amp;lt;math&amp;gt;v_1,v_2,\ldots,v_d&amp;lt;/math&amp;gt; since there is no &amp;lt;math&amp;gt;C_4&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Thus, &amp;lt;math&amp;gt;S_i\cap S_j=\emptyset&amp;lt;/math&amp;gt; for any distinct &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore, &amp;lt;math&amp;gt;\{u,v_1,v_2,\ldots,v_d\}\cup S_1\cup S_2\cup\cdots\cup S_d\subseteq V&amp;lt;/math&amp;gt; implies that&lt;br /&gt;
:&amp;lt;math&amp;gt;(d+1)+|S_1|+|S_2|+\cdots+|S_d|=(d+1)+(d(v_1)-1)+(d(v_2)-1)+\cdots+(d(v_d)-1)\le n&amp;lt;/math&amp;gt;,&lt;br /&gt;
so that &amp;lt;math&amp;gt;\sum_{v:v\sim u}d(v)\le n-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By Cauchy-Schwarz inequality,&lt;br /&gt;
:&amp;lt;math&amp;gt;n(n-1)\ge \sum_{u\in V}\sum_{v:v\sim u}d(v)=\sum_{v\in V}d(v)^2\ge\frac{\left(\sum_{v\in V}d(v)\right)}{n}=\frac{4|E|^2}{n}&amp;lt;/math&amp;gt;,&lt;br /&gt;
which implies that &amp;lt;math&amp;gt;|E|\le\frac{1}{2}n\sqrt{n-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Erdős–Stone theorem ==&lt;br /&gt;
We introduce a notation for the number of edges in extremal graphs with a specific forbidden substructure.&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\mathrm{ex}(n,H)&amp;lt;/math&amp;gt; denote the largest number of edges that a graph &amp;lt;math&amp;gt;G\not\supseteq H&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices can have.&lt;br /&gt;
}}&lt;br /&gt;
With this notation, Turán&#039;s theorem can be restated as&lt;br /&gt;
{{Theorem|Turán&#039;s theorem (restated)|&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{ex}(n,K_r)\le\frac{r-2}{2(r-1)}n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;K_s^r=K_{\underbrace{s,s,\cdots,s}_{r}}&amp;lt;/math&amp;gt; be the complete &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;-partite graph with &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; vertices in each class, i.e., the Turán graph &amp;lt;math&amp;gt;T(rs,r)&amp;lt;/math&amp;gt;.&lt;br /&gt;
The Erdős–Stone theorem (also referred as the &#039;&#039;&#039;fundamental theorem of extremal graph theory&#039;&#039;&#039;) gives an asymptotic bound on &amp;lt;math&amp;gt;\mathrm{ex}(n,K_s^r)&amp;lt;/math&amp;gt;, i.e., the largest number of edges that an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-vertex graph can have to not contain &amp;lt;math&amp;gt;K_s^r&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Fundamental theorem of extremal graph theory (Erdős–Stone 1946)|&lt;br /&gt;
:For any integers &amp;lt;math&amp;gt;r\ge 2&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;s\ge 1&amp;lt;/math&amp;gt;, and any &amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt;, if &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is sufficiently large then every graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices and with at least &amp;lt;math&amp;gt;\left(\frac{r-2}{2(r-1)}+\epsilon\right)n^2&amp;lt;/math&amp;gt; edges contains &amp;lt;math&amp;gt;K_{r,s}&amp;lt;/math&amp;gt; as a subgraph, i.e.,&lt;br /&gt;
:::&amp;lt;math&amp;gt;\mathrm{ex}(n,K_s^r)= \left(\frac{r-2}{2(r-1)}+o(1)\right)n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The theorem is called fundamental because of its single most important corollary: it relate the extremal bound for an arbitrary subgraph &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; to a very natural parameter of &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt;, its chromatic number.&lt;br /&gt;
&lt;br /&gt;
Recall that &amp;lt;math&amp;gt;\chi(G)&amp;lt;/math&amp;gt; is the &#039;&#039;&#039;chromatic number&#039;&#039;&#039; of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, the smallest number of colors that one can use to color the vertices so that no adjacent vertices have the same color.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Corollary|&lt;br /&gt;
:For every nonempty graph &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\lim_{n\rightarrow\infty}\frac{\mathrm{ex}(n,H)}{{n\choose 2}}=\frac{\chi(H)-2}{\chi(H)-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Prooftitle|Proof of corollary|&lt;br /&gt;
Let &amp;lt;math&amp;gt;r=\chi(H)&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Note that &amp;lt;math&amp;gt;T(n,r-1)&amp;lt;/math&amp;gt; can be colored with &amp;lt;math&amp;gt;r-1&amp;lt;/math&amp;gt; colors, one color for each part. Thus, &amp;lt;math&amp;gt;H\not\subseteq T(n,r-1)&amp;lt;/math&amp;gt;, since otherwise &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; can also be colored with &amp;lt;math&amp;gt;r-1&amp;lt;/math&amp;gt; colors, contradicting that &amp;lt;math&amp;gt;\chi(H)=1&amp;lt;/math&amp;gt;. By definition, &amp;lt;math&amp;gt;\mathrm{ex}(n,H)&amp;lt;/math&amp;gt; is the maximum number of edges that an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-vertex graph &amp;lt;math&amp;gt;G\not\supseteq H&amp;lt;/math&amp;gt; can have. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;|T(n,r-1)|\le\mathrm{ex}(n,H)&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is not hard to see that &lt;br /&gt;
:&amp;lt;math&amp;gt;|T(n,r-1)|\ge {r-1\choose 2}\left\lfloor\frac{n}{r-1}\right\rfloor^2\ge{r-1\choose 2}\left(\frac{n}{r-1}-1\right)^2=\left(\frac{r-2}{2(r-1)}-o(1)\right)n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
On the other hand, any finite graph &amp;lt;math&amp;gt;H&amp;lt;/math&amp;gt; with chromatic number &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; has that &amp;lt;math&amp;gt;H\subseteq K_s^r&amp;lt;/math&amp;gt; for all sufficiently large &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;. We just connect all pairs of vertices from different color classes. Thus, &lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{ex}(n,H)\le\mathrm{ex}(n,K_s^r)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Due to Erdős–Stone theorem,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{ex}(n,K_s^r)=\left(\frac{r-2}{2(r-1)}+o(1)\right)n^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
Altogether, we have &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{r-2}{r-1}-o(1)\le\frac{|T(n,r-1)|}{{n\choose 2}}\le \frac{\mathrm{ex}(n,H)}{{n\choose 2}} \le \frac{\mathrm{ex}(n,K_s^r)}{{n\choose 2}}=\frac{r-2}{r-1}+o(1)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The theorem follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* van Lin and Wilson. &#039;&#039;A course in combinatorics.&#039;&#039; Cambridge Press. Chapter 4.&lt;br /&gt;
* Aigner and Ziegler. &#039;&#039;Proofs from THE BOOK, 4th Edition.&#039;&#039; Springer-Verlag. [[media:PFTB_chap36.pdf| Chapter 36]]. &lt;br /&gt;
* Diestel. &#039;&#039;Graph Theory, 3rd Edition&#039;&#039;. Springer-Verlag 2000. [[media:Diestel2ed_chap7.pdf|Chapter 7]].&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13717</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13717"/>
		<updated>2026-05-06T05:00:57Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
* &#039;&#039;&#039;(2026/04/21)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第二次作业已发布&amp;lt;/font&amp;gt;，请在 2026/05/13 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A2.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 2|Problem Set 2]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Extremal graph theory|Extremal graph theory | 极值图论]] ([http://tcs.nju.edu.cn/slides/comb2025/ExtremalGraphs.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/The_probabilistic_method&amp;diff=13641</id>
		<title>组合数学 (Fall 2026)/The probabilistic method</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/The_probabilistic_method&amp;diff=13641"/>
		<updated>2026-04-17T13:18:44Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== The Probabilistic Method == The probabilistic method provides another way of proving the existence of objects: instead of explicitly constructing an object, we define a probability space of objects in which the probability is positive that a randomly selected object has the required property.  The basic principle of the probabilistic method is very simple, and can be stated in intuitive ways: *If an object chosen randomly from a universe satisfies a property with posi...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Probabilistic Method ==&lt;br /&gt;
The probabilistic method provides another way of proving the existence of objects: instead of explicitly constructing an object, we define a probability space of objects in which the probability is positive that a randomly selected object has the required property.&lt;br /&gt;
&lt;br /&gt;
The basic principle of the probabilistic method is very simple, and can be stated in intuitive ways:&lt;br /&gt;
*If an object chosen randomly from a universe satisfies a property with positive probability, then there must be an object in the universe that satisfies that property.&lt;br /&gt;
:For example, for a ball(the object) randomly chosen from a box(the universe) of balls, if the probability that the chosen ball is blue(the property) is &amp;gt;0, then there must be a blue ball in the box.&lt;br /&gt;
*Any random variable assumes at least one value that is no smaller than its expectation, and at least one value that is no greater than the expectation.&lt;br /&gt;
:For example, if we know the average height of the students in the class is &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;, then we know there is a students whose height is at least &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;, and there is a student whose height is at most &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Although the idea of  the probabilistic method is simple, it provides us a powerful tool for existential proof.&lt;br /&gt;
&lt;br /&gt;
===Ramsey number===&lt;br /&gt;
&lt;br /&gt;
Recall the Ramsey theorem which states that in a meeting of at least six people, there are either three people knowing each other or three people not knowing each other. In graph theoretical terms, this means that no matter how we color the edges of &amp;lt;math&amp;gt;K_6&amp;lt;/math&amp;gt; (the complete graph on six vertices), there must be a &#039;&#039;&#039;monochromatic&#039;&#039;&#039; &amp;lt;math&amp;gt;K_3&amp;lt;/math&amp;gt; (a triangle whose edges have the same color).&lt;br /&gt;
&lt;br /&gt;
Generally, the &#039;&#039;&#039;Ramsey number&#039;&#039;&#039; &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is the smallest integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; such that in any two-coloring of the edges of a complete graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; by red and blue, either there is a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; or there is a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Ramsey showed in 1929 that &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is finite for any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;. It is extremely hard to compute the exact value of &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt;. Here we give a lower bound of &amp;lt;math&amp;gt;R(k,k)&amp;lt;/math&amp;gt; by the probabilistic method.&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Theorem (Erdős 1947)|&lt;br /&gt;
:If &amp;lt;math&amp;gt;{n\choose k}\cdot 2^{1-{k\choose 2}}&amp;lt;1&amp;lt;/math&amp;gt; then it is possible to color the edges of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; with two colors so that there is no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; subgraph.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof| Consider a random two-coloring of edges of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; obtained as follows:&lt;br /&gt;
* For each edge of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt;, independently flip a fair coin to decide the color of the edge.&lt;br /&gt;
&lt;br /&gt;
For any fixed set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, let &amp;lt;math&amp;gt;\mathcal{E}_S&amp;lt;/math&amp;gt; be the event that the &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; subgraph induced by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is monochromatic. There are &amp;lt;math&amp;gt;{k\choose 2}&amp;lt;/math&amp;gt; many edges in &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;, therefore&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\mathcal{E}_S]=2\cdot 2^{-{k\choose 2}}=2^{1-{k\choose 2}}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since there are &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; possible choices of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, by the union bound&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr[\exists S, \mathcal{E}_S]\le {n\choose k}\cdot\Pr[\mathcal{E}_S]={n\choose k}\cdot 2^{1-{k\choose 2}}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Due to the assumption, &amp;lt;math&amp;gt;{n\choose k}\cdot 2^{1-{k\choose 2}}&amp;lt;1&amp;lt;/math&amp;gt;, thus there exists a two coloring that none of &amp;lt;math&amp;gt;\mathcal{E}_S&amp;lt;/math&amp;gt; occurs, which means  there is no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; subgraph.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt; and we take &amp;lt;math&amp;gt;n=\lfloor2^{k/2}\rfloor&amp;lt;/math&amp;gt;, then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
{n\choose k}\cdot 2^{1-{k\choose 2}}&lt;br /&gt;
&amp;amp;&amp;lt;&lt;br /&gt;
\frac{n^k}{k!}\cdot\frac{2^{1+\frac{k}{2}}}{2^{k^2/2}}\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\frac{2^{k^2/2}}{k!}\cdot\frac{2^{1+\frac{k}{2}}}{2^{k^2/2}}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{2^{1+\frac{k}{2}}}{k!}\\&lt;br /&gt;
&amp;amp;&amp;lt;1.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
By the above theorem, there exists a two-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; that there is no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;. Therefore, the Ramsey number &amp;lt;math&amp;gt;R(k,k)&amp;gt;\lfloor2^{k/2}\rfloor&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Tournament===&lt;br /&gt;
A &#039;&#039;&#039;[http://en.wikipedia.org/wiki/Tournament_(graph_theory) tournament]&#039;&#039;&#039; (竞赛图) on a set &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; players is an &#039;&#039;&#039;orientation&#039;&#039;&#039; of the edges of the complete graph on the set of vertices &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;. Thus for every two distinct vertices &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt;, either &amp;lt;math&amp;gt;(u,v)\in E&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;(v,u)\in E&amp;lt;/math&amp;gt;, but not both.&lt;br /&gt;
&lt;br /&gt;
We can think of the set &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; as a set of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; players in which each pair participates in a single match, where &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; is in the tournament iff player &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; beats player &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
:We say that a tournament has &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-paradoxical&#039;&#039;&#039; if for every set of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; players there is a player who beats them all.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Is it true for every finite &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, there is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-paradoxical tournament (on more than &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, of course)? This problem was first raised by Schütte, and as shown by Erdős, can be solved almost trivially by the probabilistic method.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Erdős 1963)|&lt;br /&gt;
:If &amp;lt;math&amp;gt;{n\choose k}\left(1-2^{-k}\right)^{n-k}&amp;lt;1&amp;lt;/math&amp;gt; then there is a tournament on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices that is &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-paradoxical.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Consider a uniformly random tournament &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; on the set &amp;lt;math&amp;gt;V=[n]&amp;lt;/math&amp;gt;. For every fixed subset &amp;lt;math&amp;gt;S\in{V\choose k}&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, let &amp;lt;math&amp;gt;A_S&amp;lt;/math&amp;gt; be the event defined as follows&lt;br /&gt;
:&amp;lt;math&amp;gt;A_S:\,&amp;lt;/math&amp;gt; there is no vertex in &amp;lt;math&amp;gt;V\setminus S&amp;lt;/math&amp;gt; that beats all vertices in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In a uniform random tournament, the orientations of edges are independent. For any &amp;lt;math&amp;gt;u\in V\setminus S&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[u\mbox{ beats all }v\in S]=2^{-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore, &amp;lt;math&amp;gt;\Pr[u\mbox{ does not beats all }v\in S]=1-2^{-k}&amp;lt;/math&amp;gt; and&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[A_S]=\prod_{u\in V\setminus S}\Pr[u\mbox{ does not beats all }v\in S]=(1-2^{-k})^{n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It follows that&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigvee_{S\in{V\choose k}}A_S\right]\le \sum_{S\in{V\choose k}}\Pr[A_S]={n\choose k}(1-2^{-k})^{n-k}&amp;lt;1.&amp;lt;/math&amp;gt;&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\,T\mbox{ is }k\mbox{-paradoxical }]=\Pr\left[\bigwedge_{S\in{V\choose k}}\overline{A_S}\right]=1-\Pr\left[\bigvee_{S\in{V\choose k}}A_S\right]&amp;gt;0.&amp;lt;/math&amp;gt; &lt;br /&gt;
There is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-paradoxical tournament.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Linearity of expectation ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; be a discrete &#039;&#039;&#039;random variable&#039;&#039;&#039;.  The expectation of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is defined as follows.&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Definition (Expectation)|&lt;br /&gt;
:The &#039;&#039;&#039;expectation&#039;&#039;&#039; of a discrete random variable &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;, denoted by &amp;lt;math&amp;gt;\mathbf{E}[X]&amp;lt;/math&amp;gt;, is given by&lt;br /&gt;
::&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\mathbf{E}[X] &amp;amp;= \sum_{x}x\Pr[X=x],&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
:where the summation is over all values &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; in the range of &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
A fundamental fact regarding the expectation is its &#039;&#039;&#039;linearity&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Theorem (Linearity of Expectations)|&lt;br /&gt;
:For any discrete random variables &amp;lt;math&amp;gt;X_1, X_2, \ldots, X_n&amp;lt;/math&amp;gt;, and any real constants &amp;lt;math&amp;gt;a_1, a_2, \ldots, a_n&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\mathbf{E}\left[\sum_{i=1}^n a_iX_i\right] &amp;amp;= \sum_{i=1}^n a_i\cdot\mathbf{E}[X_i].&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Hamiltonian paths&lt;br /&gt;
The following result of Szele in 1943 is often considered the first use of the probabilistic method.&lt;br /&gt;
{{Theorem|Theorem (Szele 1943)|&lt;br /&gt;
:There is a tournament on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; players with at least &amp;lt;math&amp;gt;n!2^{-(n-1)}&amp;lt;/math&amp;gt; Hamiltonian paths.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Consider the uniform random tournament &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;. For any permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;X_{\pi}&amp;lt;/math&amp;gt; be the indicator random variable defined as &lt;br /&gt;
:&amp;lt;math&amp;gt;X_{\pi}=\begin{cases}&lt;br /&gt;
1 &amp;amp; \forall i\in[n-1], (\pi_i,\pi_{i+1})\in T,\\&lt;br /&gt;
0 &amp;amp; \mbox{otherwise}.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
In other words, &amp;lt;math&amp;gt;X_{\pi}&amp;lt;/math&amp;gt; indicates whether &amp;lt;math&amp;gt;\pi_0\rightarrow\pi_1\rightarrow\pi_2\rightarrow\cdots\rightarrow\pi_{n-1}&amp;lt;/math&amp;gt; gives a Hamiltonian path. &lt;br /&gt;
It holds that&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{E}[X_\pi]=1\cdot\Pr[X_\pi=1]+0\cdot\Pr[X_\pi=0]=\Pr[\forall i\in[n-1], (\pi_i,\pi_{i+1})\in T]=2^{-(n-1)}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;X=\sum_{\pi:\text{permutation of }[n]}X_\pi\,&amp;lt;/math&amp;gt;. Clearly &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; is the number of Hamiltonian paths in the tournament &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. &lt;br /&gt;
Due to the linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathrm{E}[X]=\mathrm{E}\left[\sum_{\pi:\text{permutation of }[n]}X_\pi\right]=\sum_{\pi:\text{permutation of }[n]}\mathrm{E}[X_\pi]=n!2^{-(n-1)}.&amp;lt;/math&amp;gt;&lt;br /&gt;
This is the average number of Hamiltonian paths in a tournament, where the average is taken over all tournaments.&lt;br /&gt;
Thus some tournament has at least &amp;lt;math&amp;gt;n!2^{-(n-1)}&amp;lt;/math&amp;gt; Hamiltonian paths.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Independent sets===&lt;br /&gt;
An independent set of a graph is a set of vertices with no edges between them. The following theorem gives a lower bound on the size of the largest independent set.&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be a graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices with &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; edges. Then &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; has an independent set with at least &amp;lt;math&amp;gt;\frac{n^2}{4m}&amp;lt;/math&amp;gt; vertices.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof| Let &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; be a set of vertices constructed as follows:&lt;br /&gt;
:For each vertex &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt;:&lt;br /&gt;
:* &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; is included in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; independently with probability &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt;,&lt;br /&gt;
&amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; to be determined.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;X=|S|&amp;lt;/math&amp;gt;. It is obvious that &amp;lt;math&amp;gt;\mathbf{E}[X]=np&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For each edge &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;Y_{e}&amp;lt;/math&amp;gt; be the random variable which indicates whether both endpoints of &amp;lt;math&amp;gt;e=uv&amp;lt;/math&amp;gt; are in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbf{E}[Y_{uv}]=\Pr[u\in S\wedge v\in S]=p^2.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Let &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; be the number of edges in the subgraph of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; induced by &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. It holds that &amp;lt;math&amp;gt;Y=\sum_{e\in E}Y_e&amp;lt;/math&amp;gt;. By linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[Y]=\sum_{e\in E}\mathbf{E}[Y_e]=mp^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Note that although &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is not necessary an independent set, it can be modified to one if for each edge &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; of the induced subgraph &amp;lt;math&amp;gt;G(S)&amp;lt;/math&amp;gt;, we delete one of the endpoint of &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;S^*&amp;lt;/math&amp;gt; be the resulting set. It is obvious that &amp;lt;math&amp;gt;S^*&amp;lt;/math&amp;gt; is an independent set since there is no edge left in the induced subgraph &amp;lt;math&amp;gt;G(S^*)&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Since there are &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; edges in &amp;lt;math&amp;gt;G(S)&amp;lt;/math&amp;gt;, there are at most &amp;lt;math&amp;gt;Y&amp;lt;/math&amp;gt; vertices in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; are deleted to make it become &amp;lt;math&amp;gt;S^*&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;|S^*|\ge X-Y&amp;lt;/math&amp;gt;. By linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbf{E}[|S^*|]\ge\mathbf{E}[X-Y]=\mathbf{E}[X]-\mathbf{E}[Y]=np-mp^2.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The expectation is maximized when &amp;lt;math&amp;gt;p=\frac{n}{2m}&amp;lt;/math&amp;gt;, thus&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbf{E}[|S^*|]\ge n\cdot\frac{n}{2m}-m\left(\frac{n}{2m}\right)^2=\frac{n^2}{4m}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
There exists an independent set which contains at least &amp;lt;math&amp;gt;\frac{n^2}{4m}&amp;lt;/math&amp;gt; vertices.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Coloring large-girth graphs ==&lt;br /&gt;
The girth of a graph is the length of the shortest cycle of the graph.&lt;br /&gt;
{{Theorem|Definition|&lt;br /&gt;
Let &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; be an undirected graph.&lt;br /&gt;
* A &#039;&#039;&#039;cycle&#039;&#039;&#039; of length &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is a sequence of distinct vertices &amp;lt;math&amp;gt;v_1,v_2,\ldots,v_{k}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;v_iv_{i+1}\in E&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1,2,\ldots,k-1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v_kv_1\in E&amp;lt;/math&amp;gt;.&lt;br /&gt;
* The &#039;&#039;&#039;girth&#039;&#039;&#039; of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, dented &amp;lt;math&amp;gt;g(G)&amp;lt;/math&amp;gt;, is the length of the shortest cycle in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The chromatic number of a graph is the minimum number of colors with which the graph can be &#039;&#039;properly&#039;&#039; colored.&lt;br /&gt;
{{Theorem|Definition (chromatic number)|&lt;br /&gt;
* The &#039;&#039;&#039;chromatic number&#039;&#039;&#039; of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, denoted &amp;lt;math&amp;gt;\chi(G)&amp;lt;/math&amp;gt;, is the minimal number of colors which we need to color the vertices of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; so that no two adjacent vertices have the same color. Formally,&lt;br /&gt;
::&amp;lt;math&amp;gt;\chi(G)=\min\{C\in\mathbb{N}\mid \exists f:V\rightarrow[C]\mbox{ such that }\forall uv\in E, f(u)\neq f(v)\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In 1959, Erdős proved the following theorem: for any fixed &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;, there exists a finite graph with girth at least &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and chromatic number at least &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;. This is considered a striking example of the probabilistic method. The statement of the theorem itself calls for nothing about probability or randomness. And the result is highly contra-intuitive: if the girth is large there is no simple reason why the graph could not be colored with a few colors. We can always &amp;quot;locally&amp;quot; color a cycle with 2 or 3 colors. Erdős&#039; result shows that there are &amp;quot;global&amp;quot; restrictions for coloring, and although such configurations are very difficult to explicitly construct, with the probabilistic method, we know that they commonly exist.&lt;br /&gt;
&lt;br /&gt;
{{Theorem| Theorem (Erdős 1959)|&lt;br /&gt;
: For all &amp;lt;math&amp;gt;k,\ell&amp;lt;/math&amp;gt; there exists a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;g(G)&amp;gt;\ell&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi(G)&amp;gt;k\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is very hard to directly analyze the chromatic number of a graph. We find that the chromatic number can be related to the size of the maximum independent set.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Definition (independence number)|&lt;br /&gt;
* The &#039;&#039;&#039;independence number&#039;&#039;&#039; of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, denoted &amp;lt;math&amp;gt;\alpha(G)&amp;lt;/math&amp;gt;, is the size of the largest independent set in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Formally,&lt;br /&gt;
::&amp;lt;math&amp;gt;\alpha(G)=\max\{|S|\mid S\subseteq V\mbox{ and }\forall u,v\in S, uv\not\in E\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We observe the following relationship between the chromatic number and the independence number.&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:For any &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-vertex graph,&lt;br /&gt;
::&amp;lt;math&amp;gt;\chi(G)\ge\frac{n}{\alpha(G)}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
*In the optimal coloring, &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices are partitioned into &amp;lt;math&amp;gt;\chi(G)&amp;lt;/math&amp;gt; color classes according to the vertex color.&lt;br /&gt;
*Every color class is an independent set, or otherwise there exist two adjacent vertice with the same color.&lt;br /&gt;
*By the pigeonhole principle, there is a color class (hence an independent set) of size &amp;lt;math&amp;gt;\frac{n}{\chi(G)}&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;\alpha(G)\ge\frac{n}{\chi(G)}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The lemma follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Therefore, it is sufficient to prove that &amp;lt;math&amp;gt;\alpha(G)\le\frac{n}{k}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;g(G)&amp;gt;\ell&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Prooftitle|Proof of Erdős theorem|&lt;br /&gt;
Fix &amp;lt;math&amp;gt;\theta&amp;lt;\frac{1}{\ell}&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; be &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;p=n^{\theta-1}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For any length-&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; simple cycle &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;X_\sigma&amp;lt;/math&amp;gt; be the indicator random variable such that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
X_\sigma=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
1 &amp;amp; \sigma\mbox{ is a cycle in }G,\\&lt;br /&gt;
0 &amp;amp; \mbox{otherwise}.&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The number of cycles of length at most &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; in graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is &lt;br /&gt;
:&amp;lt;math&amp;gt;X=\sum_{i=3}^\ell\sum_{\sigma:i\text{-cycle}}X_\sigma&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For any particular length-&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; simple cycle &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[X_\sigma]=\Pr[X_\sigma=1]=\Pr[\sigma\mbox{ is a cycle in }G]=p^i=n^{\theta i-i}&amp;lt;/math&amp;gt;.&lt;br /&gt;
For any &amp;lt;math&amp;gt;3\le i\le n&amp;lt;/math&amp;gt;, the number of length-&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; simple cycle is &amp;lt;math&amp;gt;\frac{n(n-1)\cdots (n-i+1)}{2i}&amp;lt;/math&amp;gt;. By the linearity of expectation,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbf{E}[X]=\sum_{i=3}^\ell\sum_{\sigma:i\text{-cycle}}\mathbf{E}[X_\sigma]=\sum_{i=3}^\ell\frac{n(n-1)\cdots (n-i+1)}{2i}n^{\theta i-i}\le \sum_{i=3}^\ell\frac{n^{\theta i}}{2i}=o(n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Applying Markov&#039;s inequality,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[X\ge \frac{n}{2}\right]\le\frac{\mathbf{E}[X]}{n/2}=o(1).&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Therefore, with high probability the random graph has less than &amp;lt;math&amp;gt;n/2&amp;lt;/math&amp;gt; short cycles.&lt;br /&gt;
&lt;br /&gt;
Now we proceed to analyze the independence number. Let &amp;lt;math&amp;gt;m=\left\lceil\frac{3\ln n}{p}\right\rceil&amp;lt;/math&amp;gt;, so that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr[\alpha(G)\ge m]&lt;br /&gt;
&amp;amp;\le\Pr\left[\exists S\in{V\choose m}\forall \{u,v\}\in{S\choose 2}, uv\not\in G\right]\\&lt;br /&gt;
&amp;amp;\le{n\choose m}(1-p)^{m\choose 2}\\&lt;br /&gt;
&amp;amp;&amp;lt;n^m\mathrm{e}^{-p{m\choose 2}}\\&lt;br /&gt;
&amp;amp;=\left(n\mathrm{e}^{-p(m-1)/2}\right)^m=o(1)&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The probability that either of the above events occurs is &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr\left[X\ge\frac{n}{2}\vee \alpha(G)\ge m\right]&lt;br /&gt;
\le \Pr\left[X\ge \frac{n}{2}\right]+\Pr\left[\alpha(G)\ge m\right]&lt;br /&gt;
=o(1).&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Therefore, there exists a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; with less than &amp;lt;math&amp;gt;n/2&amp;lt;/math&amp;gt; &amp;quot;short&amp;quot; cycles, i.e., cycles of length at most &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt;, and with &amp;lt;math&amp;gt;\alpha(G)&amp;lt;m\le 3n^{1-\theta}\ln n&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Take each &amp;quot;short&amp;quot; cycle in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; and remove a vertex from the cycle (and also remove all adjacent edges to the removed vertex). This gives a graph &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; which has no short cycles, hence the girth &amp;lt;math&amp;gt;g(G&#039;)\ge\ell&amp;lt;/math&amp;gt;. And &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; has at least &amp;lt;math&amp;gt;n/2&amp;lt;/math&amp;gt; vertices, because at most &amp;lt;math&amp;gt;n/2&amp;lt;/math&amp;gt; vertices are removed.&lt;br /&gt;
&lt;br /&gt;
Notice that removing vertices cannot makes &amp;lt;math&amp;gt;\alpha(G)&amp;lt;/math&amp;gt; grow. It holds that &amp;lt;math&amp;gt;\alpha(G&#039;)\le\alpha(G)&amp;lt;/math&amp;gt;. Thus&lt;br /&gt;
:&amp;lt;math&amp;gt;\chi(G&#039;)\ge\frac{n/2}{\alpha(G&#039;)}\ge\frac{n}{2m}\ge\frac{n^\theta}{6\ln n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The theorem is proved by taking &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; sufficiently large so that this value is greater than &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The proof contains a very simple procedure which for any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; &#039;&#039;generates&#039;&#039; such a graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;g(G)&amp;gt;\ell&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi(G)&amp;gt;k&amp;lt;/math&amp;gt;. The procedure is as such:&lt;br /&gt;
* Fix some &amp;lt;math&amp;gt;\theta&amp;lt;\frac{1}{\ell}&amp;lt;/math&amp;gt;. Choose sufficiently large &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;\frac{n^\theta}{6\ln n}&amp;gt;k&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;p=n^{\theta-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Generate a random graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; as &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt;.&lt;br /&gt;
* For each cycle of length at most &amp;lt;math&amp;gt;\ell&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;, remove a vertex from the cycle.&lt;br /&gt;
The resulting graph &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; satisfying that &amp;lt;math&amp;gt;g(G)&amp;gt;\ell&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\chi(G)&amp;gt;k&amp;lt;/math&amp;gt; with high probability.&lt;br /&gt;
&lt;br /&gt;
== Lovász Local Lemma==&lt;br /&gt;
Consider a set of &amp;quot;bad&amp;quot; events &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt;. Suppose that &amp;lt;math&amp;gt;\Pr[A_i]\le p&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;. We want to show that there is a situation that none of the bad events occurs. Due to the probabilistic method, we need to prove that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]&amp;gt;0.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
;Case 1&amp;lt;nowiki&amp;gt;: mutually independent events.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
If all the bad events &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; are mutually independent, then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]\ge(1-p)^n&amp;gt;0,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
for any &amp;lt;math&amp;gt;p&amp;lt;1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Case 2&amp;lt;nowiki&amp;gt;: arbitrarily dependent events.&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
On the other hand, if we put no assumption on the dependencies between the events, then by the union bound (which holds unconditionally),&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]=1-\Pr\left[\bigvee_{i=1}^n A_i\right]\ge 1-np,&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
which is not an interesting bound for &amp;lt;math&amp;gt;p\ge\frac{1}{n}&amp;lt;/math&amp;gt;. We cannot improve bound without further information regarding the dependencies between the events.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
We would like to know what is going on between the two extreme cases: mutually independent events, and arbitrarily dependent events. The Lovász local lemma provides such a tool.&lt;br /&gt;
&lt;br /&gt;
The local lemma is powerful tool for showing the possibility of rare event under &#039;&#039;limited dependencies&#039;&#039;. The structure of dependencies between a set of events is described by a &#039;&#039;&#039;dependency graph&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Definition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; be a set of events. A graph &amp;lt;math&amp;gt;D=(V,E)&amp;lt;/math&amp;gt; on the set of vertices &amp;lt;math&amp;gt;V=\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;dependency graph&#039;&#039;&#039; for the events &amp;lt;math&amp;gt;A_1,\ldots,A_n&amp;lt;/math&amp;gt; if for each &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;, the event &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; is mutually independent of all the events &amp;lt;math&amp;gt;\{A_j\mid (i,j)\not\in E\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
:Let &amp;lt;math&amp;gt;X_1,X_2,\ldots,X_m&amp;lt;/math&amp;gt; be a set of &#039;&#039;mutually independent&#039;&#039; random variables. Each event &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; is a predicate defined on a number of variables among &amp;lt;math&amp;gt;X_1,X_2,\ldots,X_m&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;v(A_i)&amp;lt;/math&amp;gt; be the unique smallest set of variables which determine &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt;. The dependency graph &amp;lt;math&amp;gt;D=(V,E)&amp;lt;/math&amp;gt; is defined by &lt;br /&gt;
:::&amp;lt;math&amp;gt;(i,j)\in E&amp;lt;/math&amp;gt; iff &amp;lt;math&amp;gt;v(A_i)\cap v(A_j)\neq \emptyset&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The following lemma, known as the Lovász local lemma, first proved by Erdős and Lovász in 1975, is an extremely powerful tool, as it supplies a way for dealing with rare events.&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Lovász Local Lemma (symmetric case)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; be a set of events, and assume that the following hold:&lt;br /&gt;
:#for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Pr[A_i]\le p&amp;lt;/math&amp;gt;;&lt;br /&gt;
:#the maximum degree of the dependency graph for the events &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;d&amp;lt;/math&amp;gt;, and &lt;br /&gt;
:::&amp;lt;math&amp;gt;ep(d+1)\le 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We will prove a general version of the local lemma, where the events &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; are not symmetric. This generalization is due to Spencer.&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Lovász Local Lemma (general case)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;D=(V,E)&amp;lt;/math&amp;gt; be the dependency graph of events &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt;. Suppose there exist real numbers &amp;lt;math&amp;gt;x_1,x_2,\ldots, x_n&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;0\le x_i&amp;lt;1&amp;lt;/math&amp;gt; and for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\Pr[A_i]\le x_i\prod_{(i,j)\in E}(1-x_j)&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Then &lt;br /&gt;
::&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]\ge\prod_{i=1}^n(1-x_i)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We can use the following probability identity to compute the probability of the intersection of events:&lt;br /&gt;
{{Theorem|Chain rule|&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]=\prod_{i=1}^n\Pr\left[\overline{A_i}\mid \bigwedge_{j=1}^{i-1}\overline{A_{j}}\right]&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
By definition of conditional probability,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[\overline{A_n}\mid\bigwedge_{i=1}^{n-1}\overline{A_{i}}\right]&lt;br /&gt;
=\frac{\Pr\left[\bigwedge_{i=1}^n\overline{A_{i}}\right]}&lt;br /&gt;
{\Pr\left[\bigwedge_{i=1}^{n-1}\overline{A_{i}}\right]}&amp;lt;/math&amp;gt;,&lt;br /&gt;
so we have&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_{i}}\right]=\Pr\left[\bigwedge_{i=1}^{n-1}\overline{A_{i}}\right]\Pr\left[\overline{A_n}\mid\bigwedge_{i=1}^{n-1}\overline{A_{i}}\right]&amp;lt;/math&amp;gt;.&lt;br /&gt;
The lemma is proved by recursively applying this equation.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Next we prove by induction on &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; that for any set of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; events &amp;lt;math&amp;gt;i_1,\ldots,i_m&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[A_{i_1}\mid \bigwedge_{j=2}^m\overline{A_{i_j}}\right]\le x_{i_1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The local lemma is a direct consequence of this by applying the chain rule.&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;m=1&amp;lt;/math&amp;gt;, this is obvious. For general &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;i_2,\ldots,i_k&amp;lt;/math&amp;gt; be the set of vertices adjacent to  &amp;lt;math&amp;gt;i_1&amp;lt;/math&amp;gt; in the dependency graph. Clearly &amp;lt;math&amp;gt;k-1\le d&amp;lt;/math&amp;gt;. And it holds that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[A_{i_1}\mid \bigwedge_{j=2}^m\overline{A_{i_j}}\right]&lt;br /&gt;
=\frac{\Pr\left[ A_i\wedge \bigwedge_{j=2}^k\overline{A_{i_j}}\mid \bigwedge_{j=k+1}^m\overline{A_{i_j}}\right]}&lt;br /&gt;
{\Pr\left[\bigwedge_{j=2}^k\overline{A_{i_j}}\mid \bigwedge_{j=k+1}^m\overline{A_{i_j}}\right]}&lt;br /&gt;
&amp;lt;/math&amp;gt;,&lt;br /&gt;
which is due to the basic conditional probability identity&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[A\mid BC]=\frac{\Pr[AB\mid C]}{\Pr[B\mid C]}&amp;lt;/math&amp;gt;.&lt;br /&gt;
We bound the numerator&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr\left[ A_{i_1}\wedge \bigwedge_{j=2}^k\overline{A_{i_j}}\mid \bigwedge_{j=k+1}^m\overline{A_{i_j}}\right]&lt;br /&gt;
&amp;amp;\le\Pr\left[ A_{i_1}\mid \bigwedge_{j=k+1}^m\overline{A_{i_j}}\right]\\&lt;br /&gt;
&amp;amp;=\Pr[A_{i_1}]\\&lt;br /&gt;
&amp;amp;\le x_{i_1}\prod_{(i_1,j)\in E}(1-x_j).&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The equation is due to the independence between &amp;lt;math&amp;gt;A_{i_1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;A_{i_k+1},\ldots,A_{i_m}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The denominator can be expanded using the chain rule as&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[\bigwedge_{j=2}^k\overline{A_{i_j}}\mid \bigwedge_{j=k+1}^m\overline{A_{i_j}}\right]&lt;br /&gt;
=\prod_{j=2}^k\Pr\left[\overline{A_{i_j}}\mid \bigwedge_{\ell=j+1}^m\overline{A_{i_\ell}}\right]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
which by the induction hypothesis, is at least &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\prod_{j=2}^k(1-x_{i_j})=\prod_{\{i_1,i_j\}\in E}(1-x_j)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;E&amp;lt;/math&amp;gt; is the edge set of the dependency graph.&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left[A_{i_1}\mid \bigwedge_{j=2}^m\overline{A_{i_j}}\right]&lt;br /&gt;
\le\frac{x_{i_1}\prod_{(i_1,j)\in E}(1-x_j)}{\prod_{\{i_1,i_j\}\in E}(1-x_j)}\le x_{i_1}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Applying the chain rule, &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]&lt;br /&gt;
&amp;amp;=\prod_{i=1}^n\Pr\left[\overline{A_i}\mid \bigwedge_{j=1}^{i-1}\overline{A_{j}}\right]\\&lt;br /&gt;
&amp;amp;=\prod_{i=1}^n\left(1-\Pr\left[A_i\mid \bigwedge_{j=1}^{i-1}\overline{A_{j}}\right]\right)\\&lt;br /&gt;
&amp;amp;\ge\prod_{i=1}^n\left(1-x_i\right).&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To prove the symmetric case. Let &amp;lt;math&amp;gt;x_i=\frac{1}{d+1}&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i=1,2,\ldots,n&amp;lt;/math&amp;gt;. Note that &amp;lt;math&amp;gt;\left(1-\frac{1}{d+1}\right)^d&amp;gt;\frac{1}{\mathrm{e}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If the following conditions are satisfied:&lt;br /&gt;
:#for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\Pr[A_i]\le p&amp;lt;/math&amp;gt;;&lt;br /&gt;
:#&amp;lt;math&amp;gt;ep(d+1)\le 1&amp;lt;/math&amp;gt;;&lt;br /&gt;
then for all &amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[A_i]\le p\le\frac{1}{e(d+1)}&amp;lt;\frac{1}{d+1}\left(1-\frac{1}{d+1}\right)^d\le x_i\prod_{(i,j)\in E}(1-x_j)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Due to the local lemma for general cases, this implies that&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{i=1}^n\overline{A_i}\right]\ge\prod_{i=1}^n(1-x_i)=\left(1-\frac{1}{d+1}\right)^n&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
This gives the symmetric version of local lemma.&lt;br /&gt;
&lt;br /&gt;
=== Ramsey number, revisited ===&lt;br /&gt;
{{Theorem|Ramsey number|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;k,\ell&amp;lt;/math&amp;gt; be positive integers. The Ramsey number &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is defined as the smallest integer satisfying:&lt;br /&gt;
:If &amp;lt;math&amp;gt;n\ge R(k,\ell)&amp;lt;/math&amp;gt;, for any coloring of edges of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; with two colors red and blue, there exists a red &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; or a blue &amp;lt;math&amp;gt;K_\ell&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The Ramsey theorem says that for any &amp;lt;math&amp;gt;k,\ell&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is finite. The actual value of &amp;lt;math&amp;gt;R(k,\ell)&amp;lt;/math&amp;gt; is extremely difficult to compute.&lt;br /&gt;
We can use the local lemma to prove a lower bound for the diagonal Ramsey number.&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,k)\ge Ck2^{k/2}&amp;lt;/math&amp;gt; for some constant &amp;lt;math&amp;gt;C&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
To prove a lower bound &amp;lt;math&amp;gt;R(k,k)&amp;gt;n&amp;lt;/math&amp;gt;, it is sufficient to show that there exists a 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; without a monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;. We prove this by the probabilistic method.&lt;br /&gt;
&lt;br /&gt;
Pick a random 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; by coloring each edge uniformly and independently with one of the two colors. For any set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; vertices, let &amp;lt;math&amp;gt;A_S&amp;lt;/math&amp;gt; denote the event that &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; forms a monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;. It is easy to see that &amp;lt;math&amp;gt;\Pr[A_s]=2^{1-{k\choose 2}}=p&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; of vertices, &amp;lt;math&amp;gt;A_S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;A_T&amp;lt;/math&amp;gt; are dependent if and only if &amp;lt;math&amp;gt;|S\cap T|\ge 2&amp;lt;/math&amp;gt;. For each &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, the number of &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;|S\cap T|\ge 2&amp;lt;/math&amp;gt; is at most &amp;lt;math&amp;gt;{k\choose 2}{n\choose k-2}&amp;lt;/math&amp;gt;, so the max degree of the dependency graph is &amp;lt;math&amp;gt;d\le{k\choose 2}{n\choose k-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;n=Ck2^{k/2}&amp;lt;/math&amp;gt; for some appropriate constant &amp;lt;math&amp;gt;C&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\mathrm{e}p(d+1)&lt;br /&gt;
&amp;amp;\le \mathrm{e}2^{1-{k\choose 2}}\left({k\choose 2}{n\choose k-2}+1\right)\\&lt;br /&gt;
&amp;amp;\le 2^{3-{k\choose 2}}{k\choose 2}{n\choose k-2}\\&lt;br /&gt;
&amp;amp;\le 1&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Applying the local lemma, the probability that there is no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt; is &lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr\left[\bigwedge_{S\in{[n]\choose k}}\overline{A_S}\right]&amp;gt;0&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore, there exists a 2-coloring of &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt; which has no monochromatic &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;, which means&lt;br /&gt;
:&amp;lt;math&amp;gt;R(k,k)&amp;gt;n=Ck2^{k/2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13640</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13640"/>
		<updated>2026-04-17T13:18:00Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2026/ProbMethod.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13639</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13639"/>
		<updated>2026-04-17T13:17:48Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
# [[组合数学 (Fall 2026)/The probabilistic method|The probabilistic method | 概率法]] ([http://tcs.nju.edu.cn/slides/comb2025/ProbMethod.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Weierstrass_Approximation_Theorem&amp;diff=13638</id>
		<title>概率论与数理统计 (Spring 2026)/Weierstrass Approximation Theorem</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Weierstrass_Approximation_Theorem&amp;diff=13638"/>
		<updated>2026-04-16T08:13:07Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;[https://en.wikipedia.org/wiki/Stone%E2%80%93Weierstrass_theorem &amp;#039;&amp;#039;&amp;#039;魏尔施特拉斯逼近定理&amp;#039;&amp;#039;&amp;#039;]（&amp;#039;&amp;#039;&amp;#039;Weierstrass approximation theorem&amp;#039;&amp;#039;&amp;#039;）陈述了这样一个事实：闭区间上的连续函数总可以用多项式一致逼近。 {{Theorem|魏尔施特拉斯逼近定理| :设 &amp;lt;math&amp;gt;f:[a,b]\to\mathbb{R}&amp;lt;/math&amp;gt; 为定义在实数区间 &amp;lt;math&amp;gt;[a,b]&amp;lt;/math&amp;gt; 上的连续实值函数。对每个 &amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt;，存在一个多项式 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 使得对...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[https://en.wikipedia.org/wiki/Stone%E2%80%93Weierstrass_theorem &#039;&#039;&#039;魏尔施特拉斯逼近定理&#039;&#039;&#039;]（&#039;&#039;&#039;Weierstrass approximation theorem&#039;&#039;&#039;）陈述了这样一个事实：闭区间上的连续函数总可以用多项式一致逼近。&lt;br /&gt;
{{Theorem|魏尔施特拉斯逼近定理|&lt;br /&gt;
:设 &amp;lt;math&amp;gt;f:[a,b]\to\mathbb{R}&amp;lt;/math&amp;gt; 为定义在实数区间 &amp;lt;math&amp;gt;[a,b]&amp;lt;/math&amp;gt; 上的连续实值函数。对每个 &amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt;，存在一个多项式 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 使得对于 &amp;lt;math&amp;gt;[a,b]&amp;lt;/math&amp;gt; 中所有 &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;，均有 &amp;lt;math&amp;gt;|p(x)-f(x)|\le \epsilon&amp;lt;/math&amp;gt;，即&lt;br /&gt;
:::&amp;lt;math&amp;gt;\sup_{x\in[a,b]}\|f(x)-p(x)\|\le \epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
不失一般性地，可以仅考虑区间&amp;lt;math&amp;gt;[a,b]=[0,1]&amp;lt;/math&amp;gt;。因为对于定义在一般的实数区间&amp;lt;math&amp;gt;[a,b]&amp;lt;/math&amp;gt;上的任意函数&amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt;，可通过变量变换&amp;lt;math&amp;gt;t\mapsto a+(b-a)t&amp;lt;/math&amp;gt;将其转化为定义在&amp;lt;math&amp;gt;[0,1]&amp;lt;/math&amp;gt;上的新函数&amp;lt;math&amp;gt;g(t)=f(a+(b-a)t)&amp;lt;/math&amp;gt;，这并不会改变函数的连续性以及是否为多项式。&lt;br /&gt;
&lt;br /&gt;
因此，可假设连续函数&amp;lt;math&amp;gt;f:[0,1]\to\mathbb{R}&amp;lt;/math&amp;gt;。令&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;为足够大的正整数，取值待定。&lt;br /&gt;
&lt;br /&gt;
对于任意 &amp;lt;math&amp;gt;x\in [0,1]&amp;lt;/math&amp;gt;，令 &amp;lt;math&amp;gt;Y_x\sim\text{Bin}\left(n,x\right)&amp;lt;/math&amp;gt; 为以&amp;lt;math&amp;gt;n,x&amp;lt;/math&amp;gt;为参数的二项分布随机变量。&lt;br /&gt;
&lt;br /&gt;
将多项式 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 定义如下。对每个 &amp;lt;math&amp;gt;x\in[0,1]&amp;lt;/math&amp;gt;，令：&lt;br /&gt;
:&amp;lt;math&amp;gt;p(x)=\mathbb{E}\left[f\left(\frac{Y_x}{n}\right)\right]=\sum_{k=0}^nf\left(\frac{k}{n}\right)\Pr(Y_x=k)=\sum_{k=0}^nf\left(\frac{k}{n}\right){n\choose k}x^k(1-x)^{n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
容易看出，这是一个关于变量 &amp;lt;math&amp;gt;x\in[0,1]&amp;lt;/math&amp;gt; 的（&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;次）多项式。&lt;br /&gt;
&lt;br /&gt;
根据[https://en.wikipedia.org/wiki/Heine%E2%80%93Cantor_theorem &#039;&#039;&#039;一致连续性定理&#039;&#039;&#039;](&#039;&#039;&#039;海涅-康托尔定理&#039;&#039;&#039;)，紧空间 &amp;lt;math&amp;gt;[0,1]&amp;lt;/math&amp;gt; 上的连续函数 &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; 必然也是&#039;&#039;&#039;一致连续&#039;&#039;&#039;的。即，对任意 &amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt;，总存在 &amp;lt;math&amp;gt;\delta_\epsilon&amp;gt;0&amp;lt;/math&amp;gt;，使得对于 &amp;lt;math&amp;gt;[0,1]&amp;lt;/math&amp;gt; 中任意满足 &amp;lt;math&amp;gt;|x-y|\le\delta_\epsilon&amp;lt;/math&amp;gt; 的 &amp;lt;math&amp;gt;x,y&amp;lt;/math&amp;gt;，都有 &amp;lt;math&amp;gt;|f(x)-f(y)|\le\frac{\epsilon}{2}&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
不妨定下任意的&amp;lt;math&amp;gt;\epsilon&amp;gt;0&amp;lt;/math&amp;gt;，以及一致连续性定理因此保证的 &amp;lt;math&amp;gt;\delta_\epsilon&amp;gt;0&amp;lt;/math&amp;gt;。&lt;br /&gt;
并且定下任意的 &amp;lt;math&amp;gt;x\in[0,1]&amp;lt;/math&amp;gt;。我们希望验证 &amp;lt;math&amp;gt;|p(x)-f(x)|\le\epsilon&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
根据 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 的定义，有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
|p(x)-f(x)|&lt;br /&gt;
=&amp;amp;&lt;br /&gt;
\left|\mathbb{E}\left[f\left(\frac{Y_x}{n}\right)\right]-f(x)\right|\\&lt;br /&gt;
=&amp;amp;&lt;br /&gt;
\left|\mathbb{E}\left[f\left(\frac{Y_x}{n}\right)-f(x)\right]\right| &amp;amp;&amp;amp; \text{(期望的线性)}\\&lt;br /&gt;
\le&amp;amp; &lt;br /&gt;
\mathbb{E}\left[\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\right] &amp;amp;&amp;amp; \text{(琴生不等式)}\\&lt;br /&gt;
=&amp;amp;&lt;br /&gt;
\mathbb{E}\left[\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\,\,\bigg{|}\,\, \left|\frac{Y_x}{n}-x\right|\le \delta_\epsilon\right]&lt;br /&gt;
\cdot&lt;br /&gt;
\Pr\left[\left|\frac{Y_x}{n}-x\right|\le \delta_\epsilon\right] \\&lt;br /&gt;
&amp;amp;+&lt;br /&gt;
\mathbb{E}\left[\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\,\,\bigg{|}\,\, \left|\frac{Y_x}{n}-x\right|&amp;gt; \delta_\epsilon\right]&lt;br /&gt;
\cdot&lt;br /&gt;
\Pr\left[\left|\frac{Y_x}{n}-x\right|&amp;gt; \delta_\epsilon\right] &amp;amp;&amp;amp; \text{(全期望法则)}\\&lt;br /&gt;
\le&amp;amp;&lt;br /&gt;
\frac{\epsilon}{2}&lt;br /&gt;
+2\|f\|_{\infty}\cdot \Pr\left[\left|\frac{Y_x}{n}-x\right|&amp;gt; \delta_\epsilon\right] &amp;amp;&amp;amp; (\star)&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
上述最后一个不等式 &amp;lt;math&amp;gt;(\star)&amp;lt;/math&amp;gt; 成立是因为根据一致连续性，条件 &amp;lt;math&amp;gt;\left|\frac{Y_x}{n}-x\right|\le \delta_\epsilon&amp;lt;/math&amp;gt; 保证了 &amp;lt;math&amp;gt;\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\le\frac{\epsilon}{2}&amp;lt;/math&amp;gt;，因此&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}\left[\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\,\,\bigg{|}\,\, \left|\frac{Y_x}{n}-x\right|\le \delta_\epsilon\right]\le\frac{\epsilon}{2}&amp;lt;/math&amp;gt;&lt;br /&gt;
另一方面，有 &amp;lt;math&amp;gt;\left|f\left({Y_x}/{n}\right)-f(x)\right|\le \sup_{y\in[0,1]}|f(y)-f(x)|\le 2\sup_{y\in[0,1]}|f(y)| = 2\|f\|_{\infty}&amp;lt;/math&amp;gt; 无条件成立，因此&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}\left[\left|f\left(\frac{Y_x}{n}\right)-f(x)\right|\,\,\bigg{|}\,\, \left|\frac{Y_x}{n}-x\right|&amp;gt; \delta_\epsilon\right]\le 2\|f\|_{\infty}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
公式 &amp;lt;math&amp;gt;(\star)&amp;lt;/math&amp;gt; 中的概率可由切比雪夫不等式得出如下上界：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr\left[\left|\frac{Y_x}{n}-x\right|&amp;gt; \delta_\epsilon\right]&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\Pr\left[\left|{Y_x}-\mathbb{E}[Y_x]\right|&amp;gt; n\delta_\epsilon\right]  &amp;amp;&amp;amp; (\mathbb{E}[Y_x]=nx)\\&lt;br /&gt;
&amp;amp;\le&lt;br /&gt;
\frac{\mathbf{Var}[Y_x]}{n^2\delta_\epsilon^2} &amp;amp;&amp;amp; \text{(切比雪夫不等式)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{nx(1-x)}{n^2\delta_\epsilon^2} &amp;amp;&amp;amp; (\mathbf{Var}[Y_x]=nx(1-x))\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\frac{1}{4n\delta_\epsilon^2}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
因此可以选择 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 为任意满足 &amp;lt;math&amp;gt;n\ge\frac{\|f\|_{\infty}}{\epsilon\delta_\epsilon^2}&amp;lt;/math&amp;gt; 的正整数（注意到这一 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 的选取是与  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; 无关的，因此可对所有  &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; 选取一致的  &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;）。如此可保证以上的概率上界为 &amp;lt;math&amp;gt;\frac{1}{4n\delta_\epsilon^2}\le\frac{\epsilon}{4\|f\|_{\infty}}&amp;lt;/math&amp;gt;。&lt;br /&gt;
将其代回至 &amp;lt;math&amp;gt;(\star)&amp;lt;/math&amp;gt;式，得到如下结论：&lt;br /&gt;
:&amp;lt;math&amp;gt;|p(x)-f(x)|\le \frac{\epsilon}{2}+2\|f\|_{\infty}\cdot \frac{\epsilon}{4\|f\|_{\infty}}\le\epsilon&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Threshold_of_k-clique_in_random_graph&amp;diff=13637</id>
		<title>概率论与数理统计 (Spring 2026)/Threshold of k-clique in random graph</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Threshold_of_k-clique_in_random_graph&amp;diff=13637"/>
		<updated>2026-04-16T08:12:47Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;在 Erdős-Rényi 随机图模型 &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt; 中，一个随机无向图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 以如下的方式生成：图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 包含 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点，每一对顶点之间都独立同地以概率 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 连一条无向边。如此生成的随机图记为 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt;。  固定整数 &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt;，考虑随机图 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt; 包含 &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;（&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团，&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-clique）子图...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在 Erdős-Rényi 随机图模型 &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt; 中，一个随机无向图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 以如下的方式生成：图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 包含 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点，每一对顶点之间都独立同地以概率 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 连一条无向边。如此生成的随机图记为 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
固定整数 &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt;，考虑随机图 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt; 包含 &amp;lt;math&amp;gt;K_k&amp;lt;/math&amp;gt;（&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团，&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-clique）子图概率。&lt;br /&gt;
&lt;br /&gt;
特别地，对于任意固定（即，常数）的整数 &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt;，我们将证明存在函数 &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; 使得对所有足够大的 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 和随机图 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt; 有&lt;br /&gt;
:&amp;lt;math&amp;gt;({\color{red}\star})\qquad&amp;lt;/math&amp;gt; &amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr\left(G\text{ 包含子图 }K_k\right)&lt;br /&gt;
=\begin{cases}&lt;br /&gt;
o(1) &amp;amp; \text{如果} p=o(p_k(n))\\&lt;br /&gt;
1-o(1) &amp;amp; \text{如果} p=\omega(p_k(n))&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
这描述了“包含 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团“这一性质，在随机图 &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt; 上，展现出的一种所谓的&#039;&#039;&#039;阈值现象&#039;&#039;&#039;：随着参数 &amp;lt;math&amp;gt;p&amp;lt;/math&amp;gt; 从远小于 &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; 增长到远大于 &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;，“包含 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团“这一事件在随机图 &amp;lt;math&amp;gt;G(n,p)&amp;lt;/math&amp;gt; 上从渐进几乎从不（asymptotically almost never）发生变为渐进几乎一定（&#039;&#039;&#039;a.a.s.&#039;&#039;&#039;）发生。&lt;br /&gt;
&lt;br /&gt;
固定整数 &amp;lt;math&amp;gt;k\ge 3&amp;lt;/math&amp;gt;，假设&amp;lt;math&amp;gt;k=O(1)&amp;lt;/math&amp;gt;为常数。抽取随机图 &amp;lt;math&amp;gt;G\sim G(n,p)&amp;lt;/math&amp;gt;。令随机变量 &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; 表示 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中包含的 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团的个数，因此有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left(G\text{ 包含子图 }K_k\right)&lt;br /&gt;
=&lt;br /&gt;
\Pr(X\ge 1)&lt;br /&gt;
&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=一阶矩方法=&lt;br /&gt;
根据马尔可夫不等式：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr(X\ge 1)\le\mathbb{E}[X]&lt;br /&gt;
&amp;lt;/math&amp;gt;.&lt;br /&gt;
因此，通过计算 &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; 的期望（一阶矩），可得到概率 &amp;lt;math&amp;gt;\Pr\left(G\text{ 包含子图 }K_k\right)&amp;lt;/math&amp;gt; 的上界。&lt;br /&gt;
&lt;br /&gt;
对于顶点集合 &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; 的任意 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-子集 &amp;lt;math&amp;gt;S\in{[n]\choose k}&amp;lt;/math&amp;gt;，定义指示随机变量 &amp;lt;math&amp;gt;I_S=I(K_S\subseteq G)&amp;lt;/math&amp;gt;，即 &amp;lt;math&amp;gt;I_S=1&amp;lt;/math&amp;gt; 当且仅当点集 &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; 在随机图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中构成了一个 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团。根据这个定义，有：&lt;br /&gt;
*&amp;lt;math&amp;gt;X=\sum_{S\in{[n]\choose k}}I_S&amp;lt;/math&amp;gt;&lt;br /&gt;
*&amp;lt;math&amp;gt;\mathbb{E}[I_S]=\Pr(K_S\subseteq G)=p^{{k\choose 2}}&amp;lt;/math&amp;gt;&lt;br /&gt;
于是根据期望的线性：&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}[X]=\sum_{S\in{[n]\choose k}}\mathbb{E}[I_S]={n\choose k}p^{{k\choose 2}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
对于常数 &amp;lt;math&amp;gt;k=O(1)&amp;lt;/math&amp;gt;，当 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 足够大时，&amp;lt;math&amp;gt;{n\choose k}p^{{k\choose 2}}=\Theta\left(n^kp^{k(k-1)/2}\right)&amp;lt;/math&amp;gt;。这提示我们将函数 &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; 做如下定义：&lt;br /&gt;
:&amp;lt;math&amp;gt;p_k(n)=n^{-2/(k-1)}&amp;lt;/math&amp;gt;.&lt;br /&gt;
于是，容易验证有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}[X]=\Theta\left(n^kp^{k(k-1)/2}\right)=\begin{cases}&lt;br /&gt;
o(1) &amp;amp; \text{如果 } p=o(p_k(n))=o\left(n^{-2/(k-1)}\right)\\&lt;br /&gt;
\omega(1) &amp;amp; \text{如果 } p=\omega(p_k(n))=\omega\left(n^{-2/(k-1)}\right)&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
特别地，当 &amp;lt;math&amp;gt;p=o(p_k(n))=o\left(n^{-2/(k-1)}\right)&amp;lt;/math&amp;gt; 时，&amp;lt;math&amp;gt;\mathbb{E}[X]=o(1)&amp;lt;/math&amp;gt;。根据马尔可夫不等式：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left(G\text{ 包含子图 }K_k\right)=\Pr(X\ge 1)\le \mathbb{E}[X]=o(1).&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
因此，&amp;lt;math&amp;gt;({\color{red}\star})&amp;lt;/math&amp;gt; 中的概率上界已得到证明。&lt;br /&gt;
&lt;br /&gt;
事实上，这一结果可以更加直接地使用 union bound 证明：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr\left(G\text{ 包含子图 }K_k\right)=\mbox{$\Pr\left(\bigcup_{S\in{[n]\choose k}}(K_S\subseteq G)\right)$}\le {n\choose k}p^{{k\choose 2}}=o(1)\qquad\left(\text{如果 $p=o(p_k(n))$}\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
尽管如此，对于一阶矩的分析，有助于我们猜测出正确的阈值 &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;，而且对于更高阶矩的估计也是必要的。&lt;br /&gt;
&lt;br /&gt;
=二阶矩方法=&lt;br /&gt;
为了完全证明 &amp;lt;math&amp;gt;({\color{red}\star})&amp;lt;/math&amp;gt;，我们需要补全其中的概率下界，即在 &amp;lt;math&amp;gt;\mathbb{E}[X]=\omega(1)&amp;lt;/math&amp;gt; 的情况下，证明&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr(X\ge 1)\ge 1-o(1)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
很遗憾，为实现这一目的，仅知道 &amp;lt;math&amp;gt;\mathbb{E}[X]=\omega(1)&amp;lt;/math&amp;gt; 是不够的。我们还需要知道关于随机变量 &amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt; 更多的信息，比方说它的方差（二阶中心矩）。&lt;br /&gt;
&lt;br /&gt;
根据切比雪夫不等式：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\Pr(X=0)\le \Pr(|X-\mathbb{E}[X]|\ge \mathbb{E}[X])\le \frac{\mathbf{Var}[X]}{\mathbb{E}[X]^2}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
于是，上述目标归结为证明方差和期望之间有如下渐进关系： &amp;lt;math&amp;gt;\mathbf{Var}[X]=o\left(\mathbb{E}[X]^2\right)&amp;lt;/math&amp;gt;。实际上我们证明了更强的性质&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}[X^2]=o\left(\mathbb{E}[X]^2\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
这足以推出 &amp;lt;math&amp;gt;\mathbf{Var}[X]=\mathbb{E}[X^2]-\mathbb{E}[X]^2\le \mathbb{E}[X^2]=o\left(\mathbb{E}[X]^2\right)&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
还记得 &amp;lt;math&amp;gt;X=\sum_{S\in{[n]\choose k}}I_S&amp;lt;/math&amp;gt;，于是有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}\left[X^2\right]&lt;br /&gt;
=&lt;br /&gt;
\mathbb{E}\left[\left(\sum_{S\in{[n]\choose k}}I_S\right)^2\right]&lt;br /&gt;
=&lt;br /&gt;
\sum_{S\in{[n]\choose k}}\mathbb{E}[I_S^2] + \sum_{\substack{S,T\in{[n]\choose k}\\S\neq T}}\mathbb{E}[I_SI_T]&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
我们将分别计算这两项。首先，由于随机变量 &amp;lt;math&amp;gt;I_S&amp;lt;/math&amp;gt; 取值为0或1，因此 &amp;lt;math&amp;gt;I_S^2=I_S&amp;lt;/math&amp;gt;，于是有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\sum_{S\in{[n]\choose k}}\mathbb{E}[I_S^2]&lt;br /&gt;
=&lt;br /&gt;
\sum_{S\in{[n]\choose k}}\mathbb{E}[I_S]&lt;br /&gt;
=&lt;br /&gt;
\mathbb{E}[X]&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
另一方面，&amp;lt;math&amp;gt;I_SI_T=1&amp;lt;/math&amp;gt; 当且仅当 &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; 在随机图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中都是 &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-团，于是：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\sum_{\substack{S,T\in{[n]\choose k}\\S\neq T}}\mathbb{E}[I_SI_T]&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{\substack{S,T\in{[n]\choose k}\\S\neq T}}\Pr((K_S\cup K_T)\subseteq G)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{\ell=0}^{k-1}\sum_{|S\cap T|=\ell}p^{2{k\choose 2}-{\ell\choose 2}}\\&lt;br /&gt;
&amp;amp;\le&lt;br /&gt;
\sum_{\ell=0}^{k-1}{n\choose 2k-\ell} {2k-\ell\choose k}{k\choose \ell} p^{2{k\choose 2}-{\ell\choose 2}} &amp;amp;&amp;amp; \left(\text{因为 }{2k-\ell\choose k}{k\choose \ell}\le 2^{2k}=O(1)\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
O\left(n^{2k}p^{2{k\choose 2}}\cdot\sum_{\ell=0}^{k-1} n^{-\ell}p^{-{\ell\choose 2}}\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\mathbb{E}[X]^2\cdot O\left(\sum_{\ell=0}^{k-1} n^{-\ell}p^{-{\ell\choose 2}}\right). &amp;amp;&amp;amp; \left(\text{因为 }\mathbb{E}[X]=\Theta\left(n^kp^{{k\choose 2}}\right)\right)&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
综上，我们有 &amp;lt;math&amp;gt;\mathbf{Var}[X]\le \mathbb{E}[X^2]\le \mathbb{E}[X]+\mathbb{E}[X]^2\cdot O\left(\sum_{\ell=0}^{k-1} n^{-\ell}p^{-{\ell\choose 2}}\right)&amp;lt;/math&amp;gt;，于是：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{\mathbf{Var}[X]}{\mathbb{E}[X]^2}&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\frac{\mathbb{E}[X^2]}{\mathbb{E}[X]^2}\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\frac{1}{\mathbb{E}[X]} + O\left(\sum_{\ell=0}^{k-1} n^{-\ell}p^{-{\ell\choose 2}}\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
O\left(\sum_{\ell=2}^{k}n^{-\ell}p^{-{\ell\choose 2}} \right)  &amp;amp;&amp;amp; \left(\text{因为 }\mathbb{E}[X]=\Theta\left(n^kp^{{k\choose 2}}\right)\right)\\&lt;br /&gt;
&amp;amp;=o(1). &amp;amp;&amp;amp; (\text{当 }p=\omega(p_k(n)))&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
正如我们之前分析的，根据切比雪夫不等式，这证明了当 &amp;lt;math&amp;gt;p=\omega(p_k(n))=\omega\left(n^{-2/(k-1)}\right)&amp;lt;/math&amp;gt; 时，有 &amp;lt;math&amp;gt;\Pr(X=0)=o(1)&amp;lt;/math&amp;gt;。和一阶矩方法的部分合起来，这证明了 &amp;lt;math&amp;gt;({\color{red}\star})&amp;lt;/math&amp;gt;。&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13636</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13636"/>
		<updated>2026-04-16T08:12:04Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 1|Problem Set 1]]  请在 2026/4/1 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A1.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
** [[概率论与数理统计 (Spring 2026)/第一次作业提交名单|第一次作业提交名单]]&lt;br /&gt;
&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 2|Problem Set 2]]  请在 2026/4/22 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A2.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls|Entropy and volume of Hamming balls]]&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Karger&#039;s min-cut algorithm| Karger&#039;s min-cut algorithm]]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/RandVar.pdf 随机变量]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第2章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 2, Sections 3.1~3.5, 3.7&#039;&#039;&#039;&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[MU] Chapter 2&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Average-case analysis of QuickSort|Average-case analysis of &#039;&#039;&#039;&#039;&#039;QuickSort&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Deviation.pdf 矩与偏差]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[MU] Chapter 3&#039;&#039;&#039;&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 章节 2.4, 4.2, 4.3, 5.1&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Sections 3.3, 3.6, 7.3&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Threshold of k-clique in random graph|Threshold of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-clique in random graph]]&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Weierstrass Approximation Theorem|Weierstrass approximation]]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [https://plato.stanford.edu/entries/probability-interpret/ Interpretations of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/History_of_probability History of probability]&lt;br /&gt;
* Example problems:&lt;br /&gt;
** [https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf von Neumann&#039;s Bernoulli factory] and other [https://peteroupc.github.io/bernoulli.html Bernoulli factory algorithms]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boy_or_Girl_paradox Boy or Girl paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) Bertrand paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hard_spheres Hard spheres model] and [https://en.wikipedia.org/wiki/Ising_model Ising model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/PageRank &#039;&#039;PageRank&#039;&#039;] and stationary [https://en.wikipedia.org/wiki/Random_walk random walk]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Diffusion_process Diffusion process] and [https://en.wikipedia.org/wiki/Diffusion_model diffusion model]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Probability_space Probability space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sample_space Sample space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Event_(probability_theory) Event] and [https://en.wikipedia.org/wiki/Σ-algebra &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;-algebra]&lt;br /&gt;
** Kolmogorov&#039;s [https://en.wikipedia.org/wiki/Probability_axioms axioms of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Classical] and [https://en.wikipedia.org/wiki/Geometric_probability goemetric probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Boole%27s_inequality Union bound]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle Inclusion-Exclusion principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boole%27s_inequality#Bonferroni_inequalities Bonferroni inequalities]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Conditional_probability Conditional probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Chain_rule_(probability) Chain rule]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_probability Law of total probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bayes%27_theorem Bayes&#039; law]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Independence_(probability_theory) Independence] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Pairwise_independence Pairwise independence]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Random_variable Random variable]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cumulative_distribution_function Cumulative distribution function]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Probability_mass_function Probability mass function]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Probability_density_function Probability density function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Multivariate_random_variable Random vector]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Joint_probability_distribution Joint probability distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Conditional_probability_distribution Conditional probability distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Marginal_distribution Marginal distribution]&lt;br /&gt;
* Some &#039;&#039;&#039;discrete&#039;&#039;&#039; probability distributions&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bernoulli_trial Bernoulli trial] and [https://en.wikipedia.org/wiki/Bernoulli_distribution Bernoulli distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Discrete uniform distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Binomial_distribution Binomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Geometric_distribution Geometric distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Negative_binomial_distribution Negative binomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hypergeometric_distribution Hypergeometric distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Poisson_distribution Poisson distribution]&lt;br /&gt;
** and [https://en.wikipedia.org/wiki/List_of_probability_distributions#Discrete_distributions others]&lt;br /&gt;
* Balls into bins model&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Multinomial_distribution Multinomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Birthday_problem Birthday problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Coupon_collector%27s_problem Coupon collector]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Balls_into_bins_problem Occupancy problem]&lt;br /&gt;
* Random graphs&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi random graph model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Galton%E2%80%93Watson_process Galton–Watson branching process]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Expected_value Expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_the_unconscious_statistician Law of the unconscious statistician, &#039;&#039;LOTUS&#039;&#039;]&lt;br /&gt;
** [https://dlsun.github.io/probability/linearity.html Linearity of expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Conditional_expectation Conditional expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_expectation Law of total expectation]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Existence_problems&amp;diff=13623</id>
		<title>组合数学 (Fall 2026)/Existence problems</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Existence_problems&amp;diff=13623"/>
		<updated>2026-04-08T08:59:32Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Existence by Counting == === Shannon&amp;#039;s circuit lower bound=== This is a fundamental problem in in Computer Science.  A &amp;#039;&amp;#039;&amp;#039;boolean function&amp;#039;&amp;#039;&amp;#039; is a function in the form &amp;lt;math&amp;gt;f:\{0,1\}^n\rightarrow \{0,1\}&amp;lt;/math&amp;gt;.  [http://en.wikipedia.org/wiki/Boolean_circuit Boolean circuit] is a mathematical model of computation. Formally, a boolean circuit is a directed acyclic graph. Nodes with indegree zero are input nodes, labeled &amp;lt;math&amp;gt;x_1, x_2, \ldots , x_n&amp;lt;/math&amp;gt;. A circuit h...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Existence by Counting ==&lt;br /&gt;
=== Shannon&#039;s circuit lower bound===&lt;br /&gt;
This is a fundamental problem in in Computer Science.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;boolean function&#039;&#039;&#039; is a function in the form &amp;lt;math&amp;gt;f:\{0,1\}^n\rightarrow \{0,1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Boolean_circuit Boolean circuit] is a mathematical model of computation.&lt;br /&gt;
Formally, a boolean circuit is a directed acyclic graph. Nodes with indegree zero are input nodes, labeled &amp;lt;math&amp;gt;x_1, x_2, \ldots , x_n&amp;lt;/math&amp;gt;. A circuit has a unique node with outdegree zero, called the output node. Every other node is a gate. There are three types of gates: AND, OR (both with indegree two), and NOT (with indegree one).&lt;br /&gt;
&lt;br /&gt;
Computations in Turing machines can be simulated by circuits, and any boolean function in &#039;&#039;&#039;P&#039;&#039;&#039; can be computed by a circuit with polynomially many gates. Thus, if we can find a function in &#039;&#039;&#039;NP&#039;&#039;&#039; that cannot be computed by any circuit with polynomially many gates, then &#039;&#039;&#039;NP&#039;&#039;&#039;&amp;lt;math&amp;gt;\neq&amp;lt;/math&amp;gt;&#039;&#039;&#039;P&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The following theorem due to Shannon says that functions with exponentially large circuit complexity do exist.&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|Theorem (Shannon 1949)|&lt;br /&gt;
:There is a boolean function &amp;lt;math&amp;gt;f:\{0,1\}^n\rightarrow \{0,1\}&amp;lt;/math&amp;gt; with circuit complexity greater than &amp;lt;math&amp;gt;\frac{2^n}{3n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof| &lt;br /&gt;
We first count the number of boolean functions &amp;lt;math&amp;gt;f:\{0,1\}^n\rightarrow \{0,1\}&amp;lt;/math&amp;gt;. There are &amp;lt;math&amp;gt;2^{2^n}&amp;lt;/math&amp;gt; boolean functions &amp;lt;math&amp;gt;f:\{0,1\}^n\rightarrow \{0,1\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then we count the number of boolean circuit with fixed number of gates.&lt;br /&gt;
Fix an integer &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;, we count the number of circuits with &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; gates. By the [http://en.wikipedia.org/wiki/De_Morgan&#039;s_laws De Morgan&#039;s laws], we can assume that all NOTs are pushed back to the inputs. Each gate has one of the two types (AND or OR), and has two inputs. Each of the inputs to a gate is either a constant 0 or 1, an input variable &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt;, an inverted input variable &amp;lt;math&amp;gt;\neg x_i&amp;lt;/math&amp;gt;, or the output of another gate; thus, there are at most &amp;lt;math&amp;gt;2+2n+t-1&amp;lt;/math&amp;gt; possible gate inputs. It follows that the number of circuits with &amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; gates is at most &amp;lt;math&amp;gt;2^t(t+2n+1)^{2t}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;t=2^n/3n&amp;lt;/math&amp;gt;, then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\frac{2^t(t+2n+1)^{2t}}{2^{2^n}}=o(1)&amp;lt;1,&amp;lt;/math&amp;gt;      thus, &amp;lt;math&amp;gt;2^t(t+2n+1)^{2t} &amp;lt; 2^{2^n}.&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each boolean circuit computes one boolean function. Therefore, there must exist a boolean function &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; which cannot be computed by any circuits with &amp;lt;math&amp;gt;2^n/3n&amp;lt;/math&amp;gt; gates.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Note that by Shannon&#039;s theorem, not only there exists a boolean function with exponentially large circuit complexity, but &#039;&#039;almost all&#039;&#039; boolean functions have exponentially large circuit complexity.&lt;br /&gt;
&lt;br /&gt;
=== Double counting ===&lt;br /&gt;
The double counting principle states the following obvious fact: if the elements of a set are counted in two different ways, the answers are the same.&lt;br /&gt;
==== Handshaking lemma ====&lt;br /&gt;
The following lemma is a standard demonstration of double counting.&lt;br /&gt;
{{Theorem|Handshaking Lemma|&lt;br /&gt;
:At a party, the number of guests who shake hands an odd number of times is even.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We model this scenario as an undirected graph &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|V|=n&amp;lt;/math&amp;gt; standing for the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; guests. There is an edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; shake hands. Let &amp;lt;math&amp;gt;d(v)&amp;lt;/math&amp;gt; be the degree of vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;, which represents the number of times that &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; shakes hand. The handshaking lemma states that in any undirected graph, the number of vertices whose degrees are odd is even. It is sufficient to show that the sum of odd degrees is even.&lt;br /&gt;
&lt;br /&gt;
The handshaking lemma is a direct consequence of the following lemma, which is proved by Euler in his 1736 paper on [http://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg Seven Bridges of Königsberg] that began the study of graph theory.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma (Euler 1736)|&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{v\in V}d(v)=2|E|&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We count the number of &#039;&#039;&#039;directed&#039;&#039;&#039; edges. A directed edge is an ordered pair &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;\{u,v\}\in E&amp;lt;/math&amp;gt;. There are two ways to count the directed edges.&lt;br /&gt;
&lt;br /&gt;
First, we can enumerate by edges. Pick every edge &amp;lt;math&amp;gt;uv\in E&amp;lt;/math&amp;gt; and apply two directions &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;(v,u)&amp;lt;/math&amp;gt; to the edge. This gives us &amp;lt;math&amp;gt;2|E|&amp;lt;/math&amp;gt; directed edges.&lt;br /&gt;
&lt;br /&gt;
On the other hand, we can enumerate by vertices. Pick every vertex &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; and for each of its &amp;lt;math&amp;gt;d(v)&amp;lt;/math&amp;gt; neighbors, say &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;, generate a directed edge &amp;lt;math&amp;gt;(v,u)&amp;lt;/math&amp;gt;. This gives us &amp;lt;math&amp;gt;\sum_{v\in V}d(v)&amp;lt;/math&amp;gt; directed edges.&lt;br /&gt;
&lt;br /&gt;
It is obvious that the two terms are equal, since we just count the same thing twice with different methods. The lemma follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The handshaking lemma is implied directly by the above lemma, since the sum of even degrees is even.&lt;br /&gt;
==== Sperner&#039;s lemma ====&lt;br /&gt;
A &#039;&#039;&#039;triangulation&#039;&#039;&#039; of a triangle &amp;lt;math&amp;gt;abc&amp;lt;/math&amp;gt; is a decomposition of &amp;lt;math&amp;gt;abc&amp;lt;/math&amp;gt; to small triangles (called &#039;&#039;cells&#039;&#039;), such that any two different cells are either disjoint, or share an edge, or a vertex.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;proper coloring&#039;&#039;&#039; of a triangulation of triangle &amp;lt;math&amp;gt;abc&amp;lt;/math&amp;gt; is a coloring of all vertices in the triangulation with three colors: &amp;lt;font color=red&amp;gt;red&amp;lt;/font&amp;gt;, &amp;lt;font color=blue&amp;gt;blue&amp;lt;/font&amp;gt;, and &amp;lt;font color=green&amp;gt;green&amp;lt;/font&amp;gt;, such that the following constraints are satisfied:&lt;br /&gt;
* The three vertices &amp;lt;math&amp;gt;a,b&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt; of the big triangle receive all three colors.&lt;br /&gt;
* The vertices in each of the three lines &amp;lt;math&amp;gt;ab&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;bc&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;ac&amp;lt;/math&amp;gt; receive two colors. &lt;br /&gt;
&lt;br /&gt;
The following figure is an example of a properly colored triangulation.&lt;br /&gt;
[[Image:sperner-triangle.png|260px|center]]&lt;br /&gt;
&lt;br /&gt;
In 1928 young Emanuel Sperner gave a combinatorial proof of the famous Brouwer&#039;s fixed point theorem by proving the following lemma (now called Sperner&#039;s lemma), with an extremely elegant proof.&lt;br /&gt;
{{Theorem|Sperner&#039;s Lemma (1928)|&lt;br /&gt;
:For any properly colored triangulation, there exists a cell receiving all three colors.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
The proof is done by appropriately constructing a dual graph of the triangulation. &lt;br /&gt;
&lt;br /&gt;
The dual graph is defined as follows:&lt;br /&gt;
* Each cell in the triangulation corresponds to a distinct vertex in the dual graph.&lt;br /&gt;
* The outer space corresponds to a distinct vertex in the dual graph.&lt;br /&gt;
* An edge is added between two vertices in the dual graph if the corresponding cells share a &amp;lt;math&amp;gt;{\color{Red}\mbox{red}}\mbox{--}{\color{Blue}\mbox{blue}}&amp;lt;/math&amp;gt; edge.&lt;br /&gt;
&lt;br /&gt;
The following is an example of the dual graph of a properly colored triangulation:&lt;br /&gt;
[[Image:sperner-dual.png|260px|center]]&lt;br /&gt;
&lt;br /&gt;
For vertices in the dual graph:&lt;br /&gt;
* If a cell receives all three colors, the corresponding vertex in the dual graph has degree 1;&lt;br /&gt;
* if a cell receives only &amp;lt;math&amp;gt;{\color{Red}\mbox{red}}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;{\color{Blue}\mbox{blue}}&amp;lt;/math&amp;gt;, the corresponding vertex has degree 2;&lt;br /&gt;
* for all other cases (the cell is monochromatic, or does not have blue or red), the corresponding vertex has degree 0.&lt;br /&gt;
&lt;br /&gt;
Besides, the unique vertex corresponding to the outer space must have odd degree, since the number of &amp;lt;math&amp;gt;{\color{Red}\mbox{red}}\mbox{--}{\color{Blue}\mbox{blue}}&amp;lt;/math&amp;gt; transitions between a &amp;lt;math&amp;gt;{\color{Red}\mbox{red}}&amp;lt;/math&amp;gt; endpoint and a &amp;lt;math&amp;gt;{\color{Blue}\mbox{blue}}&amp;lt;/math&amp;gt; endpoint must be odd.&lt;br /&gt;
&lt;br /&gt;
By handshaking lemma, the number of odd-degree vertices in the dual graph is even, thus the number of cells receiving all three colors must be odd, which cannot be zero.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The Pigeonhole Principle ==&lt;br /&gt;
The &#039;&#039;&#039;pigeonhole principle&#039;&#039;&#039; states the following &amp;quot;obvious&amp;quot; fact:&lt;br /&gt;
:&#039;&#039;&amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; pigeons cannot sit in &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; holes so that every pigeon is alone in its hole.&#039;&#039;&lt;br /&gt;
This is one of the oldest &#039;&#039;&#039;non-constructive&#039;&#039;&#039; principles: it states only the &#039;&#039;existence&#039;&#039; of a pigeonhole with more than one pigeons and says nothing about how to &#039;&#039;find&#039;&#039; such a pigeonhole.&lt;br /&gt;
&lt;br /&gt;
The general form of pigeonhole principle, also known as the &#039;&#039;&#039;averaging principle&#039;&#039;&#039;, is stated as follows.&lt;br /&gt;
{{Theorem|Generalized pigeonhole principle|&lt;br /&gt;
:If a set consisting of more than &amp;lt;math&amp;gt;mn&amp;lt;/math&amp;gt; objects is partitioned into &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; classes, then some class receives more than &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; objects.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Inevitable divisors ===&lt;br /&gt;
The following is one of Erdős&#039; favorite initiation questions to mathematics. The proof uses the Pigeonhole Principle.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:For any subset &amp;lt;math&amp;gt;S\subseteq\{1,2,\ldots,2n\}&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;|S|&amp;gt;n\,&amp;lt;/math&amp;gt;, there are two numbers &amp;lt;math&amp;gt;a,b\in S&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a|b\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
For every odd number &amp;lt;math&amp;gt;m\in\{1,2,\ldots,2n\}&amp;lt;/math&amp;gt;, let &lt;br /&gt;
:&amp;lt;math&amp;gt;C_m=\{2^km\mid k\ge 0, 2^km\le 2n\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is easy to see that for any &amp;lt;math&amp;gt;b&amp;lt;a&amp;lt;/math&amp;gt; from the same &amp;lt;math&amp;gt;C_m&amp;lt;/math&amp;gt;, it holds that &amp;lt;math&amp;gt;a|b&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Every number &amp;lt;math&amp;gt;a\in S&amp;lt;/math&amp;gt; can be uniquely represented as &amp;lt;math&amp;gt;a=2^km&amp;lt;/math&amp;gt; for some odd number &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;, thus belongs to exactly one of &amp;lt;math&amp;gt;C_m&amp;lt;/math&amp;gt;, for odd &amp;lt;math&amp;gt;m\in\{1,2,\ldots, 2n\}&amp;lt;/math&amp;gt;.  There are &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; odd numbers in &amp;lt;math&amp;gt;\{1,2,\ldots,2n\}&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; different &amp;lt;math&amp;gt;C_m&amp;lt;/math&amp;gt;, but &amp;lt;math&amp;gt;|S|&amp;gt;n&amp;lt;/math&amp;gt;, thus there must exist distinct &amp;lt;math&amp;gt;a,b\in S&amp;lt;/math&amp;gt;, supposed that &amp;lt;math&amp;gt;b&amp;lt;a&amp;lt;/math&amp;gt;, belonging to the same &amp;lt;math&amp;gt;C_m&amp;lt;/math&amp;gt;, which implies that &amp;lt;math&amp;gt;a|b&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Monotonic subsequences ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; be a sequence of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct real numbers. A &#039;&#039;&#039;subsequence&#039;&#039;&#039; is a sequence of distinct terms of &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; appearing in the same order in which they appear in &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt;. Formally, a subsequence of &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;(a_{i_1},a_{i_2},\ldots,a_{i_k})&amp;lt;/math&amp;gt;, with &amp;lt;math&amp;gt;i_1&amp;lt;i_2&amp;lt;\cdots&amp;lt;i_k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A sequence &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_n)&amp;lt;/math&amp;gt; is &#039;&#039;&#039;increasing&#039;&#039;&#039; if &amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots&amp;lt;a_n&amp;lt;/math&amp;gt;, and &#039;&#039;&#039;decreasing&#039;&#039;&#039; if &amp;lt;math&amp;gt;a_1&amp;gt;a_2&amp;gt;\cdots&amp;gt;a_n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We are interested in the &#039;&#039;longest&#039;&#039; increasing and decreasing subsequences of an &amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots&amp;lt;a_n&amp;lt;/math&amp;gt;. It is intuitive that the length of both the longest increasing subsequence and the longest decreasing subsequence cannot be small simultaneously. A famous result of Erdős and Szekeres formally justifies this intuition. This is one of the first results in extremal combinatorics, published in the influential 1935 paper of Erdős and Szekeres.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Erdős-Szekeres 1935)|&lt;br /&gt;
:A sequence of more than &amp;lt;math&amp;gt;mn&amp;lt;/math&amp;gt; different real numbers must contain either an increasing subsequence of length &amp;lt;math&amp;gt;m+1&amp;lt;/math&amp;gt;, or a decreasing subsequence of length &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|(due to Seidenberg 1959)&lt;br /&gt;
Let &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_{N})&amp;lt;/math&amp;gt; be the original sequence of &amp;lt;math&amp;gt;N&amp;gt;mn&amp;lt;/math&amp;gt; distinct real numbers. Associate each &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; a pair &amp;lt;math&amp;gt;(x_i,y_i)&amp;lt;/math&amp;gt;, defined as:&lt;br /&gt;
*&amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt;: the length of the longest &#039;&#039;increasing&#039;&#039; subsequence &#039;&#039;ending&#039;&#039; at &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;;&lt;br /&gt;
*&amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt;: the length of the longest &#039;&#039;decreasing&#039;&#039; subsequence &#039;&#039;starting&#039;&#039; at &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;.&lt;br /&gt;
A key observation is that &amp;lt;math&amp;gt;(x_i,y_i)\neq (x_j,y_j)&amp;lt;/math&amp;gt; whenever &amp;lt;math&amp;gt;i\neq j&amp;lt;/math&amp;gt;. This is proved as follows:&lt;br /&gt;
: &#039;&#039;&#039;Case 1:&#039;&#039;&#039; If &amp;lt;math&amp;gt;a_i&amp;lt;a_j&amp;lt;/math&amp;gt;, then the longest increasing subsequence ending at &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; can be extended by adding on &amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;, so &amp;lt;math&amp;gt;x_i&amp;lt;x_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
: &#039;&#039;&#039;Case 2:&#039;&#039;&#039;  If &amp;lt;math&amp;gt;a_i&amp;gt;a_j&amp;lt;/math&amp;gt;, then the longest decreasing subsequence starting at &amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt; can be preceded by &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;, so &amp;lt;math&amp;gt;y_i&amp;gt;y_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
Now we put &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; &amp;quot;pigeons&amp;quot; &amp;lt;math&amp;gt;a_1,a_2,\ldots,a_N&amp;lt;/math&amp;gt; into &amp;quot;pigeonholes&amp;quot; &amp;lt;math&amp;gt;\{1,2,\ldots,N\}\times\{1,2,\ldots,N\}&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; is put into hole &amp;lt;math&amp;gt;(x_i,y_i)&amp;lt;/math&amp;gt;, with at most one pigeon per each hole (since different &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; has different &amp;lt;math&amp;gt;(x_i,y_i)&amp;lt;/math&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
The number of pigeons is &amp;lt;math&amp;gt;N&amp;gt;mn&amp;lt;/math&amp;gt;. Due to pigeonhole principle, there must be a pigeon which is outside the region &amp;lt;math&amp;gt;\{1,2,\ldots,m\}\times\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, which implies that there exists an &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; with either &amp;lt;math&amp;gt;x_i&amp;gt;m&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y_i&amp;gt;n&amp;lt;/math&amp;gt;. Due to our definition of &amp;lt;math&amp;gt;(x_i,y_i)&amp;lt;/math&amp;gt;, there must be either an increasing subsequence of length &amp;lt;math&amp;gt;m+1&amp;lt;/math&amp;gt;, or a decreasing subsequence of length &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Dirichlet&#039;s approximation ===&lt;br /&gt;
Let &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; be an irrational number. We now want to approximate &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; be a rational number (a fraction).&lt;br /&gt;
&lt;br /&gt;
Since every real interval &amp;lt;math&amp;gt;[a,b]&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;a&amp;lt;b&amp;lt;/math&amp;gt; contains infinitely many rational numbers, there must exist rational numbers arbitrarily close to &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. The trick is to let the denominator of the fraction sufficiently large.&lt;br /&gt;
&lt;br /&gt;
Suppose however we restrict the rationals we may select to have denominators bounded by &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. How closely we can approximate &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; now?&lt;br /&gt;
&lt;br /&gt;
The following important theorem is due to Dirichlet and his &#039;&#039;Schubfachprinzip&#039;&#039; (&amp;quot;drawer principle&amp;quot;). The theorem is fundamental in numer theory and real analysis, but the proof is combinatorial.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Dirichlet 1879)|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; be an irrational number. For any natural number &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, there is a rational number &amp;lt;math&amp;gt;\frac{p}{q}&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;1\le q\le n&amp;lt;/math&amp;gt; and &lt;br /&gt;
::&amp;lt;math&amp;gt;\left|x-\frac{p}{q}\right|&amp;lt;\frac{1}{nq}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;\{x\}=x-\lfloor x\rfloor&amp;lt;/math&amp;gt; denote the &#039;&#039;&#039;fractional part&#039;&#039;&#039; of the real number &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. It is obvious that &amp;lt;math&amp;gt;\{x\}\in[0,1)&amp;lt;/math&amp;gt; for any real number &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Consider the &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; numbers &amp;lt;math&amp;gt;\{kx\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;k=1,2,\ldots,n+1&amp;lt;/math&amp;gt;. These &amp;lt;math&amp;gt;n+1&amp;lt;/math&amp;gt; numbers (pigeons) belong to the following &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; intervals (pigeonholes):&lt;br /&gt;
:&amp;lt;math&amp;gt;\left(0,\frac{1}{n}\right),\left(\frac{1}{n},\frac{2}{n}\right),\ldots,\left(\frac{n-1}{n},1\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Since &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; is irrational, &amp;lt;math&amp;gt;\{kx\}&amp;lt;/math&amp;gt; cannot coincide with any endpoint of the above intervals.&lt;br /&gt;
&lt;br /&gt;
By the pigeonhole principle, there exist &amp;lt;math&amp;gt;1\le a&amp;lt;b\le n+1&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;\{ax\},\{bx\}&amp;lt;/math&amp;gt; are in the same interval, thus&lt;br /&gt;
:&amp;lt;math&amp;gt;|\{bx\}-\{ax\}|&amp;lt;\frac{1}{n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;|(b-a)x-\left(\lfloor bx\rfloor-\lfloor ax\rfloor\right)|&amp;lt;\frac{1}{n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Let &amp;lt;math&amp;gt;q=b-a&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;p=\lfloor bx\rfloor-\lfloor ax\rfloor&amp;lt;/math&amp;gt;. We have &amp;lt;math&amp;gt;|qx-p|&amp;lt;\frac{1}{n}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;1\le q\le n&amp;lt;/math&amp;gt;. Dividing both sides by &amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;, the theorem is proved.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13622</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13622"/>
		<updated>2026-04-08T08:59:09Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Existence problems|Existence problems | 存在性问题]]&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13621</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13621"/>
		<updated>2026-04-08T08:54:40Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on entropy and counting ([http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf notes]) &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13620</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13620"/>
		<updated>2026-04-08T08:52:23Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# Guest lecture by Prof. Penghui Yao on [http://tcs.nju.edu.cn/slides/comb2026/entropy.pdf entropy and counting] &lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Cayley%27s_formula&amp;diff=13619</id>
		<title>组合数学 (Fall 2026)/Cayley&#039;s formula</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Cayley%27s_formula&amp;diff=13619"/>
		<updated>2026-04-08T08:45:55Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Cayley&amp;#039;s Formula == We now present a theorem of the number of labeled trees on a fixed number of vertices. It is due to [http://en.wikipedia.org/wiki/Arthur_Cayley Cayley] in 1889. The theorem is often referred by the name [http://en.wikipedia.org/wiki/Cayley&amp;#039;s_formula Cayley&amp;#039;s formula].  {{Theorem|Cayley&amp;#039;s formula for trees| : There are &amp;lt;math&amp;gt;n^{n-2}&amp;lt;/math&amp;gt; different trees on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices. }}  The theorem has several proofs, including the bijectio...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Cayley&#039;s Formula ==&lt;br /&gt;
We now present a theorem of the number of labeled trees on a fixed number of vertices. It is due to [http://en.wikipedia.org/wiki/Arthur_Cayley Cayley] in 1889. The theorem is often referred by the name [http://en.wikipedia.org/wiki/Cayley&#039;s_formula Cayley&#039;s formula].&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Cayley&#039;s formula for trees|&lt;br /&gt;
: There are &amp;lt;math&amp;gt;n^{n-2}&amp;lt;/math&amp;gt; different trees on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The theorem has several proofs, including the bijection which encodes a tree by a [http://en.wikipedia.org/wiki/Pr%C3%BCfer_sequence Prüfer code], through the [http://en.wikipedia.org/wiki/Kirchhoff&#039;s_matrix_tree_theorem Kirchhoff&#039;s matrix tree theorem], and by double counting.&lt;br /&gt;
&lt;br /&gt;
=== Proof of Cayley&#039;s formula by double counting ===&lt;br /&gt;
We now present a double counting proof, which is considered by the [http://en.wikipedia.org/wiki/Proofs_from_THE_BOOK Proofs from THE BOOK] &amp;quot;the most beautiful of them all&amp;quot;.&lt;br /&gt;
{{Prooftitle|Proof of Cayley&#039;s formula by double counting|&lt;br /&gt;
(Due to Pitman 1999)&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;T_n&amp;lt;/math&amp;gt; be the number of different trees defined on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;rooted tree&#039;&#039;&#039; is a tree with a special vertex. That is, one of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices is marked as the &amp;quot;root&amp;quot; of the tree. A rooted tree defines a natural direction of all edges, such that an edge &amp;lt;math&amp;gt;uv&amp;lt;/math&amp;gt; of the tree is directed from &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; is before &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; along the unique path from the root.&lt;br /&gt;
&lt;br /&gt;
We count the number of different &#039;&#039;sequences&#039;&#039; of directed edges that can be added to an empty graph on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices to form from it a &#039;&#039;rooted&#039;&#039; tree. We note that such a sequence can be formed in two ways:&lt;br /&gt;
# Starting with an unrooted tree, choose one of its vertices as root, and fix an total order of edges to specify the order in which the edges are added.&lt;br /&gt;
# Starting from an empty graph, add the edges one by one in steps.&lt;br /&gt;
&lt;br /&gt;
In the first method, we pick one of the &amp;lt;math&amp;gt;T_n&amp;lt;/math&amp;gt; unrooted trees, choose one of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices as the root, and pick one of the &amp;lt;math&amp;gt;(n-1)!&amp;lt;/math&amp;gt; total orders of the &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges. This gives us &amp;lt;math&amp;gt;T_nn(n-1)!=T_nn!&amp;lt;/math&amp;gt; ways.&lt;br /&gt;
&lt;br /&gt;
In the second method, we consider the number of choices in one step, and multiply the numbers of choices in all steps. This is done as follows.&lt;br /&gt;
&lt;br /&gt;
Given a sequence of &#039;&#039;adding&#039;&#039; &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges to an empty graph to form a rooted tree, we reverse this sequence and get a sequence of &#039;&#039;removing&#039;&#039; edges one by one from the final rooted tree until no edge left. We observe that:&lt;br /&gt;
* At first, we remove an edge from the rooted tree. Suppose that the root of the tree is &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt;, and the removed directed edge is &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;.  After removing &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;, the original rooted tree is disconnected into two rooted trees, one rooted at &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; and the other rooted at &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
* After removing &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; edges, there are &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; rooted trees. In the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;th step, a directed edge &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; in the current forest is removed and the tree containing &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt; is disconnected into two trees, one rooted at the old root of that tree, and the other rooted at &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We now again reverse the above procedure, and consider the sequence of adding directed edges to an empty graph to form a rooted tree.&lt;br /&gt;
* At first, we have &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; rooted trees, each of 0 edge (&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; isolated vertices).&lt;br /&gt;
* After adding &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; edges, there are &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; rooted trees. Denoting the directed edge added next as &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;. As observed above, &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; can be any one of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices; but &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; must be the root of one of the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; trees, except the tree which contains &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt;. There are &amp;lt;math&amp;gt;n(k-1)&amp;lt;/math&amp;gt; choices of such &amp;lt;math&amp;gt;(u,v)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Multiplying the numbers of choices in all steps, the number of sequences of adding directed edges to an empty graph to form a rooted tree is given by&lt;br /&gt;
:&amp;lt;math&amp;gt;\prod_{k=2}^nn(k-1)=n^{n-2}n!&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the principle of double counting, counting the same thing by different methods yield the same result.&lt;br /&gt;
:&amp;lt;math&amp;gt;T_nn!=n^{n-2}n!&amp;lt;/math&amp;gt;,&lt;br /&gt;
which gives that &amp;lt;math&amp;gt;T_n=n^{n-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==  Prüfer code ==&lt;br /&gt;
The Prüfer code encodes a labeled tree to a sequence of labels. This gives a bijections between trees and tuples.&lt;br /&gt;
&lt;br /&gt;
=== Encoding  ===&lt;br /&gt;
In a tree, the vertices of degree 1 are called leaves. It is easy to see that:&lt;br /&gt;
* each tree has at least two leaves; and&lt;br /&gt;
* after removing a leaf (along with the edge adjacent to it) from a tree, the resulting graph is still a tree. &lt;br /&gt;
&lt;br /&gt;
The following algorithm transforms a tree &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices &amp;lt;math&amp;gt;1,2,\ldots,n&amp;lt;/math&amp;gt;, to a tuple &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})\in\{1,2,\ldots,n\}^{n-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
{{Theorem| Prüfer code (encoder)|&lt;br /&gt;
:&#039;&#039;&#039;Input&#039;&#039;&#039;: A tree &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices, labeled by &amp;lt;math&amp;gt;1,2,\ldots,n&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&lt;br /&gt;
:let &amp;lt;math&amp;gt;T_1=T&amp;lt;/math&amp;gt;;&lt;br /&gt;
:for &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;, do&lt;br /&gt;
::let &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt; be the leaf in &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; with the smallest label, and &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt; be its neighbor;&lt;br /&gt;
::let &amp;lt;math&amp;gt;T_{i+1}&amp;lt;/math&amp;gt; be the new tree obtained from deleting the leaf &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt;;&lt;br /&gt;
:end&lt;br /&gt;
:return &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})&amp;lt;/math&amp;gt;;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Decoding ===&lt;br /&gt;
It is trivial to observe the following lemma:&lt;br /&gt;
{{Theorem|Lemma 1|&lt;br /&gt;
:For each &amp;lt;math&amp;gt;1\le i\le n-1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; is a tree of &amp;lt;math&amp;gt;n-i+1&amp;lt;/math&amp;gt; vertices. In particular, the vertices of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; are  &amp;lt;math&amp;gt;u_i,u_{i+1},\ldots,u_{n-1},v_{n-1}&amp;lt;/math&amp;gt;, and the edges of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; are precisely &amp;lt;math&amp;gt;\{u_j,v_j\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;i\le j\le n-1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
And there is a reason that we do not need to store &amp;lt;math&amp;gt;v_{n-1}&amp;lt;/math&amp;gt; in the Prüfer code.&lt;br /&gt;
{{Theorem|Lemma 2|&lt;br /&gt;
:It always holds that &amp;lt;math&amp;gt;v_{n-1}=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Every tree (of at least two vertices) has at least two leaves. The &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le n-1&amp;lt;/math&amp;gt;, are the leaf of the smallest label in &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt;, which can never be &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is never deleted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Lemma 1 and 2 together imply that given a Prüfer code &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})&amp;lt;/math&amp;gt;, the only remaining task to reconstruct the tree &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; is to figure out those &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le n-1&amp;lt;/math&amp;gt;. The following lemma state how to obtain &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le n-1&amp;lt;/math&amp;gt;, from a Prüfer code &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma 3|&lt;br /&gt;
:For &amp;lt;math&amp;gt;i=1,2,\ldots,n-1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt; is the smallest element of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; not in &amp;lt;math&amp;gt;\{u_1,\ldots,u_{i-1}\}\cup\{v_i,\ldots,v_{n-1}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Note that &amp;lt;math&amp;gt;u_1,u_2,\ldots,u_{n-1},v_{n-1}&amp;lt;/math&amp;gt; is a sequence of distinct vertices, because &amp;lt;math&amp;gt;u_1,u_2,\ldots,u_{n-1}&amp;lt;/math&amp;gt; are deleted one by one from the tree, and &amp;lt;math&amp;gt;v_{n-1}=n&amp;lt;/math&amp;gt; is never deleted. Thus, each vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; appears among &amp;lt;math&amp;gt;u_1,u_2,\ldots,u_{n-1},v_{n-1}&amp;lt;/math&amp;gt; exactly once. And each vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; appears for &amp;lt;math&amp;gt;deg(v)&amp;lt;/math&amp;gt; times among the edges &amp;lt;math&amp;gt;\{u_i,v_i\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le n-1&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;deg(v)&amp;lt;/math&amp;gt; denotes the degree of vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the original tree &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;. Therefore, each vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; appears among  &amp;lt;math&amp;gt;v_1,v_2,\ldots,v_{n-2}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;deg(v)-1&amp;lt;/math&amp;gt; times.&lt;br /&gt;
&lt;br /&gt;
Similarly, each vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; appears among &amp;lt;math&amp;gt;v_i,v_{i+1},\ldots,v_{n-2}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;deg_i(v)-1&amp;lt;/math&amp;gt; times, where &amp;lt;math&amp;gt;deg_i(v)&amp;lt;/math&amp;gt; is the degree of vertex &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; in the tree &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt;. In particular, the leaves of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; are not among &amp;lt;math&amp;gt;\{v_i,v_{i+1},\ldots,v_{n-2}\}&amp;lt;/math&amp;gt;. Recall that the vertices of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;u_i,u_{i+1},\ldots,u_{n-1},v_{n-1}&amp;lt;/math&amp;gt;. Then the leaves of &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; are the elements of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; not in &amp;lt;math&amp;gt;\{u_1,\ldots,u_{i-1}\}\cup\{v_i,\ldots,v_{n-1}\}&amp;lt;/math&amp;gt;. By definition of Prüfer code, &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt; is the leaf in &amp;lt;math&amp;gt;T_i&amp;lt;/math&amp;gt; of smallest label, hence the smallest element of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; not in &amp;lt;math&amp;gt;\{u_1,\ldots,u_{i-1}\}\cup\{v_i,\ldots,v_{n-1}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Applying Lemma 3, we have the following decoder for the Prüfer code:&lt;br /&gt;
{{Theorem| Prüfer code (decoder)|&lt;br /&gt;
:&#039;&#039;&#039;Input&#039;&#039;&#039;: A tuple &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})\in\{1,2,\ldots,n\}^{n-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&lt;br /&gt;
:let &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; be empty graph, and &amp;lt;math&amp;gt;v_{n-1}=n&amp;lt;/math&amp;gt;;&lt;br /&gt;
:for &amp;lt;math&amp;gt;i=1&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;, do&lt;br /&gt;
::let &amp;lt;math&amp;gt;u_i&amp;lt;/math&amp;gt; be the smallest label not in &amp;lt;math&amp;gt;\{u_1,\ldots,u_{i-1}\}\cup\{v_i,\ldots,v_{n-1}\}&amp;lt;/math&amp;gt;;&lt;br /&gt;
::add an edge &amp;lt;math&amp;gt;\{u_i,v_i\}&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;;&lt;br /&gt;
:end&lt;br /&gt;
:return &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;; &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
In other words, the encoding of trees to tuples by the Prüfer code is reversible, thus the mapping is injective (1-1). To see it is also surjective, we need to show that for every possible &amp;lt;math&amp;gt;(v_1,v_2,\ldots,v_{n-2})\in\{1,2,\ldots,n\}^{n-2}&amp;lt;/math&amp;gt;, the above decoder recovers a tree from it. &lt;br /&gt;
&lt;br /&gt;
It is easy to see that the decoder always returns a graph of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges on the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices. The only thing remaining to verify is that the returned graph has no cycle in it, which can be easily proved by a timeline argument (left as an exercise).&lt;br /&gt;
&lt;br /&gt;
=== Bijection proof of Cayley&#039;s formula ===&lt;br /&gt;
Therefore, the Prüfer code establishes a bijection between the set of trees on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices and the tuples from &amp;lt;math&amp;gt;\{1,2,\ldots,n\}^{n-2}&amp;lt;/math&amp;gt;. This proves Cayley&#039;s formula.&lt;br /&gt;
&lt;br /&gt;
== Kirchhoff&#039;s Matrix-Tree Theorem ==&lt;br /&gt;
Given an undirected graph &amp;lt;math&amp;gt;G([n],E)&amp;lt;/math&amp;gt;, the &#039;&#039;&#039;adjacency matrix&#039;&#039;&#039; &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; of graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; matrix such that&lt;br /&gt;
:&amp;lt;math&amp;gt;A(i,j)=\begin{cases}&lt;br /&gt;
1 &amp;amp; \{i,j\}\in E,\\&lt;br /&gt;
0 &amp;amp; \{i,j\}\not\in E.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Graph Laplacian===&lt;br /&gt;
Let &amp;lt;math&amp;gt;D&amp;lt;/math&amp;gt; be a &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; diagonal matrix such that&lt;br /&gt;
:&amp;lt;math&amp;gt;D(i,j)=\begin{cases}&lt;br /&gt;
\text{deg}(i) &amp;amp; i=j,\\&lt;br /&gt;
0 &amp;amp; i\neq j,&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\text{deg}(i)&amp;lt;/math&amp;gt; denotes the degree of vertex &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;Laplacian matrix&#039;&#039;&#039; &amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; of graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is defined as &amp;lt;math&amp;gt;L=D-A&amp;lt;/math&amp;gt;, that is,&lt;br /&gt;
:&amp;lt;math&amp;gt;L(i,j)=\begin{cases}&lt;br /&gt;
\text{deg}(i) &amp;amp; i=j,\\&lt;br /&gt;
-1 &amp;amp; i\neq j\text{ and } \{i,j\}\in E,\\&lt;br /&gt;
0 &amp;amp; \text{otherwise}.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;G([n],E)&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; edges. The &#039;&#039;&#039;incidence matrix&#039;&#039;&#039; &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n\times m&amp;lt;/math&amp;gt; matrix such that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\forall i\in[n], \forall e\in E,\quad B(i,e)=\begin{cases}&lt;br /&gt;
1 &amp;amp; e=\{i,j\}\text{ and } i&amp;lt;j,\\&lt;br /&gt;
-1 &amp;amp; e=\{i,j\}\text{ and } i&amp;gt;j,\\&lt;br /&gt;
0 &amp;amp; \text{otherwise}.&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following proposition is easy to verify.&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:&amp;lt;math&amp;gt;L=BB^T&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
For any &amp;lt;math&amp;gt;i,j\in[n]&amp;lt;/math&amp;gt;, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;(BB^T)(i,j)=\sum_{e\in E}B(i,e)B^T(e,j)=\sum_{e\in E}B(i,e)B(j,e)&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is easy to verify that &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\sum_{e\in E}B(i,e)B(j,e)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
\text{deg}(i) &amp;amp; i=j,\\&lt;br /&gt;
-1 &amp;amp; i\neq j\text{ and } \{i,j\}\in E,\\&lt;br /&gt;
0 &amp;amp; \text{otherwise},&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
which is equal to the definition of &amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== The Matrix-tree Theorem ===&lt;br /&gt;
The matrix-tree theorem of Kirchhoff states a striking fact: The number of spanning trees in any connected graph can be computed as the determinant of some appropriate graph matrix. &lt;br /&gt;
{{Theorem|Kirchhoff&#039;s Matrix-Tree Theorem|&lt;br /&gt;
:For any connected graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; vertices, the number of spanning trees in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\det(L_{i,i})\,&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;L_{i,i}\,&amp;lt;/math&amp;gt; is the &amp;lt;math&amp;gt;(n-1)\times(n-1)&amp;lt;/math&amp;gt; matrix resulting from the Laplacian matrix &amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt; of graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; by deleting the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th row and the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th column.&lt;br /&gt;
}}&lt;br /&gt;
The determinant can be computed as fast as matrix multiplication, thus is quite efficient, especially when compared to our task: counting the number of subgraphs satisfying certain nontrivial global constraint (e.g. spanning tree). Such efficient algorithm is rarely seen for counting problems, which are usually #P-hard to compute (e.g. number of matchings in a graph).&lt;br /&gt;
&lt;br /&gt;
The key to prove the matrix-tree theorem is the Cauchy-Binet theorem in linear algebra, whose proof is beyond the scope of this class.&lt;br /&gt;
{{Theorem|Cauchy-Binet Theorem|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be, respectively, &amp;lt;math&amp;gt;n\times m&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; matrix. For any &amp;lt;math&amp;gt;S\subseteq [m]&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;A_{[n], S}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B_{S,[n]}&amp;lt;/math&amp;gt; denote, respectively, the &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; submatrices of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, consisting of the columns of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, or the rows of &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, indexed by elements of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\det(AB)=\sum_{S\in{[m]\choose n}}\det(A_{[n],S})\det(B_{S,[n]}).&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be the incidence matrix of graph &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Fix any vertex &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; be the &amp;lt;math&amp;gt;(n-1)\times m&amp;lt;/math&amp;gt; matrix resulting from &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; by deleting the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th row. &lt;br /&gt;
&lt;br /&gt;
Recall that &amp;lt;math&amp;gt;L=BB^T&amp;lt;/math&amp;gt;. It is easy to verify that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
L_{i,i}=CC^T.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Due to the Cauchy-Binet Theorem, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\det(L_{i,i})=\det(CC^T)&lt;br /&gt;
&amp;amp;=\sum_{S\in{[m]\choose n-1}}\det(C_{[n-1],S})\det(C^T_{S,[n-1]})\\&lt;br /&gt;
&amp;amp;=\sum_{S\in{[m]\choose n-1}}\det(C_{[n-1],S})^2.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next lemma gives a key observation to prove the matrix-tree theorem.&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:For any &amp;lt;math&amp;gt;S\subseteq [m]&amp;lt;/math&amp;gt; of size &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;, the value of &amp;lt;math&amp;gt;\det(C_{[n-1],S})&amp;lt;/math&amp;gt; is either 1, or -1, or 0. Moreover, &amp;lt;math&amp;gt;\det(C_{[n-1],S})=\pm1&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; indicates a spanning tree in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We first show &amp;lt;math&amp;gt;\det(C_{[n-1],S})\in\{0,1,-1\}&amp;lt;/math&amp;gt; by induction on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. &lt;br /&gt;
Note that &amp;lt;math&amp;gt;C_{[n-1],S}&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;(n-1)\times (n-1)&amp;lt;/math&amp;gt; matrix such that each column contains at most one 1 and at most one -1, and all other entries are 0. For such matrix, when &amp;lt;math&amp;gt;n-1=1&amp;lt;/math&amp;gt;, the induction hypothesis &amp;lt;math&amp;gt;\det(C_{[n-1],S})\in\{0,1,-1\}&amp;lt;/math&amp;gt; is trivially true. And for general &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, if every column has a 1 and a -1, then the sum of all rows is the zero vector, so the matrix is singular.  Otherwise, expand the determinant by a column with one nonzero entry to find it is &amp;lt;math&amp;gt;\pm1&amp;lt;/math&amp;gt; times the determinant of a smaller matrix of the same property, which by induction hypothesis has value 0 or &amp;lt;math&amp;gt;\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We then show that &amp;lt;math&amp;gt;\det(C_{[n-1],S})&amp;lt;/math&amp;gt; is nonzero if and only if &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a spanning tree. &lt;br /&gt;
&lt;br /&gt;
Suppose the &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges corresponding to &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is not a spanning tree of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; must have more than one components, and there must be a component &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; not containing vertex &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;. The rows of &amp;lt;math&amp;gt;C_{[n-1],S}&amp;lt;/math&amp;gt; corresponding to &amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt; add to 0, thus these rows are linearly dependent, and hence &amp;lt;math&amp;gt;\det(C_{[n-1],S})=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose the &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges corresponding to &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a spanning tree of &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Then there is a vertex &amp;lt;math&amp;gt;j_1\neq i&amp;lt;/math&amp;gt; of degree 1 in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;; let &amp;lt;math&amp;gt;e_1&amp;lt;/math&amp;gt; be the edge in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; incident to &amp;lt;math&amp;gt;j_1&amp;lt;/math&amp;gt;. Deleting vertex &amp;lt;math&amp;gt;j_1&amp;lt;/math&amp;gt; and edge &amp;lt;math&amp;gt;e_1&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, we obtain a tree of &amp;lt;math&amp;gt;n-2&amp;lt;/math&amp;gt; edges. Again there is a vertex &amp;lt;math&amp;gt;j_2\neq i&amp;lt;/math&amp;gt; of degree 1 with incident edge &amp;lt;math&amp;gt;e_2&amp;lt;/math&amp;gt;. Continue this we enumerate all vertices except &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; as &amp;lt;math&amp;gt;j_1,j_2,\ldots,j_{n-1}&amp;lt;/math&amp;gt; and all edges in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; as &amp;lt;math&amp;gt;e_1,e_2,\ldots,e_{n-1}&amp;lt;/math&amp;gt;. Now permute the rows and columns of &amp;lt;math&amp;gt;C_{[n-1],S}&amp;lt;/math&amp;gt; such that the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th row corresponds to vertex &amp;lt;math&amp;gt;j_k&amp;lt;/math&amp;gt; and the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th column corresponds to &amp;lt;math&amp;gt;e_k&amp;lt;/math&amp;gt;. By our construction the permuted &amp;lt;math&amp;gt;C_{[n-1],S}&amp;lt;/math&amp;gt; is lower triangle with &amp;lt;math&amp;gt;\pm1&amp;lt;/math&amp;gt; diagonal entries, since when each &amp;lt;math&amp;gt;j_k&amp;lt;/math&amp;gt; is removed it is of degree 1 in the remaining tree and is incident to edge &amp;lt;math&amp;gt;e_k&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;\det(C_{[n-1],S})=\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The matrix-tree theorem follows as consequence. Recall we show that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\det(L_{i,i})&lt;br /&gt;
&amp;amp;=\sum_{S\in{[m]\choose n-1}}\det(C_{[n-1],S})^2.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
The sum enumerates over all subgraphs &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; edges, and by the above lemma &amp;lt;math&amp;gt;\det(C_{[n-1],S})^2=1&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a spanning tree in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;. Therefore, &amp;lt;math&amp;gt;\det(L_{i,i})&amp;lt;/math&amp;gt; gives the number of spanning trees in &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Cayley&#039;s formula by the matrix-tree theorem ===&lt;br /&gt;
The number of trees of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct vertices equals the number of spanning trees in the complete graph &amp;lt;math&amp;gt;K_n&amp;lt;/math&amp;gt;. For &amp;lt;math&amp;gt;G=K_n&amp;lt;/math&amp;gt;, for any &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt; the &amp;lt;math&amp;gt;(n-1)\times (n-1)&amp;lt;/math&amp;gt; matrix &amp;lt;math&amp;gt;L_{ii}&amp;lt;/math&amp;gt; is given by&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
L_{i,i}&lt;br /&gt;
=&lt;br /&gt;
\begin{bmatrix}&lt;br /&gt;
n-1 &amp;amp; -1 &amp;amp; \cdots &amp;amp; -1\\&lt;br /&gt;
-1 &amp;amp; n-1 &amp;amp; \cdots &amp;amp; -1\\&lt;br /&gt;
\vdots &amp;amp; \vdots &amp;amp; \ddots &amp;amp; -1\\&lt;br /&gt;
-1 &amp;amp; -1 &amp;amp; \cdots &amp;amp; n-1&lt;br /&gt;
\end{bmatrix},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
whose determinant is &amp;lt;math&amp;gt;\det(L_{i,i})=n^{n-2}&amp;lt;/math&amp;gt;.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13618</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13618"/>
		<updated>2026-04-08T08:40:11Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Cayley&#039;s formula|Cayley&#039;s formula | Cayley公式]]  ([http://tcs.nju.edu.cn/slides/comb2026/Cayley.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Average-case_analysis_of_QuickSort&amp;diff=13617</id>
		<title>概率论与数理统计 (Spring 2026)/Average-case analysis of QuickSort</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Average-case_analysis_of_QuickSort&amp;diff=13617"/>
		<updated>2026-04-08T08:38:47Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;[http://en.wikipedia.org/wiki/Quicksort &amp;#039;&amp;#039;&amp;#039;快速排序&amp;#039;&amp;#039;&amp;#039;（&amp;#039;&amp;#039;&amp;#039;Quicksort&amp;#039;&amp;#039;&amp;#039;）]是由Tony Hoare发现的排序算法。该算法的伪代码描述如下（为方便起见，假设数组元素互不相同——更一般情况的分析易推广得到）：   &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;QSort&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;(A): 输入A[1...n]是存有n个不同数字的数组   if n&amp;gt;1 then        &amp;#039;&amp;#039;&amp;#039;pivot&amp;#039;&amp;#039;&amp;#039; = A[1];        将A中&amp;lt;pivot的元素存于数组L，将A中&amp;gt;pivot的元素存于数组R; \\保持内部元素之...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[http://en.wikipedia.org/wiki/Quicksort &#039;&#039;&#039;快速排序&#039;&#039;&#039;（&#039;&#039;&#039;Quicksort&#039;&#039;&#039;）]是由Tony Hoare发现的排序算法。该算法的伪代码描述如下（为方便起见，假设数组元素互不相同——更一般情况的分析易推广得到）：&lt;br /&gt;
  &#039;&#039;&#039;&#039;&#039;QSort&#039;&#039;&#039;&#039;&#039;(A): 输入A[1...n]是存有n个不同数字的数组&lt;br /&gt;
  if n&amp;gt;1 then&lt;br /&gt;
       &#039;&#039;&#039;pivot&#039;&#039;&#039; = A[1];&lt;br /&gt;
       将A中&amp;lt;pivot的元素存于数组L，将A中&amp;gt;pivot的元素存于数组R; \\保持内部元素之间相对顺序&lt;br /&gt;
       递归调用&#039;&#039;&#039;&#039;&#039;QSort&#039;&#039;&#039;&#039;&#039;(L)和&#039;&#039;&#039;&#039;&#039;QSort&#039;&#039;&#039;&#039;&#039;(R);&lt;br /&gt;
&lt;br /&gt;
该伪代码描述省略了对数组的存取归并等具体实现的交代。可以不妨认为算法中的&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;和&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;其实就分别是原数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;的前半部分&amp;lt;math&amp;gt;A[1...i-1]&amp;lt;/math&amp;gt;和后半部分&amp;lt;math&amp;gt;A[i...n]&amp;lt;/math&amp;gt;，其中&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;表示&#039;&#039;&#039;pivot&#039;&#039;&#039;（“&#039;&#039;&#039;基准&#039;&#039;&#039;”、“&#039;&#039;&#039;轴点&#039;&#039;&#039;”、“&#039;&#039;&#039;分水岭&#039;&#039;&#039;”元素）在数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中的序数，即&#039;&#039;&#039;pivot&#039;&#039;&#039;是数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中第&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;小的数。&lt;br /&gt;
&lt;br /&gt;
作为基于比较的（comparison-based）排序算法，我们将算法进行的元素间的&#039;&#039;&#039;比较次数&#039;&#039;&#039;作为算法的复杂性度量。在&#039;&#039;&#039;最坏情况&#039;&#039;&#039;（&#039;&#039;&#039;worst-case&#039;&#039;&#039;）输入下，我们描述的“快速排序”算法所使用的比较次数可以达到&amp;lt;math&amp;gt;\Theta(n^2)&amp;lt;/math&amp;gt;。而且有趣的是，这一&amp;lt;math&amp;gt;\Omega(n^2)&amp;lt;/math&amp;gt;的复杂度下界是在输入数组是一个已排好序的数组时达到的：此时&#039;&#039;&#039;pivot&#039;&#039;&#039;会将数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;划分为大小极不平衡的子数组&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;和&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;，递归树也因此极不平衡，而算法使用的比较次数可因此达到&amp;lt;math&amp;gt;(n-1)+(n-2)+(n-3)+\cdots+1=\Omega(n^2)&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
现在我们来分析这一算法的&#039;&#039;&#039;平均情况&#039;&#039;&#039;（&#039;&#039;&#039;average-case&#039;&#039;&#039;）复杂度。&lt;br /&gt;
令输入数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;为&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;个元素的均匀分布的随机排列。如下性质不难递归验证：&lt;br /&gt;
{{Theorem|性质一（输入分布的递归不变性）|&lt;br /&gt;
* 作为基于比较的排序算法，快速排序算法的行为仅与输入数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中元素的相对顺序有关，而与&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中元素的具体数值无关。&lt;br /&gt;
* 进一步地，在算法的每次递归调用中，其输入数组中元素的相对顺序，符合该数量元素的所有排列上的均匀分布。&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= 快速排序算法的平均复杂度分析 I（基于全期望法则）=&lt;br /&gt;
令随机变量&amp;lt;math&amp;gt;X_n&amp;lt;/math&amp;gt;表示在随机输入&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;下，快速排序算法使用的总比较次数。同时令&amp;lt;math&amp;gt;t(n)=\mathbb{E}[X_n]&amp;lt;/math&amp;gt;表示其期望。正如刚刚解释的，&amp;lt;math&amp;gt;t(n)&amp;lt;/math&amp;gt;是良定义的，因为期望值&amp;lt;math&amp;gt;\mathbb{E}[X_n]&amp;lt;/math&amp;gt;仅与&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;有关。&lt;br /&gt;
&lt;br /&gt;
对&amp;lt;math&amp;gt;1\le i\le n&amp;lt;/math&amp;gt;，定义&amp;lt;math&amp;gt;B_i&amp;lt;/math&amp;gt;为如下事件：&lt;br /&gt;
:*&#039;&#039;&#039;pivot&#039;&#039;&#039;在数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中是第&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;小的元素。&lt;br /&gt;
则&amp;lt;math&amp;gt;B_1,B_2,\ldots,B_n&amp;lt;/math&amp;gt;构成了对所有情况（样本空间）的一个划分。且每个事件&amp;lt;math&amp;gt;B_i&amp;lt;/math&amp;gt;发生的概率有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr(B_i)=\frac{(n-1)!}{n!}=\frac{1}{n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
这是因为事件&amp;lt;math&amp;gt;B_i&amp;lt;/math&amp;gt;等价于一个均匀分布的随机排列&amp;lt;math&amp;gt;\pi:[n]\xrightarrow[\text{onto}]{\text{1-1}}[n]&amp;lt;/math&amp;gt;有&amp;lt;math&amp;gt;\pi(1)=i&amp;lt;/math&amp;gt;，而这件事的概率为&amp;lt;math&amp;gt;\frac{1}{n}&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
因此，根据&#039;&#039;&#039;全期望法则&#039;&#039;&#039;（&#039;&#039;&#039;law of total expectation&#039;&#039;&#039;），有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
t(n)&lt;br /&gt;
=&lt;br /&gt;
\mathbb{E}[X_n]&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{i=1}^n\mathbb{E}[X_n\mid B_i]\Pr(B_i)&lt;br /&gt;
=&lt;br /&gt;
\frac{1}{n}\sum_{i=1}^n\mathbb{E}[X_n\mid B_i]&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;.&lt;br /&gt;
而当事件&amp;lt;math&amp;gt;B_i&amp;lt;/math&amp;gt;发生时，即当&#039;&#039;&#039;pivot&#039;&#039;&#039;恰为数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中第&amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;小的元素，&lt;br /&gt;
算法会将&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中比&#039;&#039;&#039;pivot&#039;&#039;&#039;小的&amp;lt;math&amp;gt;(i-1)&amp;lt;/math&amp;gt;个元素放入子数组&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;、将比&#039;&#039;&#039;pivot&#039;&#039;&#039;大的&amp;lt;math&amp;gt;(n-i)&amp;lt;/math&amp;gt;个元素放入子数组&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;，这总共会花费&amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;次比较。&lt;br /&gt;
而且，根据&#039;&#039;&#039;性质一&#039;&#039;&#039;中所述的输入分布的递归不变性，递归调用&#039;&#039;&#039;&#039;&#039;QSort&#039;&#039;&#039;&#039;&#039;&amp;lt;math&amp;gt;(L)&amp;lt;/math&amp;gt;和&#039;&#039;&#039;&#039;&#039;QSort&#039;&#039;&#039;&#039;&#039;&amp;lt;math&amp;gt;(R)&amp;lt;/math&amp;gt;各自所使用的总比较次数分别为&amp;lt;math&amp;gt;X_{i-1}&amp;lt;/math&amp;gt;和&amp;lt;math&amp;gt;X_{n-i}&amp;lt;/math&amp;gt;。&lt;br /&gt;
综上所述，有如下恒等关系：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\mathbb{E}[X_n\mid B_i]&lt;br /&gt;
=&lt;br /&gt;
\mathbb{E}[n-1+X_{i-1}+X_{n-i}]&lt;br /&gt;
&amp;lt;/math&amp;gt;.&lt;br /&gt;
因此，上述全期望因此可被计算如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
t(n)&lt;br /&gt;
=&lt;br /&gt;
\mathbb{E}[X_n]&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{1}{n}\sum_{i=1}^n\mathbb{E}[X_n\mid B_i]\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{1}{n}\sum_{i=1}^n\mathbb{E}[n-1+X_{i-1}+X_{n-i}]\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
n-1+\frac{2}{n}\sum_{i=0}^{n-1}\mathbb{E}[X_{i}] &amp;amp;\text{(根据期望的线性)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
n-1+\frac{2}{n}\sum_{i=0}^{n-1}t(i).&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
我们因此建立了平均复杂度&amp;lt;math&amp;gt;t(n)=\mathbb{E}[X_n]&amp;lt;/math&amp;gt;的如下递归式：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
t(n)&lt;br /&gt;
&amp;amp;= &lt;br /&gt;
n-1+\frac{2}{n}\sum_{i=0}^{n-1}t(i)&lt;br /&gt;
&amp;amp;&amp;amp; &lt;br /&gt;
\text{if }n&amp;gt;1;\\&lt;br /&gt;
t(n)&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
0&lt;br /&gt;
&amp;amp;&amp;amp;&lt;br /&gt;
\text{if }0\le n\le 1.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
我们有若干种方法从这一递归式获得关于&amp;lt;math&amp;gt;t(n)=\mathbb{E}[X_n]&amp;lt;/math&amp;gt;的真相：&lt;br /&gt;
* 一种是使用&#039;&#039;&#039;生成函数&#039;&#039;&#039;等工具来求解这样的递归方程，例如使用[[组合数学_(Fall_2025)/Generating_functions#Analysis_of_Quicksort|&#039;&#039;&#039;本学期组合数学课上的分析&#039;&#039;&#039;]]，最终可精确解出&amp;lt;math&amp;gt;t(n)=2(n+1)H(n)-4n&amp;lt;/math&amp;gt;，此处&amp;lt;math&amp;gt;H(n)=\sum_{k=1}^{n}\frac{1}{k}= \ln n+O(1)&amp;lt;/math&amp;gt;为第&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;个[https://en.wikipedia.org/wiki/Harmonic_number 调和数]；&lt;br /&gt;
* 另一种是采用&#039;&#039;&#039;数学归纳法&#039;&#039;&#039;来对我们猜想的关于&amp;lt;math&amp;gt;t(n)&amp;lt;/math&amp;gt;的界进行验证，例如从&amp;lt;math&amp;gt;t(n)\le c n \ln n&amp;lt;/math&amp;gt;的归纳假设出发，尝试使&amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;尽量小。令该归纳假设对于所有&amp;lt;math&amp;gt;0\le i&amp;lt;n&amp;lt;/math&amp;gt;都成立，则对于&amp;lt;math&amp;gt;t(n)&amp;lt;/math&amp;gt;，根据递归式因此有：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
t(n)&lt;br /&gt;
&amp;amp;= &lt;br /&gt;
n-1+\frac{2}{n}\sum_{i=0}^{n-1}t(i)\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
n-1+\frac{2c}{n}\sum_{i=1}^{n-1}i \ln i &amp;amp;&amp;amp;\text{(归纳假设)}\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
n-1+\frac{2c}{n}\int_{1}^nx \ln x\,\mathrm{d}x &amp;amp;&amp;amp;\text{(求和的积分上界)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
n-1+\frac{c}{2n}\left(2n^2\ln n-n^2+1\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
cn\ln n-\left(\frac{c}{2}-1\right)n-1+\frac{c}{2n}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
设&amp;lt;math&amp;gt;c=2&amp;lt;/math&amp;gt;时，有&amp;lt;math&amp;gt;t(n)\le cn\ln n-\left(\frac{c}{2}-1\right)n-1+\frac{c}{2n}\le 2 n \ln n&amp;lt;/math&amp;gt;对于所有&amp;lt;math&amp;gt;n\ge 1&amp;lt;/math&amp;gt;总是成立。&lt;br /&gt;
&lt;br /&gt;
= 快速排序算法的平均复杂度分析 II（基于期望的线性）=&lt;br /&gt;
令随机变量&amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;表示在随机输入&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;下，快速排序算法使用的总比较次数。我们希望分析得到期望&amp;lt;math&amp;gt;\mathbb{E}[X]&amp;lt;/math&amp;gt;的上界。&lt;br /&gt;
&lt;br /&gt;
假设输入数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;中的元素，在从小到大排序之后为&amp;lt;math&amp;gt;a_1&amp;lt;a_2&amp;lt;\cdots a_n&amp;lt;/math&amp;gt;。&lt;br /&gt;
对&amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt;，令布尔值随机变量&amp;lt;math&amp;gt;I_{ij}=I(A_{ij})\in\{0,1\}&amp;lt;/math&amp;gt;指示如下事件的发生：&lt;br /&gt;
* &amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;：元素&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;和&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;在算法运行过程中被比较了。&lt;br /&gt;
&lt;br /&gt;
容易验证：在算法运行过程中，任何元素对&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;和&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;之间至多只会进行一次比较。&lt;br /&gt;
因此总比较次数&amp;lt;math&amp;gt;X&amp;lt;/math&amp;gt;可被计算如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;X=\sum_{i&amp;lt;j}I_{ij}&amp;lt;/math&amp;gt;.&lt;br /&gt;
根据&#039;&#039;&#039;期望的线性&#039;&#039;&#039;（&#039;&#039;&#039;linearity of expectation&#039;&#039;&#039;）：&lt;br /&gt;
:&amp;lt;math&amp;gt;\mathbb{E}[X]=\sum_{i&amp;lt;j}\mathbb{E}[I_{ij}]=\sum_{i&amp;lt;j}\Pr(A_{ij})&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
因此接下来，仅需要针对每一对具体的&amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt;，计算概率：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr(A_{ij})=\Pr(a_i\text{和}a_j\text{在算法中进行了比较})&amp;lt;/math&amp;gt;.&lt;br /&gt;
而事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;发生，当且仅当：在&#039;&#039;&#039;某次&#039;&#039;&#039;递归调用中，&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;同属于当前输入数组，且&#039;&#039;&#039;pivot&#039;&#039;&#039;恰好选中&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;或&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;二者之一。&lt;br /&gt;
注意到：假如&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;同属于当前输入数组，则当前数组必然也同时包含它们之间的所有元素&amp;lt;math&amp;gt;\{a_k\mid i&amp;lt;k&amp;lt;j\}&amp;lt;/math&amp;gt;；&lt;br /&gt;
同时，事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;的发生与否，仅当&#039;&#039;&#039;首次&#039;&#039;&#039;在某递归调用中&#039;&#039;&#039;pivot&#039;&#039;&#039;选中了&amp;lt;math&amp;gt;\{a_k\mid i\le k\le j\}&amp;lt;/math&amp;gt;中的元素，才会确定。&lt;br /&gt;
综上，于是有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr(A_{ij})=\Pr(\mathsf{pivot}\in\{a_i,a_j\}\mid\mathsf{pivot}\in\{a_i,a_{i+1},\ldots,a_{j}\})=\frac{2}{j-i+1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|如果你认为该证明不够详细。这里再提供一个对于上述事实的详细证明。&lt;br /&gt;
&lt;br /&gt;
定下任意一对具体的&amp;lt;math&amp;gt;1\le i&amp;lt;j\le n&amp;lt;/math&amp;gt;。&lt;br /&gt;
在算法运行之初（顶层递归调用），元素&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;显然有&amp;lt;math&amp;gt;a_i&amp;lt;a_j&amp;lt;/math&amp;gt;，且同属于当前递归调用的输入数组&amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;的发生与否，由如下的递归随机过程确定：&lt;br /&gt;
# 在当前输入元素中按均匀分布随机选择&#039;&#039;&#039;pivot&#039;&#039;&#039;元素。如果刚好选中&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;或&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;二者之一，那么&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;之间必被比较（因为&#039;&#039;&#039;pivot&#039;&#039;&#039;会与当前数组内的所有元素进行比较）。此情况下，事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;确定发生。&lt;br /&gt;
# 如果&amp;lt;math&amp;gt;a_i&amp;lt;&amp;lt;/math&amp;gt;&#039;&#039;&#039;pivot&#039;&#039;&#039;&amp;lt;math&amp;gt;&amp;lt;a_j&amp;lt;/math&amp;gt;，即&#039;&#039;&#039;pivot&#039;&#039;&#039;取值在&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;之间，此时&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;会被大小居于其中间的&#039;&#039;&#039;pivot&#039;&#039;&#039;元素分别分流到子数组&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;中，且在之后的递归调用中永不再见，因此不会被比较。此情况下，事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;确定不发生。&lt;br /&gt;
# 如果&#039;&#039;&#039;pivot&#039;&#039;&#039;选中了比&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;更小或者比&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;更大的元素，在此情况下&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;，连同它们之间的所有元素&amp;lt;math&amp;gt;\{a_k\mid i&amp;lt;k&amp;lt;j\}&amp;lt;/math&amp;gt;，都会被分到同一个子数组&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;（假如&#039;&#039;&#039;pivot&#039;&#039;&#039;&amp;lt;math&amp;gt;&amp;gt;a_j&amp;lt;/math&amp;gt;）或者&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;（假如&#039;&#039;&#039;pivot&#039;&#039;&#039;&amp;lt;math&amp;gt;&amp;lt;a_i&amp;lt;/math&amp;gt;）中。而此时&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;的发生与否尚未能在这一层递归调用中确定，则需进入下一层递归调用，将当前输入数组改为&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;所同属的那个子数组（即&amp;lt;math&amp;gt;L&amp;lt;/math&amp;gt;如果&#039;&#039;&#039;pivot&#039;&#039;&#039;&amp;lt;math&amp;gt;&amp;gt;a_j&amp;lt;/math&amp;gt;，&amp;lt;math&amp;gt;R&amp;lt;/math&amp;gt;如果&#039;&#039;&#039;pivot&#039;&#039;&#039;&amp;lt;math&amp;gt;&amp;lt;a_i&amp;lt;/math&amp;gt;），然后回到（1）重复。&lt;br /&gt;
不难看出该递归过程跟踪模拟了事件&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;的发生与否，在快速排序算法的递归调用过程中，是如何被确定下来的。&lt;br /&gt;
&lt;br /&gt;
因此，可以得出：&amp;lt;math&amp;gt;A_{ij}&amp;lt;/math&amp;gt;发生，当且仅当在上述情况（1）或（2）之一发生的前提下有（1）发生。&lt;br /&gt;
&lt;br /&gt;
除此之外，如下两个观察通过递归验证易得：&lt;br /&gt;
* 当&amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt;与&amp;lt;math&amp;gt;a_j&amp;lt;/math&amp;gt;同属于当前递归调用的输入数组时，它们之间的所有元素&amp;lt;math&amp;gt;\{a_k\mid i&amp;lt;k&amp;lt;j\}&amp;lt;/math&amp;gt;也属于该数组；&lt;br /&gt;
* 在任何递归调用中，&#039;&#039;&#039;pivot&#039;&#039;&#039;始终在当前输入数组中均匀分布——这也可由&#039;&#039;&#039;性质一&#039;&#039;&#039;所述的输入分布的递归不变性得到。&lt;br /&gt;
综上可得：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr(A_{ij})=\Pr(\mathsf{pivot}\in\{a_i,a_j\}\mid\mathsf{pivot}\in\{a_i,a_{i+1},\ldots,a_{j}\})=\frac{2}{j-i+1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
算法总比较次数的期望&amp;lt;math&amp;gt;\mathbb{E}[X]&amp;lt;/math&amp;gt;可被计算如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\mathbb{E}\left[X\right] &lt;br /&gt;
&amp;amp;= &lt;br /&gt;
\sum_{i&amp;lt;j}\Pr(A_{ij})\\&lt;br /&gt;
&amp;amp;=\sum_{i=1}^{n-1}\sum_{j=i+1}^n\frac{2}{j-i+1}\\&lt;br /&gt;
&amp;amp;= \sum_{i=1}^{n-1}\sum_{k=2}^{n-i+1}\frac{2}{k} &amp;amp; &amp;amp; (\text{令 }k=j-i+1)\\&lt;br /&gt;
&amp;amp;\le \sum_{i=1}^n\sum_{k=1}^{n}\frac{2}{k}\\&lt;br /&gt;
&amp;amp;= 2n\sum_{k=1}^{n}\frac{1}{k}\\&lt;br /&gt;
&amp;amp;= 2n H(n).&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
此处&amp;lt;math&amp;gt;H(n)=\sum_{k=1}^{n}\frac{1}{k}= \ln n+O(1)&amp;lt;/math&amp;gt;为第&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;个[http://en.wikipedia.org/wiki/Harmonic_number 调和数]。&lt;br /&gt;
&lt;br /&gt;
如果更加仔细一些，我们甚至可以计算出总比较次数期望&amp;lt;math&amp;gt;\mathbb{E}[X]&amp;lt;/math&amp;gt;的精确值：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\mathbb{E}\left[X\right] &lt;br /&gt;
&amp;amp;= &lt;br /&gt;
\sum_{i=1}^{n-1}\sum_{k=2}^{n-i+1}\frac{2}{k}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{j=2}^n\sum_{k=2}^{j}\frac{2}{k} &amp;amp;&amp;amp; \text{(令$j=n-i+1$)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k=2}^{n}\frac{2(n-k+1)}{k} &amp;amp;&amp;amp; \text{(交换求和顺序)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k=2}^{n}\left(\frac{2(n+1)}{k}-2\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
2(n+1)\sum_{k=2}^{n}\frac{1}{k}-2(n-1)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
2(n+1)\sum_{k=1}^{n}\frac{1}{k}-4n\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
2(n+1)H(n)-4n.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13616</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13616"/>
		<updated>2026-04-08T08:38:17Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 1|Problem Set 1]]  请在 2026/4/1 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A1.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
** [[概率论与数理统计 (Spring 2026)/第一次作业提交名单|第一次作业提交名单]]&lt;br /&gt;
&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 2|Problem Set 2]]  请在 2026/4/&amp;lt;font color=red&amp;gt;TBA&amp;lt;/font&amp;gt; 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A2.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls|Entropy and volume of Hamming balls]]&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Karger&#039;s min-cut algorithm| Karger&#039;s min-cut algorithm]]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/RandVar.pdf 随机变量]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第2章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 2, Sections 3.1~3.5, 3.7&#039;&#039;&#039;&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[MU] Chapter 2&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Average-case analysis of QuickSort|Average-case analysis of &#039;&#039;&#039;&#039;&#039;QuickSort&#039;&#039;&#039;&#039;&#039;]]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [https://plato.stanford.edu/entries/probability-interpret/ Interpretations of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/History_of_probability History of probability]&lt;br /&gt;
* Example problems:&lt;br /&gt;
** [https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf von Neumann&#039;s Bernoulli factory] and other [https://peteroupc.github.io/bernoulli.html Bernoulli factory algorithms]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boy_or_Girl_paradox Boy or Girl paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) Bertrand paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hard_spheres Hard spheres model] and [https://en.wikipedia.org/wiki/Ising_model Ising model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/PageRank &#039;&#039;PageRank&#039;&#039;] and stationary [https://en.wikipedia.org/wiki/Random_walk random walk]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Diffusion_process Diffusion process] and [https://en.wikipedia.org/wiki/Diffusion_model diffusion model]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Probability_space Probability space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sample_space Sample space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Event_(probability_theory) Event] and [https://en.wikipedia.org/wiki/Σ-algebra &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;-algebra]&lt;br /&gt;
** Kolmogorov&#039;s [https://en.wikipedia.org/wiki/Probability_axioms axioms of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Classical] and [https://en.wikipedia.org/wiki/Geometric_probability goemetric probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Boole%27s_inequality Union bound]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle Inclusion-Exclusion principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boole%27s_inequality#Bonferroni_inequalities Bonferroni inequalities]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Conditional_probability Conditional probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Chain_rule_(probability) Chain rule]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_probability Law of total probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bayes%27_theorem Bayes&#039; law]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Independence_(probability_theory) Independence] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Pairwise_independence Pairwise independence]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Random_variable Random variable]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cumulative_distribution_function Cumulative distribution function]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Probability_mass_function Probability mass function]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Probability_density_function Probability density function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Multivariate_random_variable Random vector]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Joint_probability_distribution Joint probability distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Conditional_probability_distribution Conditional probability distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Marginal_distribution Marginal distribution]&lt;br /&gt;
* Some &#039;&#039;&#039;discrete&#039;&#039;&#039; probability distributions&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bernoulli_trial Bernoulli trial] and [https://en.wikipedia.org/wiki/Bernoulli_distribution Bernoulli distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Discrete uniform distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Binomial_distribution Binomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Geometric_distribution Geometric distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Negative_binomial_distribution Negative binomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hypergeometric_distribution Hypergeometric distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Poisson_distribution Poisson distribution]&lt;br /&gt;
** and [https://en.wikipedia.org/wiki/List_of_probability_distributions#Discrete_distributions others]&lt;br /&gt;
* Balls into bins model&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Multinomial_distribution Multinomial distribution]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Birthday_problem Birthday problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Coupon_collector%27s_problem Coupon collector]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Balls_into_bins_problem Occupancy problem]&lt;br /&gt;
* Random graphs&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi random graph model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Galton%E2%80%93Watson_process Galton–Watson branching process]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Expected_value Expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_the_unconscious_statistician Law of the unconscious statistician, &#039;&#039;LOTUS&#039;&#039;]&lt;br /&gt;
** [https://dlsun.github.io/probability/linearity.html Linearity of expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Conditional_expectation Conditional expectation]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_expectation Law of total expectation]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Sieve_methods&amp;diff=13580</id>
		<title>组合数学 (Fall 2026)/Sieve methods</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Fall_2026)/Sieve_methods&amp;diff=13580"/>
		<updated>2026-03-30T17:21:03Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Principle of Inclusion-Exclusion == Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be two finite sets. The cardinality of their union is :&amp;lt;math&amp;gt;|A\cup B|=|A|+|B|-{\color{Blue}|A\cap B|}&amp;lt;/math&amp;gt;. For three sets &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, the cardinality of the union of these three sets is computed as :&amp;lt;math&amp;gt;|A\cup B\cup C|=|A|+|B|+|C|-{\color{Blue}|A\cap B|}-{\color{Blue}|A\cap C|}-{\color{Blue}|B\cap C|}+{\color{Red}|A\cap B\cap C|}&amp;lt;/math&amp;gt;. This is illu...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Principle of Inclusion-Exclusion ==&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be two finite sets. The cardinality of their union is&lt;br /&gt;
:&amp;lt;math&amp;gt;|A\cup B|=|A|+|B|-{\color{Blue}|A\cap B|}&amp;lt;/math&amp;gt;.&lt;br /&gt;
For three sets &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;, the cardinality of the union of these three sets is computed as&lt;br /&gt;
:&amp;lt;math&amp;gt;|A\cup B\cup C|=|A|+|B|+|C|-{\color{Blue}|A\cap B|}-{\color{Blue}|A\cap C|}-{\color{Blue}|B\cap C|}+{\color{Red}|A\cap B\cap C|}&amp;lt;/math&amp;gt;.&lt;br /&gt;
This is illustrated by the following figure.&lt;br /&gt;
::[[Image:Inclusion-exclusion.png|200px|border|center]] &lt;br /&gt;
&lt;br /&gt;
Generally, the &#039;&#039;&#039;Principle of Inclusion-Exclusion&#039;&#039;&#039; states the rule for computing the union of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; finite sets &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt;, such that&lt;br /&gt;
{{Equation|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\left|\bigcup_{i=1}^nA_i\right|&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{I\subseteq\{1,\ldots,n\}}(-1)^{|I|-1}\left|\bigcap_{i\in I}A_i\right|.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
In combinatorial enumeration, the Principle of Inclusion-Exclusion is usually applied in its complement form.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n\subseteq U&amp;lt;/math&amp;gt; be subsets of some finite set &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt;. Here &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; is some universe of combinatorial objects, whose cardinality is easy to calculate (e.g. all strings, tuples, permutations), and each &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; contains the objects with some specific property (e.g. a &amp;quot;pattern&amp;quot;) which we want to avoid. The problem is to count the number of objects without any of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; properties. We write &amp;lt;math&amp;gt;\bar{A_i}=U-A_i&amp;lt;/math&amp;gt;. The number of objects without any of the properties &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; is&lt;br /&gt;
{{Equation|&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\left|\bar{A_1}\cap\bar{A_2}\cap\cdots\cap\bar{A_n}\right|=\left|U-\bigcup_{i=1}^nA_i\right|&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
|U|+\sum_{I\subseteq\{1,\ldots,n\}}(-1)^{|I|}\left|\bigcap_{i\in I}A_i\right|.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
For an &amp;lt;math&amp;gt;I\subseteq\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, we denote&lt;br /&gt;
:&amp;lt;math&amp;gt;A_I=\bigcap_{i\in I}A_i&amp;lt;/math&amp;gt;&lt;br /&gt;
with the convention that &amp;lt;math&amp;gt;A_\emptyset=U&amp;lt;/math&amp;gt;. The above equation is stated as:&lt;br /&gt;
{{Theorem|Principle of Inclusion-Exclusion|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt; be a family of subsets of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt;. Then the number of elements of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; which lie in none of the subsets &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; is&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{I\subseteq\{1,\ldots, n\}}(-1)^{|I|}|A_I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;S_k=\sum_{|I|=k}|A_I|\,&amp;lt;/math&amp;gt;. Conventionally, &amp;lt;math&amp;gt;S_0=|A_\emptyset|=|U|&amp;lt;/math&amp;gt;. The principle of inclusion-exclusion can be expressed as&lt;br /&gt;
{{Equation|&amp;lt;math&amp;gt;&lt;br /&gt;
\left|\bar{A_1}\cap\bar{A_2}\cap\cdots\cap\bar{A_n}\right|=&lt;br /&gt;
S_0-S_1+S_2+\cdots+(-1)^nS_n.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Surjections ===&lt;br /&gt;
In the twelvefold way, we discuss the counting problems incurred by the mappings &amp;lt;math&amp;gt;f:N\rightarrow M&amp;lt;/math&amp;gt;. The basic case is that elements from both &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; are distinguishable. In this case, it is easy to count the number of arbitrary mappings (which is &amp;lt;math&amp;gt;m^n&amp;lt;/math&amp;gt;) and the number of injective (one-to-one) mappings (which is &amp;lt;math&amp;gt;(m)_n&amp;lt;/math&amp;gt;), but the number of surjective is difficult. Here we apply the principle of inclusion-exclusion to count the number of surjective (onto) mappings.&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:The number of surjective mappings from an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set to an &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-set is given by&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{k=1}^m(-1)^{m-k}{m\choose k}k^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;U=\{f:[n]\rightarrow[m]\}&amp;lt;/math&amp;gt; be the set of mappings from &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;|U|=m^n&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
For &amp;lt;math&amp;gt;i\in[m]&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; be the set of mappings &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt; that none of &amp;lt;math&amp;gt;j\in[n]&amp;lt;/math&amp;gt; is mapped to &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;, i.e. &amp;lt;math&amp;gt;A_i=\{f:[n]\rightarrow[m]\setminus\{i\}\}&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;|A_i|=(m-1)^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
More generally, for &amp;lt;math&amp;gt;I\subseteq [m]&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A_I=\bigcap_{i\in I}A_i&amp;lt;/math&amp;gt; contains the mappings &amp;lt;math&amp;gt;f:[n]\rightarrow[m]\setminus I&amp;lt;/math&amp;gt;. And &amp;lt;math&amp;gt;|A_I|=(m-|I|)^n\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A mapping &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt; is surjective if &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; lies in none of &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt;. By the principle of inclusion-exclusion, the number of surjective &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt; is&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{I\subseteq[m]}(-1)^{|I|}\left|A_I\right|=\sum_{I\subseteq[m]}(-1)^{|I|}(m-|I|)^n=\sum_{j=0}^m(-1)^j{m\choose j}(m-j)^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
Let &amp;lt;math&amp;gt;k=m-j&amp;lt;/math&amp;gt;. The theorem is proved.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Recall that, in the twelvefold way, we establish a relation between surjections and partitions.&lt;br /&gt;
&lt;br /&gt;
* Surjection to ordered partition:&lt;br /&gt;
:For a surjective &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(f^{-1}(0),f^{-1}(1),\ldots,f^{-1}(m-1))&amp;lt;/math&amp;gt; is an &#039;&#039;&#039;ordered partition&#039;&#039;&#039; of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Ordered partition to surjection:&lt;br /&gt;
:For an ordered &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-partition &amp;lt;math&amp;gt;(B_0,B_1,\ldots, B_{m-1})&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;, we can define a function &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt; by letting &amp;lt;math&amp;gt;f(i)=j&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;i\in B_j&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is surjective since as a partition, none of &amp;lt;math&amp;gt;B_i&amp;lt;/math&amp;gt; is empty.&lt;br /&gt;
&lt;br /&gt;
Therefore, we have a one-to-one correspondence between surjective mappings from an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set to an &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-set and the ordered &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-partitions of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set.&lt;br /&gt;
&lt;br /&gt;
The Stirling number of the second kind &amp;lt;math&amp;gt;\left\{{n\atop m}\right\}&amp;lt;/math&amp;gt; is the number of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-partitions of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. There are &amp;lt;math&amp;gt;m!&amp;lt;/math&amp;gt; ways to order an &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-partition, thus the number of surjective mappings &amp;lt;math&amp;gt;f:[n]\rightarrow[m]&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;m! \left\{{n\atop m}\right\}&amp;lt;/math&amp;gt;. Combining with what we have proved for surjections, we give the following result for the Stirling number of the second kind.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:&amp;lt;math&amp;gt;\left\{{n\atop m}\right\}=\frac{1}{m!}\sum_{k=1}^m(-1)^{m-k}{m\choose k}k^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Derangements ===&lt;br /&gt;
We now count the number of bijections from a set to itself with no fixed points. This is the &#039;&#039;&#039;derangement problem&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
For a permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, a &#039;&#039;&#039;fixed point&#039;&#039;&#039; is such an &amp;lt;math&amp;gt;i\in\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;\pi(i)=i&amp;lt;/math&amp;gt;.&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Derangement &#039;&#039;&#039;derangement&#039;&#039;&#039;] of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; is a permutation of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; that has no fixed points.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:The number of derangements of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; given by&lt;br /&gt;
::&amp;lt;math&amp;gt;n!\sum_{k=0}^n\frac{(-1)^k}{k!}\approx \frac{n!}{\mathrm{e}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; be the set of all permutations of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;. So &amp;lt;math&amp;gt;|U|=n!&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; be the set of permutations with fixed point &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;; so &amp;lt;math&amp;gt;|A_i|=(n-1)!&amp;lt;/math&amp;gt;. More generally, for any &amp;lt;math&amp;gt;I\subseteq \{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;A_I=\bigcap_{i\in I}A_i&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;|A_I|=(n-|I|)!&amp;lt;/math&amp;gt;, since permutations in &amp;lt;math&amp;gt;A_I&amp;lt;/math&amp;gt; fix every point in &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; and permute the remaining points arbitrarily. A permutation is a derangement if and only if it lies in none of the sets &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt;. So the number of derangements is&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{I\subseteq\{1,2,\ldots,n\}}(-1)^{|I|}(n-|I|)!=\sum_{k=0}^n(-1)^k{n\choose k}(n-k)!=n!\sum_{k=0}^n\frac{(-1)^k}{k!}.&amp;lt;/math&amp;gt;&lt;br /&gt;
By Taylor&#039;s series,&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{\mathrm{e}}=\sum_{k=0}^\infty\frac{(-1)^k}{k!}=\sum_{k=0}^n\frac{(-1)^k}{k!}\pm o\left(\frac{1}{n!}\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is not hard to see that &amp;lt;math&amp;gt;n!\sum_{k=0}^n\frac{(-1)^k}{k!}&amp;lt;/math&amp;gt; is the closest integer to &amp;lt;math&amp;gt;\frac{n!}{\mathrm{e}}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Therefore, there are about &amp;lt;math&amp;gt;\frac{1}{\mathrm{e}}&amp;lt;/math&amp;gt; fraction of all permutations with no fixed points.&lt;br /&gt;
&lt;br /&gt;
=== Permutations with restricted positions ===&lt;br /&gt;
We introduce a general theory of counting permutations with restricted positions. In the derangement problem, we count the number of permutations that &amp;lt;math&amp;gt;\pi(i)\neq i&amp;lt;/math&amp;gt;. We now generalize to the problem of counting permutations which avoid a set of arbitrarily specified positions. &lt;br /&gt;
&lt;br /&gt;
It is traditionally described using terminology from the game of chess. Let &amp;lt;math&amp;gt;B\subseteq \{1,\ldots,n\}\times \{1,\ldots,n\}&amp;lt;/math&amp;gt;, called a &#039;&#039;&#039;board&#039;&#039;&#039;.  As illustrated below, we can think of &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; as a chess board, with the positions in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; marked by &amp;quot;&amp;lt;math&amp;gt;\times&amp;lt;/math&amp;gt;&amp;quot;.&lt;br /&gt;
{{Chess diagram small&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|=&lt;br /&gt;
 8 |__|xx|xx|__|xx|__|__|xx|=&lt;br /&gt;
 7 |xx|__|__|xx|__|__|xx|__|=&lt;br /&gt;
 6 |xx|__|xx|xx|__|xx|xx|__|=&lt;br /&gt;
 5 |__|xx|__|__|xx|__|xx|__|=&lt;br /&gt;
 4 |xx|__|__|__|xx|xx|xx|__|=&lt;br /&gt;
 3 |__|xx|__|xx|__|__|__|xx|=&lt;br /&gt;
 2 |__|__|xx|__|xx|__|__|xx|=&lt;br /&gt;
 1 |xx|__|__|xx|__|xx|__|__|=&lt;br /&gt;
 a b c d e f g h&lt;br /&gt;
|&lt;br /&gt;
}}&lt;br /&gt;
For a permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;\{1,\ldots,n\}&amp;lt;/math&amp;gt;, define the &#039;&#039;&#039;graph&#039;&#039;&#039; &amp;lt;math&amp;gt;G_\pi(V,E)&amp;lt;/math&amp;gt; as&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G_\pi &amp;amp;= \{(i,\pi(i))\mid i\in \{1,2,\ldots,n\}\}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
This can also be viewed as a set of marked positions on a chess board. Each row and each column has only one marked position, because &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; is a permutation. Thus, we can identify each &amp;lt;math&amp;gt;G_\pi&amp;lt;/math&amp;gt; as a placement of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; rooks (“城堡”，规则同中国象棋里的“车”) without attacking each other.&lt;br /&gt;
&lt;br /&gt;
For example, the following is the &amp;lt;math&amp;gt;G_\pi&amp;lt;/math&amp;gt; of such &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;\pi(i)=i&amp;lt;/math&amp;gt;.&lt;br /&gt;
{{Chess diagram small&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|=&lt;br /&gt;
 8 |rl|__|__|__|__|__|__|__|=&lt;br /&gt;
 7 |__|rl|__|__|__|__|__|__|=&lt;br /&gt;
 6 |__|__|rl|__|__|__|__|__|=&lt;br /&gt;
 5 |__|__|__|rl|__|__|__|__|=&lt;br /&gt;
 4 |__|__|__|__|rl|__|__|__|=&lt;br /&gt;
 3 |__|__|__|__|__|rl|__|__|=&lt;br /&gt;
 2 |__|__|__|__|__|__|rl|__|=&lt;br /&gt;
 1 |__|__|__|__|__|__|__|rl|=&lt;br /&gt;
 a b c d e f g h&lt;br /&gt;
|&lt;br /&gt;
}}&lt;br /&gt;
Now define&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
N_0 &amp;amp;= \left|\left\{\pi\mid B\cap G_\pi=\emptyset\right\}\right|\\&lt;br /&gt;
r_k &amp;amp;= \mbox{number of }k\mbox{-subsets of }B\mbox{ such that no two elements have a common coordinate}\\&lt;br /&gt;
&amp;amp;=\left|\left\{S\in{B\choose k} \,\bigg|\, \forall (i_1,j_1),(i_2,j_2)\in S, i_1\neq i_2, j_1\neq j_2 \right\}\right|&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Interpreted in chess game,&lt;br /&gt;
* &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;: a set of marked positions in an &amp;lt;math&amp;gt;[n]\times [n]&amp;lt;/math&amp;gt; chess board.&lt;br /&gt;
* &amp;lt;math&amp;gt;N_0&amp;lt;/math&amp;gt;: the number of ways of placing &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; non-attacking rooks on the chess board such that none of these rooks lie in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;r_k&amp;lt;/math&amp;gt;: number of ways of placing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-attacking rooks on &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Our goal is to count &amp;lt;math&amp;gt;N_0&amp;lt;/math&amp;gt; in terms of &amp;lt;math&amp;gt;r_k&amp;lt;/math&amp;gt;. This gives the number of permutations avoid all positions in a &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;N_0=\sum_{k=0}^n(-1)^kr_k(n-k)!&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
For each &amp;lt;math&amp;gt;i\in[n]&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;A_i=\{\pi\mid (i,\pi(i))\in B\}&amp;lt;/math&amp;gt; be the set of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; whose &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th position is in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;N_0&amp;lt;/math&amp;gt; is the number of permutations avoid all positions in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. Thus, our goal is to count the number of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; in none of &amp;lt;math&amp;gt;A_i&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;i\in [n]&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For each &amp;lt;math&amp;gt;I\subseteq [n]&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;A_I=\bigcap_{i\in I}A_i&amp;lt;/math&amp;gt;, which is the set of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;(i,\pi(i))\in B&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;i\in I&amp;lt;/math&amp;gt;. Due to the principle of inclusion-exclusion,&lt;br /&gt;
:&amp;lt;math&amp;gt;N_0=\sum_{I\subseteq [n]} (-1)^{|I|}|A_I|=\sum_{k=0}^n(-1)^k\sum_{I\in{[n]\choose k}}|A_I|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next observation is that &lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{I\in{[n]\choose k}}|A_I|=r_k(n-k)!&amp;lt;/math&amp;gt;,&lt;br /&gt;
because we can count both sides by first placing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-attacking rooks on &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; and placing &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; additional non-attacking rooks on &amp;lt;math&amp;gt;[n]\times [n]&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;(n-k)!&amp;lt;/math&amp;gt; ways. &lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;N_0=\sum_{k=0}^n(-1)^kr_k(n-k)!&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Derangement problem====&lt;br /&gt;
We use the above general method to solve the derange problem again.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;B=\{(1,1),(2,2),\ldots,(n,n)\}&amp;lt;/math&amp;gt; as the chess board.  A derangement &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; is a placement of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; non-attacking rooks such that none of them is in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. &lt;br /&gt;
{{Chess diagram small&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|=&lt;br /&gt;
 8 |xx|__|__|__|__|__|__|__|=&lt;br /&gt;
 7 |__|xx|__|__|__|__|__|__|=&lt;br /&gt;
 6 |__|__|xx|__|__|__|__|__|=&lt;br /&gt;
 5 |__|__|__|xx|__|__|__|__|=&lt;br /&gt;
 4 |__|__|__|__|xx|__|__|__|=&lt;br /&gt;
 3 |__|__|__|__|__|xx|__|__|=&lt;br /&gt;
 2 |__|__|__|__|__|__|xx|__|=&lt;br /&gt;
 1 |__|__|__|__|__|__|__|xx|=&lt;br /&gt;
 a b c d e f g h&lt;br /&gt;
|&lt;br /&gt;
}}&lt;br /&gt;
Clearly, the number of ways of placing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-attacking rooks on &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;r_k={n\choose k}&amp;lt;/math&amp;gt;. We want to count &amp;lt;math&amp;gt;N_0&amp;lt;/math&amp;gt;, which gives the number of ways of placing &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; non-attacking rooks such that none of these rooks lie in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By the above theorem&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
N_0=\sum_{k=0}^n(-1)^kr_k(n-k)!=\sum_{k=0}^n(-1)^k{n\choose k}(n-k)!=\sum_{k=0}^n(-1)^k\frac{n!}{k!}=n!\sum_{k=0}^n(-1)^k\frac{1}{k!}\approx\frac{n!}{e}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Problème des ménages====&lt;br /&gt;
Suppose that in a banquet, we want to seat &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; couples at a circular table, satisfying the following constraints:&lt;br /&gt;
* Men and women are in alternate places.&lt;br /&gt;
* No one sits next to his/her spouse.&lt;br /&gt;
&lt;br /&gt;
In how many ways can this be done?&lt;br /&gt;
&lt;br /&gt;
(For convenience, we assume that every seat at the table marked differently so that rotating the seats clockwise or anti-clockwise will end up with a &#039;&#039;&#039;different&#039;&#039;&#039; solution.)&lt;br /&gt;
&lt;br /&gt;
First, let the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; ladies find their seats. They may either sit at the odd numbered seats or even numbered seats, in either case, there are &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt; different orders. Thus, there are &amp;lt;math&amp;gt;2(n!)&amp;lt;/math&amp;gt; ways to seat the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; ladies.&lt;br /&gt;
&lt;br /&gt;
After sitting the wives, we label the remaining &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; places clockwise as &amp;lt;math&amp;gt;0,1,\ldots, n-1&amp;lt;/math&amp;gt;. And a seating of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; husbands is given by a permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; defined as follows. Let &amp;lt;math&amp;gt;\pi(i)&amp;lt;/math&amp;gt; be the seat of the husband of he lady sitting at the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th place.&lt;br /&gt;
&lt;br /&gt;
It is easy to see that &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; satisfies that &amp;lt;math&amp;gt;\pi(i)\neq i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\pi(i)\not\equiv i+1\pmod n&amp;lt;/math&amp;gt;, and every permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; with these properties gives a feasible seating of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; husbands. Thus, we only need to count the number of permutations &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;\pi(i)\not\equiv i, i+1\pmod n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Take &amp;lt;math&amp;gt;B=\{(0,0),(1,1),\ldots,(n-1,n-1), (0,1),(1,2),\ldots,(n-2,n-1),(n-1,0)\}&amp;lt;/math&amp;gt; as the chess board.  A permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; which defines a way of seating the husbands, is a placement of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; non-attacking rooks such that none of them is in &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. &lt;br /&gt;
{{Chess diagram small&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|=&lt;br /&gt;
 8 |xx|xx|__|__|__|__|__|__|=&lt;br /&gt;
 7 |__|xx|xx|__|__|__|__|__|=&lt;br /&gt;
 6 |__|__|xx|xx|__|__|__|__|=&lt;br /&gt;
 5 |__|__|__|xx|xx|__|__|__|=&lt;br /&gt;
 4 |__|__|__|__|xx|xx|__|__|=&lt;br /&gt;
 3 |__|__|__|__|__|xx|xx|__|=&lt;br /&gt;
 2 |__|__|__|__|__|__|xx|xx|=&lt;br /&gt;
 1 |xx|__|__|__|__|__|__|xx|=&lt;br /&gt;
 a b c d e f g h&lt;br /&gt;
|&lt;br /&gt;
}}&lt;br /&gt;
We need to compute &amp;lt;math&amp;gt;r_k&amp;lt;/math&amp;gt;, the number of ways of placing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-attacking rooks on &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;. For our choice of &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;r_k&amp;lt;/math&amp;gt; is the number of ways of choosing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; points, no two consecutive, from a collection of &amp;lt;math&amp;gt;2n&amp;lt;/math&amp;gt; points arranged in a circle.&lt;br /&gt;
&lt;br /&gt;
We first see how to do this in a &#039;&#039;line&#039;&#039;.&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:The number of ways of choosing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; &#039;&#039;non-consecutive&#039;&#039; objects from a collection of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; objects arranged in a &#039;&#039;line&#039;&#039;, is &amp;lt;math&amp;gt;{m-k+1\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We draw a line of &amp;lt;math&amp;gt;m-k&amp;lt;/math&amp;gt; black points, and then insert &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; red points into the &amp;lt;math&amp;gt;m-k+1&amp;lt;/math&amp;gt; spaces between the black points (including the beginning and end).&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
&amp;amp;\sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \, \sqcup \\&lt;br /&gt;
&amp;amp;\qquad\qquad\qquad\quad\Downarrow\\&lt;br /&gt;
&amp;amp;\sqcup \, \bullet \,\, {\color{Red}\bullet} \, \bullet \,\, {\color{Red}\bullet} \, \bullet \, \sqcup \, \bullet \,\, {\color{Red}\bullet}\, \, \bullet \, \sqcup \, \bullet \, \sqcup \, \bullet \,\, {\color{Red}\bullet}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
This gives us a line of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; points, and the red points specifies the chosen objects, which are non-consecutive. The mapping is 1-1 correspondence.&lt;br /&gt;
There are &amp;lt;math&amp;gt;{m-k+1\choose k}&amp;lt;/math&amp;gt; ways of placing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; red points into &amp;lt;math&amp;gt;m-k+1&amp;lt;/math&amp;gt; spaces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The problem of choosing non-consecutive objects in a circle can be reduced to the case that the objects are in a line.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:The number of ways of choosing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; &#039;&#039;non-consecutive&#039;&#039; objects from a collection of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; objects arranged in a &#039;&#039;circle&#039;&#039;, is &amp;lt;math&amp;gt;\frac{m}{m-k}{m-k\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;f(m,k)&amp;lt;/math&amp;gt; be the desired number; and let &amp;lt;math&amp;gt;g(m,k)&amp;lt;/math&amp;gt; be the number of ways of choosing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-consecutive points from &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; points arranged in a circle, next coloring the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; points red, and then coloring one of the uncolored point blue. &lt;br /&gt;
&lt;br /&gt;
Clearly, &amp;lt;math&amp;gt;g(m,k)=(m-k)f(m,k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
But we can also compute &amp;lt;math&amp;gt;g(m,k)&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
* Choose one of the &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; points and color it blue. This gives us &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; ways.&lt;br /&gt;
* Cut the circle to make a line of &amp;lt;math&amp;gt;m-1&amp;lt;/math&amp;gt; points by removing the blue point.&lt;br /&gt;
* Choose &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; non-consecutive points from the line of &amp;lt;math&amp;gt;m-1&amp;lt;/math&amp;gt; points and color them red. This gives &amp;lt;math&amp;gt;{m-k\choose k}&amp;lt;/math&amp;gt; ways due to the previous lemma.&lt;br /&gt;
&lt;br /&gt;
Thus, &amp;lt;math&amp;gt;g(m,k)=m{m-k\choose k}&amp;lt;/math&amp;gt;. Therefore we have the desired number &amp;lt;math&amp;gt;f(m,k)=\frac{m}{m-k}{m-k\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
By the above lemma, we have that &amp;lt;math&amp;gt;r_k=\frac{2n}{2n-k}{2n-k\choose k}&amp;lt;/math&amp;gt;. Then apply the theorem of counting permutations with restricted positions,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
N_0=\sum_{k=0}^n(-1)^kr_k(n-k)!=\sum_{k=0}^n(-1)^k\frac{2n}{2n-k}{2n-k\choose k}(n-k)!.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This gives the number of ways of seating the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; husbands &#039;&#039;after the ladies are seated&#039;&#039;. Recall that there are &amp;lt;math&amp;gt;2n!&amp;lt;/math&amp;gt; ways of seating the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; ladies. Thus, the total number of ways of seating &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; couples as required by problème des ménages is &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
2n!\sum_{k=0}^n(-1)^k\frac{2n}{2n-k}{2n-k\choose k}(n-k)!.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Inversion ==&lt;br /&gt;
&lt;br /&gt;
=== Posets ===&lt;br /&gt;
A &#039;&#039;&#039;partially ordered set&#039;&#039;&#039; or &#039;&#039;&#039;poset&#039;&#039;&#039; for short is a set &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; together with a binary relation denoted &amp;lt;math&amp;gt;\le_P&amp;lt;/math&amp;gt; (or just &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; if no confusion is caused), satisfying&lt;br /&gt;
* (&#039;&#039;reflexivity&#039;&#039;) For all &amp;lt;math&amp;gt;x\in P, x\le x&amp;lt;/math&amp;gt;.&lt;br /&gt;
* (&#039;&#039;antisymmetry&#039;&#039;) If &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y\le x&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;x=y&amp;lt;/math&amp;gt;.&lt;br /&gt;
* (&#039;&#039;transitivity&#039;&#039;) If &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y\le z&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;x\le z&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We say two elements &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are &#039;&#039;&#039;comparable&#039;&#039;&#039; if &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y\le x&amp;lt;/math&amp;gt;; otherwise &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y&amp;lt;/math&amp;gt; are &#039;&#039;&#039;incomparable&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;Notation&lt;br /&gt;
* &amp;lt;math&amp;gt;x\ge y&amp;lt;/math&amp;gt; means &amp;lt;math&amp;gt;y\le x&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;x&amp;lt;y&amp;lt;/math&amp;gt; means &amp;lt;math&amp;gt;x\le y&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x\neq y&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;x&amp;gt;y&amp;lt;/math&amp;gt; means &amp;lt;math&amp;gt;y&amp;lt;x&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== The Möbius function===&lt;br /&gt;
Let &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; be a finite poset. Consider functions in form of &amp;lt;math&amp;gt;\alpha:P\times P\rightarrow\mathbb{R}&amp;lt;/math&amp;gt; defined over domain &amp;lt;math&amp;gt;P\times P&amp;lt;/math&amp;gt;. It is convenient to treat such functions as matrices whose rows and columns are indexed by &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Incidence algebra of poset&lt;br /&gt;
:Let &lt;br /&gt;
::&amp;lt;math&amp;gt;I(P)=\{\alpha:P\times P\rightarrow\mathbb{R}\mid \alpha(x,y)=0\text{ for all }x\not\le_P y\}&amp;lt;/math&amp;gt; &lt;br /&gt;
:be the class of &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;\alpha(x,y)&amp;lt;/math&amp;gt; is non-zero only for &amp;lt;math&amp;gt;x\le_P y&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:Treating &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; as matrix, it is trivial to see that &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt; is closed under addition and scalar multiplication, that is,&lt;br /&gt;
:* if &amp;lt;math&amp;gt;\alpha,\beta\in I(P)&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;\alpha+\beta\in I(P)&amp;lt;/math&amp;gt;;&lt;br /&gt;
:* if &amp;lt;math&amp;gt;\alpha\in I(P)&amp;lt;/math&amp;gt; then &amp;lt;math&amp;gt;c\alpha\in I(P)&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;c\in\mathbb{R}&amp;lt;/math&amp;gt;;&lt;br /&gt;
:where &amp;lt;math&amp;gt;\alpha,\beta&amp;lt;/math&amp;gt; are treated as matrices.&lt;br /&gt;
&lt;br /&gt;
:With this spirit, it is natural to define the matrix multiplication in &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt;. For &amp;lt;math&amp;gt;\alpha,\beta\in I(P)&amp;lt;/math&amp;gt;, &lt;br /&gt;
::&amp;lt;math&amp;gt;(\alpha\beta)(x,y)=\sum_{z\in P}\alpha(x,z)\beta(z,y)=\sum_{x\le z\le y}\alpha(x,z)\beta(z,y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
:The second equation is due to that for &amp;lt;math&amp;gt;\alpha,\beta\in I(P)&amp;lt;/math&amp;gt;, for all &amp;lt;math&amp;gt;z&amp;lt;/math&amp;gt; other than &amp;lt;math&amp;gt;x\le z\le y&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\alpha(x,z)\beta(z,y)&amp;lt;/math&amp;gt; is zero.&lt;br /&gt;
:By the transitivity of relation &amp;lt;math&amp;gt;\le_P&amp;lt;/math&amp;gt;, it is also easy to prove that &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt; is closed under matrix multiplication (the detailed proof is left as an exercise). Therefore, &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt; is closed under addition, scalar multiplication and matrix multiplication, so we have an algebra &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt;, called &#039;&#039;&#039;incidence algebra&#039;&#039;&#039;, over functions on &amp;lt;math&amp;gt;P\times P&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Zeta function and Möbius function&lt;br /&gt;
:A special function in &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt; is the so-called &#039;&#039;&#039;zeta function&#039;&#039;&#039; &amp;lt;math&amp;gt;\zeta&amp;lt;/math&amp;gt;, defined as&lt;br /&gt;
::&amp;lt;math&amp;gt;\zeta(x,y)=\begin{cases}1&amp;amp;\text{if }x\le_P y,\\0 &amp;amp;\text{otherwise.}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:As a matrix (or more accurately, as an element of the incidence algebra), &amp;lt;math&amp;gt;\zeta&amp;lt;/math&amp;gt; is invertible and its inversion, denoted by &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;, is called the &#039;&#039;&#039;Möbius function&#039;&#039;&#039;. More precisely, &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is also in the incidence algebra &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;\mu\zeta=I&amp;lt;/math&amp;gt; where &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; is the identity matrix (the identity of the incidence algebra &amp;lt;math&amp;gt;I(P)&amp;lt;/math&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
There is an equivalent explicit definition of Möbius function.&lt;br /&gt;
{{Theorem|Definition (Möbius function)|&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu(x,y)=\begin{cases}&lt;br /&gt;
-\sum_{x\le z&amp;lt; y}\mu(x,z)&amp;amp;\text{if }x&amp;lt;y,\\&lt;br /&gt;
1&amp;amp;\text{if }x=y,\\&lt;br /&gt;
0&amp;amp;\text{if }x\not\le y. &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To see the equivalence between this definition and the inversion of zeta function, we may have the following proposition, which is proved by directly evaluating &amp;lt;math&amp;gt;\mu\zeta&amp;lt;/math&amp;gt;.&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:For any &amp;lt;math&amp;gt;x,y\in P&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{x\le z\le y}\mu(x,z)=\begin{cases}1 &amp;amp;\text{if }x=y,\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
It holds that&lt;br /&gt;
:&amp;lt;math&amp;gt;(\mu\zeta)(x,y)=\sum_{x\le z\le y}\mu(x,z)\zeta(z,y)=\sum_{x\le z\le y}\mu(x,z)&amp;lt;/math&amp;gt;.&lt;br /&gt;
On the other hand, &amp;lt;math&amp;gt;\mu\zeta=I&amp;lt;/math&amp;gt;, i.e. &lt;br /&gt;
:&amp;lt;math&amp;gt;(\mu\zeta)(x,y)=\begin{cases}1 &amp;amp;\text{if }x=y,\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
The proposition follows.&lt;br /&gt;
}}&lt;br /&gt;
Note that &amp;lt;math&amp;gt;\mu(x,y)=\sum_{x\le z\le y}\mu(x,z)-\sum_{x\le z&amp;lt; y}\mu(x,z)&amp;lt;/math&amp;gt;, which gives the above inductive definition of Möbius function.&lt;br /&gt;
&lt;br /&gt;
=== Computing Möbius functions===&lt;br /&gt;
We consider the simple poset &amp;lt;math&amp;gt;P=[n]&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; is the total order. It follows directly from the recursive definition of Möbius function that&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu(i,j)=\begin{cases}1 &amp;amp; \text{if }i=j,\\&lt;br /&gt;
-1 &amp;amp; \text{if }i+1=j,\\&lt;br /&gt;
0 &amp;amp; \text{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usually for general posets, it is difficult to directly compute the Möbius function from its definition. We introduce a rule helping us compute the Möbius function by decomposing the poset into posets with simple structures.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (the product rule)|&lt;br /&gt;
: Let &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt; be two finite posets, and &amp;lt;math&amp;gt;P\times Q&amp;lt;/math&amp;gt; be the poset resulted from Cartesian product of &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;Q&amp;lt;/math&amp;gt;, where for all &amp;lt;math&amp;gt;(x,y), (x&#039;,y&#039;)\in P\times Q&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;(x,y)\le (x&#039;,y&#039;)&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;x\le x&#039;&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y\le y&#039;&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\mu_{P\times Q}((x,y),(x&#039;,y&#039;))=\mu_P(x,x&#039;)\mu_Q(y,y&#039;)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We use the recursive definition &lt;br /&gt;
:&amp;lt;math&amp;gt;\mu(x,y)=\begin{cases}&lt;br /&gt;
-\sum_{x\le z&amp;lt; y}\mu(x,z)&amp;amp;\text{if }x&amp;lt;y,\\&lt;br /&gt;
1&amp;amp;\text{if }x=y,\\&lt;br /&gt;
0&amp;amp;\text{if }x\not\le y. &lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
to prove the equation in the theorem.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;math&amp;gt;(x,y)=(x&#039;,y&#039;)&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;x=x&#039;&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;y=y&#039;&amp;lt;/math&amp;gt;. It is easy to see that both sides of the equation are 1. If &amp;lt;math&amp;gt;(x,y)\not\le(x&#039;,y&#039;)&amp;lt;/math&amp;gt;, then either &amp;lt;math&amp;gt;x\not\le x&#039;&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y\not\le y&#039;&amp;lt;/math&amp;gt;. It is also easy to see that both sides are 0.&lt;br /&gt;
&lt;br /&gt;
The only remaining case is that &amp;lt;math&amp;gt;(x,y)&amp;lt;(x&#039;,y&#039;)&amp;lt;/math&amp;gt;, in which case either &amp;lt;math&amp;gt;x&amp;lt;x&#039;&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;y&amp;lt;y&#039;&amp;lt;/math&amp;gt;. &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\sum_{(x,y)\le (u,v)\le (x&#039;,y&#039;)}\mu_P(x,u)\mu_Q(y,v)&lt;br /&gt;
&amp;amp;=\left(\sum_{x\le u\le x&#039;}\mu_P(x,u)\right)\left(\sum_{y\le v\le y&#039;}\mu_Q(y,v)\right)=I(x,x&#039;)I(y,y&#039;)=0,&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where the last two equations are due to the proposition for &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt;. Thus&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu_P(x,x&#039;)\mu_Q(y,y&#039;)=-\sum_{(x,y)\le (u,v)&amp;lt; (x&#039;,y&#039;)}\mu_P(x,u)\mu_Q(y,v)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
By induction, assume that the equation &amp;lt;math&amp;gt;\mu_{P\times Q}((x,y),(u,v))=\mu_P(x,u)\mu_Q(y,v)&amp;lt;/math&amp;gt; is true for all &amp;lt;math&amp;gt;(u,v)&amp;lt; (x&#039;,y&#039;)&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\mu_{P\times Q}((x,y),(x&#039;,y&#039;))&lt;br /&gt;
&amp;amp;=-\sum_{(x,y)\le (u,v)&amp;lt; (x&#039;,y&#039;)}\mu_{P\times Q}((x,y),(u,v))\\&lt;br /&gt;
&amp;amp;=-\sum_{(x,y)\le (u,v)&amp;lt; (x&#039;,y&#039;)}\mu_P(x,u)\mu_Q(y,v)\\&lt;br /&gt;
&amp;amp;=\mu_P(x,x&#039;)\mu_Q(y,y&#039;),&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
which complete the proof.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Poset of subsets&lt;br /&gt;
:Consider the poset defined by all subsets of a finite universe &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt;, that is &amp;lt;math&amp;gt;P=2^U&amp;lt;/math&amp;gt;, and for &amp;lt;math&amp;gt;S,T\subseteq U&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;S\le_P T&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;S\subseteq T&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem| Möbius function for subsets|&lt;br /&gt;
:The Möbius function for the above defined poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is that for &amp;lt;math&amp;gt;S,T\subseteq U&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\mu(S,T)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
(-1)^{|T|-|S|} &amp;amp; \text{if }S\subseteq T,\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
We can equivalently represent each &amp;lt;math&amp;gt;S\subseteq U&amp;lt;/math&amp;gt; by a boolean string &amp;lt;math&amp;gt;S\in\{0,1\}^U&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;S(x)=1&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;x\in S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For each element &amp;lt;math&amp;gt;x\in U&amp;lt;/math&amp;gt;, we can define a poset &amp;lt;math&amp;gt;P_x=\{0, 1\}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;0\le 1&amp;lt;/math&amp;gt;. By definition of Möbius function, the Möbius function of this elementary poset is given by &amp;lt;math&amp;gt;\mu_x(0,0)=\mu_x(1,1)=1&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;\mu_x(0,1)=-1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\mu(1,0)=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; of all subsets of &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; is the Cartesian product of all &amp;lt;math&amp;gt;P_x&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;x\in U&amp;lt;/math&amp;gt;. By the product rule,&lt;br /&gt;
:&amp;lt;math&amp;gt;\mu(S,T)=\prod_{x\in U}\mu_x(S(x), T(x))=\prod_{x\in S\atop x\in T}1\prod_{x\not\in S\atop x\not\in T}1\prod_{x\in S\atop x\not\in T}0\prod_{x\not\in S\atop x\in T}(-1)=\begin{cases}&lt;br /&gt;
(-1)^{|T|-|S|} &amp;amp; \text{if }S\subseteq T,\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
:Note that the poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is actually the [http://en.wikipedia.org/wiki/Boolean_algebra_(structure) Boolean algebra] of rank &amp;lt;math&amp;gt;|U|&amp;lt;/math&amp;gt;. The proof relies only on that the fact that the poset is a Boolean algebra, thus the theorem holds for Boolean algebra posets.&lt;br /&gt;
&lt;br /&gt;
;Posets of divisors&lt;br /&gt;
:Consider the poset defined by all devisors of a positive integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, that is &amp;lt;math&amp;gt;P=\{a&amp;gt;0\mid a|n\}&amp;lt;/math&amp;gt;, and for &amp;lt;math&amp;gt;a,b\in P&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;a\le_P b&amp;lt;/math&amp;gt; if and only if &amp;lt;math&amp;gt;a|b\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Möbius function for divisors|&lt;br /&gt;
:The Möbius function for the above defined poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is that for &amp;lt;math&amp;gt;a,b&amp;gt;0&amp;lt;/math&amp;gt; that &amp;lt;math&amp;gt;a|n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;b|n&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;\mu(a,b)=&lt;br /&gt;
\begin{cases}&lt;br /&gt;
(-1)^{r} &amp;amp; \text{if }\frac{b}{a}\text{ is the product of }r\text{ distinct primes},\\&lt;br /&gt;
0 &amp;amp;\text{otherwise, i.e. if }a\not|b\text{ or }\frac{b}{a}\text{ is not squarefree.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Denote &amp;lt;math&amp;gt;n=p_1^{n_1}p_2^{n_2}\cdots p_k^{n_k}&amp;lt;/math&amp;gt;. Represent &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; by a tuple &amp;lt;math&amp;gt;(n_1,n_2,\ldots,n_k)&amp;lt;/math&amp;gt;. Every &amp;lt;math&amp;gt;a\in P&amp;lt;/math&amp;gt; corresponds in this way to a tuple &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_k)&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;a_i\le n_i&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;1\le i\le k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;P_i=\{1,2,\ldots,n_i\}&amp;lt;/math&amp;gt; be the poset with &amp;lt;math&amp;gt;\le&amp;lt;/math&amp;gt; being the total order. The poset &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; of divisors of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is thus isomorphic to the poset constructed by the Cartesian product of all &amp;lt;math&amp;gt;P_i&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;1\le i\le k&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\mu(a,b)&lt;br /&gt;
&amp;amp;=\prod_{1\le i\le k}\mu(a_i,b_i)=\prod_{1\le i\le k\atop a_i=b_i}1\prod_{1\le i\le k\atop b_i-a_i=1}(-1)\prod_{1\le i\le k\atop b_i-a_i\not\in\{0,1\}}0&lt;br /&gt;
=\begin{cases}&lt;br /&gt;
(-1)^{\sum_{i}(b_i-a_i)} &amp;amp; \text{if all }b_i-a_i\in\{0,1\},\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}&lt;br /&gt;
\end{cases}\\&lt;br /&gt;
&amp;amp;=\begin{cases}&lt;br /&gt;
(-1)^{r} &amp;amp; \text{if }\frac{b}{a}\text{ is the product of }r\text{ distinct primes},\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}&lt;br /&gt;
\end{cases}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Principle of Möbius inversion ===&lt;br /&gt;
We now introduce the the famous Möbius inversion formula.&lt;br /&gt;
{{Theorem|Möbius inversion formula|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; be a finite poset and &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; its Möbius function. Let &amp;lt;math&amp;gt;f,g:P\rightarrow \mathbb{R}&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\forall x\in P,\,\, g(x)=\sum_{y\le x} f(y)&amp;lt;/math&amp;gt;,&lt;br /&gt;
:if and only if&lt;br /&gt;
::&amp;lt;math&amp;gt;\forall x\in P,\,\, f(x)=\sum_{y\le x}g(y)\mu(y,x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
The functions &amp;lt;math&amp;gt;f,g:P\rightarrow\mathbb{R}&amp;lt;/math&amp;gt; are vectors. Evaluate the matrix multiplications &amp;lt;math&amp;gt;f\zeta&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;g\mu&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
:&amp;lt;math&amp;gt;(f\zeta)(x)=\sum_{y\in P}f(y)\zeta(y,x)=\sum_{y\le x}f(y)&amp;lt;/math&amp;gt;,&lt;br /&gt;
and &lt;br /&gt;
:&amp;lt;math&amp;gt;(g\mu)(x)=\sum_{y\in P}g(y)\mu(y,x)=\sum_{y\le x}g(y)\mu(y,x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
The Möbius inversion formula is nothing but the following statement&lt;br /&gt;
:&amp;lt;math&amp;gt;f\zeta=g\Leftrightarrow f=g\mu&amp;lt;/math&amp;gt;,&lt;br /&gt;
which is trivially true due to &amp;lt;math&amp;gt;\mu\zeta=I&amp;lt;/math&amp;gt; by basic linear algebra.&lt;br /&gt;
&lt;br /&gt;
The following dual form of the inversion formula is also useful.&lt;br /&gt;
{{Theorem|Möbius inversion formula, dual form|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; be a finite poset and &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; its Möbius function. Let &amp;lt;math&amp;gt;f,g:P\rightarrow \mathbb{R}&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
::&amp;lt;math&amp;gt;\forall x\in P, \,\, g(x)=\sum_{y{\color{red}\ge} x} f(y)&amp;lt;/math&amp;gt;,&lt;br /&gt;
: if and only if &lt;br /&gt;
::&amp;lt;math&amp;gt;\forall x\in P, \,\, f(x)=\sum_{y{\color{red}\ge} x}\mu(x,y)g(y)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
To prove the dual form, we only need to evaluate the matrix multiplications on left:&lt;br /&gt;
:&amp;lt;math&amp;gt;\zeta f=g\Leftrightarrow f=\mu g&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Principle of Inclusion-Exclusion&lt;br /&gt;
:Let &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n\subseteq U&amp;lt;/math&amp;gt;. For any &amp;lt;math&amp;gt;J\subseteq\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, &lt;br /&gt;
:*let &amp;lt;math&amp;gt;f(J)&amp;lt;/math&amp;gt; be the number of elements that belongs to &#039;&#039;exactly&#039;&#039; the sets &amp;lt;math&amp;gt;A_i, i\in J&amp;lt;/math&amp;gt; and to no others, i.e. &lt;br /&gt;
:::&amp;lt;math&amp;gt;f(J)=\left|\left(\bigcap_{i\in J}A_i\right)\setminus\left(\bigcup_{i\not\in J}A_i\right)\right|&amp;lt;/math&amp;gt;;&lt;br /&gt;
:*let &amp;lt;math&amp;gt;g(J)=\left|\bigcap_{i\in J}A_i\right|&amp;lt;/math&amp;gt;.&lt;br /&gt;
:For any &amp;lt;math&amp;gt;J\subseteq\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, the following relation holds for the above defined &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;g&amp;lt;/math&amp;gt;:&lt;br /&gt;
::&amp;lt;math&amp;gt;g(J)=\sum_{I\supseteq J}f(I)&amp;lt;/math&amp;gt;.&lt;br /&gt;
:Applying the dual form of the Möbius inversion formula, we have that for any &amp;lt;math&amp;gt;J\subseteq\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;f(J)=\sum_{I\supseteq J}\mu(J,I)g(I)=\sum_{I\supseteq J}\mu(J,I)\left|\bigcap_{i\in I}A_i\right|&amp;lt;/math&amp;gt;,&lt;br /&gt;
:where the Möbius function is for the poset of all subsets of &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;, ordered by &amp;lt;math&amp;gt;\subseteq&amp;lt;/math&amp;gt;, thus it holds that &amp;lt;math&amp;gt;\mu(J,I)=(-1)^{|I|-|J|}\,&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;J\subseteq I&amp;lt;/math&amp;gt;. Therefore,&lt;br /&gt;
::&amp;lt;math&amp;gt;f(J)=\sum_{I\supseteq J}(-1)^{|I|-|J|}\left|\bigcap_{i\in I}A_i\right|&amp;lt;/math&amp;gt;.&lt;br /&gt;
:We have a formula for the number of elements with exactly those properties &amp;lt;math&amp;gt;A_i, i\in J&amp;lt;/math&amp;gt; for any &amp;lt;math&amp;gt;J\subseteq\{1,2,\ldots,n\}&amp;lt;/math&amp;gt;. For the special case that &amp;lt;math&amp;gt;J=\emptyset&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;f(\emptyset)&amp;lt;/math&amp;gt; is the number of elements satisfying no property of &amp;lt;math&amp;gt;A_1,A_2,\ldots,A_n&amp;lt;/math&amp;gt;, and&lt;br /&gt;
::&amp;lt;math&amp;gt;f(\emptyset)=\left|U\setminus\bigcup_iA_i\right|=\sum_{I\subseteq \{1,\ldots,n\}}(-1)^{|I|}\left|\bigcap_{i\in I}A_i\right|&amp;lt;/math&amp;gt;&lt;br /&gt;
:which gives precisely the Principle of Inclusion-Exclusion.&lt;br /&gt;
&lt;br /&gt;
;Möbius inversion formula for number theory&lt;br /&gt;
:The number-theoretical Möbius inversion formula is stated as such: Let &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; be a positive integer, &lt;br /&gt;
::&amp;lt;math&amp;gt;g(n)=\sum_{d|n}f(d)\,&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;n|N&amp;lt;/math&amp;gt; &lt;br /&gt;
:if and only if &lt;br /&gt;
::&amp;lt;math&amp;gt;f(n)=\sum_{d|n}g(d)\mu\left(\frac{n}{d}\right)\,&amp;lt;/math&amp;gt; for all &amp;lt;math&amp;gt;n|N&amp;lt;/math&amp;gt;,&lt;br /&gt;
:where &amp;lt;math&amp;gt;\mu&amp;lt;/math&amp;gt; is the [http://en.wikipedia.org/wiki/M%C3%B6bius_function number-theoretical Möbius function], defined as&lt;br /&gt;
::&amp;lt;math&amp;gt;\mu(n)=\begin{cases}1 &amp;amp; \text{if }n\text{ is product of an even number of distinct primes,}\\&lt;br /&gt;
-1 &amp;amp;\text{if }n\text{ is product of an odd number of distinct primes,}\\&lt;br /&gt;
0 &amp;amp;\text{otherwise.}\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
:The number-theoretical Möbius inversion formula is just a special case of the Möbius inversion formula for posets, when the poset is the set of divisors of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;, and for any &amp;lt;math&amp;gt;a,b\in P&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;a\le_P b&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;a|b&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Sieve Method in Number Theory ==&lt;br /&gt;
=== The Euler totient function ===&lt;br /&gt;
Two integers &amp;lt;math&amp;gt;m, n&amp;lt;/math&amp;gt; are said to be &#039;&#039;&#039;relatively prime&#039;&#039;&#039; if their greatest common diviser &amp;lt;math&amp;gt;\mathrm{gcd}(m,n)=1&amp;lt;/math&amp;gt;. For a positive integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;\phi(n)&amp;lt;/math&amp;gt; be the number of positive integers from &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; that are relative prime to &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. This function, called the Euler &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; function or &#039;&#039;&#039;the Euler totient function&#039;&#039;&#039;, is fundamental in number theory.&lt;br /&gt;
&lt;br /&gt;
We now derive a formula for this function by using the principle of inclusion-exclusion.&lt;br /&gt;
{{Theorem|Theorem (The Euler totient function)|&lt;br /&gt;
Suppose &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is divisible by precisely &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; different primes, denoted &amp;lt;math&amp;gt;p_1,\ldots,p_r&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;\phi(n)=n\prod_{i=1}^r\left(1-\frac{1}{p_i}\right)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;U=\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; be the universe. The number of positive integers from &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; which is divisible by some &amp;lt;math&amp;gt;p_{i_1},p_{i_2},\ldots,p_{i_s}\in\{p_1,\ldots,p_r\}&amp;lt;/math&amp;gt;, is &amp;lt;math&amp;gt;\frac{n}{p_{i_1}p_{i_2}\cdots p_{i_s}}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\phi(n)&amp;lt;/math&amp;gt; is the number of integers from &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; which is not divisible by any &amp;lt;math&amp;gt;p_1,\ldots,p_r&amp;lt;/math&amp;gt;.&lt;br /&gt;
By principle of inclusion-exclusion,&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi(n)&lt;br /&gt;
&amp;amp;=n+\sum_{k=1}^r(-1)^k\sum_{1\le i_1&amp;lt;i_2&amp;lt;\cdots &amp;lt;i_k\le n}\frac{n}{p_{i_1}p_{i_2}\cdots p_{i_k}}\\&lt;br /&gt;
&amp;amp;=n-\sum_{1\le i\le n}\frac{n}{p_i}+\sum_{1\le i&amp;lt;j\le n}\frac{n}{p_i p_j}-\sum_{1\le i&amp;lt;j&amp;lt;k\le n}\frac{n}{p_{i} p_{j} p_{k}}+\cdots + (-1)^r\frac{n}{p_{1}p_{2}\cdots p_{r}}\\&lt;br /&gt;
&amp;amp;=n\left(1-\sum_{1\le i\le n}\frac{1}{p_i}+\sum_{1\le i&amp;lt;j\le n}\frac{1}{p_i p_j}-\sum_{1\le i&amp;lt;j&amp;lt;k\le n}\frac{1}{p_{i} p_{j} p_{k}}+\cdots + (-1)^r\frac{1}{p_{1}p_{2}\cdots p_{r}}\right)\\&lt;br /&gt;
&amp;amp;=n\prod_{i=1}^r\left(1-\frac{1}{p_i}\right).&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
* &#039;&#039;Stanley,&#039;&#039; Enumerative Combinatorics, Volume 1, Chapter 2.&lt;br /&gt;
* &#039;&#039;van Lin and Wilson&#039;&#039;, A course in combinatorics, Chapter 10, 25.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13579</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13579"/>
		<updated>2026-03-30T17:20:04Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2026/03/25)&#039;&#039;&#039;&amp;lt;font color=red size=4&amp;gt; 第一次作业已发布&amp;lt;/font&amp;gt;，请在 2026/04/08 上课之前提交到 [mailto:njucomb26@163.com njucomb26@163.com] (文件名为&#039;学号_姓名_A1.pdf&#039;)&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行([mailto:652024330006@smail.nju.edu.cn 652024330006@smail.nju.edu.cn])&lt;br /&gt;
** 周灿&lt;br /&gt;
** 方子伊&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* [[组合数学 (Spring 2026)/Problem Set 1|Problem Set 1]]&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
# [[组合数学 (Fall 2026)/Sieve methods|Sieve methods | 筛法]] ([http://tcs.nju.edu.cn/slides/comb2026/PIE.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Karger%27s_min-cut_algorithm&amp;diff=13578</id>
		<title>概率论与数理统计 (Spring 2026)/Karger&#039;s min-cut algorithm</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Karger%27s_min-cut_algorithm&amp;diff=13578"/>
		<updated>2026-03-30T17:19:17Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;令 &amp;lt;math&amp;gt;G(V, E)&amp;lt;/math&amp;gt; 是一个无向图。我们称边集 &amp;lt;math&amp;gt;C\subseteq E&amp;lt;/math&amp;gt; 是图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 的一个&amp;#039;&amp;#039;&amp;#039;割&amp;#039;&amp;#039;&amp;#039;，如果图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 在删除所有 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 中的边后变得不连通。  &amp;#039;&amp;#039;&amp;#039;最小割问题&amp;#039;&amp;#039;&amp;#039;, 也称为&amp;#039;&amp;#039;&amp;#039;全局最小割问题&amp;#039;&amp;#039;&amp;#039;, 定义如下。 {{Theorem|全局最小割问题| *&amp;#039;&amp;#039;&amp;#039;输入&amp;#039;&amp;#039;&amp;#039;：无向图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;； *&amp;#039;&amp;#039;&amp;#039;输出&amp;#039;&amp;#039;&amp;#039;：图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中具有最小 &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt; 的割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;。 }}...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;令 &amp;lt;math&amp;gt;G(V, E)&amp;lt;/math&amp;gt; 是一个无向图。我们称边集 &amp;lt;math&amp;gt;C\subseteq E&amp;lt;/math&amp;gt; 是图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 的一个&#039;&#039;&#039;割&#039;&#039;&#039;，如果图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 在删除所有 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 中的边后变得不连通。&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;最小割问题&#039;&#039;&#039;, 也称为&#039;&#039;&#039;全局最小割问题&#039;&#039;&#039;, 定义如下。&lt;br /&gt;
{{Theorem|全局最小割问题|&lt;br /&gt;
*&#039;&#039;&#039;输入&#039;&#039;&#039;：无向图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;；&lt;br /&gt;
*&#039;&#039;&#039;输出&#039;&#039;&#039;：图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中具有最小 &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt; 的割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;。&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
等价地，该问题要求找到一个将 &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; 分成两个不相交非空子集 &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; 的划分，使得跨越 &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt; 的边总数最小。&lt;br /&gt;
&lt;br /&gt;
我们考虑如下更具一般性的情境：输入图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 可以是&#039;&#039;&#039;多重图&#039;&#039;&#039;（&#039;&#039;&#039;multigraph&#039;&#039;&#039;），这意味着任意两个顶点 &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; 之间可能存在多条&#039;&#039;&#039;平行边&#039;&#039;&#039;（&#039;&#039;&#039;parallel edges&#039;&#039;&#039;），也称为&#039;&#039;&#039;重&#039;&#039;&#039;(读音chóng)&#039;&#039;&#039;边&#039;&#039;&#039;。多重图中的割的定义与之前相同，割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 的大小则由 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 中所有边（包括平行边）的总数给出。等价地，可以将多重图视为带有整数边权重的图，割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 的大小表示为 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 中所有边的总权重。&lt;br /&gt;
&lt;br /&gt;
通过[http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem 最大流-最小割定理]，可以得到这个问题的一个经典的确定性算法。最大流算法可以找到一个最小的&#039;&#039;&#039;&amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt;割&#039;&#039;&#039;, 将由输入任意指定的一个&#039;&#039;&#039;源点&#039;&#039;&#039; &amp;lt;math&amp;gt;s\in V&amp;lt;/math&amp;gt; 和一个&#039;&#039;&#039;汇点&#039;&#039;&#039; &amp;lt;math&amp;gt;t\in V&amp;lt;/math&amp;gt; 分割开来。然后可以通过穷举来找到针对任意固定源点 &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt; 和所有可能的汇点 &amp;lt;math&amp;gt;t\neq s&amp;lt;/math&amp;gt; 的最小 &amp;lt;math&amp;gt;s&amp;lt;/math&amp;gt;-&amp;lt;math&amp;gt;t&amp;lt;/math&amp;gt; 割，从而求得全局最小割。&lt;br /&gt;
&lt;br /&gt;
== Karger算法 ==&lt;br /&gt;
我们将描述一个简洁优美的随机化算法来解决最小割问题。该算法最初是由[http://people.csail.mit.edu/karger/ David Karger]提出的。&lt;br /&gt;
&lt;br /&gt;
给定一个多重图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; 和一条边 &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt;，我们定义如下的&#039;&#039;&#039;收缩&#039;&#039;&#039;操作 &amp;lt;math&amp;gt;\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt;，将 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 更新为一个新的多重图。&lt;br /&gt;
{{Theorem|收缩算子 &amp;lt;math&amp;gt;\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt;|&lt;br /&gt;
设 &amp;lt;math&amp;gt;e=\{u,v\}&amp;lt;/math&amp;gt;：&lt;br /&gt;
:* 将顶点 &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt; 替换为一个新顶点 &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;；&lt;br /&gt;
:* 对于图中任何一条连接 &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt; 其中之一到 &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt; 以外某顶点 &amp;lt;math&amp;gt;w\in V\setminus\{u,v\}&amp;lt;/math&amp;gt; 的边，用一条新边 &amp;lt;math&amp;gt;\{x,w\}&amp;lt;/math&amp;gt; 替换它；&lt;br /&gt;
:* 图中剩余的部分保持不变。&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
换言之，&amp;lt;math&amp;gt;\mathsf{Contract}(G,\{u,v\})&amp;lt;/math&amp;gt; 将两个顶点 &amp;lt;math&amp;gt;u&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; 合并成一个新顶点 &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;，该新顶点邻接的边保留了原始图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中与 &amp;lt;math&amp;gt;u,v&amp;lt;/math&amp;gt; 两顶点之一邻接的边（但不包括二者之间的平行边 &amp;lt;math&amp;gt;\{u,v\}&amp;lt;/math&amp;gt;）。现在我们应该能意识到为什么我们考虑多重图而不是简单图——因为即使我们从没有平行边的简单图开始，收缩操作也可能引入平行边。&lt;br /&gt;
&lt;br /&gt;
收缩操作的效果如图所示：&lt;br /&gt;
[[Image:Contract.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
Karger算法的想法很简单：在每一步中，随机选择当前多重图中的一条边，将其收缩；重复这一操作，直至图中只剩下两个顶点——这两个剩下的顶点之间的所有边的集合，必然是最初图（乃至每一步中的图）中的一个割。&lt;br /&gt;
&lt;br /&gt;
{{Theorem|收缩算法 (Karger 1993)|&lt;br /&gt;
:&#039;&#039;&#039;输入:&#039;&#039;&#039; 多重图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;;&lt;br /&gt;
----&lt;br /&gt;
:while &amp;lt;math&amp;gt;|V|&amp;gt;2&amp;lt;/math&amp;gt; do&lt;br /&gt;
:* 从当前图中均匀分布地选择一条随机的边 &amp;lt;math&amp;gt;e\in E&amp;lt;/math&amp;gt;;&lt;br /&gt;
:* &amp;lt;math&amp;gt;G=\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt;; &lt;br /&gt;
:return &amp;lt;math&amp;gt;C=E&amp;lt;/math&amp;gt; (即当前所剩的最后两个顶点之间所有的平行边);&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
另一种看待收缩操作 &amp;lt;math&amp;gt;\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt; 的方式是将其解读为对两个顶点的等价类的合并。假设 &amp;lt;math&amp;gt;V={v_1,v_2,\ldots,v_n}&amp;lt;/math&amp;gt; 是所有顶点的集合。我们从 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点等价类 &amp;lt;math&amp;gt;S_1,S_2,\ldots, S_n&amp;lt;/math&amp;gt; 开始，其中每个等价类 &amp;lt;math&amp;gt;S_i={v_i}&amp;lt;/math&amp;gt; 包含一个顶点。通过调用 &amp;lt;math&amp;gt;\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt;，其中 &amp;lt;math&amp;gt;e&amp;lt;/math&amp;gt; 跨越了两个不同的等价类 &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;S_j&amp;lt;/math&amp;gt;，其效果是将等价类 &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;S_j&amp;lt;/math&amp;gt; 合并。收缩后的多重图中的边就是跨越不同顶点等价类之间的边。&lt;br /&gt;
这一视角的效果如图所示：&lt;br /&gt;
[[Image:Contract_class.png|600px|center]]&lt;br /&gt;
&lt;br /&gt;
== Karger算法的分析 ==&lt;br /&gt;
假设输入图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 为一任意给定的多重图。Karger算法输出了该图的一个随机的割。我们需要分析该随机割是最小割的概率，即如下概率的下界：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\,\text{收缩算法输出了 }G\text{ 的一个最小割}\,]&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
对此，我们证明如下更强的结论。令 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 是输入图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中的某个特定的最小割。我们将分析如下概率的下界：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\,\text{收缩算法输出了 }C\,]&amp;lt;/math&amp;gt;.&lt;br /&gt;
显然这一概率是收缩算法成功输出最小割的概率的下界（在这里我们使用了如下概率法则：对任意事件 &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt;，若 &amp;lt;math&amp;gt;A\subseteq B&amp;lt;/math&amp;gt;，则&amp;lt;math&amp;gt;\Pr(A)\le \Pr(B)&amp;lt;/math&amp;gt;）。&lt;br /&gt;
&lt;br /&gt;
我们引入以下记号：&lt;br /&gt;
* 令 &amp;lt;math&amp;gt;e_1,e_2,\ldots,e_{n-2}&amp;lt;/math&amp;gt; 表示在运行收缩算法时，依次选中进行收缩的随机边的序列；&lt;br /&gt;
* 令 &amp;lt;math&amp;gt;G_1=G&amp;lt;/math&amp;gt; 表示最初输入的多重图。对于 &amp;lt;math&amp;gt;i=1,2,\ldots,n-2&amp;lt;/math&amp;gt;，令 &amp;lt;math&amp;gt;G_{i+1}=\mathsf{Contract}(G_{i},e_i)&amp;lt;/math&amp;gt; 表示第 &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; 轮收缩后的多重图。&lt;br /&gt;
&lt;br /&gt;
我们可以做出如下的观察：&lt;br /&gt;
{{Theorem&lt;br /&gt;
|引理 1|&lt;br /&gt;
:如果 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 是多重图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中的一个最小割，且 &amp;lt;math&amp;gt;e\not\in C&amp;lt;/math&amp;gt;，那么 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 在收缩图 &amp;lt;math&amp;gt;G&#039;=\mathsf{Contract}(G,e)&amp;lt;/math&amp;gt; 中仍然是一个最小割。}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
我们首先观察到，收缩永远不会创建新的割：收缩图 &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; 中的每个割也必定是原图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中的一个割。&lt;br /&gt;
&lt;br /&gt;
然后我们观察到，原始图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中的割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 能在收缩图 &amp;lt;math&amp;gt;G&#039;&amp;lt;/math&amp;gt; 中幸存，当且仅当收缩边 &amp;lt;math&amp;gt;e\not\in C&amp;lt;/math&amp;gt;。&lt;br /&gt;
&lt;br /&gt;
这两个观察都很容易通过收缩操作的定义进行验证（特别是在考虑顶点等价类的解释时更容易验证）。&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
根据&#039;&#039;&#039;引理1&#039;&#039;&#039;，我们有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\,\text{收缩算法输出了 }C\,]=\Pr[\,e_1,e_2,\ldots,e_{n-2}\not\in C\,]&amp;lt;/math&amp;gt;;&lt;br /&gt;
再根据链式法则，这一概率可被计算如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr[\,e_1,e_2,\ldots,e_{n-2}\not\in C\,]=\prod_{i=1}^{n-2}\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
接下来我们的任务是对每个条件概率 &amp;lt;math&amp;gt;\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]&amp;lt;/math&amp;gt; 给出下界。注意到：根据&#039;&#039;&#039;引理1&#039;&#039;&#039;，条件 &amp;lt;math&amp;gt;e_1,e_2,\ldots,e_{i-1}\not\in C&amp;lt;/math&amp;gt; 的发生意味着 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 仍是当前图 &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt; 中的最小割；而 &amp;lt;math&amp;gt;e_i&amp;lt;/math&amp;gt; 是图 &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt; 中的一条均匀分布的随机边。于是条件概率 &amp;lt;math&amp;gt;\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]&amp;lt;/math&amp;gt; 即为图 &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt; 中一条均匀随机边未命中其某个最小割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 的概率。直观上：“最小”割应该在边集中相对稀疏，因此这一概率应该有下界。如下引理严格印证了这一直觉。&lt;br /&gt;
&lt;br /&gt;
{{Theorem&lt;br /&gt;
|引理 2|&lt;br /&gt;
:如果 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 是多重图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt; 中的一个最小割，那么 &amp;lt;math&amp;gt;|E|\ge \frac{|V||C|}{2}&amp;lt;/math&amp;gt;。&lt;br /&gt;
}}&lt;br /&gt;
{{Proof| &lt;br /&gt;
:注意到每个顶点 &amp;lt;math&amp;gt;v\in V&amp;lt;/math&amp;gt; 的度数必然至少为 &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt;，否则所有与 &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; 邻接的边即构成了一个割（将点 &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; 与其余所有点分开），而且这个割比  &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt; 更小，这就与 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 是一个最小割相矛盾。&lt;br /&gt;
:现在由于每个顶点的度至少为 &amp;lt;math&amp;gt;|C|&amp;lt;/math&amp;gt;，应用[https://en.wikipedia.org/wiki/Handshaking_lemma 握手引理]，所有顶点度数之和是 &amp;lt;math&amp;gt;2|E|\ge |V||C|&amp;lt;/math&amp;gt;。（容易验证握手引理对于多重图仍旧成立。）&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
令 &amp;lt;math&amp;gt;V_i&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;E_i&amp;lt;/math&amp;gt; 分别表示多重图 &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt; 的顶点集和边集。注意到 &amp;lt;math&amp;gt;|V_{i}|=n-i+1&amp;lt;/math&amp;gt;。根据&#039;&#039;&#039;引理2&#039;&#039;&#039;，若 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 在 &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt; 中仍然是一个最小割，则有 &amp;lt;math&amp;gt;|E_i|\ge \frac{(n-i+2)|C|}{2}&amp;lt;/math&amp;gt;。于是条件概率 &amp;lt;math&amp;gt;\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]&amp;lt;/math&amp;gt;可被计算如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]&lt;br /&gt;
&amp;amp;=1-\frac{|C|}{|E_i|}\\&lt;br /&gt;
&amp;amp;\ge 1-\frac{2}{n-i+1}.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
将上述分析归总，可得：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
\Pr[\,\text{收缩算法输出了 }G\text{ 的一个最小割}\,]&lt;br /&gt;
&amp;amp;\ge&lt;br /&gt;
\Pr[\,\text{收缩算法输出了 }C\,]\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\Pr[\,e_1,e_2,\ldots,e_{n-2}\not\in C\,]\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\prod_{i=1}^{n-2}\Pr[\,e_i\not\in C\mid e_1,e_2,\ldots,e_{i-1}\not\in C\,]\\&lt;br /&gt;
&amp;amp;\ge&lt;br /&gt;
\prod_{i=1}^{n-2}\left(1-\frac{2}{n-i+1}\right)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\prod_{k=3}^{n}\frac{k-2}{k}\\&lt;br /&gt;
&amp;amp;= \frac{2}{n(n-1)}.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
这证明了如下定理：&lt;br /&gt;
{{Theorem&lt;br /&gt;
|定理（收缩算法的正确概率）|&lt;br /&gt;
:对于 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点的任意多重图，收缩算法返回一个最小割的概率至少为 &amp;lt;math&amp;gt;\frac{2}{n(n-1)}&amp;lt;/math&amp;gt;。&lt;br /&gt;
}}&lt;br /&gt;
初看之下，这一成功概率似乎相当小。然而请注意，一个图中可能存在指数多的割（因为潜在地，每个非空点集 &amp;lt;math&amp;gt;S\subset V&amp;lt;/math&amp;gt; 都可以对应一个将 &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; 与其补集分开的割），而Karger算法有效地将这个指数级的解空间事实上缩小到了平方级别。&lt;br /&gt;
&lt;br /&gt;
我们可以独立地运行上述收缩算法 &amp;lt;math&amp;gt;t=\left\lceil\frac{n(n-1)\ln n}{2}\right\rceil&amp;lt;/math&amp;gt; 次，将所有返回的割中最小的一个作为最终结果返回。最终正确得到最小割的概率至少是：&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
&amp;amp;1-\Pr[\,\text{全部 }t\text{ 次独立运行收缩算法都没有找到 }G\text{ 的最小割}\,] \\&lt;br /&gt;
= &lt;br /&gt;
&amp;amp;1-\Pr[\,\text{一次运行收缩算法没有成功输出 }G\text{ 的最小割}\,]^{t} \\&lt;br /&gt;
\ge &lt;br /&gt;
&amp;amp;1- \left(1-\frac{2}{n(n-1)}\right)^{\frac{n(n-1)}{2}\cdot \ln n} \\&lt;br /&gt;
\ge &lt;br /&gt;
&amp;amp;1-\left(\frac{1}{\mathrm{e}}\right)^{\ln n}\\&lt;br /&gt;
=&lt;br /&gt;
&amp;amp;1-\frac{1}{n}.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== 一个概率法推论 ==&lt;br /&gt;
上述对Karger算法的分析可以导出如下关于图中最小割数量的推论。&lt;br /&gt;
{{Theorem|推论（最小割数量上界）|&lt;br /&gt;
:对于 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点的任意多重图 &amp;lt;math&amp;gt;G(V,E)&amp;lt;/math&amp;gt;，&amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中最小割的数量至多为 &amp;lt;math&amp;gt;\frac{n(n-1)}{2}&amp;lt;/math&amp;gt;。&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
首先定义事件 &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; 如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;A:&amp;lt;/math&amp;gt; “收缩算法输出了图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 的某个最小割”。&lt;br /&gt;
并对 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中每一个不同的最小割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;，定义事件 &amp;lt;math&amp;gt;A_C&amp;lt;/math&amp;gt; 如下：&lt;br /&gt;
:&amp;lt;math&amp;gt;A_C:&amp;lt;/math&amp;gt; “收缩算法输出了 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;”。&lt;br /&gt;
容易验证，对于图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中的不同最小割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;，事件 &amp;lt;math&amp;gt;A_C&amp;lt;/math&amp;gt; 彼此不相容；而且，事件 &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; 是对所有最小割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; 事件 &amp;lt;math&amp;gt;A_C&amp;lt;/math&amp;gt; 的并，即&lt;br /&gt;
:&amp;lt;math&amp;gt;A=\bigcup_{G\text{中所有最小割}C}A_C&amp;lt;/math&amp;gt;.&lt;br /&gt;
于是根据概率的 &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;可加性，有：&lt;br /&gt;
:&amp;lt;math&amp;gt;\Pr(A)=\sum_{G\text{中所有最小割}C}\Pr(A_C)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
由我们对于Karger算法的分析可得，对任何最小割 &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt;，都有 &amp;lt;math&amp;gt;\Pr(A_c)\ge\frac{2}{n(n-1)}&amp;lt;/math&amp;gt;。而作为良定义的概率，必然有 &amp;lt;math&amp;gt;\Pr(A)\le 1&amp;lt;/math&amp;gt;。因此可知，图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt; 中最小割的总数不会超过 &amp;lt;math&amp;gt;\frac{n(n-1)}{2}&amp;lt;/math&amp;gt;。&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
上述推论是一个&#039;&#039;&#039;概率法&#039;&#039;&#039;（&#039;&#039;&#039;the probabilistic method&#039;&#039;&#039;）的实例：结论本身不具有任何随机性，但是其证明过程引入了概率论。而且这个结论给出的界是紧的：存在 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点的图 &amp;lt;math&amp;gt;G&amp;lt;/math&amp;gt;，其最小割的个数刚好为  &amp;lt;math&amp;gt;\frac{n(n-1)}{2}&amp;lt;/math&amp;gt;，例如：&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 个顶点的环。&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13577</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13577"/>
		<updated>2026-03-30T17:18:35Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 1|Problem Set 1]]  请在 2026/4/1 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A1.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls|Entropy and volume of Hamming balls]]&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Karger&#039;s min-cut algorithm| Karger&#039;s min-cut algorithm]]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/RandVar.pdf 随机变量]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第2章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 2, Sections 3.1~3.5, 3.7&#039;&#039;&#039;&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[MU] Chapter 2&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [https://plato.stanford.edu/entries/probability-interpret/ Interpretations of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/History_of_probability History of probability]&lt;br /&gt;
* Example problems:&lt;br /&gt;
** [https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf von Neumann&#039;s Bernoulli factory] and other [https://peteroupc.github.io/bernoulli.html Bernoulli factory algorithms]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boy_or_Girl_paradox Boy or Girl paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) Bertrand paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hard_spheres Hard spheres model] and [https://en.wikipedia.org/wiki/Ising_model Ising model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/PageRank &#039;&#039;PageRank&#039;&#039;] and stationary [https://en.wikipedia.org/wiki/Random_walk random walk]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Diffusion_process Diffusion process] and [https://en.wikipedia.org/wiki/Diffusion_model diffusion model]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Probability_space Probability space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sample_space Sample space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Event_(probability_theory) Event] and [https://en.wikipedia.org/wiki/Σ-algebra &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;-algebra]&lt;br /&gt;
** Kolmogorov&#039;s [https://en.wikipedia.org/wiki/Probability_axioms axioms of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Classical] and [https://en.wikipedia.org/wiki/Geometric_probability goemetric probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Boole%27s_inequality Union bound]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle Inclusion-Exclusion principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boole%27s_inequality#Bonferroni_inequalities Bonferroni inequalities]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Conditional_probability Conditional probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Chain_rule_(probability) Chain rule]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_probability Law of total probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bayes%27_theorem Bayes&#039; law]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Independence_(probability_theory) Independence] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Pairwise_independence Pairwise independence]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13576</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13576"/>
		<updated>2026-03-30T17:17:31Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
*[[概率论与数理统计 (Spring 2026)/Problem Set 1|Problem Set 1]]  请在 2026/4/1 上课之前(9am UTC+8)提交到 [mailto:pr2026_nju@163.com pr2026_nju@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A1.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls|Entropy and volume of Hamming balls]]&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Karger&#039;s min-cut algorithm| Karger&#039;s min-cut algorithm]]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [https://plato.stanford.edu/entries/probability-interpret/ Interpretations of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/History_of_probability History of probability]&lt;br /&gt;
* Example problems:&lt;br /&gt;
** [https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf von Neumann&#039;s Bernoulli factory] and other [https://peteroupc.github.io/bernoulli.html Bernoulli factory algorithms]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boy_or_Girl_paradox Boy or Girl paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) Bertrand paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hard_spheres Hard spheres model] and [https://en.wikipedia.org/wiki/Ising_model Ising model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/PageRank &#039;&#039;PageRank&#039;&#039;] and stationary [https://en.wikipedia.org/wiki/Random_walk random walk]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Diffusion_process Diffusion process] and [https://en.wikipedia.org/wiki/Diffusion_model diffusion model]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Probability_space Probability space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sample_space Sample space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Event_(probability_theory) Event] and [https://en.wikipedia.org/wiki/Σ-algebra &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;-algebra]&lt;br /&gt;
** Kolmogorov&#039;s [https://en.wikipedia.org/wiki/Probability_axioms axioms of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Classical] and [https://en.wikipedia.org/wiki/Geometric_probability goemetric probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Boole%27s_inequality Union bound]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle Inclusion-Exclusion principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boole%27s_inequality#Bonferroni_inequalities Bonferroni inequalities]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Conditional_probability Conditional probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Chain_rule_(probability) Chain rule]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_probability Law of total probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bayes%27_theorem Bayes&#039; law]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Independence_(probability_theory) Independence] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Pairwise_independence Pairwise independence]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Entropy_and_volume_of_Hamming_balls&amp;diff=13529</id>
		<title>概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)/Entropy_and_volume_of_Hamming_balls&amp;diff=13529"/>
		<updated>2026-03-17T09:41:13Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;在求解抛掷公平硬币（fair coin）的尾概率时，我们经常会需要分析如下二项式系数求和： :&amp;lt;math&amp;gt;\sum_{k=0}^r{n\choose k}&amp;lt;/math&amp;gt;，对于某个&amp;lt;math&amp;gt;1\le r\le n&amp;lt;/math&amp;gt; 这其实等价与求一个 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 维汉明空间中半径为 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 的球的体积。 :{|border=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot; | :&amp;#039;...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在求解抛掷公平硬币（fair coin）的尾概率时，我们经常会需要分析如下二项式系数求和：&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{k=0}^r{n\choose k}&amp;lt;/math&amp;gt;，对于某个&amp;lt;math&amp;gt;1\le r\le n&amp;lt;/math&amp;gt;&lt;br /&gt;
这其实等价与求一个 &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 维汉明空间中半径为 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 的球的体积。&lt;br /&gt;
:{|border=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
:&#039;&#039;&#039;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; 维汉明空间&#039;&#039;&#039;（&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-dimensional Hamming space）是如下的度量空间 &amp;lt;math&amp;gt;\left(M,d\right)&amp;lt;/math&amp;gt;：该度量空间点集为 &amp;lt;math&amp;gt;M=\{0,1\}^n&amp;lt;/math&amp;gt;；距离 &amp;lt;math&amp;gt;d(\cdot,\cdot)&amp;lt;/math&amp;gt; 为该点集上的&#039;&#039;&#039;汉明距离&#039;&#039;&#039; (Hamming distance)，即——对于任意 &amp;lt;math&amp;gt;x,y\in\{0,1\}^n&amp;lt;/math&amp;gt;，&amp;lt;math&amp;gt;d(x,y)=\sum_{i=1}^n|x_i-y_i|&amp;lt;/math&amp;gt;。&lt;br /&gt;
:以某点 &amp;lt;math&amp;gt;o\in\{0,1\}^n&amp;lt;/math&amp;gt; 圆心、半径为 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 的&#039;&#039;&#039;汉明球体&#039;&#039;&#039; (Hamming ball) 为如下的点集：&lt;br /&gt;
:: &amp;lt;math&amp;gt;B_r(o)=\left\{x\in \{0,1\}^n\mid d(x,o)\le r\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
:容易验证，对于任何圆心 &amp;lt;math&amp;gt;o\in\{0,1\}^n&amp;lt;/math&amp;gt;，半径为 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 的汉明球体的体积，均为：&lt;br /&gt;
:: &amp;lt;math&amp;gt;|B_r(o)|=\sum_{k\le r}{n\choose k}&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
该二项式系数的求和式相当常见。然而不幸地，除对于极少数特殊的 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 取值之外，我们对于这一求和式并没有通用的闭合形式解。&lt;br /&gt;
&lt;br /&gt;
对于占整个空间不超过一半的汉明球体，其体积有如下的上界总是成立。&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:对于任何 &amp;lt;math&amp;gt;p\in\left[0,\frac{1}{2}\right]&amp;lt;/math&amp;gt;，有：&lt;br /&gt;
::&amp;lt;math&amp;gt;\sum_{k\le pn}{n\choose k}\le 2^{n\cdot h(p)}&amp;lt;/math&amp;gt;&lt;br /&gt;
:这里 &amp;lt;math&amp;gt;h(p)&amp;lt;/math&amp;gt; 为&#039;&#039;&#039;二进制信息熵函数&#039;&#039;&#039; ([https://en.wikipedia.org/wiki/Binary_entropy_function binary entropy function])，定义如下：&lt;br /&gt;
::&amp;lt;math&amp;gt;h(p)=p\log_2\frac{1}{p}+(1-p)\log_2\frac{1}{1-p}&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
对此上界，有一个比较初等的计算式证明。&lt;br /&gt;
&lt;br /&gt;
{{Proof|&lt;br /&gt;
（初等证明）&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\sum_{k\le pn}{n\choose k}/2^{n\cdot h(p)}&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k\le pn}{n\choose k}p^{pn}(1-p)^{(1-p)n}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k\le pn}{n\choose k}(1-p)^n\left(\frac{p}{1-p}\right)^{pn}\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\sum_{k\le pn}{n\choose k}(1-p)^n\left(\frac{p}{1-p}\right)^{k} &amp;amp;&amp;amp;(\text{因为 } p\le 1/2\le 1-p \text{ 以及 } k\le pn)\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k\le pn}{n\choose k}(1-p)^{n-k}p^k\\&lt;br /&gt;
&amp;amp;\le &lt;br /&gt;
\sum_{k=0}^n{n\choose k}(1-p)^{n-k}p^k\\&lt;br /&gt;
&amp;amp;=1&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
最后一个等式是因为这是在对参数为 &amp;lt;math&amp;gt;n,p&amp;lt;/math&amp;gt; 的二项分布的概率质量求和。&lt;br /&gt;
}}&lt;br /&gt;
除了上述初等证明之外，对这一不等式还有一个基于香农信息熵的&#039;&#039;&#039;次可加性&#039;&#039;&#039;（subadditivity）的简单且直观的证明，等到我们学习了随机变量的数学期望之后可以再次学习这个新的证明。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
与此同时，利用 [https://en.wikipedia.org/wiki/Stirling%27s_approximation Stirling公式]，可以验算得到形式如下的下界：&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{k\le pn}{n\choose k}\ge 2^{n\cdot (h(p)-o(1))}&amp;lt;/math&amp;gt;&lt;br /&gt;
因此，上述汉明球体积上界在此渐近意义下是紧的。&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13528</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13528"/>
		<updated>2026-03-17T09:40:42Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
#* [[概率论与数理统计 (Spring 2026)/Entropy and volume of Hamming balls|Entropy and volume of Hamming balls]]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [https://plato.stanford.edu/entries/probability-interpret/ Interpretations of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/History_of_probability History of probability]&lt;br /&gt;
* Example problems:&lt;br /&gt;
** [https://dornsifecms.usc.edu/assets/sites/520/docs/VonNeumann-ams12p36-38.pdf von Neumann&#039;s Bernoulli factory] and other [https://peteroupc.github.io/bernoulli.html Bernoulli factory algorithms]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boy_or_Girl_paradox Boy or Girl paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Monty_Hall_problem Monty Hall problem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bertrand_paradox_(probability) Bertrand paradox]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Hard_spheres Hard spheres model] and [https://en.wikipedia.org/wiki/Ising_model Ising model]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/PageRank &#039;&#039;PageRank&#039;&#039;] and stationary [https://en.wikipedia.org/wiki/Random_walk random walk]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Diffusion_process Diffusion process] and [https://en.wikipedia.org/wiki/Diffusion_model diffusion model]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Probability_space Probability space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sample_space Sample space]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Event_(probability_theory) Event] and [https://en.wikipedia.org/wiki/Σ-algebra &amp;lt;math&amp;gt;\sigma&amp;lt;/math&amp;gt;-algebra]&lt;br /&gt;
** Kolmogorov&#039;s [https://en.wikipedia.org/wiki/Probability_axioms axioms of probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Discrete_uniform_distribution Classical] and [https://en.wikipedia.org/wiki/Geometric_probability goemetric probability]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Boole%27s_inequality Union bound]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle Inclusion-Exclusion principle]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Boole%27s_inequality#Bonferroni_inequalities Bonferroni inequalities]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Conditional_probability Conditional probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Chain_rule_(probability) Chain rule]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Law_of_total_probability Law of total probability]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Bayes%27_theorem Bayes&#039; law]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Independence_(probability_theory) Independence] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Pairwise_independence Pairwise independence]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13503</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13503"/>
		<updated>2026-03-11T08:51:18Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]] ([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13502</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13502"/>
		<updated>2026-03-11T08:51:10Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]]([http://tcs.nju.edu.cn/slides/comb2026/GeneratingFunction.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)/Generating_functions&amp;diff=13501</id>
		<title>组合数学 (Spring 2026)/Generating functions</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)/Generating_functions&amp;diff=13501"/>
		<updated>2026-03-11T08:38:10Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Generating Functions == In Stanley&amp;#039;s magnificent book &amp;#039;&amp;#039;Enumerative Combinatorics&amp;#039;&amp;#039;, he comments the generating function as &amp;quot;the most useful but most difficult to understand method (for counting)&amp;quot;.  The solution to a counting problem is usually represented as some &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; depending a parameter &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Sometimes this &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; is called a &amp;#039;&amp;#039;counting function&amp;#039;&amp;#039; as it is a function of the parameter &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.  &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; can also be tre...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Generating Functions ==&lt;br /&gt;
In Stanley&#039;s magnificent book &#039;&#039;Enumerative Combinatorics&#039;&#039;, he comments the generating function as &amp;quot;the most useful but most difficult to understand method (for counting)&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The solution to a counting problem is usually represented as some &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; depending a parameter &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Sometimes this &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; is called a &#039;&#039;counting function&#039;&#039; as it is a function of the parameter &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.  &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; can also be treated as a infinite series:&lt;br /&gt;
:&amp;lt;math&amp;gt;a_0,a_1,a_2,\ldots&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;ordinary generating function (OGF)&#039;&#039;&#039; defined by &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt; is&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
G(x)=\sum_{n\ge 0} a_nx^n.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So &amp;lt;math&amp;gt;G(x)=a_0+a_1x+a_2x^2+\cdots&amp;lt;/math&amp;gt;. An expression in this form is called a [http://en.wikipedia.org/wiki/Formal_power_series &#039;&#039;&#039;formal power series&#039;&#039;&#039;], and &amp;lt;math&amp;gt;a_0,a_1,a_2,\ldots&amp;lt;/math&amp;gt; is the sequence of &#039;&#039;&#039;coefficients&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Furthermore, the generating function can be expanded as&lt;br /&gt;
:G(x)=&amp;lt;math&amp;gt;(\underbrace{1+\cdots+1}_{a_0})+(\underbrace{x+\cdots+x}_{a_1})+(\underbrace{x^2+\cdots+x^2}_{a_2})+\cdots+(\underbrace{x^n+\cdots+x^n}_{a_n})+\cdots&amp;lt;/math&amp;gt;&lt;br /&gt;
so it indeed &amp;quot;generates&amp;quot; all the possible instances of the objects we want to count.&lt;br /&gt;
&lt;br /&gt;
Usually, we do not evaluate the generating function &amp;lt;math&amp;gt;GF(x)&amp;lt;/math&amp;gt; on any particular value. &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; remains as a &#039;&#039;&#039;formal variable&#039;&#039;&#039; without assuming any value. The numbers that we want to count are the coefficients carried by the terms in the formal power series. So far the generating function is just another way to represent the sequence&lt;br /&gt;
:&amp;lt;math&amp;gt;(a_0,a_1,a_2,\ldots\ldots)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The true power of generating functions comes from the various algebraic operations that we can perform on these generating functions. We use an example to demonstrate this.&lt;br /&gt;
&lt;br /&gt;
=== Combinations ===&lt;br /&gt;
Suppose we wish to enumerate all subsets of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. To construct a subset, we specifies for every element of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set whether the element is chosen or not. Let us denote the choice to omit an element by &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt;, and the choice to include it by &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt;. Using &amp;quot;&amp;lt;math&amp;gt;+&amp;lt;/math&amp;gt;&amp;quot; to represent &amp;quot;OR&amp;quot;, and using the multiplication to denote &amp;quot;AND&amp;quot;, the choices of subsets of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set are expressed as&lt;br /&gt;
:&amp;lt;math&amp;gt;\underbrace{(x_0+x_1)(x_0+x_1)\cdots (x_0+x_1)}_{n\mbox{ elements}}=(x_0+x_1)^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, when &amp;lt;math&amp;gt;n=3&amp;lt;/math&amp;gt;, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
(x_0+x_1)^3&lt;br /&gt;
&amp;amp;=x_0x_0x_0+x_0x_0x_1+x_0x_1x_0+x_0x_1x_1\\&lt;br /&gt;
&amp;amp;\quad +x_1x_0x_0+x_1x_0x_1+x_1x_1x_0+x_1x_1x_1&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
So it &amp;quot;generate&amp;quot; all subsets of the 3-set. Writing &amp;lt;math&amp;gt;1&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;x_0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;x_1&amp;lt;/math&amp;gt;, we have &amp;lt;math&amp;gt;(1+x)^3=1+3x+3x^2+x^3&amp;lt;/math&amp;gt;. The coefficient of &amp;lt;math&amp;gt;x^k&amp;lt;/math&amp;gt; is the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subsets of a 3-element set.&lt;br /&gt;
&lt;br /&gt;
In general, &amp;lt;math&amp;gt;(1+x)^n&amp;lt;/math&amp;gt; has the coefficients which are the number of subsets of fixed sizes of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-element set.&lt;br /&gt;
&lt;br /&gt;
-----&lt;br /&gt;
&lt;br /&gt;
Suppose that we have twelve balls: &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;3 red&amp;lt;/font&amp;gt;, &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;4 blue&amp;lt;/font&amp;gt;, and &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;5 green&amp;lt;/font&amp;gt;. Balls with the same color are indistinguishable.&lt;br /&gt;
&lt;br /&gt;
We want to determine the number of ways to select &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; balls from these twelve balls, for some &amp;lt;math&amp;gt;0\le k\le 12&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The generating function of this sequence is&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
&amp;amp;\quad {\color{Red}(1+x+x^2+x^3)}{\color{Blue}(1+x+x^2+x^3+x^4)}{\color{OliveGreen}(1+x+x^2+x^3+x^4+x^5)}\\&lt;br /&gt;
&amp;amp;=1+3x+6x^2+10x^3+14x^4+17x^5+18x^6+17x^7+14x^8+10x^9+6x^{10}+3x^{11}+x^{12}.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
The coefficient of &amp;lt;math&amp;gt;x^k&amp;lt;/math&amp;gt; gives the number of ways to select &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; balls.&lt;br /&gt;
&lt;br /&gt;
=== Fibonacci numbers  ===&lt;br /&gt;
Consider the following counting problems.&lt;br /&gt;
* Count the number of ways that the nonnegative integer &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; can be written as a sum of ones and twos (in order).&lt;br /&gt;
: The problem asks for the number of compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; with summands from &amp;lt;math&amp;gt;\{1,2\}&amp;lt;/math&amp;gt;. Formally, we are counting the number of tuples &amp;lt;math&amp;gt;(x_1,x_2,\ldots,x_k)&amp;lt;/math&amp;gt; for some &amp;lt;math&amp;gt;k\le n&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_i\in\{1,2\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
: Let &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; be such a number. We observe that a composition either starts with a 1, in which case the rest is a composition of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;; or starts with a 2, in which case the rest is a composition of &amp;lt;math&amp;gt;n-2&amp;lt;/math&amp;gt;. So we have the recursion for &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; that&lt;br /&gt;
::&amp;lt;math&amp;gt;f_n=f_{n-1}+f_{n-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
* Count the ways to completely cover a &amp;lt;math&amp;gt;2\times n&amp;lt;/math&amp;gt; rectangle with &amp;lt;math&amp;gt;2\times 1&amp;lt;/math&amp;gt; dominos without any overlaps.&lt;br /&gt;
: Dominos are identical &amp;lt;math&amp;gt;2\times 1&amp;lt;/math&amp;gt; rectangles, so that only their orientations --- vertical or horizontal matter.&lt;br /&gt;
: Let &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; be the number. It also holds that &amp;lt;math&amp;gt;f_n=f_{n-1}+f_{n-2}&amp;lt;/math&amp;gt;. The proof is left as an exercise.&lt;br /&gt;
&lt;br /&gt;
In both problems, the solution is given by &amp;lt;math&amp;gt;f_n&amp;lt;/math&amp;gt; which satisfies the following recursion.&lt;br /&gt;
:&amp;lt;math&amp;gt;f_n=\begin{cases}&lt;br /&gt;
f_{n-1}+f_{n-2} &amp;amp; \mbox{if }n\ge 2,\\&lt;br /&gt;
1 &amp;amp; \mbox{if }n=1\\&lt;br /&gt;
1 &amp;amp; \mbox{if }n=0.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Instead we consider a closely related quantity:&lt;br /&gt;
:&amp;lt;math&amp;gt;F_n=\begin{cases}&lt;br /&gt;
F_{n-1}+F_{n-2} &amp;amp; \mbox{if }n\ge 2,\\&lt;br /&gt;
1 &amp;amp; \mbox{if }n=1\\&lt;br /&gt;
0 &amp;amp; \mbox{if }n=0.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly &amp;lt;math&amp;gt;F_n=f_{n-1}&amp;lt;/math&amp;gt; and the quantity &amp;lt;math&amp;gt;F_n&amp;lt;/math&amp;gt; is called the [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number].&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
::&amp;lt;math&amp;gt;F_n=\frac{1}{\sqrt{5}}\left(\phi^n-\hat{\phi}^n\right)&amp;lt;/math&amp;gt;,&lt;br /&gt;
:where &amp;lt;math&amp;gt;\phi=\frac{1+\sqrt{5}}{2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\phi}=\frac{1-\sqrt{5}}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
The quantity &amp;lt;math&amp;gt;\phi=\frac{1+\sqrt{5}}{2}&amp;lt;/math&amp;gt; is the so-called [http://en.wikipedia.org/wiki/Golden_ratio golden ratio], a constant with some significance in mathematics and aesthetics.&lt;br /&gt;
&lt;br /&gt;
We now prove this theorem by using generating functions.&lt;br /&gt;
The ordinary generating function for the Fibonacci number &amp;lt;math&amp;gt;F_{n}&amp;lt;/math&amp;gt; is&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}F_n x^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
We have that &amp;lt;math&amp;gt;F_{n}=F_{n-1}+F_{n-2}&amp;lt;/math&amp;gt; for &amp;lt;math&amp;gt;n\ge 2&amp;lt;/math&amp;gt;, thus&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{align}&lt;br /&gt;
G(x) &lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{n\ge 0}F_n x^n&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
F_0+F_1x+\sum_{n\ge 2}F_n x^n&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
x+\sum_{n\ge 2}(F_{n-1}+F_{n-2})x^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
For generating functions, there are general ways to generate &amp;lt;math&amp;gt;F_{n-1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;F_{n-2}&amp;lt;/math&amp;gt;, or the coefficients with any smaller indices.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
xG(x)&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}F_n x^{n+1}=\sum_{n\ge 1}F_{n-1} x^n=\sum_{n\ge 2}F_{n-1} x^n\\&lt;br /&gt;
x^2G(x)&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}F_n x^{n+2}=\sum_{n\ge 2}F_{n-2} x^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
So we have&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=x+(x+x^2)G(x)\,&amp;lt;/math&amp;gt;,&lt;br /&gt;
hence&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{x}{1-x-x^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The value of &amp;lt;math&amp;gt;F_n&amp;lt;/math&amp;gt; is the coefficient of &amp;lt;math&amp;gt;x^n&amp;lt;/math&amp;gt; in the Taylor series for this formular, which is &amp;lt;math&amp;gt;\frac{G^{(n)}(0)}{n!}=\frac{1}{\sqrt{5}}\left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}}\left(\frac{1-\sqrt{5}}{2}\right)^n&amp;lt;/math&amp;gt;. Although this expansion works in principle, the detailed calculus is rather painful.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
It is easier to expand the generating function by breaking it into two geometric series.&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;\phi=\frac{1+\sqrt{5}}{2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\phi}=\frac{1-\sqrt{5}}{2}&amp;lt;/math&amp;gt;. It holds that&lt;br /&gt;
::&amp;lt;math&amp;gt;\frac{x}{1-x-x^2}=\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\phi x}-\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\hat{\phi} x}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
It is easy to verify the above equation, but to deduce it, we need some (high school) calculation.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;2&amp;quot; width=&amp;quot;100%&amp;quot; cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
:{|&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;math&amp;gt;1-x-x^2&amp;lt;/math&amp;gt; has two roots &amp;lt;math&amp;gt;\frac{-1\pm\sqrt{5}}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Denote that &amp;lt;math&amp;gt;\phi=\frac{2}{-1+\sqrt{5}}=\frac{1+\sqrt{5}}{2}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\hat{\phi}=\frac{2}{-1-\sqrt{5}}=\frac{1-\sqrt{5}}{2}&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Then &amp;lt;math&amp;gt;(1-x-x^2)=(1-\phi x)(1-\hat{\phi}x)&amp;lt;/math&amp;gt;, so we can write &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{x}{1-x-x^2}&lt;br /&gt;
&amp;amp;=\frac{x}{(1-\phi x)(1-\hat{\phi} x)}\\&lt;br /&gt;
&amp;amp;=\frac{\alpha}{(1-\phi x)}+\frac{\beta}{(1-\hat{\phi} x)},&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta&amp;lt;/math&amp;gt; satisfying that&lt;br /&gt;
:&amp;lt;math&amp;gt;\begin{cases}&lt;br /&gt;
\alpha+\beta=0\\&lt;br /&gt;
\alpha\phi+\beta\hat{\phi}= -1.&lt;br /&gt;
\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
Solving this we have that &amp;lt;math&amp;gt;\alpha=\frac{1}{\sqrt{5}}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\beta=-\frac{1}{\sqrt{5}}&amp;lt;/math&amp;gt;. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{x}{1-x-x^2}=\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\phi x}-\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\hat{\phi} x}&amp;lt;/math&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
:&amp;lt;math&amp;gt;\square&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note that the expression &amp;lt;math&amp;gt;\frac{1}{1-z}&amp;lt;/math&amp;gt; has a well known geometric expansion:&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{1-z}=\sum_{n\ge 0}z^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore, &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; can be expanded as&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G(x)&lt;br /&gt;
&amp;amp;=\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\phi x}-\frac{1}{\sqrt{5}}\cdot\frac{1}{1-\hat{\phi} x}\\&lt;br /&gt;
&amp;amp;=\frac{1}{\sqrt{5}}\sum_{n\ge 0}(\phi x)^n-\frac{1}{\sqrt{5}}\sum_{n\ge 0}(\hat{\phi} x)^n\\&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}\frac{1}{\sqrt{5}}\left(\phi^n-\hat{\phi}^n\right)x^n.&lt;br /&gt;
\end{align}&amp;lt;/math&amp;gt;&lt;br /&gt;
So the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th Fibonacci number is given by &lt;br /&gt;
:&amp;lt;math&amp;gt;F_n=\frac{1}{\sqrt{5}}\left(\phi^n-\hat{\phi}^n\right)=\frac{1}{\sqrt{5}}\left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}}\left(\frac{1-\sqrt{5}}{2}\right)^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Solving recurrences ==&lt;br /&gt;
The following steps describe a general methodology of solving recurrences by generating functions.&lt;br /&gt;
:1. Give a recursion that computes &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt;. In the case of Fibonacci sequence&lt;br /&gt;
::&amp;lt;math&amp;gt;a_n=a_{n-1}+a_{n-2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:2. Multiply both sides of the equation by &amp;lt;math&amp;gt;x^n&amp;lt;/math&amp;gt; and sum over all &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. This gives the generating function&lt;br /&gt;
::&amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}a_nx^n=\sum_{n\ge 0}(a_{n-1}+a_{n-2})x^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
:: And manipulate the right hand side of the equation so that it becomes some other expression involving &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
::&amp;lt;math&amp;gt;G(x)=x+(x+x^2)G(x)\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
:3. Solve the resulting equation to derive an explicit formula for &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
::&amp;lt;math&amp;gt;G(x)=\frac{x}{1-x-x^2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:4. Expand &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; into a power series and read off the coefficient of &amp;lt;math&amp;gt;x^n&amp;lt;/math&amp;gt;, which is a closed form for &amp;lt;math&amp;gt;a_n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The first step is usually established by combinatorial observations, or explicitly given by the problem. The third step is trivial.&lt;br /&gt;
&lt;br /&gt;
The second and the forth steps need some non-trivial analytic techniques.&lt;br /&gt;
&lt;br /&gt;
=== Algebraic operations on generating functions ===&lt;br /&gt;
The second step in the above methodology is somehow tricky. It involves first applying the recurrence to the coefficients of &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt;, which is easy; and then manipulating the resulting formal power series to express it in terms of &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt;, which is more difficult (because it works backwards).&lt;br /&gt;
&lt;br /&gt;
We can apply several natural algebraic operations on the formal power series.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Generating function manipulation|&lt;br /&gt;
:Let &amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}g_nx^n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;F(x)=\sum_{n\ge 0}f_nx^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
&amp;amp;\text{shift:}&lt;br /&gt;
&amp;amp;x^k G(x)&lt;br /&gt;
&amp;amp;= \sum_{n\ge k}g_{n-k}x^n, &amp;amp;\qquad (\mbox{integer }k\ge 0)\\&lt;br /&gt;
&amp;amp;\text{addition:}&lt;br /&gt;
&amp;amp; F(x)+G(x)&lt;br /&gt;
&amp;amp;= \sum_{n\ge 0} (f_n+ g_n)x^n\\&lt;br /&gt;
&amp;amp;\text{convolution:}&lt;br /&gt;
&amp;amp;F(x)G(x)&lt;br /&gt;
&amp;amp;= \sum_{n\ge 0}\sum_{k=0}^nf_kg_{n-k}x^n\\&lt;br /&gt;
&amp;amp;\text{differentiation:}&lt;br /&gt;
&amp;amp;G&#039;(x)&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}(n+1)g_{n+1}x^n&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
When manipulating generating functions, these rules are applied backwards; that is, from the right-hand-side to the left-hand-side.&lt;br /&gt;
&lt;br /&gt;
=== Expanding generating functions ===&lt;br /&gt;
The last step of solving recurrences by generating function is expanding the closed form generating function &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; to evaluate its &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-th coefficient. &lt;br /&gt;
====Taylor expansion====&lt;br /&gt;
In principle, we can always use the [http://en.wikipedia.org/wiki/Taylor_series Taylor series]&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}\frac{G^{(n)}(0)}{n!}x^n&amp;lt;/math&amp;gt;,&lt;br /&gt;
where &amp;lt;math&amp;gt;G^{(n)}(0)&amp;lt;/math&amp;gt; is the value of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-th derivative of &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; evaluated at &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Geometric sequence====&lt;br /&gt;
In the example of Fibonacci numbers, we use the well known geometric series:&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{1-x}=\sum_{n\ge 0}x^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is useful when we can express the generating function in the form of &amp;lt;math&amp;gt;G(x)=\frac{a_1}{1-b_1x}+\frac{a_2}{1-b_2x}+\cdots+\frac{a_k}{1-b_kx}&amp;lt;/math&amp;gt;. The coefficient of &amp;lt;math&amp;gt;x^n&amp;lt;/math&amp;gt; in such &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;a_1b_1^n+a_2b_2^n+\cdots+a_kb_k^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Binomial theorem====&lt;br /&gt;
The &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-th derivative of &amp;lt;math&amp;gt;(1+x)^\alpha&amp;lt;/math&amp;gt; for some real &amp;lt;math&amp;gt;\alpha&amp;lt;/math&amp;gt; is &lt;br /&gt;
:&amp;lt;math&amp;gt;\alpha(\alpha-1)(\alpha-2)\cdots(\alpha-n+1)(1+x)^{\alpha-n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
By Taylor series, we get a generalized version of the binomial theorem known as [http://en.wikipedia.org/wiki/Binomial_coefficient#Newton.27s_binomial_series &#039;&#039;&#039;Newton&#039;s formula&#039;&#039;&#039;]:&lt;br /&gt;
{{Theorem|Newton&#039;s formular (generalized binomial theorem)|&lt;br /&gt;
If &amp;lt;math&amp;gt;|x|&amp;lt;1&amp;lt;/math&amp;gt;, then&lt;br /&gt;
:&amp;lt;math&amp;gt;(1+x)^\alpha=\sum_{n\ge 0}{\alpha\choose n}x^{n}&amp;lt;/math&amp;gt;,&lt;br /&gt;
where &amp;lt;math&amp;gt;{\alpha\choose n}&amp;lt;/math&amp;gt; is the &#039;&#039;&#039;generalized binomial coefficient&#039;&#039;&#039; defined by &lt;br /&gt;
:&amp;lt;math&amp;gt;{\alpha\choose n}=\frac{\alpha(\alpha-1)(\alpha-2)\cdots(\alpha-n+1)}{n!}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Example: multisets ===&lt;br /&gt;
In the last lecture we gave a combinatorial proof of the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. Now we give a generating function approach to the problem.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-element set. We have&lt;br /&gt;
:&amp;lt;math&amp;gt;(1+x_1+x_1^2+\cdots)(1+x_2+x_2^2+\cdots)\cdots(1+x_n+x_n^2+\cdots)=\sum_{m:S\rightarrow\mathbb{N}} \prod_{x_i\in S}x_i^{m(x_i)}&amp;lt;/math&amp;gt;,&lt;br /&gt;
where each &amp;lt;math&amp;gt;m:S\rightarrow\mathbb{N}&amp;lt;/math&amp;gt; species a possible multiset on &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; with multiplicity function &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let all &amp;lt;math&amp;gt;x_i=x&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
(1+x+x^2+\cdots)^n&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{m:S\rightarrow\mathbb{N}}x^{m(x_1)+\cdots+m(x_n)}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{\text{multiset }M\text{ on }S}x^{|M|}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{k\ge 0}\left({n\choose k}\right)x^k.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The last equation is due to the the definition of &amp;lt;math&amp;gt;\left({n\choose k}\right)&amp;lt;/math&amp;gt;. Our task is to evaluate &amp;lt;math&amp;gt;\left({n\choose k}\right)&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
Due to the geometric sequence and the Newton&#039;s formula&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
(1+x+x^2+\cdots)^n=(1-x)^{-n}=\sum_{k\ge 0}{-n\choose k}(-x)^k.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
So&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\left({n\choose k}\right)=(-1)^k{-n\choose k}={n+k-1\choose k}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The last equation is due to the definition of the generalized binomial coefficient. We use an analytic (generating function) proof to get the same result of &amp;lt;math&amp;gt;\left({n\choose k}\right)&amp;lt;/math&amp;gt; as the combinatorial proof.&lt;br /&gt;
&lt;br /&gt;
== Catalan Number ==&lt;br /&gt;
We now introduce a class of counting problems, all with the same solution, called [http://en.wikipedia.org/wiki/Catalan_number &#039;&#039;&#039;Catalan number&#039;&#039;&#039;]. &lt;br /&gt;
&lt;br /&gt;
The &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th Catalan number is denoted as &amp;lt;math&amp;gt;C_n&amp;lt;/math&amp;gt;.&lt;br /&gt;
In Volume 2 of Stanley&#039;s &#039;&#039;Enumerative Combinatorics&#039;&#039;, a set of exercises describe 66 different interpretations of the Catalan numbers. We give a few examples, cited from Wikipedia.&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of &#039;&#039;&#039;Dyck words&#039;&#039;&#039; of length 2&#039;&#039;n&#039;&#039;. A Dyck word is a string consisting of &#039;&#039;n&#039;&#039; X&#039;s and &#039;&#039;n&#039;&#039; Y&#039;s such that no initial segment of the string has more Y&#039;s than X&#039;s (see also [http://en.wikipedia.org/wiki/Dyck_language Dyck language]). For example, the following are the Dyck words of length 6:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;big&amp;gt; XXXYYY &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; XYXXYY &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; XYXYXY &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; XXYYXY &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; XXYXYY.&amp;lt;/big&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Re-interpreting the symbol X as an open parenthesis and Y as a close parenthesis, &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; counts the number of expressions containing &#039;&#039;n&#039;&#039; pairs of parentheses which are correctly matched:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;big&amp;gt; ((())) &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; ()(()) &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; ()()() &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; (())() &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; (()()) &amp;lt;/big&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of different ways &#039;&#039;n&#039;&#039;&amp;amp;nbsp;+&amp;amp;nbsp;1 factors can be completely parenthesized (or the number of ways of associating &#039;&#039;n&#039;&#039; applications of a &#039;&#039;&#039;binary operator&#039;&#039;&#039;). For &#039;&#039;n&#039;&#039; = 3, for example, we have the following five different parenthesizations of four factors:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;((ab)c)d \quad (a(bc))d \quad(ab)(cd) \quad a((bc)d) \quad a(b(cd))&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Successive applications of a binary operator can be represented in terms of a &#039;&#039;&#039;full binary tree&#039;&#039;&#039;. (A rooted binary tree is &#039;&#039;full&#039;&#039; if every vertex has either two children or no children.) It follows that &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of full binary trees with &#039;&#039;n&#039;&#039;&amp;amp;nbsp;+&amp;amp;nbsp;1 leaves:&lt;br /&gt;
[[Image:Catalan number binary tree example.png|center]] &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of &#039;&#039;&#039;monotonic paths&#039;&#039;&#039; along the edges of a grid with &#039;&#039;n&#039;&#039; × &#039;&#039;n&#039;&#039; square cells, which do not pass above the diagonal. A monotonic path is one which starts in the lower left corner, finishes in the upper right corner, and consists entirely of edges pointing rightwards or upwards. Counting such paths is equivalent to counting Dyck words: X stands for &amp;quot;move right&amp;quot; and Y stands for &amp;quot;move up&amp;quot;. The following diagrams show the case &#039;&#039;n&#039;&#039; = 4:&lt;br /&gt;
[[Image:Catalan number 4x4 grid example.svg.png|450px|center]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of different ways a [http://en.wikipedia.org/wiki/Convex_polygon &#039;&#039;&#039;convex polygon&#039;&#039;&#039;] with &#039;&#039;n&#039;&#039;&amp;amp;nbsp;+&amp;amp;nbsp;2 sides can be cut into &#039;&#039;&#039;triangles&#039;&#039;&#039; by connecting vertices with straight lines. The following hexagons illustrate the case &#039;&#039;n&#039;&#039; = 4:&lt;br /&gt;
[[Image:Catalan-Hexagons-example.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of [http://en.wikipedia.org/wiki/Stack_(data_structure) &#039;&#039;&#039;stack&#039;&#039;&#039;]-sortable permutations of {1, ..., &#039;&#039;n&#039;&#039;}. A permutation &#039;&#039;w&#039;&#039; is called &#039;&#039;&#039;stack-sortable&#039;&#039;&#039; if &#039;&#039;S&#039;&#039;(&#039;&#039;w&#039;&#039;) =&amp;amp;nbsp;(1,&amp;amp;nbsp;...,&amp;amp;nbsp;&#039;&#039;n&#039;&#039;), where &#039;&#039;S&#039;&#039;(&#039;&#039;w&#039;&#039;) is defined recursively as follows: write &#039;&#039;w&#039;&#039; =&amp;amp;nbsp;&#039;&#039;unv&#039;&#039; where &#039;&#039;n&#039;&#039; is the largest element in &#039;&#039;w&#039;&#039; and &#039;&#039;u&#039;&#039; and &#039;&#039;v&#039;&#039; are shorter sequences, and set &#039;&#039;S&#039;&#039;(&#039;&#039;w&#039;&#039;) =&amp;amp;nbsp;&#039;&#039;S&#039;&#039;(&#039;&#039;u&#039;&#039;)&#039;&#039;S&#039;&#039;(&#039;&#039;v&#039;&#039;)&#039;&#039;n&#039;&#039;, with &#039;&#039;S&#039;&#039; being the identity for one-element sequences. &lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;C&#039;&#039;&amp;lt;sub&amp;gt;&#039;&#039;n&#039;&#039;&amp;lt;/sub&amp;gt; is the number of ways to tile a stairstep shape of height &#039;&#039;n&#039;&#039; with &#039;&#039;n&#039;&#039; rectangles. The following figure illustrates the case &#039;&#039;n&#039;&#039;&amp;amp;nbsp;=&amp;amp;nbsp;4:&lt;br /&gt;
[[Image:Catalan stairsteps 4.png|400px|center]]&lt;br /&gt;
&lt;br /&gt;
=== Solving the Catalan numbers ===&lt;br /&gt;
{{Theorem|Recurrence relation for Catalan numbers|&lt;br /&gt;
:&amp;lt;math&amp;gt;C_0=1&amp;lt;/math&amp;gt;, and for &amp;lt;math&amp;gt;n\ge1&amp;lt;/math&amp;gt;,&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
C_n=&lt;br /&gt;
\sum_{k=0}^{n-1}C_kC_{n-1-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}C_nx^n&amp;lt;/math&amp;gt; be the generating function. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G(x)^2&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}\sum_{k=0}^{n}C_kC_{n-k}x^n\\&lt;br /&gt;
xG(x)^2&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}\sum_{k=0}^{n}C_kC_{n-k}x^{n+1}=\sum_{n\ge 1}\sum_{k=0}^{n-1}C_kC_{n-1-k}x^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Due to the recurrence,&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\sum_{n\ge 0}C_nx^n=C_0+\sum_{n\ge 1}\sum_{k=0}^{n-1}C_kC_{n-1-k}x^n=1+xG(x)^2&amp;lt;/math&amp;gt;.&lt;br /&gt;
Solving &amp;lt;math&amp;gt;xG(x)^2-G(x)+1=0&amp;lt;/math&amp;gt;, we obtain&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{1\pm(1-4x)^{1/2}}{2x}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Only one of these functions can be the generating function for &amp;lt;math&amp;gt;C_n&amp;lt;/math&amp;gt;, and it must satisfy&lt;br /&gt;
:&amp;lt;math&amp;gt;\lim_{x\rightarrow 0}G(x)=C_0=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
It is easy to check that the correct function is&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{1-(1-4x)^{1/2}}{2x}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Expanding &amp;lt;math&amp;gt;(1-4x)^{1/2}&amp;lt;/math&amp;gt; by Newton&#039;s formula, &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
(1-4x)^{1/2}&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{n\ge 0}{1/2\choose n}(-4x)^n\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
1+\sum_{n\ge 1}{1/2\choose n}(-4x)^n\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
1-4x\sum_{n\ge 0}{1/2\choose n+1}(-4x)^n&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Then, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G(x)&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{1-(1-4x)^{1/2}}{2x}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
2\sum_{n\ge 0}{1/2\choose n+1}(-4x)^n&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
Thus, &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
C_n&lt;br /&gt;
&amp;amp;=2{1/2\choose n+1}(-4)^n\\&lt;br /&gt;
&amp;amp;=2\cdot\left(\frac{1}{2}\cdot\frac{-1}{2}\cdot\frac{-3}{2}\cdots\frac{-(2n-1)}{2}\right)\cdot\frac{1}{(n+1)!}\cdot(-4)^n\\&lt;br /&gt;
&amp;amp;=\frac{2^n}{(n+1)!}\prod_{k=1}^n(2k-1)\\&lt;br /&gt;
&amp;amp;=\frac{2^n}{(n+1)!}\prod_{k=1}^n\frac{(2k-1)2k}{2k}\\&lt;br /&gt;
&amp;amp;=\frac{1}{n!(n+1)!}\prod_{k=1}^n (2k-1)2k\\&lt;br /&gt;
&amp;amp;=\frac{(2n)!}{n!(n+1)!}\\&lt;br /&gt;
&amp;amp;=\frac{1}{n+1}{2n\choose n}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
So we prove the following closed form for Catalan number.&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;C_n=\frac{1}{n+1}{2n\choose n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Analysis of Quicksort ==&lt;br /&gt;
Given as input a set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; numbers, we want to sort the numbers in &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; in increasing order. One of the most famous algorithm for this problem is the  [http://en.wikipedia.org/wiki/Quicksort Quicksort] algorithm.&lt;br /&gt;
{{Theorem|Quicksort algorithm|&lt;br /&gt;
&#039;&#039;&#039;Input&#039;&#039;&#039;: a set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; numbers.&lt;br /&gt;
* if &amp;lt;math&amp;gt;|S|&amp;gt;1&amp;lt;/math&amp;gt; do:&lt;br /&gt;
** pick an &amp;lt;math&amp;gt;x\in S&amp;lt;/math&amp;gt; as the &#039;&#039;pivot&#039;&#039;;&lt;br /&gt;
** partition &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;S_1=\{y\in S\mid y&amp;lt;x\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_2=\{y\in S\mid y&amp;gt;x\}&amp;lt;/math&amp;gt;;&lt;br /&gt;
** recursively sort &amp;lt;math&amp;gt;S_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_2&amp;lt;/math&amp;gt;;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Usually the input set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is given as an array of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; elements in an arbitrary order. The pivot is picked from a fixed position in the arrary (e.g. the first number in the array). &lt;br /&gt;
&lt;br /&gt;
The time complexity of this sorting algorithm is measured by the &#039;&#039;&#039;number of comparisons&#039;&#039;&#039;.  &lt;br /&gt;
&lt;br /&gt;
=== The quicksort recursion ===&lt;br /&gt;
It is easy to observe that the running time of the algorithm depends only on the relative order of the elements in the input array. &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;T_n&amp;lt;/math&amp;gt; be the average number of comparison used by the Quicksort to sort an array of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; numbers, where the average is taken over all &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt; total orders of the elements in the array.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|The Quicksort recursion|&lt;br /&gt;
:&amp;lt;math&amp;gt;T_n=&lt;br /&gt;
\frac{1}{n}\sum_{k=1}^n\left(n-1+T_{k-1}+T_{n-k}\right)&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
:and &amp;lt;math&amp;gt;T_0=T_1=0\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
The recursion is got from averaging over the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; sub-cases that the pivot is chosen as the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th smallest element for &amp;lt;math&amp;gt;k=1,2,\ldots,n&amp;lt;/math&amp;gt;. Partitioning the input set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;S_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_2&amp;lt;/math&amp;gt; takes exactly &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; comparisons regardless the choice of the pivot. Given that the pivot is chosen as the  &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-th smallest element, the sizes of &amp;lt;math&amp;gt;S_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_2&amp;lt;/math&amp;gt; are &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; respectively, thus the costs of sorting &amp;lt;math&amp;gt;S_1&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;S_2&amp;lt;/math&amp;gt; are given recursively by &amp;lt;math&amp;gt;T_{k-1}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T_{n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Manipulating the OGF===&lt;br /&gt;
We write the ordinary generating function (OGF) for the quicksort:&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G(x)&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}T_nx^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The quicksort recursion also gives us another equation for formal power series:&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\sum_{n\ge 0}nT_nx^n&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}\left(\sum_{k=1}^n\left(n-1+T_{k-1}+T_{n-k}\right)\right)x^n\\&lt;br /&gt;
&amp;amp;=\sum_{n\ge 0}n(n-1)x^n+2\sum_{n\ge 0}\left(\sum_{k=0}^{n-1}T_{k}\right)x^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We express the three terms &amp;lt;math&amp;gt;\sum_{n\ge 0}n(n-1)x^n&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;2\sum_{n\ge 0}\left(\sum_{k=0}^{n-1}T_{k}\right)x^n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\sum_{n\ge 0}nT_nx^n&amp;lt;/math&amp;gt; in closed form involving &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; as follows:&lt;br /&gt;
# Evaluate the power series: &amp;lt;math&amp;gt;\sum_{n\ge 0}n(n-1)x^n=x^2\sum_{n\ge 0}n(n-1)x^{n-2}=\frac{2x^2}{(1-x)^3}&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Apply the convolution rule of OGF: &amp;lt;math&amp;gt;2\sum_{n\ge 0}\left(\sum_{k=0}^{n-1}T_{k}\right)x^n=2x\sum_{n\ge 0}\left(\sum_{k=0}^{n}T_{k}\right)x^{n}=2xF(x)G(x)&amp;lt;/math&amp;gt;,&lt;br /&gt;
#:where &amp;lt;math&amp;gt;F(x)=\sum_{n\ge 0}x^n=\frac{1}{1-x}&amp;lt;/math&amp;gt;,&lt;br /&gt;
#:therefore, &amp;lt;math&amp;gt;2\sum_{n\ge 0}\left(\sum_{k=0}^{n-1}T_{k}\right)x^n=2xF(x)G(x)=\frac{2x}{1-x}G(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
# Apply the differentiation rule of OGF: &amp;lt;math&amp;gt;\sum_{n\ge 0}nT_nx^n=x\sum_{n\ge 0}(n+1)T_{n+1}x^{n}=xG&#039;(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore we have the following identity for the OGF for quicksort:&lt;br /&gt;
{{Theorem|Equation for the generating function|&lt;br /&gt;
:&amp;lt;math&amp;gt;xG&#039;(x)=\frac{2x^2}{(1-x)^3}+\frac{2x}{1-x}G(x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
=== Solving the equation ===&lt;br /&gt;
The above equation for the generating function &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; is a first-order linear differential equation, which has a general solution.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{c-2x}{(1-x)^2}+\frac{2}{(1-x)^2}\ln\frac{1}{1-x}&amp;lt;/math&amp;gt; for some constant &amp;lt;math&amp;gt;c&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Taking &amp;lt;math&amp;gt;x=0&amp;lt;/math&amp;gt;, we have that &amp;lt;math&amp;gt;G(0)=c=T_0=0&amp;lt;/math&amp;gt;.&lt;br /&gt;
Therefore&lt;br /&gt;
:&amp;lt;math&amp;gt;G(x)=\frac{-2x}{(1-x)^2}+\frac{2}{(1-x)^2}\ln\frac{1}{1-x}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Expanding ===&lt;br /&gt;
Due to Taylor&#039;s expansion,&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{1}{(1-x)^2}=\sum_{n\ge 0}(n+1) x^{n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:&amp;lt;math&amp;gt;\ln\frac{1}{1-x}=\sum_{n\ge 1}\frac{x^n}{n}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{-2x}{(1-x)^2}&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
-\sum_{n\ge 0}2(n+1)x^{n+1}&lt;br /&gt;
=&lt;br /&gt;
-\sum_{n\ge 1}2nx^{n}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And the convolution product can be calculated by&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\frac{2}{(1-x)^2}\ln\frac{1}{1-x}&lt;br /&gt;
&amp;amp;=2\sum_{n\ge 0}(n+1) x^{n}\sum_{n\ge 1}\frac{x^n}{n}\\&lt;br /&gt;
&amp;amp;=2\sum_{n\ge 1}\left(\sum_{k=1}^{n}(n-k+1)\frac{1}{k}\right)x^n.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The generating function &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt; is calculated as &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
G(x)&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\frac{-2x}{(1-x)^2}+\frac{2}{(1-x)^2}\ln\frac{1}{1-x}\\&lt;br /&gt;
&amp;amp;=&lt;br /&gt;
\sum_{n\ge 1}\left(-2n+2\sum_{k=1}^{n}(n-k+1)\frac{1}{k}\right)x^{n}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Denote by &amp;lt;math&amp;gt;[x^n]G(x)&amp;lt;/math&amp;gt; the coefficient of &amp;lt;math&amp;gt;x^n&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;G(x)&amp;lt;/math&amp;gt;. Then&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
T_n&lt;br /&gt;
&amp;amp;=[x^n]G(x)\\&lt;br /&gt;
&amp;amp;=-2n+2\sum_{k=1}^{n}(n-k+1)\frac{1}{k}\\&lt;br /&gt;
&amp;amp;=-2n+2(n+1)\sum_{k=1}^n\frac{1}{k}-2\sum_{k=1}^nk\cdot\frac{1}{k}\\&lt;br /&gt;
&amp;amp;=2(n+1)H(n)-4n,&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;H(n)&amp;lt;/math&amp;gt; is the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;th [http://en.wikipedia.org/wiki/Harmonic_number harmonic number], which satisfies that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\ln n\le H(n)=\sum_{k=1}^n\frac{1}{k}\le 1+\ln n.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, the average number of comparisons used by the quicksort to sort lists of length &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is&lt;br /&gt;
:&amp;lt;math&amp;gt;T_n=2(n+1)H(n)-4n&amp;lt;/math&amp;gt;,&lt;br /&gt;
which is lower and upper bounded as &amp;lt;math&amp;gt;2n\ln n-4n\le T_n\le 2n\ln n-(2-o(1))n&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
* &#039;&#039;Graham, Knuth, and Patashnik&#039;&#039;, Concrete Mathematics: A Foundation for Computer Science, Chapter 7.&lt;br /&gt;
* &#039;&#039;van Lin and Wilson&#039;&#039;, A course in combinatorics, Chapter 14.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13500</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13500"/>
		<updated>2026-03-11T08:37:47Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
# [[组合数学 (Spring 2026)/Generating functions|Generating functions | 生成函数]]&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13496</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13496"/>
		<updated>2026-03-09T08:59:21Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]] ([http://tcs.nju.edu.cn/slides/comb2026/BasicEnumeration.pdf slides])&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13495</id>
		<title>概率论与数理统计 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E6%A6%82%E7%8E%87%E8%AE%BA%E4%B8%8E%E6%95%B0%E7%90%86%E7%BB%9F%E8%AE%A1_(Spring_2026)&amp;diff=13495"/>
		<updated>2026-03-09T08:57:32Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lectures */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;&#039;&#039;&#039;概率论与数理统计&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Probability Theory&#039;&#039;&#039; &amp;lt;br&amp;gt; &amp;amp; &#039;&#039;&#039;Mathematical Statistics&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4  = office&lt;br /&gt;
|data4   = 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = liu@nju.edu.cn  &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = office&lt;br /&gt;
|data7   = 计算机系 516&lt;br /&gt;
|header8 = Class&lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &lt;br /&gt;
|header9 =&lt;br /&gt;
|label9  = Class meeting&lt;br /&gt;
|data9   = Wednesday, 9am-12am&amp;lt;br&amp;gt;&lt;br /&gt;
仙Ⅱ-212&lt;br /&gt;
|header10=&lt;br /&gt;
|label10 = Office hour&lt;br /&gt;
|data10  = TBA &amp;lt;br&amp;gt;计算机系 804（尹一通）&amp;lt;br&amp;gt;计算机系 516（刘景铖）&lt;br /&gt;
|header11= Textbook&lt;br /&gt;
|label11 = &lt;br /&gt;
|data11  = &lt;br /&gt;
|header12=&lt;br /&gt;
|label12 = &lt;br /&gt;
|data12  = [[File:概率导论.jpeg|border|100px]]&lt;br /&gt;
|header13=&lt;br /&gt;
|label13 = &lt;br /&gt;
|data13  = &#039;&#039;&#039;概率导论&#039;&#039;&#039;（第2版·修订版）&amp;lt;br&amp;gt; Dimitri P. Bertsekas and John N. Tsitsiklis&amp;lt;br&amp;gt; 郑忠国 童行伟 译；人民邮电出版社 (2022)&lt;br /&gt;
|header14=&lt;br /&gt;
|label14 = &lt;br /&gt;
|data14  = [[File:Grimmett_probability.jpg|border|100px]]&lt;br /&gt;
|header15=&lt;br /&gt;
|label15 = &lt;br /&gt;
|data15  = &#039;&#039;&#039;Probability and Random Processes&#039;&#039;&#039; (4E) &amp;lt;br&amp;gt; Geoffrey Grimmett and David Stirzaker &amp;lt;br&amp;gt;  Oxford University Press (2020)&lt;br /&gt;
|header16=&lt;br /&gt;
|label16 = &lt;br /&gt;
|data16  = [[File:Probability_and_Computing_2ed.jpg|border|100px]]&lt;br /&gt;
|header17=&lt;br /&gt;
|label17 = &lt;br /&gt;
|data17  = &#039;&#039;&#039;Probability and Computing&#039;&#039;&#039; (2E) &amp;lt;br&amp;gt; Michael Mitzenmacher and Eli Upfal &amp;lt;br&amp;gt;   Cambridge University Press (2017)&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Probability Theory and Mathematical Statistics&#039;&#039; (概率论与数理统计) class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 鞠哲：[mailto:juzhe@smail.nju.edu.cn &amp;lt;juzhe@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
** 祝永祺：[mailto:652025330045@smail.nju.edu.cn &amp;lt;652025330045@smail.nju.edu.cn&amp;gt;]，计算机系 426&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;:&lt;br /&gt;
** 周三：9am-12am，仙Ⅱ-212&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: &lt;br /&gt;
:* TBA, 计算机系 804（尹一通）&lt;br /&gt;
:* TBA, 计算机系 516（刘景铖）&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090092561（申请加入需提供姓名、院系、学号）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
课程内容分为三大部分：&lt;br /&gt;
* &#039;&#039;&#039;经典概率论&#039;&#039;&#039;：概率空间、随机变量及其数字特征、多维与连续随机变量、极限定理等内容&lt;br /&gt;
* &#039;&#039;&#039;概率与计算&#039;&#039;&#039;：测度集中现象 (concentration of measure)、概率法 (the probabilistic method)、离散随机过程的相关专题&lt;br /&gt;
* &#039;&#039;&#039;数理统计&#039;&#039;&#039;：参数估计、假设检验、贝叶斯估计、线性回归等统计推断等概念&lt;br /&gt;
&lt;br /&gt;
对于第一和第二部分，要求清楚掌握基本概念，深刻理解关键的现象与规律以及背后的原理，并可以灵活运用所学方法求解相关问题。对于第三部分，要求熟悉数理统计的若干基本概念，以及典型的统计模型和统计推断问题。&lt;br /&gt;
&lt;br /&gt;
经过本课程的训练，力求使学生能够熟悉掌握概率的语言，并会利用概率思维来理解客观世界并对其建模，以及驾驭概率的数学工具来分析和求解专业问题。&lt;br /&gt;
&lt;br /&gt;
=== 教材与参考书 Course Materials ===&lt;br /&gt;
* &#039;&#039;&#039;[BT]&#039;&#039;&#039; 概率导论（第2版·修订版），[美]伯特瑟卡斯（Dimitri P.Bertsekas）[美]齐齐克利斯（John N.Tsitsiklis）著，郑忠国 童行伟 译，人民邮电出版社（2022）。&lt;br /&gt;
* &#039;&#039;&#039;[GS]&#039;&#039;&#039; &#039;&#039;Probability and Random Processes&#039;&#039;, by Geoffrey Grimmett and David Stirzaker; Oxford University Press; 4th edition (2020).&lt;br /&gt;
* &#039;&#039;&#039;[MU]&#039;&#039;&#039; &#039;&#039;Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis&#039;&#039;, by Michael Mitzenmacher, Eli Upfal; Cambridge University Press; 2nd edition (2017).&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grading Policy ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。符合规则的讨论与致谢将不会影响得分。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
&lt;br /&gt;
= Lectures =&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/Intro.pdf 课程简介]&lt;br /&gt;
# [http://tcs.nju.edu.cn/slides/prob2026/ProbSpace.pdf 概率空间]&lt;br /&gt;
#* 阅读：&#039;&#039;&#039;[BT] 第1章&#039;&#039;&#039; 或 &#039;&#039;&#039;[GS] Chapter 1&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)/Basic_enumeration&amp;diff=13484</id>
		<title>组合数学 (Spring 2026)/Basic enumeration</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)/Basic_enumeration&amp;diff=13484"/>
		<updated>2026-03-03T08:58:03Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;== Basic Enumeration ==  The three basic rules for enumeration are: *&amp;#039;&amp;#039;&amp;#039;The sum rule&amp;#039;&amp;#039;&amp;#039;: for any &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;disjoint&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the union &amp;lt;math&amp;gt;|S\cup T|=|S|+|T|&amp;lt;/math&amp;gt;.  *&amp;#039;&amp;#039;&amp;#039;The product rule&amp;#039;&amp;#039;&amp;#039;: for any finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the Cartesian product &amp;lt;math&amp;gt;|S\times T|=|S|\cdot|T|&amp;lt;/math&amp;gt;. *&amp;#039;&amp;#039;&amp;#039;The bijection rule&amp;#039;&amp;#039;&amp;#039;: if there exists a bijection between finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; a...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Basic Enumeration ==&lt;br /&gt;
&lt;br /&gt;
The three basic rules for enumeration are:&lt;br /&gt;
*&#039;&#039;&#039;The sum rule&#039;&#039;&#039;: for any &#039;&#039;&#039;&#039;&#039;disjoint&#039;&#039;&#039;&#039;&#039; finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the union &amp;lt;math&amp;gt;|S\cup T|=|S|+|T|&amp;lt;/math&amp;gt;. &lt;br /&gt;
*&#039;&#039;&#039;The product rule&#039;&#039;&#039;: for any finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the Cartesian product &amp;lt;math&amp;gt;|S\times T|=|S|\cdot|T|&amp;lt;/math&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;The bijection rule&#039;&#039;&#039;: if there exists a bijection between finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;|S|=|T|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Now we apply these rules to solve some basic enumeration problems.&lt;br /&gt;
&lt;br /&gt;
=== Tuples ===&lt;br /&gt;
We count the number of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-tuples of &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt;. Formally, we count the number of elements of &amp;lt;math&amp;gt;[m]^n&amp;lt;/math&amp;gt;. (Remember that &amp;lt;math&amp;gt;[m]=\{0,1,2,\ldots,m-1\}&amp;lt;/math&amp;gt;.)&lt;br /&gt;
&lt;br /&gt;
It is not very hard to see that this number is &amp;lt;math&amp;gt;m^n&amp;lt;/math&amp;gt;. That is, &amp;lt;math&amp;gt;|[m]^n|=m^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To prove this rigorously, we use &#039;&#039;&amp;quot;the product rule&amp;quot;&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;The product rule&#039;&#039;&#039;: for any finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the Cartesian product &amp;lt;math&amp;gt;|S\times T|=|S|\cdot|T|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To count the size of &amp;lt;math&amp;gt;[m]^n\,&amp;lt;/math&amp;gt;, we write &amp;lt;math&amp;gt;[m]^n=[m]\times[m]^{n-1}&amp;lt;/math&amp;gt;, thus &amp;lt;math&amp;gt;|[m]^n|=m\cdot|[m]^{n-1}|\,&amp;lt;/math&amp;gt;. Solving the recursion, we have that &amp;lt;math&amp;gt;|[m]^n|=m^n\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Functions ===&lt;br /&gt;
Consider the problem of counting the number of functions mapping from &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt;, i.e. we count the number of functions in the form &amp;lt;math&amp;gt;f:[n]\rightarrow [m]&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We claim that this is the same as counting the number of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-tuples of &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt;. To see this, for any &amp;lt;math&amp;gt;f:[n]\rightarrow [m]&amp;lt;/math&amp;gt;, we define a tuple &amp;lt;math&amp;gt;v_f\in[m]^n&amp;lt;/math&amp;gt; by letting &amp;lt;math&amp;gt;v_f(i)=f(i-1)&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;i=1,2,\ldots,n&amp;lt;/math&amp;gt;. It is easy to verify that &amp;lt;math&amp;gt;v&amp;lt;/math&amp;gt; defines a &#039;&#039;&#039;bijection&#039;&#039;&#039; (a 1-1 correspondence) between &amp;lt;math&amp;gt;\{f:[n]\rightarrow [m]\}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;[m]^n&amp;lt;/math&amp;gt;. (Consider this as an exercise.)&lt;br /&gt;
&lt;br /&gt;
Now we summon the &#039;&#039;&amp;quot;the bijection rule&amp;quot;&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;The bijection rule&#039;&#039;&#039;: if there exists a bijection between finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;|S|=|T|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Applying this rule, we have that the number of functions from &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt; equals the number of tuples in &amp;lt;math&amp;gt;[m]^n&amp;lt;/math&amp;gt;, which is &amp;lt;math&amp;gt;m^n&amp;lt;/math&amp;gt; as we proved previously.&lt;br /&gt;
&lt;br /&gt;
=== Subsets ===&lt;br /&gt;
We count the number of subsets of a set.&lt;br /&gt;
&lt;br /&gt;
Let&amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-element set, or &#039;&#039;&#039;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set&#039;&#039;&#039; for short. &lt;br /&gt;
Let &amp;lt;math&amp;gt;2^S=\{T\mid T\subset S\}&amp;lt;/math&amp;gt; denote the set of all subset of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. &amp;lt;math&amp;gt;2^S&amp;lt;/math&amp;gt; is called the &#039;&#039;&#039;power set&#039;&#039;&#039; of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We give a combinatorial proof that &amp;lt;math&amp;gt;|2^S|=2^n&amp;lt;/math&amp;gt;. We observe that every subset &amp;lt;math&amp;gt;T\in 2^S&amp;lt;/math&amp;gt; corresponds to a unique bit-vector &amp;lt;math&amp;gt;v\in\{0,1\}^S&amp;lt;/math&amp;gt;, such that each bit &amp;lt;math&amp;gt;v_i&amp;lt;/math&amp;gt; indicates whether &amp;lt;math&amp;gt;x_i\in S&amp;lt;/math&amp;gt;. Formally, define a map &amp;lt;math&amp;gt;\phi:2^S\rightarrow\{0,1\}^n&amp;lt;/math&amp;gt; by &amp;lt;math&amp;gt;\phi(T)=(v_1,v_2,\ldots,v_n)&amp;lt;/math&amp;gt;, where&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
v_i=\begin{cases}&lt;br /&gt;
1 &amp;amp; \mbox{if }x_i\in T\\&lt;br /&gt;
0 &amp;amp; \mbox{if }x_i\not\in T.&lt;br /&gt;
\end{cases}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
The map &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is a bijection. The proof that &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is a bijection is left as an exercise.&lt;br /&gt;
&lt;br /&gt;
Since there is a bijection between &amp;lt;math&amp;gt;2^S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;\{0,1\}^n&amp;lt;/math&amp;gt;, it holds that &amp;lt;math&amp;gt;|2^S|=|\{0,1\}^n|=2^n\,&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are two elements of the proof:&lt;br /&gt;
* Find a 1-1 correspondence between subsets of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set and &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-bit vectors.&lt;br /&gt;
: An application of this in Computer Science is that we can use bit-array as a data structure for sets: any set defined over a &#039;&#039;&#039;universe&#039;&#039;&#039; &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; can be represented by an array of &amp;lt;math&amp;gt;|U|&amp;lt;/math&amp;gt; bits.&lt;br /&gt;
* The bijection rule: if there is a 1-1 correspondence between two sets, then their cardinalities are the same.&lt;br /&gt;
&lt;br /&gt;
Many counting problems are solved by establishing a bijection between the set to be counted and some easy-to-count set. This kind of proofs are usually called (non-rigorously) &#039;&#039;&#039;combinatorial proofs&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
We give an alternative proof that &amp;lt;math&amp;gt;|2^S|=2^n&amp;lt;/math&amp;gt;. The proof needs another basic counting rule:  &#039;&#039;&amp;quot;the sum rule&amp;quot;&#039;&#039;.&lt;br /&gt;
*&#039;&#039;&#039;The sum rule&#039;&#039;&#039;: for any &#039;&#039;&#039;&#039;&#039;disjoint&#039;&#039;&#039;&#039;&#039; finite sets &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;T&amp;lt;/math&amp;gt;, the cardinality of the union &amp;lt;math&amp;gt;|S\cup T|=|S|+|T|&amp;lt;/math&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Define the function &amp;lt;math&amp;gt;f(n)=|2^{S_n}|&amp;lt;/math&amp;gt;, where &amp;lt;math&amp;gt;S_n=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt; is an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. Our goal is to compute &amp;lt;math&amp;gt;f(n)&amp;lt;/math&amp;gt;. We prove the following recursion for &amp;lt;math&amp;gt;f(n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Lemma|&lt;br /&gt;
:&amp;lt;math&amp;gt;f(n)=2f(n-1)\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Fix an element &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; be the set of subsets of &amp;lt;math&amp;gt;S_n&amp;lt;/math&amp;gt; that contain &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt; and let &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; be the set of subsets of &amp;lt;math&amp;gt;S_n&amp;lt;/math&amp;gt; that do not contain &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt;. It is obvious that &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; are disjoint (i.e. &amp;lt;math&amp;gt;U\cap V=\emptyset&amp;lt;/math&amp;gt;) and &amp;lt;math&amp;gt;2^{S_n}=U\cup V&amp;lt;/math&amp;gt;, because any subset of &amp;lt;math&amp;gt;S_n&amp;lt;/math&amp;gt; either contains &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt; or does not contain &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt; but not both.  &lt;br /&gt;
&lt;br /&gt;
Applying the sum rule, &lt;br /&gt;
:&amp;lt;math&amp;gt;f(n)=|U\cup V|=|U|+|V|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The next observation is that &amp;lt;math&amp;gt;|U|=|V|=f(n-1)&amp;lt;/math&amp;gt;, because &amp;lt;math&amp;gt;V&amp;lt;/math&amp;gt; is exactly the &amp;lt;math&amp;gt;2^{S_{n-1}}&amp;lt;/math&amp;gt;, and &amp;lt;math&amp;gt;U&amp;lt;/math&amp;gt; is the set resulting from adding &amp;lt;math&amp;gt;x_n&amp;lt;/math&amp;gt; to every member of &amp;lt;math&amp;gt;2^{S_{n-1}}&amp;lt;/math&amp;gt;. Therefore, &lt;br /&gt;
:&amp;lt;math&amp;gt;f(n)=|U|+|V|=f(n-1)+f(n-1)=2f(n-1)\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
The elementary case &amp;lt;math&amp;gt;f(0)=1&amp;lt;/math&amp;gt;, because &amp;lt;math&amp;gt;\emptyset&amp;lt;/math&amp;gt; has only one subset &amp;lt;math&amp;gt;\emptyset&amp;lt;/math&amp;gt;. Solving the recursion, we have that &amp;lt;math&amp;gt;|2^S|=f(n)=2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Subsets of fixed size ===&lt;br /&gt;
We then count the number of subsets of fixed size of a set. Again, let &amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt; be an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. We define &amp;lt;math&amp;gt;{S\choose k}&amp;lt;/math&amp;gt; to be the set of all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-elements subsets (or &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subsets&#039;&#039;&#039;) of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;. Formally, &amp;lt;math&amp;gt;{S\choose k}=\{T\subseteq S\mid |T|=k\}&amp;lt;/math&amp;gt;. The set &amp;lt;math&amp;gt;{S\choose k}&amp;lt;/math&amp;gt; is sometimes called the &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-uniform&#039;&#039;&#039; of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We denote that &amp;lt;math&amp;gt;{n\choose k}=\left|{S\choose k}\right|&amp;lt;/math&amp;gt;. The notation &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; is read &amp;quot;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; choose &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;{n\choose k}=\frac{n(n-1)\cdots(n-k+1)}{k(k-1)\cdots 1}=\frac{n!}{k!(n-k)!}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
The number of &#039;&#039;&#039;ordered&#039;&#039;&#039; &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subsets of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set is &amp;lt;math&amp;gt;n(n-1)\cdots(n-k+1)&amp;lt;/math&amp;gt;. Every &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset has &amp;lt;math&amp;gt;k!=k(k-1)\cdots1&amp;lt;/math&amp;gt; ways to order it.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
;Some notations&lt;br /&gt;
* &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt;, read &amp;quot;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; factorial&amp;quot;, is defined as that &amp;lt;math&amp;gt;n!=n(n-1)(n-2)\cdots 1&amp;lt;/math&amp;gt;, with the convention that &amp;lt;math&amp;gt;0!=1&amp;lt;/math&amp;gt;.&lt;br /&gt;
* &amp;lt;math&amp;gt;n(n-1)\cdots(n-k+1)=\frac{n!}{(n-k)!}&amp;lt;/math&amp;gt; is usually denoted as &amp;lt;math&amp;gt;(n)_k\,&amp;lt;/math&amp;gt;, read &amp;quot;&amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; lower factorial &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Binomial coefficient ===&lt;br /&gt;
The quantity &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;binomial coefficient&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
# &amp;lt;math&amp;gt;{n\choose k}={n\choose n-k}&amp;lt;/math&amp;gt;;&lt;br /&gt;
# &amp;lt;math&amp;gt;\sum_{k=0}^n {n\choose k}=2^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
1. We give two proofs for the first equation:&lt;br /&gt;
:(1) (numerical proof)&lt;br /&gt;
::&amp;lt;math&amp;gt;{n\choose k}=\frac{n!}{k!(n-k)!}={n\choose n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
:(2) (combinatorial proof)&lt;br /&gt;
::Choosing &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; elements from an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set is equivalent to choosing the &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; elements to leave out. Formally, every &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset &amp;lt;math&amp;gt;T\in{S\choose k}&amp;lt;/math&amp;gt; is uniquely specified by its complement &amp;lt;math&amp;gt;S\setminus T\in {S\choose n-k}&amp;lt;/math&amp;gt;, and the same holds for &amp;lt;math&amp;gt;(n-k)&amp;lt;/math&amp;gt;-subsets, thus we have a bijection between &amp;lt;math&amp;gt;{S\choose k}&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;{S\choose n-k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
2. The second equation can also be proved in different ways, but the combinatorial proof is much easier. For an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-element set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, it is obvious that we can enumerate all subsets of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; by enumerating &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subsets for every possible size &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, i.e. it holds that&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
2^S=\bigcup_{k=0}^n{S\choose k}.&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
For different &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;{S\choose k}&amp;lt;/math&amp;gt; are obviously disjoint. By the sum rule,&lt;br /&gt;
:&amp;lt;math&amp;gt;2^n=|2^S|=\left|\bigcup_{k=0}^n{S\choose k}\right|=\sum_{k=0}^n\left|{S\choose k}\right|=\sum_{k=0}^n {n\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; is called binomial coefficient for a reason. The following celebrated &#039;&#039;&#039;Binomial Theorem&#039;&#039;&#039; states that if a power of a binomial is expanded, the coefficients in the resulting polynomial are the binomial coefficients.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Binomial theorem)|&lt;br /&gt;
:&amp;lt;math&amp;gt;(1+x)^n=\sum_{k=0}^n{n\choose k}x^k&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Write &amp;lt;math&amp;gt;(1+x)^n&amp;lt;/math&amp;gt; as the product of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; factors&lt;br /&gt;
:&amp;lt;math&amp;gt;(1+x)(1+x)\cdots (1+x)&amp;lt;/math&amp;gt;.&lt;br /&gt;
The term &amp;lt;math&amp;gt;x^k&amp;lt;/math&amp;gt; is obtained by choosing &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; from &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; factors and 1 from the rest &amp;lt;math&amp;gt;(n-k)&amp;lt;/math&amp;gt; factors. There are &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; ways of choosing these &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; factors, so the coefficient of &amp;lt;math&amp;gt;x^k&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following proposition has an easy proof due to the binomial theorem.&lt;br /&gt;
{{Theorem| Proposition|&lt;br /&gt;
:For &amp;lt;math&amp;gt;n&amp;gt;0&amp;lt;/math&amp;gt;, the numbers of subsets of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set of even and of odd cardinality are equal.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Set &amp;lt;math&amp;gt;x=-1&amp;lt;/math&amp;gt; in the binomial theorem.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
0=(1-1)^n=\sum_{k=0}^n{n\choose k}(-1)^k=\sum_{\overset{0\le k\le n}{k \text{ even}}}{n\choose k}-\sum_{\overset{0\le k\le n}{k \text{ odd}}}{n\choose k},&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
therefore&lt;br /&gt;
:&amp;lt;math&amp;gt;\sum_{\overset{0\le k\le n}{k \text{ even}}}{n\choose k}=\sum_{\overset{0\le k\le n}{k \text{ odd}}}{n\choose k}.&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
For counting problems, what we care about are &#039;&#039;numbers&#039;&#039;. In the binomial theorem, a formal &#039;&#039;variable&#039;&#039; &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; is introduced. It looks having nothing to do with our problem, but turns out to be very useful. This idea of introducing a formal variable is the basic idea of some advanced counting techniques, which will be discussed in future classes.&lt;br /&gt;
&lt;br /&gt;
=== Compositions of an integer ===&lt;br /&gt;
A &#039;&#039;&#039;composition&#039;&#039;&#039; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is an expression of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; as an &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;&#039;&#039;ordered&#039;&#039;&amp;lt;/font&amp;gt; sum of &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;&#039;&#039;positive&#039;&#039;&amp;lt;/font&amp;gt; integers. A &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition&#039;&#039;&#039; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is a composition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; with exactly &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; positive summands. &lt;br /&gt;
&lt;br /&gt;
Formally, a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-tuple &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_k)\in\{1,2,\ldots,n\}^k&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;a_1+a_2+\cdots+a_k=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Suppose we have &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; identical balls in a line. A &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition partitions these &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; &#039;&#039;nonempty&#039;&#039; sets, illustrated as follows.&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{array}{c|cc|c|c|ccc|cc}&lt;br /&gt;
\bigcirc \,&amp;amp;\, \bigcirc \,&amp;amp; \bigcirc \,&amp;amp;\, \bigcirc \,&amp;amp;\, \bigcirc \,&amp;amp;\, \bigcirc &amp;amp;\, \bigcirc &amp;amp;\, \bigcirc \,&amp;amp;\, \bigcirc \,&amp;amp; \bigcirc&lt;br /&gt;
\end{array}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
So the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; equals the number of ways we put &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; bars &amp;quot;&amp;lt;math&amp;gt;|&amp;lt;/math&amp;gt;&amp;quot; into &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; slots &amp;quot;&amp;lt;math&amp;gt;\sqcup&amp;lt;/math&amp;gt;&amp;quot;, where each slot has at most one bar (because all the summands &amp;lt;math&amp;gt;a_i&amp;gt;0&amp;lt;/math&amp;gt;):&lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc \sqcup \bigcirc&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
which is equal to the number of ways of choosing &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; slots out of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; slots, which is &amp;lt;math&amp;gt;{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
This graphic argument can be expressed as a formal proof. We construct a bijection between the set of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;{\{1,2,\ldots,n-1\}\choose k-1}&amp;lt;/math&amp;gt; as follows. &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; be a mapping that given a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_k)&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\phi((a_1,a_2,\ldots,a_k))&lt;br /&gt;
&amp;amp;=\{a_1,\,\,a_1+a_2,\,\,a_1+a_2+a_3,\,\,\ldots,\,\,a_1+a_2+\cdots+a_{k-1}\}\\&lt;br /&gt;
&amp;amp;=\left\{\sum_{i=1}^ja_i\,\,\bigg|\,\, 1\le j&amp;lt;k\right\}.&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; maps every &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition to a &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-subset of &amp;lt;math&amp;gt;\{1,2,\ldots,n-1\}&amp;lt;/math&amp;gt;. It is easy to verify that &amp;lt;math&amp;gt;\phi&amp;lt;/math&amp;gt; is a bijection, thus the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
----&lt;br /&gt;
The number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is equal to the number of solutions to &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt; in &#039;&#039;positive&#039;&#039; integers. This suggests us to relax the constraint and count the number of solutions to &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt; in &#039;&#039;nonnegative&#039;&#039; integers. We call such a solution a &#039;&#039;&#039;weak &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition&#039;&#039;&#039; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Formally, a weak &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is a tuple &amp;lt;math&amp;gt;(x_1,x_2,\ldots,x_k)\in[n+1]^k&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Given a weak &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition &amp;lt;math&amp;gt;(x_1,x_2,\ldots,x_k)&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, if we set &amp;lt;math&amp;gt;y_i=x_i+1&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;1\le i\le k&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;y_i&amp;gt;0&amp;lt;/math&amp;gt; and &lt;br /&gt;
:&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
y_1+y_2+\cdots +y_k&lt;br /&gt;
&amp;amp;=(x_1+1)+(x_2+1)+\cdots+(x_k+1)&amp;amp;=n+k,&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
i.e., &amp;lt;math&amp;gt;(y_1,y_2,\ldots,y_k)&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition of &amp;lt;math&amp;gt;n+k&amp;lt;/math&amp;gt;. It is easy to see that it defines a bijection between weak &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n+k&amp;lt;/math&amp;gt;. Therefore, the number of weak &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;{n+k-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
----&lt;br /&gt;
We now count the number of solutions to &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k\le n&amp;lt;/math&amp;gt; in nonnegative integers. &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;x_{k+1}=n-(x_1+x_2+\cdots+x_k)&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;x_{k+1}\ge 0&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x_1+x_2+\ldots+x_k+x_{k+1}=n&amp;lt;/math&amp;gt;. &lt;br /&gt;
The problem is transformed to that counting the number of solutions to the above equation in nonnegative integers. The answer is &amp;lt;math&amp;gt;{n+k\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Multisets ===&lt;br /&gt;
A &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is sometimes called a &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-combination of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; without repetitions&#039;&#039;&#039;. This suggests the problem of counting the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-combinations of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; &#039;&#039;&#039;&#039;&#039;with repetitions&#039;&#039;&#039;&#039;&#039;; that is, we choose &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; elements of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;, disregarding order and allowing repeated elements. &lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
:&amp;lt;math&amp;gt;S=\{1,2,3,4\}&amp;lt;/math&amp;gt;. All &amp;lt;math&amp;gt;3&amp;lt;/math&amp;gt;-combination without repetitions are &lt;br /&gt;
::&amp;lt;math&amp;gt;\{1,2,3\},\{1,2,4\},\{1,3,4\},\{2,3,4\}\,&amp;lt;/math&amp;gt;. &lt;br /&gt;
:Allowing repetitions, we also include the following 3-combinations:&lt;br /&gt;
::&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
&amp;amp;\{1,1,1\},\{1,1,2\},\{1,1,3\},\{1,1,4\},\{1,2,2\},\{1,3,3\},\{1,4,4\},\\&lt;br /&gt;
&amp;amp;\{2,2,2\},\{2,2,3\},\{2,2,4\},\{2,3,3\},\{2,4,4\},\\&lt;br /&gt;
&amp;amp;\{3,3,3\},\{3,3,4\},\{3,4,4\}\\&lt;br /&gt;
&amp;amp;\{4,4,4\}&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Combinations with repetitions can be formally defined as &#039;&#039;&#039;multisets&#039;&#039;&#039;. A multiset is a set with repeated elements. Formally, a multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; on a set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a function &amp;lt;math&amp;gt;m:S\rightarrow \mathbb{N}&amp;lt;/math&amp;gt;. For any element &amp;lt;math&amp;gt;x\in S&amp;lt;/math&amp;gt;, the integer &amp;lt;math&amp;gt;m(x)\ge 0&amp;lt;/math&amp;gt; is the number of repetitions of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;, called the &#039;&#039;&#039;multiplicity&#039;&#039;&#039; of &amp;lt;math&amp;gt;x&amp;lt;/math&amp;gt;. The sum of multiplicities &amp;lt;math&amp;gt;\sum_{x\in S}m(x)&amp;lt;/math&amp;gt; is called the &#039;&#039;&#039;cardinality&#039;&#039;&#039; of &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; and is denoted as &amp;lt;math&amp;gt;|M|&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multiset on a set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|M|=k&amp;lt;/math&amp;gt;. It is obvious that a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-combination of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; with repetition is simply a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multiset on &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The set of all &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is denoted &amp;lt;math&amp;gt;\left({S\choose k}\right)&amp;lt;/math&amp;gt;. Assuming that &amp;lt;math&amp;gt;n=|S|&amp;lt;/math&amp;gt;, denote &amp;lt;math&amp;gt;\left({n\choose k}\right)=\left|\left({S\choose k}\right)\right|&amp;lt;/math&amp;gt;, which is the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-combinations of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set with repetitions.&lt;br /&gt;
&lt;br /&gt;
Believe it or not: we have already evaluated the number  &amp;lt;math&amp;gt;\left({n\choose k}\right)&amp;lt;/math&amp;gt;. If &amp;lt;math&amp;gt;S=\{x_1,x_2,\ldots,x_n\}&amp;lt;/math&amp;gt;, let &amp;lt;math&amp;gt;z_i=m(x_i)&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;\left({n\choose k}\right)&amp;lt;/math&amp;gt; is the number of solutions to &amp;lt;math&amp;gt;z_1+z_2+\cdots+z_n=k&amp;lt;/math&amp;gt; in nonnegative integers, which is the number of weak &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, which we have seen is &amp;lt;math&amp;gt;{n+k-1\choose n-1}={n+k-1\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There is a direct combinatorial proof that &amp;lt;math&amp;gt;\left({n\choose k}\right)={n+k-1\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Given a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multiset &amp;lt;math&amp;gt;0\le a_0\le a_1\le\cdots\le a_{k-1}\le n-1&amp;lt;/math&amp;gt; on &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;, then defining &amp;lt;math&amp;gt;b_i=a_i+i&amp;lt;/math&amp;gt;, we see that &amp;lt;math&amp;gt;\{b_0,b_1,\ldots,b_{k-1}\}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset of &amp;lt;math&amp;gt;[n+k-1]&amp;lt;/math&amp;gt;. Conversely, given a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-subset &amp;lt;math&amp;gt;0\le b_0\le b_1\le\cdots\le b_{k-1}\le n+k-2&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;[n+k-1]&amp;lt;/math&amp;gt;, then defining &amp;lt;math&amp;gt;a_i=b_i-i&amp;lt;/math&amp;gt;, we have that &amp;lt;math&amp;gt;\{a_0,a_1,\ldots,a_{k-1}\}&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multiset on &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt;. Therefore, we have a bijection between &amp;lt;math&amp;gt;\left({[n]\choose k}\right)&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;{[n+k-1]\choose k}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=== Multinomial coefficients ===&lt;br /&gt;
The binomial coefficient &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; may be interpreted as follows. Each element of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set is placed into two groups, with &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; elements in Group 1 and &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; elements in Group 2. The binomial coefficient &amp;lt;math&amp;gt;{n\choose k}&amp;lt;/math&amp;gt; counts the number of such placements.&lt;br /&gt;
&lt;br /&gt;
This suggests a generalization allowing more than two groups. Let &amp;lt;math&amp;gt;(a_1,a_2,\ldots,a_m)&amp;lt;/math&amp;gt; be a tuple of nonnegative integers summing to &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Let &amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt; denote the number of ways of assigning each element of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set to one of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; groups &amp;lt;math&amp;gt;G_1,G_2,\ldots,G_m&amp;lt;/math&amp;gt; so that exactly &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; elements are assigned to &amp;lt;math&amp;gt;G_i&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The binomial coefficient is just the case when there are two groups, and &amp;lt;math&amp;gt;{n\choose k}={n\choose k,n-k}&amp;lt;/math&amp;gt;. The number &amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;multinomial coefficient&#039;&#039;&#039;. We can think of it as that &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; labeled balls are assigned to &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; labeled bins, and &amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt; is the number of assignments such that the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th bin has &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; balls in it.&lt;br /&gt;
&lt;br /&gt;
The multinomial coefficient can also be interpreted as the number of &#039;&#039;permutations of multisets&#039;&#039;. A permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; can be defined in two equivalent ways:&lt;br /&gt;
* a bijection &amp;lt;math&amp;gt;\pi:S\rightarrow S&amp;lt;/math&amp;gt;;&lt;br /&gt;
* a tuple &amp;lt;math&amp;gt;\pi=(x_1,x_2,\ldots,x_n)\in S^n&amp;lt;/math&amp;gt; such that all &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; are distinct.&lt;br /&gt;
There are &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt; permutations of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;permutation of a multiset&#039;&#039;&#039; &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; is a tuple &amp;lt;math&amp;gt;\pi=(x_1,x_2,\ldots,x_n)&amp;lt;/math&amp;gt; such that every &amp;lt;math&amp;gt;x_i\in M&amp;lt;/math&amp;gt; appears in &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; for exactly &amp;lt;math&amp;gt;m(x_i)&amp;lt;/math&amp;gt; times, where &amp;lt;math&amp;gt;m(x_i)&amp;lt;/math&amp;gt; is the multiplicity of &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;Example&lt;br /&gt;
:We want to enumerate all the ways of reordering the word &amp;quot;multinomial&amp;quot;. Note that in this word, the letter &amp;quot;m&amp;quot;, &amp;quot;l&amp;quot; and &amp;quot;i&amp;quot; each appears twice. So the problem is to enumerate the permutations of the multiset &amp;lt;math&amp;gt;\{\text{a, i, i, l, l, m, m, n, o, t, u}\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; be a multiset of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct elements &amp;lt;math&amp;gt;x_1,x_2,\ldots,x_m&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; has multiplicity &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. A permutation &amp;lt;math&amp;gt;\pi&amp;lt;/math&amp;gt; of multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; assigns &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; indices &amp;lt;math&amp;gt;1,2,\ldots,n&amp;lt;/math&amp;gt; to &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; groups, where each group corresponds to a distinct element &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt;, such that &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; is assigned to group &amp;lt;math&amp;gt;j&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;\pi_i=x_j&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Therefore,&lt;br /&gt;
&amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt; is also the number of permutations of a multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;|M|=n&amp;lt;/math&amp;gt; such that &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct elements whose multiplicities are given by &amp;lt;math&amp;gt;a_1,a_2,\ldots,a_m&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}=\frac{n!}{a_1!a_2!\cdots a_m!}.&amp;lt;/math&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
There are &amp;lt;math&amp;gt;n!&amp;lt;/math&amp;gt; permutations of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; objects. Assume that these &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; objects are the elements of an multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct elements with &amp;lt;math&amp;gt;|M|=n&amp;lt;/math&amp;gt; and multiplicities &amp;lt;math&amp;gt;a_1,a_2,\ldots,a_m&amp;lt;/math&amp;gt;. Since &amp;lt;math&amp;gt;a_i!&amp;lt;/math&amp;gt; permutations of object &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; do not change the permutation of the multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;, every &amp;lt;math&amp;gt;a_1!a_2!\cdots a_m!&amp;lt;/math&amp;gt; permutations of these &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; objects correspond to the same permutation of the multiset &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt;. Thus, the number of permutations of &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;\frac{n!}{a_1!a_2!\cdots a_m!}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
We also have the Multinomial Theorem.&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt; is the coefficient of &amp;lt;math&amp;gt;x_1^{a_1}x_2^{a_2}\cdots x_m^{a_m}&amp;lt;/math&amp;gt; in &amp;lt;math&amp;gt;(x_1+x_2+\cdots +x_m)^n&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Write&lt;br /&gt;
:&amp;lt;math&amp;gt;(x_1+x_2+\cdots +x_m)^n=(x_1+x_2+\cdots +x_m)\cdots (x_1+x_2+\cdots +x_m)&amp;lt;/math&amp;gt;. &lt;br /&gt;
Each of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; factors corresponds to a distinct ball, and &amp;lt;math&amp;gt;x_1,x_2,\ldots,x_m&amp;lt;/math&amp;gt; correspond to &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; groups. The coefficient of &amp;lt;math&amp;gt;x_1^{a_1}x_2^{a_2}\cdots x_m^{a_m}&amp;lt;/math&amp;gt; equals the number of ways to put &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;distinct balls to &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct groups so that group &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt; receives &amp;lt;math&amp;gt;a_i&amp;lt;/math&amp;gt; balls, which is exactly our first definition of &amp;lt;math&amp;gt;{n\choose a_1,a_2,\ldots,a_m}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Partitions of a set ===&lt;br /&gt;
A &#039;&#039;&#039;partition&#039;&#039;&#039; of finite set &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; is a collection &amp;lt;math&amp;gt;P=\{S_1,S_2,\ldots,S_k\}&amp;lt;/math&amp;gt; of subsets of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; such that:&lt;br /&gt;
* &amp;lt;math&amp;gt;S_i\neq\emptyset&amp;lt;/math&amp;gt; for every &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;;&lt;br /&gt;
* &amp;lt;math&amp;gt;S_i\cap S_j=\emptyset&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;i\neq j&amp;lt;/math&amp;gt; (also called that blocks are pairwise &#039;&#039;&#039;disjoint&#039;&#039;&#039;);&lt;br /&gt;
* &amp;lt;math&amp;gt;S_1\cup S_2\cup\cdots\cup S_k=S&amp;lt;/math&amp;gt;.&lt;br /&gt;
Each &amp;lt;math&amp;gt;S_i&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;block&#039;&#039;&#039; of partition &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;. We call &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; a &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition&#039;&#039;&#039; of &amp;lt;math&amp;gt;S&amp;lt;/math&amp;gt; if &amp;lt;math&amp;gt;|P|=k&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Define &amp;lt;math&amp;gt;\left\{{n \atop k}\right\}&amp;lt;/math&amp;gt; to be the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. Note that since a partition &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is a set, the order of blocks &amp;lt;math&amp;gt;S_1,S_2,\ldots,S_k&amp;lt;/math&amp;gt; is disregarded when counting &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions.&lt;br /&gt;
&lt;br /&gt;
The number &amp;lt;math&amp;gt;\left\{{n \atop k}\right\}&amp;lt;/math&amp;gt; is called a &#039;&#039;&#039;Stirling number of the second kind&#039;&#039;&#039;.&lt;br /&gt;
:{|border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
;Stirling number&lt;br /&gt;
: [http://en.wikipedia.org/wiki/Stirling_number Stirling numbers] are named after James Stirling.There are two kinds of Stirling numbers. [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_first_kind Stirling number of the first kind] is related to the number of permutations with fixed number of disjoint cycles. And [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind] counts the number of ways of partitioning a set into fixed number of disjoint blocks. Both numbers arise from important combinatorial problems and have various applications in combinatorics and other branches of Mathematics.&lt;br /&gt;
|}&lt;br /&gt;
Unlike previous identities, it is very difficult to give a determinant for &amp;lt;math&amp;gt;\left\{{n \atop k}\right\}&amp;lt;/math&amp;gt;. But we have the following recurrence:&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
:&amp;lt;math&amp;gt;\left\{{n \atop k}\right\}=k\left\{{n-1 \atop k}\right\}+\left\{{n-1 \atop k-1}\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
To partition &amp;lt;math&amp;gt;\{1,2,\ldots,n\}&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; blocks,  &lt;br /&gt;
* we can partition &amp;lt;math&amp;gt;\{1,2,\ldots,{n-1}\}&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; blocks and place &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; into one of the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; blocks, which gives us &amp;lt;math&amp;gt;k\left\{{n-1 \atop k}\right\}&amp;lt;/math&amp;gt; ways to do so; &lt;br /&gt;
* or we can partition &amp;lt;math&amp;gt;\{1,2,\ldots,{n-1}\}&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k-1&amp;lt;/math&amp;gt; blocks and let &amp;lt;math&amp;gt;\{n\}&amp;lt;/math&amp;gt; be a block by itself, which gives us &amp;lt;math&amp;gt;\left\{{n-1 \atop k-1}\right\}&amp;lt;/math&amp;gt; ways to do so.&lt;br /&gt;
&lt;br /&gt;
The partitions constructed by these two methods are different, since by the first method, &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is always in a block of cardinality &amp;lt;math&amp;gt;&amp;gt;1&amp;lt;/math&amp;gt;, and by the second method, &amp;lt;math&amp;gt;\{n\}&amp;lt;/math&amp;gt; is always a block. So the cases are disjoint. And any &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set must be constructible by one of the two methods, thus by the sum rule,&lt;br /&gt;
:&amp;lt;math&amp;gt;\,\left\{{n \atop k}\right\}=k\left\{{n-1 \atop k}\right\}+\left\{{n-1 \atop k-1}\right\}&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;B_n=\sum_{k=1}^n \left\{{n \atop k}\right\}&amp;lt;/math&amp;gt;, which gives the total number of partitions of an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-set. &amp;lt;math&amp;gt;B(n)&amp;lt;/math&amp;gt; is called the &#039;&#039;&#039;Bell number&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
=== Partitions of a number ===&lt;br /&gt;
We count the ways of partitioning &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; &#039;&#039;identical&#039;&#039; objects into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; &#039;&#039;unordered&#039;&#039; groups. This is equivalent to counting the ways partitioning a number &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; unordered parts.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;&amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition&#039;&#039;&#039; of a number &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is a multiset &amp;lt;math&amp;gt;\{x_1,x_2,\ldots,x_k\}&amp;lt;/math&amp;gt; with &amp;lt;math&amp;gt;x_i\ge 1&amp;lt;/math&amp;gt; for every element &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
We define &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; as the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For example, number 7 has the following partitions:&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&amp;lt;math&amp;gt;&lt;br /&gt;
\begin{align}&lt;br /&gt;
&amp;amp;\{7\}&lt;br /&gt;
&amp;amp; p_1(7)=1\\&lt;br /&gt;
&amp;amp;\{1,6\},\{2,5\},\{3,4\}&lt;br /&gt;
&amp;amp; p_2(7)=3\\&lt;br /&gt;
&amp;amp;\{1,1,5\}, \{1,2,4\}, \{1,3,3\}, \{2,2,3\} &lt;br /&gt;
&amp;amp; p_3(7)=4\\&lt;br /&gt;
&amp;amp;\{1,1,1,4\},\{1,1,2,3\}, \{1,2,2,2\}&lt;br /&gt;
&amp;amp; p_4(7)=3\\&lt;br /&gt;
&amp;amp;\{1,1,1,1,3\},\{1,1,1,2,2\}&lt;br /&gt;
&amp;amp; p_5(7)=2\\&lt;br /&gt;
&amp;amp;\{1,1,1,1,1,2\}&lt;br /&gt;
&amp;amp; p_6(7)=1\\&lt;br /&gt;
&amp;amp;\{1,1,1,1,1,1,1\}&lt;br /&gt;
&amp;amp; p_7(7)=1&lt;br /&gt;
\end{align}&lt;br /&gt;
&amp;lt;/math&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Equivalently, we can also define that A &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of a number &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-tuple &amp;lt;math&amp;gt;(x_1,x_2,\ldots,x_k)&amp;lt;/math&amp;gt; with:&lt;br /&gt;
* &amp;lt;math&amp;gt;x_1\ge x_2\ge\cdots\ge x_k\ge 1&amp;lt;/math&amp;gt;;&lt;br /&gt;
* &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; the number of integral solutions to the above system.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;p(n)=\sum_{k=1}^n p_k(n)&amp;lt;/math&amp;gt; be the total number of partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. The function &amp;lt;math&amp;gt;p(n)&amp;lt;/math&amp;gt; is called the &#039;&#039;&#039;partition number&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
We now try to determine &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;. Unfortunately, &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt; does not have a nice closed form formula. We now give a recurrence for &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
:&amp;lt;math&amp;gt;p_k(n)=p_{k-1}(n-1)+p_k(n-k)\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Suppose that &amp;lt;math&amp;gt;(x_1,\ldots,x_k)&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Note that it must hold that&lt;br /&gt;
:&amp;lt;math&amp;gt;x_1\ge x_2\ge \cdots \ge x_k\ge 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
There are two cases: &amp;lt;math&amp;gt;x_k=1&amp;lt;/math&amp;gt; or &amp;lt;math&amp;gt;x_k&amp;gt;1&amp;lt;/math&amp;gt;.&lt;br /&gt;
;Case 1.&lt;br /&gt;
:If &amp;lt;math&amp;gt;x_k=1&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;(x_1,\cdots,x_{k-1})&amp;lt;/math&amp;gt; is a distinct &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt;. And every &amp;lt;math&amp;gt;(k-1)&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n-1&amp;lt;/math&amp;gt; can be obtained in this way. Thus the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; in this case is &amp;lt;math&amp;gt;p_{k-1}(n-1)&amp;lt;/math&amp;gt;. &lt;br /&gt;
;Case 2.&lt;br /&gt;
:If &amp;lt;math&amp;gt;x_k&amp;gt;1&amp;lt;/math&amp;gt;, then &amp;lt;math&amp;gt;(x_1-1,\cdots,x_{k}-1)&amp;lt;/math&amp;gt; is a distinct &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt;. And every &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; can be obtained in this way. Thus the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; in this case is &amp;lt;math&amp;gt;p_{k}(n-k)&amp;lt;/math&amp;gt;. &lt;br /&gt;
In conclusion, the number of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is &amp;lt;math&amp;gt;p_{k-1}(n-1)+p_k(n-k)&amp;lt;/math&amp;gt;, i.e.&lt;br /&gt;
:&amp;lt;math&amp;gt;p_k(n)=p_{k-1}(n-1)+p_k(n-k)\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Use the above recurrence, we can compute the &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;  for some decent &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; by computer simulation.&lt;br /&gt;
&lt;br /&gt;
If we are not restricted ourselves to the precise estimation of &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;, the next theorem gives an asymptotic estimation of &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;. Note that it only holds for &#039;&#039;&#039;constant&#039;&#039;&#039; &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, i.e. &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; does not depend on &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&lt;br /&gt;
For any fixed &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;,&lt;br /&gt;
:&amp;lt;math&amp;gt;p_k(n)\sim\frac{n^{k-1}}{k!(k-1)!}&amp;lt;/math&amp;gt;,&lt;br /&gt;
as &amp;lt;math&amp;gt;n\rightarrow \infty&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Suppose that &amp;lt;math&amp;gt;(x_1,\ldots,x_k)&amp;lt;/math&amp;gt; is a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Then &amp;lt;math&amp;gt;x_1+x_2+\cdots+x_k=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;x_1\ge x_2\ge \cdots \ge x_k\ge 1&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;math&amp;gt;k!&amp;lt;/math&amp;gt; permutations of &amp;lt;math&amp;gt;(x_1,\ldots,x_k)&amp;lt;/math&amp;gt; yield at most &amp;lt;math&amp;gt;k!&amp;lt;/math&amp;gt; many &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions (the &#039;&#039;ordered&#039;&#039; sum of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; positive integers). There are &amp;lt;math&amp;gt;{n-1\choose k-1}&amp;lt;/math&amp;gt; many &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-compositions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, every one of which can be yielded in this way by permuting a partition. Thus,&lt;br /&gt;
:&amp;lt;math&amp;gt;k!p_k(n)\ge{n-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;y_i=x_i+k-i&amp;lt;/math&amp;gt;. That is, &amp;lt;math&amp;gt;y_k=x_k, y_{k-1}=x_{k-1}+1, y_{k-2}=x_{k-2}+2,\ldots, y_{1}=x_{1}+k-1&amp;lt;/math&amp;gt;. Then, it holds that&lt;br /&gt;
* &amp;lt;math&amp;gt;y_1&amp;gt;y_2&amp;gt;\cdots&amp;gt;y_k\ge 1&amp;lt;/math&amp;gt;; and &lt;br /&gt;
* &amp;lt;math&amp;gt;y_1+y_2+\cdots+y_k=n+\frac{k(k-1)}{2}&amp;lt;/math&amp;gt;.&lt;br /&gt;
Each permutation of &amp;lt;math&amp;gt;(y_1,y_2,\ldots,y_k)&amp;lt;/math&amp;gt; yields a &#039;&#039;&#039;distinct&#039;&#039;&#039; &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-composition of &amp;lt;math&amp;gt;n+\frac{k(k-1)}{2}&amp;lt;/math&amp;gt;, because all &amp;lt;math&amp;gt;y_i&amp;lt;/math&amp;gt; are distinct.&lt;br /&gt;
Thus, &lt;br /&gt;
:&amp;lt;math&amp;gt;k!p_k(n)\le {n+\frac{k(k-1)}{2}-1\choose k-1}&amp;lt;/math&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Combining the two inequalities, we have&lt;br /&gt;
:&amp;lt;math&amp;gt;\frac{{n-1\choose k-1}}{k!}\le p_k(n)\le \frac{{n+\frac{k(k-1)}{2}-1\choose k-1}}{k!}&amp;lt;/math&amp;gt;.&lt;br /&gt;
The theorem follows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ferrers diagram ===&lt;br /&gt;
A partition of a number &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; can be represented as a diagram of dots (or squares), called a &#039;&#039;&#039;Ferrers diagram&#039;&#039;&#039; (the square version of Ferrers diagram is also called a &#039;&#039;&#039;Young diagram&#039;&#039;&#039;, named after a structured called Young tableaux). &lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;(x_1,x_2,\ldots,x_k)&amp;lt;/math&amp;gt; with that &amp;lt;math&amp;gt;x_1\ge x_2\ge \cdots x_k\ge 1&amp;lt;/math&amp;gt; be a partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. Its Ferrers diagram consists of &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; rows, where the &amp;lt;math&amp;gt;i&amp;lt;/math&amp;gt;-th row contains &amp;lt;math&amp;gt;x_i&amp;lt;/math&amp;gt; dots (or squares).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
{|border=&amp;quot;0&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
{|border=&amp;quot;0&amp;quot;&lt;br /&gt;
|[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess xot45.svg|22px]]||[[File:Chess xot45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess xot45.svg|22px]]&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
[[File:Chess t45.svg|120px]]&lt;br /&gt;
|align=center|&lt;br /&gt;
{|border=&amp;quot;2&amp;quot;  cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|align=center|Ferrers diagram (&#039;&#039;dot version&#039;&#039;) of (5,4,2,1)||&lt;br /&gt;
|align=center|Ferrers diagram (&#039;&#039;square version&#039;&#039;) of (5,4,2,1)&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Conjugate partition&lt;br /&gt;
The partition we get by reading the Ferrers diagram by column instead of rows is called the &#039;&#039;&#039;conjugate&#039;&#039;&#039; of the original partition.&lt;br /&gt;
&amp;lt;div class=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
{|border=&amp;quot;0&amp;quot;&lt;br /&gt;
|align=center|&lt;br /&gt;
{|border=&amp;quot;2&amp;quot;  cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]&lt;br /&gt;
|}&lt;br /&gt;
|&lt;br /&gt;
[[File:Chess t45.svg|120px]]&lt;br /&gt;
|align=center|&lt;br /&gt;
{|border=&amp;quot;2&amp;quot;  cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;3&amp;quot; rules=&amp;quot;all&amp;quot; style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]||[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]&lt;br /&gt;
|-&lt;br /&gt;
|[[File:Chess t45.svg|22px]]&lt;br /&gt;
|}&lt;br /&gt;
|-&lt;br /&gt;
|align=center|&amp;lt;math&amp;gt;(6,4,4,2,1)&amp;lt;/math&amp;gt;||&lt;br /&gt;
|align=center|conjugate: &amp;lt;math&amp;gt;(5,4,3,3,1,1)&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clearly, &lt;br /&gt;
* different partitions cannot have the same conjugate, and &lt;br /&gt;
* every partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; is the conjugate of some partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;,&lt;br /&gt;
so the conjugation mapping is a permutation on the set of partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. This fact is very useful in proving theorems for partitions numbers.&lt;br /&gt;
&lt;br /&gt;
Some theorems of partitions can be easily proved by representing partitions in Ferrers diagrams.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Proposition|&lt;br /&gt;
# The number of partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; which have largest summand &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;, is &amp;lt;math&amp;gt;p_k(n)&amp;lt;/math&amp;gt;. &lt;br /&gt;
# The number of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts equals the number of partitions of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; into at most &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts. Formally,&lt;br /&gt;
::&amp;lt;math&amp;gt;p_k(n)=\sum_{j=1}^k p_j(n-k)&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
# For every &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition, the conjugate partition has largest part &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;. And vice versa.&lt;br /&gt;
# For a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;, remove the leftmost cell of every row of the Ferrers diagram. Totally &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; cells are removed and the remaining diagram is a partition of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; into at most &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts. And for a partition of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; into at most &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts, add a cell to each of the &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; rows (including the empty ones). This will give us a &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-partition of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;. It is easy to see the above mappings are 1-1 correspondences. Thus, the number of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; into &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts equals the number of partitions of &amp;lt;math&amp;gt;n-k&amp;lt;/math&amp;gt; into at most &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt; parts.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== The twelvfold way ==&lt;br /&gt;
We now introduce a general framework for counting problems, called the [http://en.wikipedia.org/wiki/Twelvefold_way twelvefold way]. This framework is introduced by the great mathematician and also a great teacher, [http://en.wikipedia.org/wiki/Gian-Carlo_Rota Gian-Carlo Rota].&lt;br /&gt;
&lt;br /&gt;
Let &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; be finite sets with &amp;lt;math&amp;gt;|N|=n&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;|M|=m&amp;lt;/math&amp;gt;. We count the number of functions &amp;lt;math&amp;gt;f:N\rightarrow M&amp;lt;/math&amp;gt; subject to different restrictions. There are three restrictions regarding the mapping &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; itself:&lt;br /&gt;
# &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is an &#039;&#039;&#039;arbitrary&#039;&#039;&#039; function;&lt;br /&gt;
# &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is an &#039;&#039;&#039;injection&#039;&#039;&#039; (one-to-one);&lt;br /&gt;
# &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; is a &#039;&#039;&#039;surjection&#039;&#039;&#039; (onto).&lt;br /&gt;
&lt;br /&gt;
The elements of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; can be regarded as &#039;&#039;&#039;distinguishable&#039;&#039;&#039; or &#039;&#039;&#039;indistinguishable&#039;&#039;&#039;. Think of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; as a set of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls and &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; as a set of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; bins. A function &amp;lt;math&amp;gt;f:N\rightarrow M&amp;lt;/math&amp;gt; is an assignment of the &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; bins. The balls are &#039;&#039;distinguishable&#039;&#039; if each ball has a distinct label on it, and the balls are &#039;&#039;indistinguishable&#039;&#039; if they are identical. The same also applies to the bins. &lt;br /&gt;
&lt;br /&gt;
Three restrictions on the functions, with two restrictions on each of the domain and the range, together give us twelve counting problems, called the &#039;&#039;&#039;Twelvefold Way&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
The following table gives the solutions to the counting problems.&lt;br /&gt;
{|border=&amp;quot;2&amp;quot;  cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;10&amp;quot; rules=&amp;quot;all&amp;quot;  style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!bgcolor=&amp;quot;#A7C1F2&amp;quot; | Elements of &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt;&lt;br /&gt;
!bgcolor=&amp;quot;#A7C1F2&amp;quot; | Elements of &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; &lt;br /&gt;
!bgcolor=&amp;quot;#A7C1F2&amp;quot; | Any &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; &lt;br /&gt;
!bgcolor=&amp;quot;#A7C1F2&amp;quot; | Injective (1-1) &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; &lt;br /&gt;
!bgcolor=&amp;quot;#A7C1F2&amp;quot; | Surjective (on-to) &amp;lt;math&amp;gt;f&amp;lt;/math&amp;gt; &lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;distinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;distinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;m^n\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\left(m\right)_n&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;m!\left\{{n\atop m}\right\}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;indistinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;distinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\left({m\choose n}\right)&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&amp;lt;math&amp;gt;{m\choose n}&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;|&amp;lt;math&amp;gt;{n-1\choose m-1}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;distinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;indistinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\sum_{k=1}^m \left\{{n\atop k}\right\}&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\begin{cases}1 &amp;amp; \mbox{if }n\le m\\ 0&amp;amp; \mbox{if }n&amp;gt;m\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\left\{{n\atop m}\right\}\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;indistinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &#039;&#039;indistinguishable&#039;&#039;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\sum_{k=1}^m p_k(n)&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;\begin{cases}1 &amp;amp; \mbox{if }n\le m\\ 0&amp;amp; \mbox{if }n&amp;gt;m\end{cases}&amp;lt;/math&amp;gt;&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;p_m(n)\,&amp;lt;/math&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
In the Volume 4A of Don Knuth&#039;s [http://www-cs-faculty.stanford.edu/~uno/taocp.html TAOCP], the twelvefold way is presented as the problems of counting the ways of assigning &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; bins. The domain &amp;lt;math&amp;gt;N&amp;lt;/math&amp;gt; corresponds to a set of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls, the range &amp;lt;math&amp;gt;M&amp;lt;/math&amp;gt; corresponds to a set of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; bins, and each function corresponds to an assignment of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; balls into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; bins. Balls (or bins) are distinguishable if they are &#039;&#039;distinct&#039;&#039; and are indistinguishable if they are &#039;&#039;identical&#039;&#039;. An injective function corresponds to an assignment with &#039;&#039;at most&#039;&#039; one ball in each bin, and a surjective function corresponds to an assignment with &#039;&#039;at least&#039;&#039; one ball(s) in each bin.&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;2&amp;quot;  cellspacing=&amp;quot;4&amp;quot; cellpadding=&amp;quot;10&amp;quot; rules=&amp;quot;all&amp;quot;  style=&amp;quot;margin:1em 1em 1em 0; border:solid 1px #AAAAAA; border-collapse:collapse;empty-cells:show;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | balls per bin&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | unrestricted &lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | ≤ 1&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | ≥ 1&lt;br /&gt;
|-&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct balls, &amp;lt;br&amp;gt;&amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct bins&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-tuples &amp;lt;br&amp;gt;of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; things&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-permutations &amp;lt;br&amp;gt;of &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; things&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| partition of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; ordered parts&lt;br /&gt;
|-&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; identical balls, &amp;lt;br&amp;gt;&amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; distinct bins&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-combinations of &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;with repetitions&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-combinations of &amp;lt;math&amp;gt;[m]&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt; without repetitions&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt;-compositions &amp;lt;br&amp;gt;of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; distinct balls, &amp;lt;br&amp;gt;&amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; identical bins&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| partitions of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;\le m&amp;lt;/math&amp;gt; parts&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; pigeons &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; holes&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| partitions of &amp;lt;math&amp;gt;[n]&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; parts&lt;br /&gt;
|-&lt;br /&gt;
!align=&amp;quot;center&amp;quot; bgcolor=&amp;quot;#A7C1F2&amp;quot; | &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; identical balls, &amp;lt;br&amp;gt;&amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; identical bins&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;\le m&amp;lt;/math&amp;gt; parts&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; pigeons &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; holes&lt;br /&gt;
|align=&amp;quot;center&amp;quot;| partitions of &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt; &amp;lt;br&amp;gt;into &amp;lt;math&amp;gt;m&amp;lt;/math&amp;gt; parts&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
* &#039;&#039;Stanley,&#039;&#039; Enumerative Combinatorics, Volume 1, Chapter 1.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13483</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13483"/>
		<updated>2026-03-03T08:57:28Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[组合数学 (Spring 2026)/Basic enumeration|Basic enumeration | 基本计数]]&lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13482</id>
		<title>组合数学 (Spring 2026)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E7%BB%84%E5%90%88%E6%95%B0%E5%AD%A6_(Spring_2026)&amp;diff=13482"/>
		<updated>2026-03-03T08:56:46Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;{{Infobox |name         = Infobox |bodystyle    =  |title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt; Combinatorics&amp;lt;/font&amp;gt; |titlestyle   =   |image        =  |imagestyle   =  |caption      =  |captionstyle =  |headerstyle  = background:#ccf; |labelstyle   = background:#ddf; |datastyle    =   |header1 =Instructor |label1  =  |data1   =  |header2 =  |label2  =  |data2   = 尹一通 |header3 =  |label3  = Email |data3   = yinyt@nju.edu.cn   |header4 = |label4= office |data4=...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;组合数学  &amp;lt;br&amp;gt;&lt;br /&gt;
Combinatorics&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 尹一通&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn  &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = Wednesday, 2pm-4pm &amp;lt;br&amp;gt; 逸B-313&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = Tuesday, 2-3pm &amp;lt;br&amp;gt;计算机系 804&lt;br /&gt;
|header9 = Textbook&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = [[File:LW-combinatorics.jpeg|border|100px]]&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = van Lint and Wilson. &amp;lt;br&amp;gt; &#039;&#039;A course in Combinatorics, 2nd ed.&#039;&#039;, &amp;lt;br&amp;gt; Cambridge Univ Press, 2001.&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = [[File:Jukna_book.jpg|border|100px]]&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = &lt;br /&gt;
|data13   = Jukna. &#039;&#039;Extremal Combinatorics: &amp;lt;br&amp;gt; With Applications in Computer Science,&amp;lt;br&amp;gt;2nd ed.&#039;&#039;, Springer, 2011.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Combinatorics&#039;&#039; class of Spring 2026. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 尹一通 ([http://tcs.nju.edu.cn/yinyt/ homepage])&lt;br /&gt;
:*&#039;&#039;&#039;email&#039;&#039;&#039;: yinyt@nju.edu.cn&lt;br /&gt;
:*&#039;&#039;&#039;office&#039;&#039;&#039;: 计算机系 804 &lt;br /&gt;
* &#039;&#039;&#039;Teaching assistant&#039;&#039;&#039;:&lt;br /&gt;
** 丁天行&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: Wednesday, 2pm-4pm, 逸A-313.&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: TBA&lt;br /&gt;
:* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 1090691552 (加入时需报姓名、专业、学号)&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 离散数学（Discrete Mathematics）&lt;br /&gt;
* 线性代数（Linear Algebra）&lt;br /&gt;
* 概率论（Probability Theory）&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[组合数学 (Spring 2025)/Course materials|&amp;lt;font size=3&amp;gt;教材和参考书清单&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩 (≥ 60%) 和期末考试成绩 (≤ 40%) 综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
* TBA&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# &lt;br /&gt;
&lt;br /&gt;
= Resources =&lt;br /&gt;
* [http://math.mit.edu/~fox/MAT307.html Combinatorics course] by Jacob Fox&lt;br /&gt;
* [https://yufeizhao.com/pm/ Probabilistic Methods in Combinatorics] and [https://yufeizhao.com/gtacbook/ Graph Theory and Additive Combinatorics] by Yufei Zhao&lt;br /&gt;
* [https://www.math.uvic.ca/~noelj/combinatoricsLectures.html Combinatorics Lecture Videos online]&lt;br /&gt;
* [https://www.math.ucla.edu/~pak/lectures/Math-Videos/comb-videos.htm Collection of Combinatorics Videos]&lt;br /&gt;
&lt;br /&gt;
= Concepts =&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_coefficient Binomial coefficient]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Twelvefold_way The twelvefold way]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Composition_(number_theory) Composition of a number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multiset#Formal_definition Multiset]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Combination#Number_of_combinations_with_repetition Combinations with repetition], [http://en.wikipedia.org/wiki/Multiset#Counting_multisets &amp;lt;math&amp;gt;k&amp;lt;/math&amp;gt;-multisets on a set]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Multinomial_theorem#Multinomial_coefficients Multinomial coefficients]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Stirling_numbers_of_the_second_kind Stirling number of the second kind]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Partition_(number_theory) Partition of a number]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Young_tableau Young tableau]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Fibonacci_number Fibonacci number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Catalan_number Catalan number]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Generating_function Generating function] and [http://en.wikipedia.org/wiki/Formal_power_series formal power series]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Binomial_series Newton&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Inclusion-exclusion_principle The principle of inclusion-exclusion] (and more generally the [http://en.wikipedia.org/wiki/Sieve_theory sieve method])&lt;br /&gt;
* [http://en.wikipedia.org/wiki/M%C3%B6bius_inversion_formula Möbius inversion formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Derangement Derangement], and [http://en.wikipedia.org/wiki/M%C3%A9nage_problem Problème des ménages]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ryser%27s_formula#Ryser_formula Ryser&#039;s formula]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Euler_totient Euler totient function]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Burnside%27s_lemma Burnside&#039;s lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action Group action]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Group_action#Orbits_and_stabilizers Orbits]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/P%C3%B3lya_enumeration_theorem Pólya enumeration theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Permutation_group Permutation group]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Cycle_index Cycle index]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Cayley_formula Cayley&#039;s formula]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Prüfer_sequence Prüfer code for trees]&lt;br /&gt;
** [http://en.wikipedia.org/wiki/Kirchhoff%27s_matrix_tree_theorem Kirchhoff&#039;s matrix-tree theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Double_counting_(proof_technique) Double counting] and the [http://en.wikipedia.org/wiki/Handshaking_lemma handshaking lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Sperner&#039;s_lemma Sperner&#039;s lemma] and [http://en.wikipedia.org/wiki/Brouwer_fixed_point_theorem Brouwer fixed point theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Pigeonhole_principle Pigeonhole principle]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Dirichlet&#039;s_approximation_theorem Dirichlet&#039;s approximation theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Probabilistic_method The Probabilistic Method]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Lov%C3%A1sz_local_lemma Lovász local lemma]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93R%C3%A9nyi_model Erdős–Rényi model for random graphs]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Extremal_graph_theory Extremal graph theory]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Turan_theorem Turán&#039;s theorem], [http://en.wikipedia.org/wiki/Tur%C3%A1n_graph Turán graph]&lt;br /&gt;
* Two analytic inequalities: &lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Cauchy%E2%80%93Schwarz_inequality Cauchy–Schwarz inequality]&lt;br /&gt;
:* the [http://en.wikipedia.org/wiki/Inequality_of_arithmetic_and_geometric_means inequality of arithmetic and geometric means]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Stone_theorem Erdős–Stone theorem] (fundamental theorem of extremal graph theory)&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sunflower_(mathematics) Sunflower lemma and conjecture]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Ko%E2%80%93Rado_theorem Erdős–Ko–Rado theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sperner%27s_theorem Sperner&#039;s theorem]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Sperner_family Sperner system] or &#039;&#039;&#039;antichain&#039;&#039;&#039;&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Sauer%E2%80%93Shelah_lemma Sauer–Shelah lemma]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Vapnik%E2%80%93Chervonenkis_dimension Vapnik–Chervonenkis dimension]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Kruskal%E2%80%93Katona_theorem Kruskal–Katona theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Ramsey_theory Ramsey theory]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Ramsey&#039;s_theorem Ramsey&#039;s theorem]&lt;br /&gt;
:*[http://en.wikipedia.org/wiki/Happy_Ending_problem Happy Ending problem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem Van der Waerden&#039;s theorem]&lt;br /&gt;
:*[https://en.wikipedia.org/wiki/Hales%E2%80%93Jewett_theorem Hales–Jewett theorem]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Hall%27s_marriage_theorem Hall&#039;s theorem ] (the marriage theorem)&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Doubly_stochastic_matrix Birkhoff–Von Neumann theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/K%C3%B6nig&#039;s_theorem_(graph_theory) König-Egerváry theorem]&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Dilworth&#039;s_theorem Dilworth&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Erd%C5%91s%E2%80%93Szekeres_theorem Erdős–Szekeres theorem]&lt;br /&gt;
* The  [http://en.wikipedia.org/wiki/Max-flow_min-cut_theorem Max-Flow Min-Cut Theorem]&lt;br /&gt;
:* [https://en.wikipedia.org/wiki/Menger%27s_theorem Menger&#039;s theorem]&lt;br /&gt;
:* [http://en.wikipedia.org/wiki/Maximum_flow_problem Maximum flow]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Linear_programming Linear programming]&lt;br /&gt;
** [https://en.wikipedia.org/wiki/Dual_linear_program Duality] &lt;br /&gt;
** [https://en.wikipedia.org/wiki/Unimodular_matrix Unimodularity]&lt;br /&gt;
* [https://en.wikipedia.org/wiki/Matroid Matroid]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Main_Page&amp;diff=13481</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Main_Page&amp;diff=13481"/>
		<updated>2026-03-03T07:47:24Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Home Pages for Courses and Seminars */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a course/seminar wiki run by the [http://tcs.nju.edu.cn theory group] in the Department of Computer Science and Technology at Nanjing University.&lt;br /&gt;
&lt;br /&gt;
== Home Pages for Courses and Seminars==&lt;br /&gt;
;Current semester&lt;br /&gt;
* [[高级算法 (Spring 2026)|高级算法 Advanced Algorithms (Spring 2026, Suzhou)]]&lt;br /&gt;
&lt;br /&gt;
* [[组合数学 (Spring 2026)|组合数学 Combinatorics (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
* [[计算复杂性 (Spring 2026)|计算复杂性 Computational Complexity (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
* [[计算方法 Numerical method (Spring 2026)|计算方法 Numerical method (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
* [[概率论与数理统计 (Spring 2026)|概率论与数理统计 Probability Theory (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;Past courses&lt;br /&gt;
&lt;br /&gt;
* Advanced Algorithms: [[高级算法 (Fall 2025)|Fall 2025]], [[高级算法 (Spring 2025)|Spring 2025(Suzhou)]], [[高级算法 (Fall 2024)|Fall 2024]], [[高级算法 (Fall 2023)|Fall 2023]], [[高级算法 (Fall 2022)|Fall 2022]], [[高级算法 (Fall 2021)|Fall 2021]], [[高级算法 (Fall 2020)|Fall 2020]], [[高级算法 (Fall 2019)|Fall 2019]], [[高级算法 (Fall 2018)|Fall 2018]], [[高级算法 (Fall 2017)|Fall 2017]], [[随机算法 \ 高级算法 (Fall 2016)|Fall 2016]].&lt;br /&gt;
&lt;br /&gt;
*Algorithm Design and Analysis: [https://tcs.nju.edu.cn/shili/courses/2024spring-algo/ Spring 2024]&lt;br /&gt;
&lt;br /&gt;
* Combinatorics: [[组合数学 (Spring 2025)|Spring 2025]], [[组合数学 (Spring 2024)|Spring 2024]], [[组合数学 (Spring 2023)|Spring 2023]], [[组合数学 (Fall 2019)|Fall 2019]], [[组合数学 (Fall 2017)|Fall 2017]], [[组合数学 (Fall 2016)|Fall 2016]], [[组合数学 (Fall 2015)|Fall 2015]], [[组合数学 (Spring 2014)|Spring 2014]], [[组合数学 (Spring 2013)|Spring 2013]], [[组合数学 (Fall 2011)|Fall 2011]], [[Combinatorics (Fall 2010)|Fall 2010]].&lt;br /&gt;
&lt;br /&gt;
* Computational Complexity: [[计算复杂性 (Spring 2025)|Spring 2025]], [[计算复杂性 (Spring 2024)|Spring 2024]], [[计算复杂性 (Spring 2023)|Spring 2023]], [[计算复杂性 (Fall 2019)|Fall 2019]], [[计算复杂性 (Fall 2018)|Fall 2018]].&lt;br /&gt;
&lt;br /&gt;
* Foundations of Data Science: [[数据科学基础 (Fall 2025)|Fall 2025]], [[数据科学基础 (Fall 2024)|Fall 2024]]&lt;br /&gt;
&lt;br /&gt;
* Numerical Method: [[计算方法 Numerical method (Spring 2025)|Spring 2025]], [[计算方法 Numerical method (Spring 2024)|Spring 2024]], [[计算方法 Numerical method (Spring 2023)|Spring 2023]], [https://liuexp.github.io/numerical.html Spring 2022].&lt;br /&gt;
&lt;br /&gt;
* Probability Theory: [[概率论与数理统计 (Spring 2025)|Spring 2025]], [[概率论与数理统计 (Spring 2024)|Spring 2024]], [[概率论与数理统计 (Spring 2023)|Spring 2023]].&lt;br /&gt;
&lt;br /&gt;
* Quantum Computation: [[量子计算 (Spring 2022)|Spring 2022]], [[量子计算 (Spring 2021)|Spring 2021]], [[量子计算 (Fall 2019)|Fall 2019]].&lt;br /&gt;
&lt;br /&gt;
* Randomized Algorithms:  [[随机算法 (Fall 2015)|Fall 2015]], [[随机算法 (Spring 2014)|Spring 2014]], [[随机算法 (Spring 2013)|Spring 2013]], [[随机算法 (Fall 2011)|Fall 2011]], [[Randomized Algorithms (Spring 2010)|Spring 2010]].&lt;br /&gt;
&lt;br /&gt;
;Past seminars, workshops and summer schools&lt;br /&gt;
*计算理论之美暑期学校: [[计算理论之美 (Summer 2025)|2025]], [[计算理论之美 (Summer 2024)|2024]], [[计算理论之美 (Summer 2023)|2023]], [[计算理论之美 (Summer 2021)|2021]]&lt;br /&gt;
*[[Theory Seminar|理论计算机科学讨论班]]&lt;br /&gt;
*[[Study Group|理论计算机科学学习小组]]&lt;br /&gt;
*[[TCSPhD2020| 理论计算机科学优秀博士生论坛2020]]&lt;br /&gt;
*[[Quantum|量子算法与物理实现研讨会]]&lt;br /&gt;
*Theory Day: [[Theory@Suzhou 2025 | 2025 (Suzhou)]],  [[Theory@Nanjing 2019|2019]], [[Theory@Nanjing 2018|2018]], [[Theory@Nanjing 2017|2017]]&lt;br /&gt;
*[[\Delta Seminar on Logic, Philosophy, and Computer Science|Δ Seminar on Logic, Philosophy, and Computer Science]]&lt;br /&gt;
*[[近似算法讨论班 (Fall 2011)|近似算法 Approximation Algorithms, Fall 2011.]]&lt;br /&gt;
&lt;br /&gt;
; 其它链接&lt;br /&gt;
* [[General Circulation(Fall 2025)|大气环流 General Circulation of the Atmosphere, Fall 2025]]&lt;br /&gt;
* [[General Circulation(Fall 2024)|大气环流 General Circulation of the Atmosphere, Fall 2024]]&lt;br /&gt;
&lt;br /&gt;
* [[概率论 (Summer 2014)| 概率与计算 (上海交大 Summer 2014)]]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Main_Page&amp;diff=13480</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Main_Page&amp;diff=13480"/>
		<updated>2026-03-03T07:45:59Z</updated>

		<summary type="html">&lt;p&gt;Etone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a course/seminar wiki run by the [http://tcs.nju.edu.cn theory group] in the Department of Computer Science and Technology at Nanjing University.&lt;br /&gt;
&lt;br /&gt;
== Home Pages for Courses and Seminars==&lt;br /&gt;
;Current semester&lt;br /&gt;
* [[高级算法 (Spring 2026)|高级算法 Advanced Algorithms (Spring 2026, Suzhou)]]&lt;br /&gt;
&lt;br /&gt;
* [[概率论与数理统计 (Spring 2026)|概率论与数理统计 Probability Theory (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
* [[计算复杂性 (Spring 2026)|计算复杂性 Computational Complexity (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
* [[计算方法 Numerical method (Spring 2026)|计算方法 Numerical method (Spring 2026)]]&lt;br /&gt;
&lt;br /&gt;
;Past courses&lt;br /&gt;
&lt;br /&gt;
* Advanced Algorithms: [[高级算法 (Fall 2025)|Fall 2025]], [[高级算法 (Spring 2025)|Spring 2025(Suzhou)]], [[高级算法 (Fall 2024)|Fall 2024]], [[高级算法 (Fall 2023)|Fall 2023]], [[高级算法 (Fall 2022)|Fall 2022]], [[高级算法 (Fall 2021)|Fall 2021]], [[高级算法 (Fall 2020)|Fall 2020]], [[高级算法 (Fall 2019)|Fall 2019]], [[高级算法 (Fall 2018)|Fall 2018]], [[高级算法 (Fall 2017)|Fall 2017]], [[随机算法 \ 高级算法 (Fall 2016)|Fall 2016]].&lt;br /&gt;
&lt;br /&gt;
*Algorithm Design and Analysis: [https://tcs.nju.edu.cn/shili/courses/2024spring-algo/ Spring 2024]&lt;br /&gt;
&lt;br /&gt;
* Combinatorics: [[组合数学 (Spring 2025)|Spring 2025]], [[组合数学 (Spring 2024)|Spring 2024]], [[组合数学 (Spring 2023)|Spring 2023]], [[组合数学 (Fall 2019)|Fall 2019]], [[组合数学 (Fall 2017)|Fall 2017]], [[组合数学 (Fall 2016)|Fall 2016]], [[组合数学 (Fall 2015)|Fall 2015]], [[组合数学 (Spring 2014)|Spring 2014]], [[组合数学 (Spring 2013)|Spring 2013]], [[组合数学 (Fall 2011)|Fall 2011]], [[Combinatorics (Fall 2010)|Fall 2010]].&lt;br /&gt;
&lt;br /&gt;
* Computational Complexity: [[计算复杂性 (Spring 2025)|Spring 2025]], [[计算复杂性 (Spring 2024)|Spring 2024]], [[计算复杂性 (Spring 2023)|Spring 2023]], [[计算复杂性 (Fall 2019)|Fall 2019]], [[计算复杂性 (Fall 2018)|Fall 2018]].&lt;br /&gt;
&lt;br /&gt;
* Foundations of Data Science: [[数据科学基础 (Fall 2025)|Fall 2025]], [[数据科学基础 (Fall 2024)|Fall 2024]]&lt;br /&gt;
&lt;br /&gt;
* Numerical Method: [[计算方法 Numerical method (Spring 2025)|Spring 2025]], [[计算方法 Numerical method (Spring 2024)|Spring 2024]], [[计算方法 Numerical method (Spring 2023)|Spring 2023]], [https://liuexp.github.io/numerical.html Spring 2022].&lt;br /&gt;
&lt;br /&gt;
* Probability Theory: [[概率论与数理统计 (Spring 2025)|Spring 2025]], [[概率论与数理统计 (Spring 2024)|Spring 2024]], [[概率论与数理统计 (Spring 2023)|Spring 2023]].&lt;br /&gt;
&lt;br /&gt;
* Quantum Computation: [[量子计算 (Spring 2022)|Spring 2022]], [[量子计算 (Spring 2021)|Spring 2021]], [[量子计算 (Fall 2019)|Fall 2019]].&lt;br /&gt;
&lt;br /&gt;
* Randomized Algorithms:  [[随机算法 (Fall 2015)|Fall 2015]], [[随机算法 (Spring 2014)|Spring 2014]], [[随机算法 (Spring 2013)|Spring 2013]], [[随机算法 (Fall 2011)|Fall 2011]], [[Randomized Algorithms (Spring 2010)|Spring 2010]].&lt;br /&gt;
&lt;br /&gt;
;Past seminars, workshops and summer schools&lt;br /&gt;
*计算理论之美暑期学校: [[计算理论之美 (Summer 2025)|2025]], [[计算理论之美 (Summer 2024)|2024]], [[计算理论之美 (Summer 2023)|2023]], [[计算理论之美 (Summer 2021)|2021]]&lt;br /&gt;
*[[Theory Seminar|理论计算机科学讨论班]]&lt;br /&gt;
*[[Study Group|理论计算机科学学习小组]]&lt;br /&gt;
*[[TCSPhD2020| 理论计算机科学优秀博士生论坛2020]]&lt;br /&gt;
*[[Quantum|量子算法与物理实现研讨会]]&lt;br /&gt;
*Theory Day: [[Theory@Suzhou 2025 | 2025 (Suzhou)]],  [[Theory@Nanjing 2019|2019]], [[Theory@Nanjing 2018|2018]], [[Theory@Nanjing 2017|2017]]&lt;br /&gt;
*[[\Delta Seminar on Logic, Philosophy, and Computer Science|Δ Seminar on Logic, Philosophy, and Computer Science]]&lt;br /&gt;
*[[近似算法讨论班 (Fall 2011)|近似算法 Approximation Algorithms, Fall 2011.]]&lt;br /&gt;
&lt;br /&gt;
; 其它链接&lt;br /&gt;
* [[General Circulation(Fall 2025)|大气环流 General Circulation of the Atmosphere, Fall 2025]]&lt;br /&gt;
* [[General Circulation(Fall 2024)|大气环流 General Circulation of the Atmosphere, Fall 2024]]&lt;br /&gt;
&lt;br /&gt;
* [[概率论 (Summer 2014)| 概率与计算 (上海交大 Summer 2014)]]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Assignment_4,_Fall_2025&amp;diff=13419</id>
		<title>Assignment 4, Fall 2025</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Assignment_4,_Fall_2025&amp;diff=13419"/>
		<updated>2025-11-30T09:43:35Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;在第四章中，我们从准地转近似下的纬向平均风场、温度场的趋势方程出发，定义了E-P通量。但是该定义下的E-P通量并没有考虑到大气湿过程的影响。如果从第三章介绍的水汽方程出发，我们可以按照以下步骤定义出一个包含大气大尺度运动中湿过程作用的广义的E-P通量。   1）在准地转近似下，如果我们按照对热力学方程的简化方法，将比湿（specific humidity...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;在第四章中，我们从准地转近似下的纬向平均风场、温度场的趋势方程出发，定义了E-P通量。但是该定义下的E-P通量并没有考虑到大气湿过程的影响。如果从第三章介绍的水汽方程出发，我们可以按照以下步骤定义出一个包含大气大尺度运动中湿过程作用的广义的E-P通量。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
1）在准地转近似下，如果我们按照对热力学方程的简化方法，将比湿（specific humidity）&amp;lt;math&amp;gt;q&amp;lt;/math&amp;gt;， 分解成一个标准比湿 &amp;lt;math&amp;gt;q_s&amp;lt;/math&amp;gt;（reference specific humidity）和变化量&amp;lt;math&amp;gt;q&#039;&amp;lt;/math&amp;gt;，并且同样假设&amp;lt;math&amp;gt; \partial q /\partial p&amp;lt;/math&amp;gt;的水平变化很小，请证明在准地转近似下p坐标系下的纬向平均比湿&amp;lt;math&amp;gt;[q]&amp;lt;/math&amp;gt;的变化方程为：&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math&amp;gt;\dfrac{\partial [q&#039;]}{\partial t} + \dfrac{\partial q_s}{\partial p}[\omega]=-[C-S] -\dfrac{\partial}{\partial y}[v^*q^*]&amp;lt;/math&amp;gt;, &lt;br /&gt;
&lt;br /&gt;
其中&amp;lt;math&amp;gt;C-S&amp;lt;/math&amp;gt;为水汽方程在准地砖近似下的源汇项，表征由大尺度运动所带来的净凝结率。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2）如果重新定义一个非绝热加热项&amp;lt;math&amp;gt;Q_m&amp;lt;/math&amp;gt;，使得&amp;lt;math&amp;gt;Q_m=Q-L[C-S](\frac{p}{p_o})^{R/c_p}&amp;lt;/math&amp;gt;，请推导出一个关于&amp;lt;math&amp;gt;[\theta+\frac{L}{c_p}q&#039;]&amp;lt;/math&amp;gt;的变化方程。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3）根据以上推导出的新方程和准地转近似下&amp;lt;math&amp;gt;[u]&amp;lt;/math&amp;gt;的变化方程，请重新定义一个广义的E-P通量&amp;lt;math&amp;gt;\mathcal{F}_m&amp;lt;/math&amp;gt;，使得新的E-P通量中包含了eddy对水汽输送的作用；并且证明，在湿绝热&amp;lt;math&amp;gt;(Q_m=0)&amp;lt;/math&amp;gt;和无摩擦的情况下，平衡状态下的&amp;lt;math&amp;gt;\mathcal{F}_m&amp;lt;/math&amp;gt;满足&amp;lt;math&amp;gt;\nabla \cdot \mathcal{F}_m=0&amp;lt;/math&amp;gt;, 并请根据水汽输送的空间分布讨论：在实际大气中，新定义的E-P通量的&amp;lt;math&amp;gt;\nabla \cdot \mathcal{F}_m&amp;lt;/math&amp;gt;应该有怎样的变化？eddy 对水汽的输送作用将对维持 Ferrel 环流起到怎样的作用？&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
4）请根据新定义出的E-P通量，定义出新的剩余环流(residual circulation, &amp;lt;math&amp;gt;[\tilde{v}_m]&amp;lt;/math&amp;gt;, &amp;lt;math&amp;gt;[\tilde{\omega}_m]&amp;lt;/math&amp;gt;)，并讨论此时剩余环流的含义是什么？相对于新的剩余环流，新的TEM方程(Transformed Eulerian Mean Equations)应该是什么？同时，也请写出，如果用剩余环流来表述，(1)问中推导出的水汽方程将如何改写，eddy强迫项应变为什么？&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt; 作业用到的[http://tcs.nju.edu.cn/yzhang/Chap_5_vq_ver.pdf eddy对水汽输送的空间分布]&amp;lt;/font&amp;gt;&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13418</id>
		<title>General Circulation(Fall 2025)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13418"/>
		<updated>2025-11-30T09:42:58Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Assignments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = 大气环流 &amp;lt;br&amp;gt;&lt;br /&gt;
General Circulation of the Atmosphere&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 张洋&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yangzhang@nju.edu.cn &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 仙林大气楼 B410&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = 周一 下午 2:00-4:00，仙II-110&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = 周五 下午13:00-2:00 &amp;lt;br&amp;gt;仙林大气楼B410 &lt;br /&gt;
|header9 = Reference book&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:James-Circulating.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = Introduction to Circulating Atmospheres, &amp;lt;br&amp;gt;&#039;&#039;I. James&#039;&#039;, Cambridge Press, 1995&lt;br /&gt;
|captionstyle = }}&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:Oort.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Physics of Climate, &#039;&#039;Peixoto, J. P.&#039;&#039; and &#039;&#039;A. H. Oort&#039;&#039;,  Springer-Verlag New York, 1992&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:geoff.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation, &#039;&#039;Vallis, G. K.&#039;&#039;, Cambridge University Press, 2006&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the page for the class &#039;&#039;General Circulation of the Atmosphere (大气环流)&#039;&#039; for the Fall 2025 semester. Students who take this class should check this page periodically for content updates and new announcements.&lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* 课程交流QQ群：631262169，请各位选课的同学入群。【2025.9.8】&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 张洋，&lt;br /&gt;
:*office: 仙林气象楼 B410&lt;br /&gt;
:*email: yangzhang@nju.edu.cn&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: 周一 下午 2:00-4:00；仙II-110&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: 周五 &amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;2&amp;gt;下午1:00-2:00，仙林大气楼B410&amp;lt;/font&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Prerequisites&#039;&#039;&#039;: 动力气象，天气学，气候学&lt;br /&gt;
* &#039;&#039;&#039;Grading&#039;&#039;&#039;: 平时作业（50％）＋ 期末考试（50％）&lt;br /&gt;
本课程将大致布置4次作业，每次作业一二道题目左右。题目将选择每个课题最具有代表性、需要一定思维强度和动手能力的训练用题目,意在使学生通过顺利完成作业来建立环流系统的物理模型、以对课程内容得到深刻全面地理解和掌握。期末考试题目数量将会比平时作业多,覆盖面更广,但会比作业题目简单,只涉及对基本内容的掌握和对环流理论的直接应用。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
# [[Assignment 1, Fall 2025|Reanalysis data and the earth&#039;s climatology]] [Due:2025.10.13]&amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;1.5&amp;quot;&amp;gt;请在本次作业的截止日期前将本次作业的图片部分和文字部分打包作为附件发送至邮箱 circulation_nju@126.com &amp;lt;/font&amp;gt;[[Namelist_Assignment_1_2025|上交作业人员名单]]&lt;br /&gt;
# [[Assignment 2, Fall 2025|Simple energy balance climate model]][Due:2025.10.27]&lt;br /&gt;
# [[Assignment 3, Fall 2025|Hadley Cell]] [Due:2025.11.10]&lt;br /&gt;
# [[Assignment 4, Fall 2025|A generalized E-P flux ]][Due:2025.12.15]&lt;br /&gt;
&lt;br /&gt;
= Course intro =&lt;br /&gt;
“大气环流”常指地球大气较大空间范围、较长时间尺度上的空气流动，及其对地球大气热量、动量、能量和水汽的全球输送。虽然从十七、十八世纪起人们就开始研究大尺度的大气运动(如Hadley在1735年提出的信风理论)，但大气环流真正发展成为一门较完备的学科方向却是近半个世纪的事情。随着四五十年代探空资料等高空气象要素的取得，以及六十年代卫星等覆盖全球的观测资料的加入，大气环流的空间结构和时间变化开始被系统、全面地揭示。与此同时，大气环流的数值模拟，也开始成为研究大气环流的一个主要方法，并发展至今成为了解和预估未来气候变化的主要手段。随着观测和模拟手段的进步，大气环流的理论研究也在近三十年开始快速地发展，人们对各种环流系统的维持和变化有了更全面、更深刻、也更为现代的理解。&lt;br /&gt;
&lt;br /&gt;
现代的大气环流是大气动力学、天气学和气候学相结合的产物。大气环流，既是各种天气现象产生的背景流场，又是各种气候状态形成的动力机制。大气环流在低频、季节、年际、年代际等时间尺度的变化，不但会引起天气现象的变化，也影响着气候状态的形成。而在大气科学领域面临着诸如全球暖化、气候变化、环流异常等重大科学问题的今天，大气环流研究的重要性被推到了前所未有的高度,大气环流也成为活跃发展又充满挑战的学科方向。&lt;br /&gt;
&lt;br /&gt;
本课程将讲述在过去几十年里大气环流在观测、理论和模拟上取得的进展。希望学生借此课程能熟悉大气环流的基本分布和形态，掌握各主要环流系统的维持和变化机制，建立各环流系统形成的物理模型，了解现阶段的大气环流模式，知道大气环流方向有待解决的科学问题。&lt;br /&gt;
&lt;br /&gt;
作为一门课程，大气环流内容的讲述常可以有两条线索。一条是全球尺度上大气热量、动量、能量和水汽的分布与输送，Lorenz（1967）和 Peixoto and Oort（1992）是按此线索介绍大气环流的优秀教材；另一条线索，是各纬度、各区域内大气环流系统的形成、维持和变化机制，James（1995）和 Vallis（2006）是按此线索介绍大气环流的经典讲义。根据现阶段大气环流方向的研究特点，本课程的讲述将主要按照后一种方式来展开，并辅以介绍各环流系统对大气各要素场的输送。在介绍各环流系统时，本课程将以观测、理论和模拟为顺序，从各大气环流系统的观测事实入手，介绍大气环流系统的分布特征和时空变化特征；着重介绍关于环流系统的各种动力学模型和现阶段对环流系统的理解；辅以对环流系统模拟研究的介绍；最后通过三者的对比，讨论各环流系统有待研究的问题。&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
本课程具体的内容安排如下：第一章为大气环流的概述，介绍大气环流发展的历史、包含的内容以及大气环流研究的常用观测资料和分析方法。第二章介绍大气环流产生的外部强迫：辐射强迫和下界面过程。第三至六章介绍大气环流中的各个环流系统及它们的动力机制。第七章详细介绍各复杂度的大气环流模式。第八章介绍大气环流领域现阶段最大的一个开放课题：全球暖化背景下的大气环流。这一章既是对前几章所介绍的大气环流理论的应用与检验，又是对未来大气环流研究方向的探讨。借此让学生熟悉并理解大气环流领域亟需解决的课题。具体课程安排和参考书目如下。&lt;br /&gt;
== Course schedule ==&lt;br /&gt;
*大气环流概述 (Introduction) （6课时）&lt;br /&gt;
*大气环流的外部强迫（3课时）&lt;br /&gt;
**辐射强迫 (Radiative forcing)&lt;br /&gt;
**下界面过程 (Surface boundaries)&lt;br /&gt;
*经向环流系统 (Zonally-averaged circulations)&lt;br /&gt;
**Hadley 环流（4课时）&lt;br /&gt;
**Ferrel 环流，急流，中纬度的波流相互作用（8课时）&lt;br /&gt;
*纬向环流系统（Non-zonal circulations）（6课时）&lt;br /&gt;
**Storm tracks&lt;br /&gt;
**Monsoon&lt;br /&gt;
**ENSO and Walker circulation&lt;br /&gt;
*能量和水汽循环 (Angular momentum, energy and water vapor)（2课时）&lt;br /&gt;
*不同复杂度的大气环流模式 (General circulation in a hierarchy of models)（2课时）&lt;br /&gt;
*全球暖化背景下的大气环流 (General circulation in the global warming scenario)（2课时）&lt;br /&gt;
&lt;br /&gt;
[[点击此处看详细课程安排 (click for more)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*观测部分：Peixoto, J. P. and A. H. Oort, 1992: Physics of Climate. Springer-Verlag New York, Inc., 520 pp. 中文译本：气候物理学，1995，吴国雄、刘辉等译校，气象出版社。&lt;br /&gt;
*综合介绍：James, I., 1995: Introduction to circulating atmospheres. Cambridge University Press, 448 pp. &lt;br /&gt;
*理论部分：Vallis, G. K., 2006: Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation. Cambridge University Press. 745 pp.&lt;br /&gt;
* [[其它参考书目（点击看详情）]]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Assignment_3,_Fall_2025&amp;diff=13338</id>
		<title>Assignment 3, Fall 2025</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Assignment_3,_Fall_2025&amp;diff=13338"/>
		<updated>2025-10-26T15:00:03Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;Held-Hou(1980) 讨论了当外部强迫的经向分布呈二次勒让德多项式，即&amp;lt;math&amp;gt;\dfrac{\Theta_E(\phi,z)}{\Theta_o}=1-\dfrac{2}{3}\Delta_H P_2(\sin \phi)+\Delta_v(\dfrac{z}{H}-\dfrac{1}{2})&amp;lt;/math&amp;gt;的情况下，哈德莱环流内的风场、温度场、环流的空间范围等将怎样随纬度和外力强迫的强度而变化。如果将外力强迫的空间分布改为&amp;lt;math&amp;gt;\dfrac{\Theta_E(\phi,z)}{\Theta_o}=1-\Delta_H(\sin \phi -\frac{1}{2})+\Delta_v(\dfra...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Held-Hou(1980) 讨论了当外部强迫的经向分布呈二次勒让德多项式，即&amp;lt;math&amp;gt;\dfrac{\Theta_E(\phi,z)}{\Theta_o}=1-\dfrac{2}{3}\Delta_H P_2(\sin \phi)+\Delta_v(\dfrac{z}{H}-\dfrac{1}{2})&amp;lt;/math&amp;gt;的情况下，哈德莱环流内的风场、温度场、环流的空间范围等将怎样随纬度和外力强迫的强度而变化。如果将外力强迫的空间分布改为&amp;lt;math&amp;gt;\dfrac{\Theta_E(\phi,z)}{\Theta_o}=1-\Delta_H(\sin \phi -\frac{1}{2})+\Delta_v(\dfrac{z}{H}-\dfrac{1}{2})&amp;lt;/math&amp;gt;，&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#请推导出哈德莱环流内的高空风场和垂直平均位温场&amp;lt;math&amp;gt;\dfrac{\tilde{\Theta}}{\Theta_o} &amp;lt;/math&amp;gt;将如何随纬度分布;&lt;br /&gt;
#同样利用小角度假设，请推导出环流的空间范围&amp;lt;math&amp;gt;\phi_H &amp;lt;/math&amp;gt; 的表达式。如果设 &amp;lt;math&amp;gt;r \equiv \dfrac{gH}{\Omega^2a^2}  &amp;lt;/math&amp;gt;, 请分别画出当 &amp;lt;math&amp;gt;\Delta_H=1/3&amp;lt;/math&amp;gt; 和 &amp;lt;math&amp;gt;\Delta_H=1/6&amp;lt;/math&amp;gt; 时, 与Held-Hou的情况相比，&amp;lt;math&amp;gt;\phi_H&amp;lt;/math&amp;gt; 怎样随 &amp;lt;math&amp;gt;r&amp;lt;/math&amp;gt; 而变化。&lt;br /&gt;
#&amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;2&amp;quot;&amp;gt;选做题目：&amp;lt;/font&amp;gt;在此情况下，近地面风场的分布有怎样变化。&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13337</id>
		<title>General Circulation(Fall 2025)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13337"/>
		<updated>2025-10-26T14:59:25Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Assignments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = 大气环流 &amp;lt;br&amp;gt;&lt;br /&gt;
General Circulation of the Atmosphere&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 张洋&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yangzhang@nju.edu.cn &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 仙林大气楼 B410&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = 周一 下午 2:00-4:00，仙II-110&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = 周五 下午13:00-2:00 &amp;lt;br&amp;gt;仙林大气楼B410 &lt;br /&gt;
|header9 = Reference book&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:James-Circulating.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = Introduction to Circulating Atmospheres, &amp;lt;br&amp;gt;&#039;&#039;I. James&#039;&#039;, Cambridge Press, 1995&lt;br /&gt;
|captionstyle = }}&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:Oort.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Physics of Climate, &#039;&#039;Peixoto, J. P.&#039;&#039; and &#039;&#039;A. H. Oort&#039;&#039;,  Springer-Verlag New York, 1992&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:geoff.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation, &#039;&#039;Vallis, G. K.&#039;&#039;, Cambridge University Press, 2006&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the page for the class &#039;&#039;General Circulation of the Atmosphere (大气环流)&#039;&#039; for the Fall 2025 semester. Students who take this class should check this page periodically for content updates and new announcements.&lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* 课程交流QQ群：631262169，请各位选课的同学入群。【2025.9.8】&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 张洋，&lt;br /&gt;
:*office: 仙林气象楼 B410&lt;br /&gt;
:*email: yangzhang@nju.edu.cn&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: 周一 下午 2:00-4:00；仙II-110&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: 周五 &amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;2&amp;gt;下午1:00-2:00，仙林大气楼B410&amp;lt;/font&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Prerequisites&#039;&#039;&#039;: 动力气象，天气学，气候学&lt;br /&gt;
* &#039;&#039;&#039;Grading&#039;&#039;&#039;: 平时作业（50％）＋ 期末考试（50％）&lt;br /&gt;
本课程将大致布置4次作业，每次作业一二道题目左右。题目将选择每个课题最具有代表性、需要一定思维强度和动手能力的训练用题目,意在使学生通过顺利完成作业来建立环流系统的物理模型、以对课程内容得到深刻全面地理解和掌握。期末考试题目数量将会比平时作业多,覆盖面更广,但会比作业题目简单,只涉及对基本内容的掌握和对环流理论的直接应用。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
# [[Assignment 1, Fall 2025|Reanalysis data and the earth&#039;s climatology]] [Due:2025.10.13]&amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;1.5&amp;quot;&amp;gt;请在本次作业的截止日期前将本次作业的图片部分和文字部分打包作为附件发送至邮箱 circulation_nju@126.com &amp;lt;/font&amp;gt;[[Namelist_Assignment_1_2025|上交作业人员名单]]&lt;br /&gt;
# [[Assignment 2, Fall 2025|Simple energy balance climate model]][Due:2025.10.27]&lt;br /&gt;
# [[Assignment 3, Fall 2025|Hadley Cell]] [Due:2025.11.10]&lt;br /&gt;
&lt;br /&gt;
= Course intro =&lt;br /&gt;
“大气环流”常指地球大气较大空间范围、较长时间尺度上的空气流动，及其对地球大气热量、动量、能量和水汽的全球输送。虽然从十七、十八世纪起人们就开始研究大尺度的大气运动(如Hadley在1735年提出的信风理论)，但大气环流真正发展成为一门较完备的学科方向却是近半个世纪的事情。随着四五十年代探空资料等高空气象要素的取得，以及六十年代卫星等覆盖全球的观测资料的加入，大气环流的空间结构和时间变化开始被系统、全面地揭示。与此同时，大气环流的数值模拟，也开始成为研究大气环流的一个主要方法，并发展至今成为了解和预估未来气候变化的主要手段。随着观测和模拟手段的进步，大气环流的理论研究也在近三十年开始快速地发展，人们对各种环流系统的维持和变化有了更全面、更深刻、也更为现代的理解。&lt;br /&gt;
&lt;br /&gt;
现代的大气环流是大气动力学、天气学和气候学相结合的产物。大气环流，既是各种天气现象产生的背景流场，又是各种气候状态形成的动力机制。大气环流在低频、季节、年际、年代际等时间尺度的变化，不但会引起天气现象的变化，也影响着气候状态的形成。而在大气科学领域面临着诸如全球暖化、气候变化、环流异常等重大科学问题的今天，大气环流研究的重要性被推到了前所未有的高度,大气环流也成为活跃发展又充满挑战的学科方向。&lt;br /&gt;
&lt;br /&gt;
本课程将讲述在过去几十年里大气环流在观测、理论和模拟上取得的进展。希望学生借此课程能熟悉大气环流的基本分布和形态，掌握各主要环流系统的维持和变化机制，建立各环流系统形成的物理模型，了解现阶段的大气环流模式，知道大气环流方向有待解决的科学问题。&lt;br /&gt;
&lt;br /&gt;
作为一门课程，大气环流内容的讲述常可以有两条线索。一条是全球尺度上大气热量、动量、能量和水汽的分布与输送，Lorenz（1967）和 Peixoto and Oort（1992）是按此线索介绍大气环流的优秀教材；另一条线索，是各纬度、各区域内大气环流系统的形成、维持和变化机制，James（1995）和 Vallis（2006）是按此线索介绍大气环流的经典讲义。根据现阶段大气环流方向的研究特点，本课程的讲述将主要按照后一种方式来展开，并辅以介绍各环流系统对大气各要素场的输送。在介绍各环流系统时，本课程将以观测、理论和模拟为顺序，从各大气环流系统的观测事实入手，介绍大气环流系统的分布特征和时空变化特征；着重介绍关于环流系统的各种动力学模型和现阶段对环流系统的理解；辅以对环流系统模拟研究的介绍；最后通过三者的对比，讨论各环流系统有待研究的问题。&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
本课程具体的内容安排如下：第一章为大气环流的概述，介绍大气环流发展的历史、包含的内容以及大气环流研究的常用观测资料和分析方法。第二章介绍大气环流产生的外部强迫：辐射强迫和下界面过程。第三至六章介绍大气环流中的各个环流系统及它们的动力机制。第七章详细介绍各复杂度的大气环流模式。第八章介绍大气环流领域现阶段最大的一个开放课题：全球暖化背景下的大气环流。这一章既是对前几章所介绍的大气环流理论的应用与检验，又是对未来大气环流研究方向的探讨。借此让学生熟悉并理解大气环流领域亟需解决的课题。具体课程安排和参考书目如下。&lt;br /&gt;
== Course schedule ==&lt;br /&gt;
*大气环流概述 (Introduction) （6课时）&lt;br /&gt;
*大气环流的外部强迫（3课时）&lt;br /&gt;
**辐射强迫 (Radiative forcing)&lt;br /&gt;
**下界面过程 (Surface boundaries)&lt;br /&gt;
*经向环流系统 (Zonally-averaged circulations)&lt;br /&gt;
**Hadley 环流（4课时）&lt;br /&gt;
**Ferrel 环流，急流，中纬度的波流相互作用（8课时）&lt;br /&gt;
*纬向环流系统（Non-zonal circulations）（6课时）&lt;br /&gt;
**Storm tracks&lt;br /&gt;
**Monsoon&lt;br /&gt;
**ENSO and Walker circulation&lt;br /&gt;
*能量和水汽循环 (Angular momentum, energy and water vapor)（2课时）&lt;br /&gt;
*不同复杂度的大气环流模式 (General circulation in a hierarchy of models)（2课时）&lt;br /&gt;
*全球暖化背景下的大气环流 (General circulation in the global warming scenario)（2课时）&lt;br /&gt;
&lt;br /&gt;
[[点击此处看详细课程安排 (click for more)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*观测部分：Peixoto, J. P. and A. H. Oort, 1992: Physics of Climate. Springer-Verlag New York, Inc., 520 pp. 中文译本：气候物理学，1995，吴国雄、刘辉等译校，气象出版社。&lt;br /&gt;
*综合介绍：James, I., 1995: Introduction to circulating atmospheres. Cambridge University Press, 448 pp. &lt;br /&gt;
*理论部分：Vallis, G. K., 2006: Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation. Cambridge University Press. 745 pp.&lt;br /&gt;
* [[其它参考书目（点击看详情）]]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Namelist_Assignment_1_2025&amp;diff=13327</id>
		<title>Namelist Assignment 1 2025</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Namelist_Assignment_1_2025&amp;diff=13327"/>
		<updated>2025-10-20T02:22:55Z</updated>

		<summary type="html">&lt;p&gt;Etone: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;学号     	姓名&lt;br /&gt;
&lt;br /&gt;
221830009	丁潘宇&lt;br /&gt;
&lt;br /&gt;
221840131	崔亚川&lt;br /&gt;
&lt;br /&gt;
221830192	张梓轩&lt;br /&gt;
&lt;br /&gt;
221830060	梁茗豪&lt;br /&gt;
&lt;br /&gt;
221840001	檀纯芳&lt;br /&gt;
&lt;br /&gt;
221840042	刘鑫磊&lt;br /&gt;
&lt;br /&gt;
221840183	胡峻滔&lt;br /&gt;
&lt;br /&gt;
221840252	徐玘&lt;br /&gt;
&lt;br /&gt;
221830079	余秀蓝&lt;br /&gt;
&lt;br /&gt;
221840217	于步涵&lt;br /&gt;
&lt;br /&gt;
221840063	樊瑾奕&lt;br /&gt;
&lt;br /&gt;
221840226	郑凯容&lt;br /&gt;
&lt;br /&gt;
221840163	周若冰&lt;br /&gt;
&lt;br /&gt;
221840204	张利荣&lt;br /&gt;
&lt;br /&gt;
652025280008	李俊霖&lt;br /&gt;
&lt;br /&gt;
502025280011	苟敏杰&lt;br /&gt;
&lt;br /&gt;
502025280051	吴雨涵&lt;br /&gt;
&lt;br /&gt;
502024280014	何昌霖&lt;br /&gt;
&lt;br /&gt;
502025280038	齐若彤&lt;br /&gt;
&lt;br /&gt;
502025280008	冯英飞&lt;br /&gt;
&lt;br /&gt;
502025280022	蒋妍&lt;br /&gt;
&lt;br /&gt;
502025280062	张艳&lt;br /&gt;
&lt;br /&gt;
502025280049	王彧喆&lt;br /&gt;
&lt;br /&gt;
502025280013	郭浩彬&lt;br /&gt;
&lt;br /&gt;
502025280006	陈俊任&lt;br /&gt;
&lt;br /&gt;
502025280001	边兆洋&lt;br /&gt;
&lt;br /&gt;
502025280060	虞越&lt;br /&gt;
&lt;br /&gt;
502025280032	刘毓晴&lt;br /&gt;
&lt;br /&gt;
502025280041	饶嘉祺&lt;br /&gt;
&lt;br /&gt;
502025280045	汪嘉斌&lt;br /&gt;
&lt;br /&gt;
502025280024	康育恺&lt;br /&gt;
&lt;br /&gt;
502025280035	骆建勋&lt;br /&gt;
&lt;br /&gt;
502025280053	夏瑞阳&lt;br /&gt;
&lt;br /&gt;
502025280010	葛雯菲&lt;br /&gt;
&lt;br /&gt;
502025280005	陈镜宇&lt;br /&gt;
&lt;br /&gt;
502025280026	李博彦&lt;br /&gt;
&lt;br /&gt;
502025280028	&lt;br /&gt;
&lt;br /&gt;
502025280029	刘辰昊&lt;br /&gt;
&lt;br /&gt;
502025280052	吴雨杭&lt;br /&gt;
&lt;br /&gt;
502025280002	蔡鸿雨&lt;br /&gt;
&lt;br /&gt;
502025280019	黄奏凯&lt;br /&gt;
&lt;br /&gt;
502025280039	钱福荣&lt;br /&gt;
&lt;br /&gt;
502025280043	宋丹阳&lt;br /&gt;
&lt;br /&gt;
502025280048	王弈博&lt;br /&gt;
&lt;br /&gt;
502025280017	黄扬&lt;br /&gt;
&lt;br /&gt;
502025280033	龙江羽恬&lt;br /&gt;
&lt;br /&gt;
502025280014	郭毅&lt;br /&gt;
&lt;br /&gt;
502025280063	张一鸣&lt;br /&gt;
&lt;br /&gt;
502025280059	尹志刚&lt;br /&gt;
&lt;br /&gt;
502025280020	霍星宏&lt;br /&gt;
&lt;br /&gt;
502025280023	开塞尔·克热米拉&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Namelist_Assignment_1_2025&amp;diff=13326</id>
		<title>Namelist Assignment 1 2025</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Namelist_Assignment_1_2025&amp;diff=13326"/>
		<updated>2025-10-20T02:22:36Z</updated>

		<summary type="html">&lt;p&gt;Etone: Created page with &amp;quot;学号	姓名 221830009	丁潘宇  221840131	崔亚川  221830192	张梓轩  221830060	梁茗豪  221840001	檀纯芳  221840042	刘鑫磊  221840183	胡峻滔  221840252	徐玘  221830079	余秀蓝  221840217	于步涵  221840063	樊瑾奕  221840226	郑凯容  221840163	周若冰  221840204	张利荣  652025280008	李俊霖  502025280011	苟敏杰  502025280051	吴雨涵  502024280014	何昌霖  502025280038	齐若彤  502025280008	冯英飞  502025280022	蒋妍  50202...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;学号	姓名&lt;br /&gt;
221830009	丁潘宇&lt;br /&gt;
&lt;br /&gt;
221840131	崔亚川&lt;br /&gt;
&lt;br /&gt;
221830192	张梓轩&lt;br /&gt;
&lt;br /&gt;
221830060	梁茗豪&lt;br /&gt;
&lt;br /&gt;
221840001	檀纯芳&lt;br /&gt;
&lt;br /&gt;
221840042	刘鑫磊&lt;br /&gt;
&lt;br /&gt;
221840183	胡峻滔&lt;br /&gt;
&lt;br /&gt;
221840252	徐玘&lt;br /&gt;
&lt;br /&gt;
221830079	余秀蓝&lt;br /&gt;
&lt;br /&gt;
221840217	于步涵&lt;br /&gt;
&lt;br /&gt;
221840063	樊瑾奕&lt;br /&gt;
&lt;br /&gt;
221840226	郑凯容&lt;br /&gt;
&lt;br /&gt;
221840163	周若冰&lt;br /&gt;
&lt;br /&gt;
221840204	张利荣&lt;br /&gt;
&lt;br /&gt;
652025280008	李俊霖&lt;br /&gt;
&lt;br /&gt;
502025280011	苟敏杰&lt;br /&gt;
&lt;br /&gt;
502025280051	吴雨涵&lt;br /&gt;
&lt;br /&gt;
502024280014	何昌霖&lt;br /&gt;
&lt;br /&gt;
502025280038	齐若彤&lt;br /&gt;
&lt;br /&gt;
502025280008	冯英飞&lt;br /&gt;
&lt;br /&gt;
502025280022	蒋妍&lt;br /&gt;
&lt;br /&gt;
502025280062	张艳&lt;br /&gt;
&lt;br /&gt;
502025280049	王彧喆&lt;br /&gt;
&lt;br /&gt;
502025280013	郭浩彬&lt;br /&gt;
&lt;br /&gt;
502025280006	陈俊任&lt;br /&gt;
&lt;br /&gt;
502025280001	边兆洋&lt;br /&gt;
&lt;br /&gt;
502025280060	虞越&lt;br /&gt;
&lt;br /&gt;
502025280032	刘毓晴&lt;br /&gt;
&lt;br /&gt;
502025280041	饶嘉祺&lt;br /&gt;
&lt;br /&gt;
502025280045	汪嘉斌&lt;br /&gt;
&lt;br /&gt;
502025280024	康育恺&lt;br /&gt;
&lt;br /&gt;
502025280035	骆建勋&lt;br /&gt;
&lt;br /&gt;
502025280053	夏瑞阳&lt;br /&gt;
&lt;br /&gt;
502025280010	葛雯菲&lt;br /&gt;
&lt;br /&gt;
502025280005	陈镜宇&lt;br /&gt;
&lt;br /&gt;
502025280026	李博彦&lt;br /&gt;
&lt;br /&gt;
502025280028	&lt;br /&gt;
&lt;br /&gt;
502025280029	刘辰昊&lt;br /&gt;
&lt;br /&gt;
502025280052	吴雨杭&lt;br /&gt;
&lt;br /&gt;
502025280002	蔡鸿雨&lt;br /&gt;
&lt;br /&gt;
502025280019	黄奏凯&lt;br /&gt;
&lt;br /&gt;
502025280039	钱福荣&lt;br /&gt;
&lt;br /&gt;
502025280043	宋丹阳&lt;br /&gt;
&lt;br /&gt;
502025280048	王弈博&lt;br /&gt;
&lt;br /&gt;
502025280017	黄扬&lt;br /&gt;
&lt;br /&gt;
502025280033	龙江羽恬&lt;br /&gt;
&lt;br /&gt;
502025280014	郭毅&lt;br /&gt;
&lt;br /&gt;
502025280063	张一鸣&lt;br /&gt;
&lt;br /&gt;
502025280059	尹志刚&lt;br /&gt;
&lt;br /&gt;
502025280020	霍星宏&lt;br /&gt;
&lt;br /&gt;
502025280023	开塞尔·克热米拉&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13325</id>
		<title>General Circulation(Fall 2025)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=General_Circulation(Fall_2025)&amp;diff=13325"/>
		<updated>2025-10-20T02:08:00Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Assignments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = 大气环流 &amp;lt;br&amp;gt;&lt;br /&gt;
General Circulation of the Atmosphere&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = 张洋&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yangzhang@nju.edu.cn &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 仙林大气楼 B410&lt;br /&gt;
|header5 = Class&lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &lt;br /&gt;
|header6 =&lt;br /&gt;
|label6  = Class meetings&lt;br /&gt;
|data6   = 周一 下午 2:00-4:00，仙II-110&lt;br /&gt;
|header7 =&lt;br /&gt;
|label7  = Place&lt;br /&gt;
|data7   = &lt;br /&gt;
|header8 =&lt;br /&gt;
|label8  = Office hours&lt;br /&gt;
|data8   = 周五 下午13:00-2:00 &amp;lt;br&amp;gt;仙林大气楼B410 &lt;br /&gt;
|header9 = Reference book&lt;br /&gt;
|label9  = &lt;br /&gt;
|data9   = &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10  = &lt;br /&gt;
|data10   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:James-Circulating.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = Introduction to Circulating Atmospheres, &amp;lt;br&amp;gt;&#039;&#039;I. James&#039;&#039;, Cambridge Press, 1995&lt;br /&gt;
|captionstyle = }}&lt;br /&gt;
|header11 =&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:Oort.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Physics of Climate, &#039;&#039;Peixoto, J. P.&#039;&#039; and &#039;&#039;A. H. Oort&#039;&#039;,  Springer-Verlag New York, 1992&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = &lt;br /&gt;
|data12   = {{Infobox&lt;br /&gt;
|name         = &lt;br /&gt;
|bodystyle  = &lt;br /&gt;
|title        = &lt;br /&gt;
|titlestyle   = &lt;br /&gt;
|image        = [[File:geoff.jpg|border|100px]]&lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      =Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation, &#039;&#039;Vallis, G. K.&#039;&#039;, Cambridge University Press, 2006&lt;br /&gt;
|captionstyle = &lt;br /&gt;
}}&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the page for the class &#039;&#039;General Circulation of the Atmosphere (大气环流)&#039;&#039; for the Fall 2025 semester. Students who take this class should check this page periodically for content updates and new announcements.&lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* 课程交流QQ群：631262169，请各位选课的同学入群。【2025.9.8】&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;: 张洋，&lt;br /&gt;
:*office: 仙林气象楼 B410&lt;br /&gt;
:*email: yangzhang@nju.edu.cn&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: 周一 下午 2:00-4:00；仙II-110&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: 周五 &amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;2&amp;gt;下午1:00-2:00，仙林大气楼B410&amp;lt;/font&amp;gt;&lt;br /&gt;
* &#039;&#039;&#039;Prerequisites&#039;&#039;&#039;: 动力气象，天气学，气候学&lt;br /&gt;
* &#039;&#039;&#039;Grading&#039;&#039;&#039;: 平时作业（50％）＋ 期末考试（50％）&lt;br /&gt;
本课程将大致布置4次作业，每次作业一二道题目左右。题目将选择每个课题最具有代表性、需要一定思维强度和动手能力的训练用题目,意在使学生通过顺利完成作业来建立环流系统的物理模型、以对课程内容得到深刻全面地理解和掌握。期末考试题目数量将会比平时作业多,覆盖面更广,但会比作业题目简单,只涉及对基本内容的掌握和对环流理论的直接应用。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
# [[Assignment 1, Fall 2025|Reanalysis data and the earth&#039;s climatology]] [Due:2025.10.13]&amp;lt;font color=&amp;quot;red&amp;quot; size=&amp;quot;1.5&amp;quot;&amp;gt;请在本次作业的截止日期前将本次作业的图片部分和文字部分打包作为附件发送至邮箱 circulation_nju@126.com &amp;lt;/font&amp;gt;[[Namelist_Assignment_1_2025|上交作业人员名单]]&lt;br /&gt;
# [[Assignment 2, Fall 2025|Simple energy balance climate model]][Due:2025.10.27]&lt;br /&gt;
&lt;br /&gt;
= Course intro =&lt;br /&gt;
“大气环流”常指地球大气较大空间范围、较长时间尺度上的空气流动，及其对地球大气热量、动量、能量和水汽的全球输送。虽然从十七、十八世纪起人们就开始研究大尺度的大气运动(如Hadley在1735年提出的信风理论)，但大气环流真正发展成为一门较完备的学科方向却是近半个世纪的事情。随着四五十年代探空资料等高空气象要素的取得，以及六十年代卫星等覆盖全球的观测资料的加入，大气环流的空间结构和时间变化开始被系统、全面地揭示。与此同时，大气环流的数值模拟，也开始成为研究大气环流的一个主要方法，并发展至今成为了解和预估未来气候变化的主要手段。随着观测和模拟手段的进步，大气环流的理论研究也在近三十年开始快速地发展，人们对各种环流系统的维持和变化有了更全面、更深刻、也更为现代的理解。&lt;br /&gt;
&lt;br /&gt;
现代的大气环流是大气动力学、天气学和气候学相结合的产物。大气环流，既是各种天气现象产生的背景流场，又是各种气候状态形成的动力机制。大气环流在低频、季节、年际、年代际等时间尺度的变化，不但会引起天气现象的变化，也影响着气候状态的形成。而在大气科学领域面临着诸如全球暖化、气候变化、环流异常等重大科学问题的今天，大气环流研究的重要性被推到了前所未有的高度,大气环流也成为活跃发展又充满挑战的学科方向。&lt;br /&gt;
&lt;br /&gt;
本课程将讲述在过去几十年里大气环流在观测、理论和模拟上取得的进展。希望学生借此课程能熟悉大气环流的基本分布和形态，掌握各主要环流系统的维持和变化机制，建立各环流系统形成的物理模型，了解现阶段的大气环流模式，知道大气环流方向有待解决的科学问题。&lt;br /&gt;
&lt;br /&gt;
作为一门课程，大气环流内容的讲述常可以有两条线索。一条是全球尺度上大气热量、动量、能量和水汽的分布与输送，Lorenz（1967）和 Peixoto and Oort（1992）是按此线索介绍大气环流的优秀教材；另一条线索，是各纬度、各区域内大气环流系统的形成、维持和变化机制，James（1995）和 Vallis（2006）是按此线索介绍大气环流的经典讲义。根据现阶段大气环流方向的研究特点，本课程的讲述将主要按照后一种方式来展开，并辅以介绍各环流系统对大气各要素场的输送。在介绍各环流系统时，本课程将以观测、理论和模拟为顺序，从各大气环流系统的观测事实入手，介绍大气环流系统的分布特征和时空变化特征；着重介绍关于环流系统的各种动力学模型和现阶段对环流系统的理解；辅以对环流系统模拟研究的介绍；最后通过三者的对比，讨论各环流系统有待研究的问题。&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
本课程具体的内容安排如下：第一章为大气环流的概述，介绍大气环流发展的历史、包含的内容以及大气环流研究的常用观测资料和分析方法。第二章介绍大气环流产生的外部强迫：辐射强迫和下界面过程。第三至六章介绍大气环流中的各个环流系统及它们的动力机制。第七章详细介绍各复杂度的大气环流模式。第八章介绍大气环流领域现阶段最大的一个开放课题：全球暖化背景下的大气环流。这一章既是对前几章所介绍的大气环流理论的应用与检验，又是对未来大气环流研究方向的探讨。借此让学生熟悉并理解大气环流领域亟需解决的课题。具体课程安排和参考书目如下。&lt;br /&gt;
== Course schedule ==&lt;br /&gt;
*大气环流概述 (Introduction) （6课时）&lt;br /&gt;
*大气环流的外部强迫（3课时）&lt;br /&gt;
**辐射强迫 (Radiative forcing)&lt;br /&gt;
**下界面过程 (Surface boundaries)&lt;br /&gt;
*经向环流系统 (Zonally-averaged circulations)&lt;br /&gt;
**Hadley 环流（4课时）&lt;br /&gt;
**Ferrel 环流，急流，中纬度的波流相互作用（8课时）&lt;br /&gt;
*纬向环流系统（Non-zonal circulations）（6课时）&lt;br /&gt;
**Storm tracks&lt;br /&gt;
**Monsoon&lt;br /&gt;
**ENSO and Walker circulation&lt;br /&gt;
*能量和水汽循环 (Angular momentum, energy and water vapor)（2课时）&lt;br /&gt;
*不同复杂度的大气环流模式 (General circulation in a hierarchy of models)（2课时）&lt;br /&gt;
*全球暖化背景下的大气环流 (General circulation in the global warming scenario)（2课时）&lt;br /&gt;
&lt;br /&gt;
[[点击此处看详细课程安排 (click for more)]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*观测部分：Peixoto, J. P. and A. H. Oort, 1992: Physics of Climate. Springer-Verlag New York, Inc., 520 pp. 中文译本：气候物理学，1995，吴国雄、刘辉等译校，气象出版社。&lt;br /&gt;
*综合介绍：James, I., 1995: Introduction to circulating atmospheres. Cambridge University Press, 448 pp. &lt;br /&gt;
*理论部分：Vallis, G. K., 2006: Atmospheric and Oceanic Fluid Dynamics: Fundamentals and Large-scale Circulation. Cambridge University Press. 745 pp.&lt;br /&gt;
* [[其它参考书目（点击看详情）]]&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=%E9%AB%98%E7%BA%A7%E7%AE%97%E6%B3%95_(Fall_2025)&amp;diff=13311</id>
		<title>高级算法 (Fall 2025)</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=%E9%AB%98%E7%BA%A7%E7%AE%97%E6%B3%95_(Fall_2025)&amp;diff=13311"/>
		<updated>2025-10-16T04:18:51Z</updated>

		<summary type="html">&lt;p&gt;Etone: /* Lecture Notes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox&lt;br /&gt;
|name         = Infobox&lt;br /&gt;
|bodystyle    = &lt;br /&gt;
|title        = &amp;lt;font size=3&amp;gt;高级算法 &lt;br /&gt;
&amp;lt;br&amp;gt;Advanced Algorithms&amp;lt;/font&amp;gt;&lt;br /&gt;
|titlestyle   = &lt;br /&gt;
&lt;br /&gt;
|image        = &lt;br /&gt;
|imagestyle   = &lt;br /&gt;
|caption      = &lt;br /&gt;
|captionstyle = &lt;br /&gt;
|headerstyle  = background:#ccf;&lt;br /&gt;
|labelstyle   = background:#ddf;&lt;br /&gt;
|datastyle    = &lt;br /&gt;
&lt;br /&gt;
|header1 =Instructor&lt;br /&gt;
|label1  = &lt;br /&gt;
|data1   = &lt;br /&gt;
|header2 = &lt;br /&gt;
|label2  = &lt;br /&gt;
|data2   = &#039;&#039;&#039;尹一通&#039;&#039;&#039;&lt;br /&gt;
|header3 = &lt;br /&gt;
|label3  = Email&lt;br /&gt;
|data3   = yinyt@nju.edu.cn &lt;br /&gt;
|header4 =&lt;br /&gt;
|label4= office&lt;br /&gt;
|data4= 计算机系 804&lt;br /&gt;
|header5 = &lt;br /&gt;
|label5  = &lt;br /&gt;
|data5   = &#039;&#039;&#039;栗师&#039;&#039;&#039;&lt;br /&gt;
|header6 = &lt;br /&gt;
|label6  = Email&lt;br /&gt;
|data6   = shili@nju.edu.cn &lt;br /&gt;
|header7 =&lt;br /&gt;
|label7= office&lt;br /&gt;
|data7= 计算机系 605&lt;br /&gt;
|header8 = &lt;br /&gt;
|label8  = &lt;br /&gt;
|data8   = &#039;&#039;&#039;刘景铖&#039;&#039;&#039;&lt;br /&gt;
|header9 = &lt;br /&gt;
|label9  = Email&lt;br /&gt;
|data9   = liu@nju.edu.cn &lt;br /&gt;
|header10 =&lt;br /&gt;
|label10= office&lt;br /&gt;
|data10= 计算机系 516&lt;br /&gt;
|header11 = Class&lt;br /&gt;
|label11  = &lt;br /&gt;
|data11   = &lt;br /&gt;
|header12 =&lt;br /&gt;
|label12  = Class meetings&lt;br /&gt;
|data12   = Monday, 2pm-4pm &amp;lt;br&amp;gt; Thursday (双), 2pm-4pm &amp;lt;br&amp;gt;仙Ⅰ-320&lt;br /&gt;
|header13 =&lt;br /&gt;
|label13  = Place&lt;br /&gt;
|data13   = &lt;br /&gt;
|header14 =&lt;br /&gt;
|label14  = Office hours&lt;br /&gt;
|data14   = TBD, &amp;lt;br&amp;gt;计算机系 804&amp;lt;br&amp;gt;&lt;br /&gt;
|header15 = Textbooks&lt;br /&gt;
|label15  = &lt;br /&gt;
|data15   = &lt;br /&gt;
|header16 =&lt;br /&gt;
|label16  = &lt;br /&gt;
|data16   = [[File:MR-randomized-algorithms.png|border|100px]]&lt;br /&gt;
|header17 =&lt;br /&gt;
|label17  = &lt;br /&gt;
|data17   = Motwani and Raghavan. &amp;lt;br&amp;gt;&#039;&#039;Randomized Algorithms&#039;&#039;.&amp;lt;br&amp;gt; Cambridge Univ Press, 1995.&lt;br /&gt;
|header18 =&lt;br /&gt;
|label18  = &lt;br /&gt;
|data18   = [[File:Approximation_Algorithms.jpg|border|100px]]&lt;br /&gt;
|header19 =&lt;br /&gt;
|label19  = &lt;br /&gt;
|data19   =  Vazirani. &amp;lt;br&amp;gt;&#039;&#039;Approximation Algorithms&#039;&#039;. &amp;lt;br&amp;gt; Springer-Verlag, 2001.&lt;br /&gt;
|belowstyle = background:#ddf;&lt;br /&gt;
|below = &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This is the webpage for the &#039;&#039;Advanced Algorithms&#039;&#039; class of fall 2025. Students who take this class should check this page periodically for content updates and new announcements. &lt;br /&gt;
&lt;br /&gt;
= Announcement =&lt;br /&gt;
* &#039;&#039;&#039;(2025/9/10)&#039;&#039;&#039; 本周四（9月11日）课程时间地点不变，为第五、六节在仙I-320。从第四周（9月15日）开始，采用新的上课时间：每周一的第五、六节，以及双周四的第五、六节，地点仍在仙I-320。&lt;br /&gt;
&lt;br /&gt;
= Course info =&lt;br /&gt;
* &#039;&#039;&#039;Instructor &#039;&#039;&#039;（授课时间顺序）: &lt;br /&gt;
:* [http://tcs.nju.edu.cn/yinyt/ 尹一通]：[mailto:yinyt@nju.edu.cn &amp;lt;yinyt@nju.edu.cn&amp;gt;]，计算机系 804 &lt;br /&gt;
:* [https://liuexp.github.io 刘景铖]：[mailto:liu@nju.edu.cn &amp;lt;liu@nju.edu.cn&amp;gt;]，计算机系 516 &lt;br /&gt;
:*[https://tcs.nju.edu.cn/shili/ 栗师]：[mailto:shili@nju.edu.cn &amp;lt;shili@nju.edu.cn&amp;gt;]，计算机系 605&lt;br /&gt;
* &#039;&#039;&#039;Teaching Assistant&#039;&#039;&#039;: &lt;br /&gt;
** 侯哲：houzhe@smail.nju.edu.cn&lt;br /&gt;
** 张弈垚：zhangyiyao@smail.nju.edu.cn&lt;br /&gt;
* &#039;&#039;&#039;Class meeting&#039;&#039;&#039;: &lt;br /&gt;
** Monday, 2pm-4pm, 仙Ⅰ-320&lt;br /&gt;
** Thursday (双), 2pm-4pm, 仙Ⅰ-320&lt;br /&gt;
* &#039;&#039;&#039;Office hour&#039;&#039;&#039;: Wednesday 2pm-3pm, 计算机系 804&lt;br /&gt;
* &#039;&#039;&#039;QQ群&#039;&#039;&#039;: 524141453（加群请注明专业学号姓名）&lt;br /&gt;
&lt;br /&gt;
= Syllabus =&lt;br /&gt;
随着计算机算法理论的不断发展，现代计算机算法的设计与分析大量地使用非初等的数学工具以及非传统的算法思想。“高级算法”这门课程就是面向计算机算法的这一发展趋势而设立的。课程将针对传统算法课程未系统涉及、却在计算机科学各领域的科研和实践中扮演重要角色的高等算法设计思想和算法分析工具进行系统讲授。&lt;br /&gt;
&lt;br /&gt;
=== 先修课程 Prerequisites ===&lt;br /&gt;
* 必须：离散数学，概率论，线性代数。&lt;br /&gt;
* 推荐：算法设计与分析。&lt;br /&gt;
&lt;br /&gt;
=== Course materials ===&lt;br /&gt;
* [[高级算法 (Fall 2025) / Course materials|&amp;lt;font size=3&amp;gt;教材和参考书&amp;lt;/font&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== 成绩 Grades ===&lt;br /&gt;
* 课程成绩：本课程将会有若干次作业和一次期末考试。最终成绩将由平时作业成绩和期末考试成绩综合得出。&lt;br /&gt;
* 迟交：如果有特殊的理由，无法按时完成作业，请提前联系授课老师，给出正当理由。否则迟交的作业将不被接受。&lt;br /&gt;
&lt;br /&gt;
=== &amp;lt;font color=red&amp;gt; 学术诚信 Academic Integrity &amp;lt;/font&amp;gt;===&lt;br /&gt;
学术诚信是所有从事学术活动的学生和学者最基本的职业道德底线，本课程将不遗余力的维护学术诚信规范，违反这一底线的行为将不会被容忍。&lt;br /&gt;
&lt;br /&gt;
作业完成的原则：署你名字的工作必须是你个人的贡献。在完成作业的过程中，允许讨论，前提是讨论的所有参与者均处于同等完成度。但关键想法的执行、以及作业文本的写作必须独立完成，并在作业中致谢（acknowledge）所有参与讨论的人。不允许其他任何形式的合作——尤其是与已经完成作业的同学“讨论”。&lt;br /&gt;
&lt;br /&gt;
本课程将对剽窃行为采取零容忍的态度。在完成作业过程中，对他人工作（出版物、互联网资料、其他人的作业等）直接的文本抄袭和对关键思想、关键元素的抄袭，按照 [http://www.acm.org/publications/policies/plagiarism_policy ACM Policy on Plagiarism]的解释，都将视为剽窃。剽窃者成绩将被取消。如果发现互相抄袭行为，&amp;lt;font color=red&amp;gt; 抄袭和被抄袭双方的成绩都将被取消&amp;lt;/font&amp;gt;。因此请主动防止自己的作业被他人抄袭。&lt;br /&gt;
&lt;br /&gt;
学术诚信影响学生个人的品行，也关乎整个教育系统的正常运转。为了一点分数而做出学术不端的行为，不仅使自己沦为一个欺骗者，也使他人的诚实努力失去意义。让我们一起努力维护一个诚信的环境。&lt;br /&gt;
&lt;br /&gt;
= Assignments =&lt;br /&gt;
Late policy: In general, we will accomodate late submission requests ONLY IF you made such requests ahead of time. &lt;br /&gt;
&lt;br /&gt;
*[[高级算法 (Fall 2025)/Problem Set 1|Problem Set 1]]  请在 2025/10/30 上课之前(14:00 UTC+8) 提交到 [mailto:njuadvalg25@163.com njuadvalg25@163.com] (文件名为&#039;&amp;lt;font color=red &amp;gt;学号_姓名_A1.pdf&amp;lt;/font&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
= Lecture Notes =&lt;br /&gt;
# [[高级算法 (Fall 2025)/Min Cut, Max Cut, and Spectral Cut|Min Cut, Max Cut, and Spectral Cut]] ([http://tcs.nju.edu.cn/slides/aa2025/Cut.pdf slides])&lt;br /&gt;
#*  [[高级算法 (Fall 2025)/Probability Basics|Probability basics]]&lt;br /&gt;
#  [[高级算法 (Fall 2025)/Fingerprinting| Fingerprinting]] ([http://tcs.nju.edu.cn/slides/aa2025/Fingerprinting.pdf slides]) &lt;br /&gt;
#*  [[高级算法 (Fall 2025)/Finite Field Basics|Finite field basics]]&lt;br /&gt;
#  [[高级算法 (Fall 2025)/Hashing and Sketching|Hashing and Sketching]] ([http://tcs.nju.edu.cn/slides/aa2025/Hashing.pdf slides])   &lt;br /&gt;
#*  [[高级算法 (Fall 2025)/Limited independence|Limited independence]]&lt;br /&gt;
#*  [[高级算法 (Fall 2025)/Basic deviation inequalities|Basic deviation inequalities]]&lt;br /&gt;
# [[高级算法 (Fall 2025)/Concentration of measure|Concentration of measure]] ([http://tcs.nju.edu.cn/slides/aa2025/Concentration.pdf slides])&lt;br /&gt;
#*  [[高级算法 (Fall 2025)/Conditional expectations|Conditional expectations]]&lt;br /&gt;
# [[高级算法 (Fall 2025)/Dimension Reduction|Dimension Reduction]] ([http://tcs.nju.edu.cn/slides/aa2025/NNS.pdf slides]) &lt;br /&gt;
#* [https://www.cs.princeton.edu/~hy2/teaching/fall22-cos521/notes/JL.pdf Professor Huacheng Yu&#039;s note on Johnson-Lindenstrauss Theorem]&lt;br /&gt;
#* [http://people.csail.mit.edu/gregory/annbook/introduction.pdf An introduction of LSH]&lt;br /&gt;
# &#039;&#039;Lovász&#039;&#039; Local Lemma   ([http://tcs.nju.edu.cn/slides/aa2025/LLL.pdf slides]) &lt;br /&gt;
#* [https://theory.stanford.edu/~jvondrak/MATH233A-2018/Math233-lec02.pdf Professor Jan Vondrák&#039;s Lecture Notes on LLL]&lt;br /&gt;
#* [https://www.cc.gatech.edu/~vigoda/6550/Notes/Lec16.pdf Professor Eric Vigoda&#039;s Lecture Notes on Algorithmic LLL]&lt;br /&gt;
&lt;br /&gt;
= Related Online Courses=&lt;br /&gt;
* [https://www.cs.cmu.edu/~15850/ Advanced Algorithms] by Anupam Gupta at CMU.&lt;br /&gt;
* [http://people.csail.mit.edu/moitra/854.html Advanced Algorithms] by Ankur Moitra at MIT.&lt;br /&gt;
* [http://courses.csail.mit.edu/6.854/current/ Advanced Algorithms] by David Karger and Aleksander Mądry at MIT.&lt;br /&gt;
* [http://web.stanford.edu/class/cs168/index.html The Modern Algorithmic Toolbox] by Tim Roughgarden and Gregory Valiant at Stanford.&lt;br /&gt;
* [https://www.cs.princeton.edu/courses/archive/fall18/cos521/ Advanced Algorithm Design] by Pravesh Kothari and Christopher Musco at Princeton.&lt;br /&gt;
* [http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15859-f11/www/ Linear and Semidefinite Programming (Advanced Algorithms)] by Anupam Gupta and Ryan O&#039;Donnell at CMU.&lt;br /&gt;
* [https://www.cs.cmu.edu/~odonnell/papers/cs-theory-toolkit-lecture-notes.pdf CS Theory Toolkit] by Ryan O&#039;Donnell at CMU.&lt;br /&gt;
* [https://cs.uwaterloo.ca/~lapchi/cs860/index.html Eigenvalues and Polynomials] by Lap Chi Lau at University of Waterloo.&lt;br /&gt;
* The [https://www.cs.cornell.edu/jeh/book.pdf &amp;quot;Foundations of Data Science&amp;quot; book] by Avrim Blum, John Hopcroft, and Ravindran Kannan.&lt;/div&gt;</summary>
		<author><name>Etone</name></author>
	</entry>
</feed>