

max: a_{1}x_{1} + a_{2}x_{2} + ... + a_{n}x_{n} // Objective function subject to: c_{11}x_{1} + c_{12}x_{2} + ... + c_{1n}x_{n} ≤ d_{1} // Constraints c_{21}x_{1} + c_{22}x_{2} + ... + c_{2n}x_{n} ≤ d_{2} .... c_{m1}x_{1} + c_{m2}x_{2} + ... + c_{mn}x_{n} ≤ d_{m} x_{1} ≥ 0, x_{2} ≥ 0, ..., x_{n} ≥ 0 
Note:





The variable s_{1} is called a surplus variable

max: x_{1} + x_{2} s.t.: x_{1} + 2x_{2} ≤ 8 3x_{1} + 2x_{2} ≤ 12 x_{1} ≥ 0, x_{2} ≥ 0 
max: z = x_{1} + x_{2} s.t.: x_{1} + 2x_{2} ≤ 8 3x_{1} + 2x_{2} ≤ 12 x_{1} ≥ 0, x_{2} ≥ 0 
We want to maximize the variable x...

Notes:





Related: Nonbasic variable:

Example:
x_{1} x_{2} s_{1} s_{2} z  RHS ==========================+==== 1 1 0 0 1  0 1 2 1 0 0  8 3 2 0 1 0  12 Basic variables: s_{1} s_{2} z Nonbasic variables: x_{1} x_{2} 


Example:




