# Combinatorics (Fall 2010)/Flow and matching

## Flow and Cut

### Flows

An instance of the maximum flow problem consists of:

• a directed graph $\displaystyle{ G(V,E) }$;
• two distinguished vertices $\displaystyle{ s }$ (the source) and $\displaystyle{ t }$ (the sink), where the in-degree of $\displaystyle{ s }$ and the out-degree of $\displaystyle{ t }$ are both 0;
• the capacity function $\displaystyle{ c:E\rightarrow\mathbb{R}^+ }$ which associates each directed edge $\displaystyle{ (u,v)\in E }$ a nonnegative real number $\displaystyle{ c_{uv} }$ called the capacity of the edge.

The quadruple $\displaystyle{ (G,c,s,t) }$ is called a flow network.

A function $\displaystyle{ f:E\rightarrow\mathbb{R}^+ }$ is called a flow (to be specific an $\displaystyle{ s }$-$\displaystyle{ t }$ flow) in the network $\displaystyle{ G(V,E) }$ if it satisfies:

• Capacity constraint: $\displaystyle{ f_{uv}\le c_{uv} }$ for all $\displaystyle{ (u,v)\in E }$.
• Conservation constraint: $\displaystyle{ \sum_{u:(u,v)\in E}f_{uv}=\sum_{w:(v,w)\in E}f_{vw} }$ for all $\displaystyle{ v\in V\setminus\{s,t\} }$.

The value of the flow $\displaystyle{ f }$ is $\displaystyle{ \sum_{v:(s,v)\in E}f_{sv} }$.

Given a flow network, the maximum flow problem asks to find the flow of the maximum value.

The maximum flow problem can be described as the following linear program.

\displaystyle{ \begin{align} \text{maximize} \quad& \sum_{v:(s,v)\in E}f_{sv}\\ \begin{align} \text{subject to} \\ \\ \\ \\ \end{align} \quad & \begin{align} f_{uv}&\le c_{uv} &\quad& \forall (u,v)\in E\\ \sum_{u:(u,v)\in E}f_{uv}-\sum_{w:(v,w)\in E}f_{vw} &=0 &\quad& \forall v\in V\setminus\{s,t\}\\ f_{uv}&\ge 0 &\quad& \forall (u,v)\in E \end{align} \end{align} }

### Cuts

 Definition Let $\displaystyle{ (G(V,E),c,s,t) }$ be a flow network. Let $\displaystyle{ S\subset V }$. We call $\displaystyle{ (S,\bar{S}) }$ an $\displaystyle{ s }$-$\displaystyle{ t }$ cut if $\displaystyle{ s\in S }$ and $\displaystyle{ t\not\in S }$. The value of the cut (also called the capacity of the cut) is defined as $\displaystyle{ \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }$.

A fundamental fact in flow theory is that cuts always upper bound flows.

 Lemma Let $\displaystyle{ (G(V,E),c,s,t) }$ be a flow network. Let $\displaystyle{ f }$ be an arbitrary flow in $\displaystyle{ G }$, and let $\displaystyle{ (S,\bar{S}) }$ be an arbitrary $\displaystyle{ s }$-$\displaystyle{ t }$ cut. Then $\displaystyle{ \sum_{v:(s,v)}f_{sv}\le \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }$, that is, the value of any flow is no greater than the value of any cut.
Proof.
 By the definition of $\displaystyle{ s }$-$\displaystyle{ t }$ cut, $\displaystyle{ s\in S }$ and $\displaystyle{ t\not\in S }$. Due to the conservation of flow, $\displaystyle{ \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}\,. }$ On the other hand, summing flow over edges, $\displaystyle{ \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}\,. }$ Therefore, $\displaystyle{ \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}\,, }$
$\displaystyle{ \square }$

