<?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=172.21.5.190</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=172.21.5.190"/>
	<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Special:Contributions/172.21.5.190"/>
	<updated>2026-05-04T10:56:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4312</id>
		<title>Combinatorics (Fall 2010)/Flow and matching</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4312"/>
		<updated>2010-12-26T07:28:29Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.190: /* Integrality of polytopes */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{maximize} \quad&amp;amp; \sum_{v:(s,v)\in E}f_{sv}\\&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{subject to} \\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\end{align}&lt;br /&gt;
\quad &amp;amp;&lt;br /&gt;
\begin{align} f_{uv}&amp;amp;\le c_{uv} &amp;amp;\quad&amp;amp; \forall (u,v)\in E\\&lt;br /&gt;
\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;
 f_{uv}&amp;amp;\ge 0 &amp;amp;\quad&amp;amp; \forall (u,v)\in E&lt;br /&gt;
\end{align}&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;
=== 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 &amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;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;
{{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;
== Unimodularity ==&lt;br /&gt;
&lt;br /&gt;
=== Integer Programming===&lt;br /&gt;
&lt;br /&gt;
=== Integrality of polytopes ===&lt;br /&gt;
A point in an &amp;lt;math&amp;gt;n&amp;lt;/math&amp;gt;-dimensional space is integral if all its coordinates are integers. &lt;br /&gt;
&lt;br /&gt;
A polyhedron is said to be &#039;&#039;&#039;integral&#039;&#039;&#039; if all its vertices are integral.&lt;br /&gt;
&lt;br /&gt;
There always exists an optimal solution which is a vertex in &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;. For integral &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt;, all vertices are integral.&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Hoffman 1974)|&lt;br /&gt;
: If a polyhedron &amp;lt;math&amp;gt;P&amp;lt;/math&amp;gt; is integral then for all integer vectors &amp;lt;math&amp;gt;\boldsymbol{c}&amp;lt;/math&amp;gt; there is an optimal solution to &amp;lt;math&amp;gt;\max\{\boldsymbol{c}^T\boldsymbol{x}\mid \boldsymbol{x}\in P\}&amp;lt;/math&amp;gt; which is integral.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Unimodularity and total unimodularity ===&lt;br /&gt;
{{Theorem|Definition (Unimodularity)|&lt;br /&gt;
:An &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;unimodular&#039;&#039;&#039; if &amp;lt;math&amp;gt;\det(A)=\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:An &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;total unimodular&#039;&#039;&#039; if every square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;, that is, every square, nonsingular submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is unimodular.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be a basis of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; be the corresponding coordinates in &amp;lt;math&amp;gt;\boldsymbol{b}&amp;lt;/math&amp;gt;. A basic solution is formed by &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; and zeros. Since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodular and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is a basis thus nonsingular, &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;. By [http://en.wikipedia.org/wiki/Cramer&#039;s_rule Cramer&#039;s rule], &amp;lt;math&amp;gt;B^{-1}&amp;lt;/math&amp;gt; has integer entries, thus &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; is integral. Therefore, any basic solution of &amp;lt;math&amp;gt;A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}&amp;lt;/math&amp;gt; is integral, which means the polyhedron  &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Hoffman-Kruskal 1956)|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&#039;=\begin{bmatrix}A &amp;amp; -I\end{bmatrix}&amp;lt;/math&amp;gt;. We claim that &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is also totally unimodular. Any square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; can be written in the following form after permutation:&lt;br /&gt;
:&amp;lt;math&amp;gt;B=\begin{bmatrix}&lt;br /&gt;
C &amp;amp; 0\\&lt;br /&gt;
D &amp;amp; I&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is a square submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; is identity matrix. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\det(B)=\det(C)\in\{1,-1,0\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
thus &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is totally unimodular.&lt;br /&gt;
&lt;br /&gt;
Add slack variables to transform the constraints to the standard form &amp;lt;math&amp;gt;A&#039;\boldsymbol{z}=\boldsymbol{b},\boldsymbol{z}\ge\boldsymbol{0}&amp;lt;/math&amp;gt;. The polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral if the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{z}\mid A&#039;\boldsymbol{z}=\boldsymbol{b}, \boldsymbol{z}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral, which is implied by the total unimodularity of &amp;lt;math&amp;gt;A&#039;\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>172.21.5.190</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4311</id>
		<title>Combinatorics (Fall 2010)/Flow and matching</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4311"/>
		<updated>2010-12-26T07:10:55Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.190: /* Cuts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{maximize} \quad&amp;amp; \sum_{v:(s,v)\in E}f_{sv}\\&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{subject to} \\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\end{align}&lt;br /&gt;
\quad &amp;amp;&lt;br /&gt;
\begin{align} f_{uv}&amp;amp;\le c_{uv} &amp;amp;\quad&amp;amp; \forall (u,v)\in E\\&lt;br /&gt;
\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;
 f_{uv}&amp;amp;\ge 0 &amp;amp;\quad&amp;amp; \forall (u,v)\in E&lt;br /&gt;
\end{align}&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;
=== 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 &amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;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;
{{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;
== Unimodularity ==&lt;br /&gt;
&lt;br /&gt;
=== Integer Programming===&lt;br /&gt;
&lt;br /&gt;
=== Integrality of polytopes ===&lt;br /&gt;
&lt;br /&gt;
=== Unimodularity and total unimodularity ===&lt;br /&gt;
{{Theorem|Definition (Unimodularity)|&lt;br /&gt;
:An &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;unimodular&#039;&#039;&#039; if &amp;lt;math&amp;gt;\det(A)=\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:An &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;total unimodular&#039;&#039;&#039; if every square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;, that is, every square, nonsingular submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is unimodular.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be a basis of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; be the corresponding coordinates in &amp;lt;math&amp;gt;\boldsymbol{b}&amp;lt;/math&amp;gt;. A basic solution is formed by &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; and zeros. Since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodular and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is a basis thus nonsingular, &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;. By [http://en.wikipedia.org/wiki/Cramer&#039;s_rule Cramer&#039;s rule], &amp;lt;math&amp;gt;B^{-1}&amp;lt;/math&amp;gt; has integer entries, thus &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; is integral. Therefore, any basic solution of &amp;lt;math&amp;gt;A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}&amp;lt;/math&amp;gt; is integral, which means the polyhedron  &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Hoffman-Kruskal 1956)|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&#039;=\begin{bmatrix}A &amp;amp; -I\end{bmatrix}&amp;lt;/math&amp;gt;. We claim that &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is also totally unimodular. Any square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; can be written in the following form after permutation:&lt;br /&gt;
:&amp;lt;math&amp;gt;B=\begin{bmatrix}&lt;br /&gt;
C &amp;amp; 0\\&lt;br /&gt;
D &amp;amp; I&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is a square submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; is identity matrix. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\det(B)=\det(C)\in\{1,-1,0\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
thus &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is totally unimodular.&lt;br /&gt;
&lt;br /&gt;
Add slack variables to transform the constraints to the standard form &amp;lt;math&amp;gt;A&#039;\boldsymbol{z}=\boldsymbol{b},\boldsymbol{z}\ge\boldsymbol{0}&amp;lt;/math&amp;gt;. The polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral if the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{z}\mid A&#039;\boldsymbol{z}=\boldsymbol{b}, \boldsymbol{z}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral, which is implied by the total unimodularity of &amp;lt;math&amp;gt;A&#039;\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>172.21.5.190</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4310</id>
		<title>Combinatorics (Fall 2010)/Flow and matching</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4310"/>
		<updated>2010-12-26T07:09:55Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.190: /* Integer Programmings */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{maximize} \quad&amp;amp; \sum_{v:(s,v)\in E}f_{sv}\\&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{subject to} \\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\end{align}&lt;br /&gt;
\quad &amp;amp;&lt;br /&gt;
\begin{align} f_{uv}&amp;amp;\le c_{uv} &amp;amp;\quad&amp;amp; \forall (u,v)\in E\\&lt;br /&gt;
\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;
 f_{uv}&amp;amp;\ge 0 &amp;amp;\quad&amp;amp; \forall (u,v)\in E&lt;br /&gt;
\end{align}&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 the theory of flow 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;
=== 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 &amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;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;
{{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;
== Unimodularity ==&lt;br /&gt;
&lt;br /&gt;
=== Integer Programming===&lt;br /&gt;
&lt;br /&gt;
=== Integrality of polytopes ===&lt;br /&gt;
&lt;br /&gt;
=== Unimodularity and total unimodularity ===&lt;br /&gt;
{{Theorem|Definition (Unimodularity)|&lt;br /&gt;
:An &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;unimodular&#039;&#039;&#039; if &amp;lt;math&amp;gt;\det(A)=\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:An &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;total unimodular&#039;&#039;&#039; if every square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;, that is, every square, nonsingular submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is unimodular.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be a basis of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; be the corresponding coordinates in &amp;lt;math&amp;gt;\boldsymbol{b}&amp;lt;/math&amp;gt;. A basic solution is formed by &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; and zeros. Since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodular and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is a basis thus nonsingular, &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;. By [http://en.wikipedia.org/wiki/Cramer&#039;s_rule Cramer&#039;s rule], &amp;lt;math&amp;gt;B^{-1}&amp;lt;/math&amp;gt; has integer entries, thus &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; is integral. Therefore, any basic solution of &amp;lt;math&amp;gt;A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}&amp;lt;/math&amp;gt; is integral, which means the polyhedron  &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Hoffman-Kruskal 1956)|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&#039;=\begin{bmatrix}A &amp;amp; -I\end{bmatrix}&amp;lt;/math&amp;gt;. We claim that &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is also totally unimodular. Any square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; can be written in the following form after permutation:&lt;br /&gt;
:&amp;lt;math&amp;gt;B=\begin{bmatrix}&lt;br /&gt;
C &amp;amp; 0\\&lt;br /&gt;
D &amp;amp; I&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is a square submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; is identity matrix. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\det(B)=\det(C)\in\{1,-1,0\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
thus &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is totally unimodular.&lt;br /&gt;
&lt;br /&gt;
Add slack variables to transform the constraints to the standard form &amp;lt;math&amp;gt;A&#039;\boldsymbol{z}=\boldsymbol{b},\boldsymbol{z}\ge\boldsymbol{0}&amp;lt;/math&amp;gt;. The polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral if the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{z}\mid A&#039;\boldsymbol{z}=\boldsymbol{b}, \boldsymbol{z}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral, which is implied by the total unimodularity of &amp;lt;math&amp;gt;A&#039;\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>172.21.5.190</name></author>
	</entry>
	<entry>
		<id>https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4309</id>
		<title>Combinatorics (Fall 2010)/Flow and matching</title>
		<link rel="alternate" type="text/html" href="https://tcs.nju.edu.cn/wiki/index.php?title=Combinatorics_(Fall_2010)/Flow_and_matching&amp;diff=4309"/>
		<updated>2010-12-26T07:04:57Z</updated>

		<summary type="html">&lt;p&gt;172.21.5.190: /* Unimodularity and total unimodularity */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&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;&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{maximize} \quad&amp;amp; \sum_{v:(s,v)\in E}f_{sv}\\&lt;br /&gt;
\begin{align}&lt;br /&gt;
\text{subject to} \\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\\&lt;br /&gt;
\end{align}&lt;br /&gt;
\quad &amp;amp;&lt;br /&gt;
\begin{align} f_{uv}&amp;amp;\le c_{uv} &amp;amp;\quad&amp;amp; \forall (u,v)\in E\\&lt;br /&gt;
\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;
 f_{uv}&amp;amp;\ge 0 &amp;amp;\quad&amp;amp; \forall (u,v)\in E&lt;br /&gt;
\end{align}&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 the theory of flow 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;
=== 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 &amp;lt;math&amp;gt;S=\{u\in V\mid \exists\text{an augmenting path to }u\}&amp;lt;/math&amp;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;
{{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;
== Unimodularity ==&lt;br /&gt;
&lt;br /&gt;
=== Integer Programmings===&lt;br /&gt;
&lt;br /&gt;
=== Integrality of polytopes ===&lt;br /&gt;
&lt;br /&gt;
=== Unimodularity and total unimodularity ===&lt;br /&gt;
{{Theorem|Definition (Unimodularity)|&lt;br /&gt;
:An &amp;lt;math&amp;gt;n\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;unimodular&#039;&#039;&#039; if &amp;lt;math&amp;gt;\det(A)=\pm1&amp;lt;/math&amp;gt;.&lt;br /&gt;
:An &amp;lt;math&amp;gt;m\times n&amp;lt;/math&amp;gt; integer matrix &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is called &#039;&#039;&#039;total unimodular&#039;&#039;&#039; if every square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; has &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;, that is, every square, nonsingular submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is unimodular.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; be a basis of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt;, and let &amp;lt;math&amp;gt;\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; be the corresponding coordinates in &amp;lt;math&amp;gt;\boldsymbol{b}&amp;lt;/math&amp;gt;. A basic solution is formed by &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; and zeros. Since &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodular and &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; is a basis thus nonsingular, &amp;lt;math&amp;gt;\det(B)\in\{1,-1,0\}&amp;lt;/math&amp;gt;. By [http://en.wikipedia.org/wiki/Cramer&#039;s_rule Cramer&#039;s rule], &amp;lt;math&amp;gt;B^{-1}&amp;lt;/math&amp;gt; has integer entries, thus &amp;lt;math&amp;gt;B^{-1}\boldsymbol{b}&#039;&amp;lt;/math&amp;gt; is integral. Therefore, any basic solution of &amp;lt;math&amp;gt;A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}&amp;lt;/math&amp;gt; is integral, which means the polyhedron  &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Theorem|Theorem (Hoffman-Kruskal 1956)|&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; integer matrix. &lt;br /&gt;
:If &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; is totally unimodualr, then for any integer vector &amp;lt;math&amp;gt;\boldsymbol{b}\in\mathbb{Z}^n&amp;lt;/math&amp;gt; the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral.&lt;br /&gt;
}}&lt;br /&gt;
{{Proof|&lt;br /&gt;
Let &amp;lt;math&amp;gt;A&#039;=\begin{bmatrix}A &amp;amp; -I\end{bmatrix}&amp;lt;/math&amp;gt;. We claim that &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is also totally unimodular. Any square submatrix &amp;lt;math&amp;gt;B&amp;lt;/math&amp;gt; of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; can be written in the following form after permutation:&lt;br /&gt;
:&amp;lt;math&amp;gt;B=\begin{bmatrix}&lt;br /&gt;
C &amp;amp; 0\\&lt;br /&gt;
D &amp;amp; I&lt;br /&gt;
\end{bmatrix}&amp;lt;/math&amp;gt;&lt;br /&gt;
where &amp;lt;math&amp;gt;C&amp;lt;/math&amp;gt; is a square submatrix of &amp;lt;math&amp;gt;A&amp;lt;/math&amp;gt; and &amp;lt;math&amp;gt;I&amp;lt;/math&amp;gt; is identity matrix. Therefore,&lt;br /&gt;
:&amp;lt;math&amp;gt;\det(B)=\det(C)\in\{1,-1,0\}&amp;lt;/math&amp;gt;,&lt;br /&gt;
thus &amp;lt;math&amp;gt;A&#039;&amp;lt;/math&amp;gt; is totally unimodular.&lt;br /&gt;
&lt;br /&gt;
Add slack variables to transform the constraints to the standard form &amp;lt;math&amp;gt;A&#039;\boldsymbol{z}=\boldsymbol{b},\boldsymbol{z}\ge\boldsymbol{0}&amp;lt;/math&amp;gt;. The polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{x}\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral if the polyhedron &amp;lt;math&amp;gt;\{\boldsymbol{z}\mid A&#039;\boldsymbol{z}=\boldsymbol{b}, \boldsymbol{z}\ge \boldsymbol{0}\}&amp;lt;/math&amp;gt; is integral, which is implied by the total unimodularity of &amp;lt;math&amp;gt;A&#039;\,&amp;lt;/math&amp;gt;.&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>172.21.5.190</name></author>
	</entry>
</feed>