This blog is going to talk about the general form and standard form, and the transformation between different forms.
General form of Linear Optimization
We given a cost vector ${ \bar{c} = \left[ \begin{smallmatrix} c_1 & c_2 & \cdots & c_n \end{smallmatrix} \right]^\top}$ and we seek to minimize or maximize the linear cost function ${ \bar{x} \in \mathbb{R}^n \mapsto \bar{c}^T \bar{x} \in \mathbb{R}^n}$
Over all vectors ${ \bar{x} = \left[ \begin{smallmatrix} x_1 & x_2 & \cdots & x_n \end{smallmatrix} \right] ^\top \in \mathbb{R}^n }$ satisfying a set of linear equality and inequality constrains, like the following form
Here, ${ L,E,G }$ are some finite index sets (they may be empty). ${ P,N }$ are subsets of ${ {1,2,\cdots, n} }$
Important terms
-
The variables ${ x_1,x_2,\cdots,x_n }$ are called decision variables .
-
A vector ${ \bar{x} }$ satisfying all the contraints is called a feasible solution or a feasible vector.
-
The set of all feasible solution is called the feasible set or a feasible region.
-
A feasible solution ${ \bar{x}^* }$ that minimizes the cost function or objective function is called an optimal (feasible) solution (i.e. a feasible solution ${ \bar{x}^*}$ such that ${ \forall \bar{x} \in \text{feasible set }, \bar{c}^T\bar{x}^* \leq \bar{c}^T \bar{x}}$)
-
The value of ${ \bar{c}^T\bar{x}^* }$ is called the optimal cost
-
We say that the cost is unbounded below or that the optimal cost is ${ -\infty }$, if ${ \forall K\in \mathbb{R}, \exists }$ a feasible solution ${ \bar{x} }$ such that ${ \bar{c}^T\bar{x} \leq K }$
E.g. following optimization problem gives an example that the cost function is unbounded below
Unify the General form
-
An equality constraint ${ \bar{a_i}^T \bar{x_i} = b_i}$ is equivalent to the pair of inequality contraints ${ \bar{a_i}^T \bar{x_i} \leq b_i, \bar{a_i}^T \bar{x_i} \geq b_i }$
-
The constraint ${ \bar{a_i}^T \bar{x_i} \leq b_i}$ is equivalent to ${ - \bar{a_i}^T \bar{x_i} \geq -b_i }$
-
A constraint of the form ${ x_j \geq 0 }$ is a special case of the constraint ${ \bar{a_i}^T \bar{x_i} \geq b_i }$, where ${ b_i = 0, \bar{a_i} = \left[\matrix{0\\0\\ \vdots\\0\\1 \\0 \\ \vdots \\0 } \right] \matrix{ \ \ \ \ \leftarrow j^{th} element}}$
The feasible set in a general linear optimization problem can thus be expressed exclusively in terms of constrains of the form ${ \bar{a_i}^T \bar{x_i} \geq b_i }$
Next, we can rewrite the ${ m }$ constains into another form ${ A\bar{x} \geq \bar{b} }$, here
PS: the “${ \geq }$” between two vector means all the componets of front vector are equal and greater than corresponding elements of second vector.
- Maximazing ${ \bar{x} \mapsto \bar{c}^T \bar{x} }$ is equivalent to minimazing ${ \bar{x} \mapsto - \bar{c}^T \bar{x}}$. We just need to take the “Opposite number” of cost value for original optimization problem.
In summary, all the Linear Optimization problem can be written as General form:
Standard form of Linear Optimization
A linear programming problem of the form
Standard form will be more convenient in solving Linear Optimization problem.
Fact: Any linear optimization problem can be transformed into an equivalent problem in standard form!.
Method for transforming into Standard form
Step 1. Eliminate Unrestricted Variables
If a decision variable ${ x_i }$ is unrestricted in sign, introduce two new decision variables ${ x_i^+ , x_i^- }$ substitute ${ x_i^+ - x_i^- }$ for every ${ x_i }$ in the problem and the restrictions ${ x_i^+ \geq 0 , x_i^- \geq 0}$ to the list of contraints.
Step 2. Eliminate Inequality Constrains of type ${ \sum_{j=1}^n a_{ij} x_j \leq b_i }$
For each contrains like that, introduce a new decision variable ${ s_i }$ and replace the inequality constraint as
The new decision variable ${ s_i }$ is called a slack variable
Step 3. Eliminate Inequality Constrains of type ${ \sum_{j=1}^n a_{ij} x_j \geq b_i }$
Similar way to treat it like above, replace the constrains as
The new decision variable ${ s_i }$ is called a surplus variable
An example of transforming
- Replace all the unrestricted variables
- Add surplus/slack variables
Note!
In Linear Optimization problem, when we say two LO problems are equivalent, it means givena solution of one, we can transform it into a feasible solution of another one with same cost.
Here are two pairs of solutions of above problem
Second Example
Special cases
-
If ${ 0\leq x_1 \leq 2 }$, we can treat it as ${ x_1 \geq 0, x_1 \leq 2 }$. Then add slack variable ${ x_1 + s = 2, s\geq 0 }$
-
If ${ x_1 \geq -2 }$
${\Rightarrow x_1^+ - x_1^- \geq -2, x_1^+ , x_1^- \geq 0 }$
${\Rightarrow x_1^+ - x_1^- - s = -2, x_1^+ , x_1^-,s \geq 0 }$