### Augmenting paths

 Definition (Augmenting path) Let $\displaystyle{ f }$ be a flow in $\displaystyle{ G }$. An augmenting path to $\displaystyle{ u_k }$ is a sequence of distinct vertices $\displaystyle{ P=(u_0,u_1,\cdots, u_k) }$, such that $\displaystyle{ u_0=s\, }$; and each pair of consecutive vertices $\displaystyle{ u_{i}u_{i+1}\, }$ in $\displaystyle{ P }$ corresponds to either a forward edge $\displaystyle{ (u_{i},u_{i+1})\in E }$ or a reverse edge $\displaystyle{ (u_{i+1},u_{i})\in E }$, and $\displaystyle{ f(u_i,u_{i+1})\lt c(u_i,u_{i+1})\, }$ when $\displaystyle{ u_{i}u_{i+1}\, }$ corresponds to a forward edge $\displaystyle{ (u_{i},u_{i+1})\in E }$, and $\displaystyle{ f(u_{i+1},u_i)\gt 0\, }$ when $\displaystyle{ u_{i}u_{i+1}\, }$ corresponds to a reverse edge $\displaystyle{ (u_{i+1},u_{i})\in E }$. If $\displaystyle{ u_k=t\, }$, we simply call $\displaystyle{ P }$ an augmenting path.

Let $\displaystyle{ f }$ be a flow in $\displaystyle{ G }$. Suppose there is an augmenting path $\displaystyle{ P=u_0u_1\cdots u_k }$, where $\displaystyle{ u_0=s }$ and $\displaystyle{ u_k=t }$. Let $\displaystyle{ \epsilon\gt 0 }$ be a positive constant satisfying

• $\displaystyle{ \epsilon \le c(u_{i},u_{i+1})-f(u_i,u_{i+1}) }$ for all forward edges $\displaystyle{ (u_{i},u_{i+1})\in E }$ in $\displaystyle{ P }$;
• $\displaystyle{ \epsilon \le f(u_{i+1},u_i) }$ for all reverse edges $\displaystyle{ (u_{i+1},u_i)\in E }$ in $\displaystyle{ P }$.

Due to the definition of augmenting path, we can always find such a positive $\displaystyle{ \epsilon }$.

Increase $\displaystyle{ f(u_i,u_{i+1}) }$ by $\displaystyle{ \epsilon }$ for all forward edges $\displaystyle{ (u_{i},u_{i+1})\in E }$ in $\displaystyle{ P }$ and decrease $\displaystyle{ f(u_{i+1},u_i) }$ by $\displaystyle{ \epsilon }$ for all reverse edges $\displaystyle{ (u_{i+1},u_i)\in E }$ in $\displaystyle{ P }$. Denote the modified flow by $\displaystyle{ f' }$. It can be verified that $\displaystyle{ f' }$ satisfies the capacity constraint and conservation constraint thus is still a valid flow. On the other hand, the value of the new flow $\displaystyle{ f' }$

$\displaystyle{ \sum_{v:(s,v)\in E}f_{sv}'=\epsilon+\sum_{v:(s,v)\in E}f_{sv}\gt \sum_{v:(s,v)\in E}f_{sv} }$.

Therefore, the value of the flow can be "augmented" 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 "characterized" by augmenting paths.

 Lemma A flow $\displaystyle{ f }$ is maximum if and only if there are no augmenting paths.
Proof.
 We have already proved the "only if" direction above. Now we prove the "if" direction. Let $\displaystyle{ S=\{u\in V\mid \exists\text{an augmenting path to }u\} }$. Clearly $\displaystyle{ s\in S }$, and since there is no augmenting path $\displaystyle{ t\not\in S }$. Therefore, $\displaystyle{ (S,\bar{S}) }$ defines an $\displaystyle{ s }$-$\displaystyle{ t }$ cut. We claim that $\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }$, that is, the value of flow $\displaystyle{ f }$ approach the value of the cut $\displaystyle{ (S,\bar{S}) }$ defined above. By the above lemma, this will imply that the current flow $\displaystyle{ f }$ is maximum. To prove this claim, we first observe that $\displaystyle{ \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} }$. This identity is implied by the flow conservation constraint, and holds for any $\displaystyle{ s }$-$\displaystyle{ t }$ cut $\displaystyle{ (S,\bar{S}) }$. We then claim that $\displaystyle{ f_{uv}=c_{uv} }$ for all $\displaystyle{ u\in S,v\not\in S, (u,v)\in E }$; and $\displaystyle{ f_{vu}=0 }$ for all $\displaystyle{ u\in S,v\not\in S, (v,u)\in E }$. If otherwise, then the augmenting path to $\displaystyle{ u }$ apending $\displaystyle{ uv }$ becomes a new augmenting path to $\displaystyle{ v }$, which contradicts that $\displaystyle{ S }$ includes all vertices to which there exist augmenting paths. Therefore, $\displaystyle{ \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} }$. As discussed above, this proves the theorem.
