The assignment problem Given 𝑛×𝑛 matrix of costs 𝐶= 𝑐 𝑖𝑗 , find a permutation 𝜋 on 1,2,…,𝑛 such that 𝑖=1 𝑛 𝑐 𝑖,𝜋(𝑖) is minimized
As an integer linear program 𝑖=1 𝑛 𝑐 𝑖𝑗 𝑥 𝑖𝑗 min 𝑗=1 𝑛 𝑥 𝑖𝑗 =1 𝑖=1 𝑛 𝑥 𝑖𝑗 =1 𝑥 𝑖𝑗 ≥0 s.t. 𝑖=1,…,𝑛 𝑗=1,…,𝑛
Cramer’s Rule The system 𝐴𝑥=𝑏 has a unique solution if and only if det 𝐴 ≠0, and in that case it is given by 𝑥 𝑖 = det( 𝐴 𝑖 ) det(𝐴) where 𝐴 𝑖 is 𝐴 with column 𝑖 replaced by 𝑏.
Laplace’s formula Given 𝑛×𝑛 matrix 𝐴=( 𝑎 𝑖𝑗 ). det 𝐴 = 𝑗=1 𝑛 −1 𝑖+𝑗 𝑎 𝑖𝑗 det 𝐴 𝑖𝑗 = 𝑖=1 𝑛 −1 𝑖+𝑗 𝑎 𝑖𝑗 det( 𝐴 𝑖𝑗 ) where 𝐴 𝑖𝑗 is 𝐴 with row 𝑖 and column 𝑗 removed.
Properties of determinants Let 𝐴 be 𝑚×𝑚 matrix. Then Exchanging rows or columns changes sign of determinant. Multiplying row or column by 𝑐 multiplies determinant by 𝑐 as well. Adding a multiple of row (column) to another row (column) does not affect determinant.
Totally Unimodular Matrices An 𝑚×𝑛 matrix 𝐴=( 𝑎 𝑖𝑗 ) is totally unimodular if every square submatrix has determinant in −1,0,1 .
Integrality theorem for totally unimodular linear programs Let 𝐴=( 𝑎 𝑖𝑗 ) be 𝑚×𝑛 totally unimodular matrix and let 𝑏∈ 𝒁 𝑚 . Then all basic solutions of 𝐹= 𝐴𝑥≤𝑏, 𝑥≥0 are integer.
Lemma 1 If 𝐴=( 𝑎 𝑖𝑗 ) is a matrix with entries from −1,0,1 such that: Every column of 𝐴 has at most one entry that is 1 and at most one entry that is −1. Then 𝐴 is totally unimodular.
Canonical example Let 𝐷= 𝑁,𝐴 be directed graph. Let 𝐴 be node-arc adjacency matrix of 𝐷. Rows are indexed by nodes. Columns by arcs. Entry (𝑘, 𝑖,𝑗 ) is: 1 when 𝑘=𝑖 −1 when 𝑘=𝑗 0 otherwise.
Lemma 2 Let 𝐴 be totally unimodular. Then 𝐴 ⊺ is totally unimodular. Suppose 𝐵 is obtained from 𝐴 by: Removing rows or columns. Exchanging rows or columns. Multiplying rows or columns by −1. Then 𝐵 is totally unimodular.
Lemma 3 Let 𝐴 be totally unimodular. Then 𝐴 𝐼 and 𝐴 𝐴 are totally unimodular as well.
Networks Directed graph 𝐷=(𝑁,𝐴). Flow 𝑥 assigns a real number 𝑥 𝑖𝑗 to arc 𝑖𝑗∈𝐴. Nonnegativity constraint: 𝑥 𝑖𝑗 ≥0
Balances Outgoing flow from node 𝑖: 𝑖𝑗∈𝐴 𝑥 𝑖𝑗 Ingoing flow from node 𝑖: 𝑗𝑖∈𝐴 𝑥 𝑖𝑗 Balance at node 𝑖 wrt. 𝑥: 𝑏 𝑖 𝑥 = 𝑖𝑗∈𝐴 𝑥 𝑖𝑗 − 𝑗𝑖∈𝐴 𝑥 𝑖𝑗 Note 𝑖 is source if 𝑏 𝑖 𝑥 >0, and sink if 𝑏 𝑖 𝑥 <0. No sources or sinks: flow is circulation.
Balance constraints Given by balances 𝑏 𝑖 for 𝑖∈𝑁. Constraint: 𝑏 𝑖 𝑥 = 𝑏 𝑖 for all 𝑖∈𝑁. Assumption: 𝑖∈𝑁 𝑏 𝑖 =0
Arc constraints Given by lower bounds 𝑙 𝑖𝑗 and upper bounds 𝑢 𝑖𝑗 . Constraint: 𝑙 𝑖𝑗 ≤ 𝑥 𝑖𝑗 ≤ 𝑢 𝑖𝑗 for all 𝑖𝑗∈𝐴. Assumption: 0≤ 𝑙 𝑖𝑗 ≤ 𝑢 𝑖𝑗
The minimum cost problem Given network 𝐷=(𝑁,𝐴) with arc costs 𝑐 𝑖𝑗 , together with balance constraints and possibly arc constraints. Find feasible flow 𝑥 minimizing 𝑖𝑗∈𝐴 𝑐 𝑖𝑗 𝑥 𝑖𝑗
Integrality theorem If all balance constraints, lower bounds, and upper bounds are integer, then there is a minimum cost feasible flow that is integer.
Modelling with min cost flows Like modelling with linear programs this is an acquired skill. Most important question to figure out: What is the flow.
Transportation problem Given: Set of sources 𝑆 and destinations 𝐷. Ship goods from sources to destinations at minimum cost. Cost of shipping unit of good from source 𝑖 to destination 𝑗 is 𝑐 𝑖𝑗 . Source 𝑖 has supply 𝑟 𝑖 . Destination 𝑗 has demand 𝑠 𝑗 .
Tanker Scheduling Problem Find minimum size of fleet to accomodate schedule of deliveries. Given: List of deliveries ( 𝑖 𝑘 , 𝑗 𝑘 , 𝑡 𝑘 ) for 𝑘=1,…,𝑚. Pick up at port 𝑖 𝑘 at time 𝑡 𝑘 and deliver at port 𝑗 𝑘 . 𝑎 𝑖𝑗 = time to load at port 𝑖 and sail to port 𝑗. 𝑏 𝑖𝑗 = time to unload at port 𝑖 and sail to port 𝑗.
Optimal loading of a hopping airplane Find most profitable way to accept passengers on a ”hopping flight” route. Given: Single plane with capacity 𝑝. Route along cities 1,2,…,𝑛. At city 𝑖 there are 𝑏 𝑖𝑗 passengers that would like to go to city 𝑗, paying fare 𝑓 𝑖𝑗 each.