# Linear Programming

Given a function ${\displaystyle f:\mathbb {R} ^{n}\rightarrow \mathbb {R} }$ and a set ${\displaystyle {\mathcal {F}}\subseteq \mathbb {R} ^{n}}$, an optimization problem is the problem of finding an ${\displaystyle x\in {\mathcal {F}}}$ with the optimal (minimum) ${\displaystyle f(x)}$. Formally, the problem can be expressed as:

{\displaystyle {\begin{aligned}{\mbox{minimize}}&\quad f(x)\\{\mbox{subject to}}&\quad x\in {\mathcal {F}}\end{aligned}}}

where ${\displaystyle x\in {\mathcal {R}}^{n}}$ is a vector of ${\displaystyle n}$ variables. For the problem of maximizing a function ${\displaystyle f}$, we just minimizes ${\displaystyle -f}$ instead.

We call the function ${\displaystyle f}$ the objective function and call any ${\displaystyle x\in {\mathcal {F}}}$ a feasible solution of the problem. A feasible solution that minimizes ${\displaystyle f(x)}$ is called an optimal solution. Our task is to find an optimal solution.

The feasible set ${\displaystyle {\mathcal {F}}}$ is usually given by a number of constraints ${\displaystyle P_{1},P_{2},\ldots ,P_{m}}$, which are predicates defined on ${\displaystyle x}$. An ${\displaystyle x}$ is a feasible solution if it satisfies all the constraints.

A linear programming (LP) problem is an optimization problem with a linear objective function subject to a number of linear constraints. Formally, an LP is a problem that can be expressed in the following form:

{\displaystyle {\begin{aligned}{\mbox{minimize}}&\quad c_{1}x_{1}+c_{2}x_{2}+\cdots +c_{n}x_{n}\\{\mbox{subject to}}&\quad a_{11}x_{1}+a_{12}x_{2}+\cdots +a_{1n}x_{n}\leq b_{1}\\&\quad a_{21}x_{1}+a_{22}x_{2}+\cdots +a_{2n}x_{n}\leq b_{2}\\&\qquad \qquad \vdots \\&\quad a_{m1}x_{1}+a_{m2}x_{2}+\cdots +a_{mn}x_{n}\leq b_{m}\\\end{aligned}}}

where ${\displaystyle a_{ij}}$, ${\displaystyle b_{i}}$ and ${\displaystyle c_{j}}$ are constants and ${\displaystyle x_{j}}$ are variables. For maximization problem, or constraints given by "${\displaystyle \geq }$", we can multiply the coefficients by ${\displaystyle -1}$ and still write the LP in the above form.

We can describe the programming in the vector form. Let ${\displaystyle x}$ be a vector of ${\displaystyle n}$ variables. Let ${\displaystyle A=(a_{ij})}$ be an ${\displaystyle m\times n}$ matrix of constant entries, ${\displaystyle b=(b_{1},\ldots ,b_{m})}$ be a vector of ${\displaystyle m}$ constant entries, and ${\displaystyle c=(c_{1},\ldots ,c_{n})}$ be a vector of ${\displaystyle n}$ constant entries. Then an LP is expressed as:

{\displaystyle {\begin{aligned}{\mbox{minimize}}&\quad c^{T}x\\{\mbox{subject to}}&\quad Ax\leq b\end{aligned}}}

We call it the canonical form of linear programming.

# The geometry of LPs

For ${\displaystyle n}$-dimensional space ${\displaystyle \mathbb {R} ^{n}}$, a linear constraint ${\displaystyle ax\leq b}$ specifies a halfspace. The feasible set specified by ${\displaystyle m}$ constraints together is an intersection of ${\displaystyle m}$ halfspaces, thus, a convex polytope.

The convex polytope is defined by ${\displaystyle Ax\leq b}$.

The LP can be thought as given an ${\displaystyle n}$-dimensional polytope and a linear (affine) function ${\displaystyle f:\mathbb {R} ^{n}\rightarrow \mathbb {R} }$, looking for a point ${\displaystyle x}$ in the polytope with the smallest function value ${\displaystyle f(x)}$.

We can choose a number of constraints in the system ${\displaystyle Ax\leq b}$, and make them hold with equality. This would define a subspace of ${\displaystyle \mathbb {R} ^{n}}$. In particular, if we choose ${\displaystyle n}$ linearly independent constraints to form an ${\displaystyle n\times n}$ submatrix ${\displaystyle A'}$ and the corresponding ${\displaystyle n}$-dimensional vector ${\displaystyle b'}$, solving ${\displaystyle A'x=b'}$ would give us exactly one point ${\displaystyle x}$. If this ${\displaystyle x}$ is in the polytope, i.e. ${\displaystyle x}$ satisfies that ${\displaystyle Ax\leq b}$, we call such ${\displaystyle x}$ a vertex of the polytope ${\displaystyle Ax\leq b}$. In the context of LP, it is also called a basic feasible solution (bfs) of the LP.

A key observation for LP is that there is a basic feasible solution which is optimal, i.e. the optimal solution is a vertex of the polytope.

# The simplex algorithms

The simplex algorithm by George Dantzig solves the linear programming by moving from vertex to vertex of the convex polytope, each time making some progress towards optimizing the objective function. Eventually the algorithm reaches a vertex which is a local optimum. In a convex set, a locally optimal point is also global optimal, thus the simplex algorithm returns an optimal solution in finite steps.

The problem with the simplex algorithm is that in some bad polytopes, it takes the simplex algorithm exponentially many steps to reach the optimum. The simplex algorithm is actually a class of algorithms defined by various pivoting rules, which describe how to move locally from one vertex to another. The original pivoting rule proposed by Dantzig has an exponentially large worst-case time complexity (though works very good in practice). To-date, it is still unknown whether there exists any deterministic simplex algorithm with sub-exponential worst-case complexity.

People have tried randomized pivoting rules, and there are some amazing progresses have been made:

• Kalai 1992: there is a randomized simplex algorithm with sub-exponential time complexity.
• Kelner-Spielman 2006: there is a polynomial time randomized simplex algorithm.

Although we do not know whether there exists deterministic poly-time simplex algorithm, we do know that LP can be solved by deterministic poly-time algorithms, i.e. LP is in P. The following two algorithms use different ideas than the simplex algorithm, and are both in poly-time:

• The ellipsoid algorithm.
• Interior point methods.

Although these algorithms guarantee polynomial time complexity in the worst-case, their performances are worse than the simplex algorithms. However, the ideas of these algorithms can be used to solve more general mathematical programmings, such as convex programmings.