$\displaystyle{ \square }$

### The max-flow min-cut theorem

 Max-Flow Min-Cut Theorem In a flow network, the maximum value of any $\displaystyle{ s }$-$\displaystyle{ t }$ flow equals the minimum value of any $\displaystyle{ s }$-$\displaystyle{ t }$ cut.
Proof.
 Let $\displaystyle{ f }$ be a flow with maximum value, so there is no augmenting path. Again, let $\displaystyle{ S=\{u\in V\mid \exists\text{an augmenting path to }u\} }$. As proved above, $\displaystyle{ (S,\bar{S}) }$ forms an $\displaystyle{ s }$-$\displaystyle{ t }$ cut, and $\displaystyle{ \sum_{v:(s,v)}f_{sv}= \sum_{u\in S,v\not\in S\atop (u,v)\in E}c_{uv} }$, that is, the value of flow $\displaystyle{ f }$ equals the value of cut $\displaystyle{ (S,\bar{S}) }$. Since we know that all $\displaystyle{ s }$-$\displaystyle{ t }$ flows are not greater than any $\displaystyle{ s }$-$\displaystyle{ t }$ cut, the value of flow $\displaystyle{ f }$ equals the minimum value of any $\displaystyle{ s }$-$\displaystyle{ t }$ cut.
$\displaystyle{ \square }$
 Flow Integrality Theorem Let $\displaystyle{ (G,c,s,t) }$ be a flow network with integral capacity $\displaystyle{ c }$. There exists an integral flow which is maximum.
Proof.
 Let $\displaystyle{ f }$ be an integral flow of maximum value. If there is an augmenting path, since both $\displaystyle{ c }$ and $\displaystyle{ f }$ are integral, a new flow can be constructed of value 1+the value of $\displaystyle{ f }$, contradicting that $\displaystyle{ f }$ is maximum over all integral flows. Therefore, there is no augmenting path, which means that $\displaystyle{ f }$ is maximum over all flows, integral or not.
$\displaystyle{ \square }$

### Applications

Menger's theorem

Given an undirected graph $\displaystyle{ G(V,E) }$ and two distinct vertices $\displaystyle{ s,t\in V }$, a set of edges $\displaystyle{ C\subseteq E }$ is called an $\displaystyle{ s }$-$\displaystyle{ t }$ cut, if deleting edges in $\displaystyle{ C }$ disconnects $\displaystyle{ s }$ and $\displaystyle{ t }$.

A simple path from $\displaystyle{ s }$ to $\displaystyle{ t }$ is called an $\displaystyle{ s }$-$\displaystyle{ t }$ path. Two paths are said to be edge-disjoint if they do not share any edge.

 Theorem (Menger 1927) Let $\displaystyle{ G(V,E) }$ be an arbitrary undirected graph and $\displaystyle{ s,t\in V }$ be two distinct vertices. The minimum size of any $\displaystyle{ s }$-$\displaystyle{ t }$ cut equals the maximum number of edge-disjoint $\displaystyle{ s }$-$\displaystyle{ t }$ paths.
Proof.
 Construct a directed graph $\displaystyle{ G'(V,E') }$ from $\displaystyle{ G(V,E) }$ as follows: replace every undirected edge $\displaystyle{ uv\in E }$ that $\displaystyle{ s,t\not\in\{u,v\} }$ by two directed edges $\displaystyle{ (u,v) }$ and $\displaystyle{ (v,u) }$; replace every undirected edge $\displaystyle{ sv\in E }$ by $\displaystyle{ (s,v) }$, and very undirected edge $\displaystyle{ vt\in E }$ by $\displaystyle{ (v,t) }$. Then assign every directed edge with capacity 1. It is easy to verify that in the flow network constructed as above, the followings hold: An integral $\displaystyle{ s }$-$\displaystyle{ t }$ flow corresponds to a set of $\displaystyle{ s }$-$\displaystyle{ t }$ paths in the undirected graph $\displaystyle{ G }$, where the value of the flow is the number of $\displaystyle{ s }$-$\displaystyle{ t }$ paths. An $\displaystyle{ s }$-$\displaystyle{ t }$ cut in the flow network corresponds to an $\displaystyle{ s }$-$\displaystyle{ t }$ cut in the undirected graph $\displaystyle{ G }$ with the same value. The Menger's theorem follows as a direct consequence of the max-flow min-cut theorem.
$\displaystyle{ \square }$
König-Egerváry theorem

Let $\displaystyle{ G(V,E) }$ be a graph. An edge set $\displaystyle{ M\subseteq E }$ is called a matching if no edge in $\displaystyle{ M }$ shares any vertex. A vertex set $\displaystyle{ C\subseteq V }$ is called a vertex cover if for any edge $\displaystyle{ uv\in E }$, either $\displaystyle{ u\in C }$ or $\displaystyle{ v\in C }$.

 Theorem (König 1936) In any bipartite graph $\displaystyle{ G(V_1,V_2,E) }$, the size of a maximum matching equals the size of a minimum vertex cover.

We now show how a reduction of bipartite matchings to flows.

Construct a flow network $\displaystyle{ (G'(V,E'),c,s,t) }$ as follows:

