\documentstyle[handout,11pt]{article}
\begin{document}
\input{lecmacros}
\thispagestyle{empty}
\setlength{\parindent}{0pt}
\setlength{\parskip}{1.8ex}

\lecturehead{3391}{Advanced Algorithms}{27 October 1999}{5, part 2}{Mohsen D. Ghassemi}

\begin{center}
\Large{\bf Introduction To Linear Programming}
\end{center}

\section{The Diet Problem}
\label{sec:lec.lp}

Many linear programming formulations arise from situations where a decision 
maker wants to minimize the cost of meeting a set of requirements. In the diet 
problem we would like to develop a diet using $n$ food items such that it 
satisfies the daily vitamin requirements. Let the food items be numbered
1 through $n$ and let the $m$ vitamin mineral requirements be given by
$b_1, \ldots, b_m$. 

From food item $j$, you get $a_{ij}$ units of mineral $i$ per unit of $j$.
If you decide to have $x_{j}$ units of item $j$, you get $x_{j}a_{ij}$
units of mineral $i$.

\begin{eqnarray*}
\sum_{j} x_j a_{ij} \geq  b_{i} \ \ \ \forall i \\
\end{eqnarray*}
If the cost of food item $j$ is $c_{j}$ per unit. Then the total cost
incurred = $\sum_{j} c_{j} x_{j}$.

We would like to \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {minimize} $\sum_{j} c_j \ x_j$ \\
\ \ subject \ to: 
\begin{eqnarray*}
\ \ \sum_{j=1}^{n} x_i a_{i,j} \ \geq \ b_{i} \ \ i=1,..,m \\
\end{eqnarray*}
Alternatively, one can write the above optimization problem as: 
\[ minimize \left[ \begin{array}{llll} c_{1} & c_{2} \ldots c_{n}
\end{array} \right]
\left[ \begin{array}{c}
x_{1} \\ x_{2} \\ \vdots \\ x_{n}
\end{array} \right] \]
\[ \ \ subject \ to: \ \left[ \begin{array}{ll}
a_{11} & a_{12} \ldots a_{1n} \\
a_{21} & a_{22} \ldots a_{2n} \\
a_{m1} & a_{m2} \ldots a_{mn}
\end{array} \right] \left[ \begin{array}{c}
x_{1} \\ x_{2} \\ \vdots \\ x_{n} 
\end{array} \right] \geq 
\left[ \begin{array}{ll}
b_{1} \\ b_{2} \\ \vdots \\ b_{n}
\end{array} \right] \]

The above problem is of the form min $c^Tx$ {subject} {to:} $Ax \geq b$. Such 
that a problem is referenced to as a {\it linear program}. This is because
the objective function as well as the constraints are linear combination
of the variables.

We now consider some optimization problems that we have studied and see
weather we can write them down as a linear program.

\subsection{Knapsack Problem}

Recall that in the knapsack problem we are given $n$ items of sizes $w_{1}$ 
through $w_{n}$ and profits $p_{1}$ through $p_{n}$. The goal is to build the 
items with total size $\leq$ $B$ such that the total profit is maximized. 

The LP representation of the problem can be shown as:

\[ \begin{array}{lll}
maximize & \sum x_j p_j \\
subject \ to & \sum_{j=1}^{n} x_j w_j \leq B \\
& x_j \in \{0,1\} 
\end{array} \]
\[ c^T = \left[ \begin{array}{c}
p_{1} \\ \vdots \\ p_{n} 
\end{array} \right] \]
\[ A = \left[ \begin{array}{ll} 
w_{1} & w_{2} \ldots w_{n} 
\end{array} \right] \]
\[ b = \left[ \begin{array}{ll} 
B
\end{array} \right] \]
Note that the constraint $x_j \in$ \{0,1\} is not a linear constraint so
that the above program is an integer linear program. 
\subsection{Minimum Spanning Tree Problem}
In the minimum spanning tree roblem, the set of instances is the set of all 
weighted undirected graphs. For a given instance graph $G$, the set $S(G)$ of 
solutions for $G$ is the set of all trees that span every vertex of $G$. 
Finally, the value of a solution tree $T$ is simply the sum of the weights 
of the edges of $T$.

One LP representation of the problem is: 

\[ \begin{array}{lll}
minimize & \sum_{e} w_e x_e \\
subject \ to & \sum_{e \ \in \ c} x_e \geq 1  & \ for \ all \ cut \ c  \\
& x_e = {0 \ or \ 1} \ & \ for \ all \ edges \ e 
\end{array} \]
Note that since there are an exponential number of cuts, the number of 
constraints is exponential.
\subsection{Weighted Vertex Cover Problem}
Recall that a vertex cover of undirected graph $G = (V.E)$ is a subset
${V}' \subseteq {V}$ such that if (${u,v}) \in {E}$, then ${u} \in {V}'$ 
or ${v} \in {V}'$ (or both). That is, each vertex covers its incident edges,
and a vertex cover for ${G}$ is a set of vertices that covers all the edges
in ${E}$.

The LP representation of the problem is: 

\[ \begin{array}{lll}
minimize & \sum_{u} x_u w_u \\
subject \ to & x_u + x_v \geq 1 & \forall ({u},{v}) \in E \\
& x_u, x_v = {0 \ or \ 1} 
\end{array} \]
\end{document}