• $\displaystyle{ V=V_1\cup V_2\cup\{s,t\} }$ where $\displaystyle{ s }$ and $\displaystyle{ t }$ are two new vertices.
• For ever $\displaystyle{ uv\in E }$, add $\displaystyle{ (u,v) }$ to $\displaystyle{ E' }$; for every $\displaystyle{ u\in V_1 }$, add $\displaystyle{ (s,u) }$ to $\displaystyle{ E' }$; and for every $\displaystyle{ v\in V_2 }$, add $\displaystyle{ (v,t) }$ to $\displaystyle{ E' }$.
• Let $\displaystyle{ c_{su}=1 }$ for every $\displaystyle{ u\in V_1 }$ and $\displaystyle{ c_{vt}=1 }$ for every $\displaystyle{ v\in V_2 }$. Let $\displaystyle{ c_{uv}=\infty }$ for every bipartite edges $\displaystyle{ (u,v) }$.
 Lemma The size of a maximum matching in $\displaystyle{ G }$ is equal to the value of a maximum $\displaystyle{ s }$-$\displaystyle{ t }$ flow in $\displaystyle{ G' }$.
Proof.
 Given an integral $\displaystyle{ s }$-$\displaystyle{ t }$ flow $\displaystyle{ f }$ in $\displaystyle{ G' }$, let $\displaystyle{ M=\{uv\in E\mid f_{uv}=1\} }$. Then $\displaystyle{ M }$ must be a matching since for every $\displaystyle{ u\in V_1 }$. To see this, observe that there is at most one $\displaystyle{ v\in V_2 }$ that $\displaystyle{ f_{uv}=1 }$, because of that $\displaystyle{ f_{su}\le c_{su}=1 }$ and conservation of flows. The same holds for vertices in $\displaystyle{ V_2 }$ by the same argument. Therefore, each flow corresponds to a matching. Given a matching $\displaystyle{ M }$ in bipartite graph $\displaystyle{ G }$, define an integral flow $\displaystyle{ f }$ as such: for $\displaystyle{ uv\in E }$, $\displaystyle{ f_{uv}=1 }$ if $\displaystyle{ uv\in M }$ and $\displaystyle{ f_{uv}=0 }$ if otherwise; for $\displaystyle{ u\in V_1 }$, $\displaystyle{ f_{su}=1 }$ if $\displaystyle{ uv\in M }$ for some $\displaystyle{ v }$ and $\displaystyle{ f_{su}=0 }$ if otherwise; for $\displaystyle{ v\in V_2 }$, $\displaystyle{ f_{vt}=1 }$ if $\displaystyle{ uv\in M }$ for some $\displaystyle{ u }$ and $\displaystyle{ f_{vt}=0 }$ if otherwise. It is easy to check that $\displaystyle{ f }$ is valid $\displaystyle{ s }$-$\displaystyle{ t }$ flow in $\displaystyle{ G' }$. Therefore, there is an one-one correspondence between flows in $\displaystyle{ G' }$ and matchings in $\displaystyle{ G }$. The lemma follows naturally.
$\displaystyle{ \square }$

We then establish a correspondence between $\displaystyle{ s }$-$\displaystyle{ t }$ cuts in $\displaystyle{ G' }$ and vertex covers in $\displaystyle{ G }$.

Suppose $\displaystyle{ (S,\bar{S}) }$ is an $\displaystyle{ s }$-$\displaystyle{ t }$ cut in $\displaystyle{ G' }$.

 Lemma The size of a minimum vertex cover in $\displaystyle{ G }$ is equal to the value of a minimum $\displaystyle{ s }$-$\displaystyle{ t }$ cut in $\displaystyle{ G' }$.
Proof.
 Let $\displaystyle{ (S,\bar{S}) }$ be an $\displaystyle{ s }$-$\displaystyle{ t }$ cut of minimum capacity in $\displaystyle{ G' }$. Then $\displaystyle{ \sum_{u\in S, v\not\in S\atop (u,v)\in E'}c_{uv} }$ must be finite since $\displaystyle{ S=\{s\} }$ gives us an $\displaystyle{ s }$-$\displaystyle{ t }$ cut whose capacity is $\displaystyle{ |V_1| }$ which is finite. Therefore, no edge $\displaystyle{ uv\in E }$ has $\displaystyle{ u\in V_1\cap S }$ and $\displaystyle{ v\in V_2\setminus S }$, i.e., for all $\displaystyle{ uv\in E }$, either $\displaystyle{ u\in V_1\setminus S }$ or $\displaystyle{ v\in V_2\cap S }$. Therefore, $\displaystyle{ (V_1\setminus S)\cup(V_2\cap S) }$ is a vertex cover in $\displaystyle{ G }$, whose size is $\displaystyle{ |(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'}c_{uv} }$. The last term is the capacity of the minimum $\displaystyle{ s }$-$\displaystyle{ t }$ cut $\displaystyle{ (S,\bar{S}) }$.
$\displaystyle{ \square }$

The König-Egerváry theorem then holds as a consequence of the max-flow min-cut theorem.

## Unimodularity

### Integer Programming

Consider the maximum integral flow problem: given as input a flow network $\displaystyle{ (G(V,E),c,s,t) }$ where for every $\displaystyle{ uv\in E }$ the capacity $\displaystyle{ c_{uv} }$ is integer. We want to find the integral flow $\displaystyle{ f:E\rightarrow\mathbb{Z} }$ with maximum value.

The mathematical programming for the problem is:

\displaystyle{ \begin{align} \text{maximize} \quad& \sum_{v:(s,v)\in E}f_{sv}\\ \begin{align} \text{subject to} \\ \\ \\ \\ \\ \end{align} \quad & \begin{align} f_{uv}&\le c_{uv} &\quad& \forall (u,v)\in E\\ \sum_{u:(u,v)\in E}f_{uv}-\sum_{w:(v,w)\in E}f_{vw} &=0 &\quad& \forall v\in V\setminus\{s,t\}\\ f_{uv}&\in\mathbb{N} &\quad& \forall (u,v)\in E \end{align} \end{align} }

where $\displaystyle{ \mathbb{N} }$ is the set of all nonnegative integers. Compared to the LP for the max-flow problem, we just replace the last line $\displaystyle{ f_{uv}\ge 0 }$ with $\displaystyle{ f_{uv}\in\mathbb{N} }$. The resulting optimization is called an integer programming (IP), or more specific integer linear programming (ILP).

Due to the Flow Integrality Theorem, when capacities are integers, there must be an integral flow whose value is maximum among all flows (integral or not). This means the above IP can be efficiently solved by solving its LP-relaxation. This is usually impossible for general IPs.

Generally, an IP of canonical form is written as

\displaystyle{ \begin{align} \text{maximize} \quad& \boldsymbol{c}^T\boldsymbol{x}\\ \begin{align} \text{subject to} \\ \\ \\ \end{align} \quad & \begin{align} A\boldsymbol{x} &\ge\boldsymbol{b} \\ \boldsymbol{x}&\ge \boldsymbol{0}\\ \boldsymbol{x}&\in\mathbb{Z}^n \end{align} \end{align} }

Consider the 3SAT problem. Each instance is a 3CNF(conjunctive normal form): $\displaystyle{ \bigwedge_{i=1}^m(\ell_{i_1}\vee\ell_{i_2}\vee\ell_{i_3}) }$, where each $\displaystyle{ (\ell_{i_1}\vee\ell_{i_2}\vee\ell_{i_3}) }$ is a clause and each $\displaystyle{ \ell_{i_r}\in\{x_{j},\neg x_{j}\mid 1\le j\le n\} }$, called a literal, is either a boolean variable or a negation of a boolean variable. We want to determine whether there exists an truth assignment of the $\displaystyle{ n }$ boolean variables $\displaystyle{ x_1,\ldots,x_n }$ such that the input formula is satisfied (i.e., is true).

The following IP solves 3SAT:

\displaystyle{ \begin{align} \text{maximize} \quad& \sum_{i=1}^mz_i\\ \begin{align} \text{subject to} \\ \\ \\ \\ \end{align} \quad & \begin{align} z_i &\le y_{i_1}+y_{i_2}+y_{i_3} &\quad& \forall 1\le i\le m\\ y_{i_r}&\le x_{j} &\quad& \text{if }\ell_{i_r}=x_{j} \\ y_{i_r}&\le 1-x_{j} &\quad& \text{if }\ell_{i_r}=\neg x_{j} \\ z_i, x_j&\in\{0,1\} &\quad& \forall 1\le i\le m, 1\le j\le n \end{align} \end{align} }

Since 3SAT is NP-hard (actually it is the first problem known to be NP-hard), generally IP is NP-hard.

### Integrality of polytopes

A point in an $\displaystyle{ n }$-dimensional space is integral if it belongs to $\displaystyle{ \mathbb{Z}^n }$, i.e., if all its coordinates are integers.

A polyhedron is said to be integral if all its vertices are integral.

An easy observation is that an integer programming has the same optimal solutions as its LP-relaxation when the polyhedron defined by the LP-relaxation is integral.

 Theorem (Hoffman 1974) If a polyhedron $\displaystyle{ P }$ is integral then for all integer vectors $\displaystyle{ \boldsymbol{c} }$ there is an optimal solution to $\displaystyle{ \max\{\boldsymbol{c}^T\boldsymbol{x}\mid \boldsymbol{x}\in P\} }$ which is integral.
Proof.
 There always exists an optimal solution which is a vertex in $\displaystyle{ P }$. For integral $\displaystyle{ P }$, all vertices are integral.
$\displaystyle{ \square }$

### Unimodularity and total unimodularity

 Definition (Unimodularity) An $\displaystyle{ n\times n }$ integer matrix $\displaystyle{ A }$ is called unimodular if $\displaystyle{ \det(A)=\pm1 }$. An $\displaystyle{ m\times n }$ integer matrix $\displaystyle{ A }$ is called total unimodular if every square submatrix $\displaystyle{ B }$ of $\displaystyle{ A }$ has $\displaystyle{ \det(B)\in\{1,-1,0\} }$, that is, every square, nonsingular submatrix of $\displaystyle{ A }$ is unimodular.

A totally unimodular matrix defines a integral convex polyhedron.

 Theorem Let $\displaystyle{ A }$ be an $\displaystyle{ m\times n }$ integer matrix. If $\displaystyle{ A }$ is totally unimodualr, then for any integer vector $\displaystyle{ \boldsymbol{b}\in\mathbb{Z}^n }$ the polyhedron $\displaystyle{ \{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\} }$ is integral.
Proof.
 Let $\displaystyle{ B }$ be a basis of $\displaystyle{ A }$, and let $\displaystyle{ \boldsymbol{b}' }$ be the corresponding coordinates in $\displaystyle{ \boldsymbol{b} }$. A basic solution is formed by $\displaystyle{ B^{-1}\boldsymbol{b}' }$ and zeros. Since $\displaystyle{ A }$ is totally unimodular and $\displaystyle{ B }$ is a basis thus nonsingular, $\displaystyle{ \det(B)\in\{1,-1,0\} }$. By Cramer's rule, $\displaystyle{ B^{-1} }$ has integer entries, thus $\displaystyle{ B^{-1}\boldsymbol{b}' }$ is integral. Therefore, any basic solution of $\displaystyle{ A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0} }$ is integral, which means the polyhedron $\displaystyle{ \{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}=\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\} }$ is integral.
$\displaystyle{ \square }$

Our next result is the famous Hoffman-Kruskal theorem.

 Theorem (Hoffman-Kruskal 1956) Let $\displaystyle{ A }$ be an $\displaystyle{ m\times n }$ integer matrix. If $\displaystyle{ A }$ is totally unimodualr, then for any integer vector $\displaystyle{ \boldsymbol{b}\in\mathbb{Z}^n }$ the polyhedron $\displaystyle{ \{\boldsymbol{x}\in\mathbb{R}^n\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\} }$ is integral.
Proof.
 Let $\displaystyle{ A'=\begin{bmatrix}A & -I\end{bmatrix} }$. We claim that $\displaystyle{ A' }$ is also totally unimodular. Any square submatrix $\displaystyle{ B }$ of $\displaystyle{ A }$ can be written in the following form after permutation: $\displaystyle{ B=\begin{bmatrix} C & 0\\ D & I \end{bmatrix} }$ where $\displaystyle{ C }$ is a square submatrix of $\displaystyle{ A }$ and $\displaystyle{ I }$ is identity matrix. Therefore, $\displaystyle{ \det(B)=\det(C)\in\{1,-1,0\} }$, thus $\displaystyle{ A' }$ is totally unimodular. Add slack variables to transform the constraints to the standard form $\displaystyle{ A'\boldsymbol{z}=\boldsymbol{b},\boldsymbol{z}\ge\boldsymbol{0} }$. The polyhedron $\displaystyle{ \{\boldsymbol{x}\mid A\boldsymbol{x}\ge\boldsymbol{b}, \boldsymbol{x}\ge \boldsymbol{0}\} }$ is integral if the polyhedron $\displaystyle{ \{\boldsymbol{z}\mid A'\boldsymbol{z}=\boldsymbol{b}, \boldsymbol{z}\ge \boldsymbol{0}\} }$ is integral, which is implied by the total unimodularity of $\displaystyle{ A'\, }$.
$\displaystyle{ \square }$