2
$\begingroup$

In simplex algorithm, in order to handle inequation constraints, we need to convert them into equations by introducing so-called 'slack variables', like $$ \mathbf{a}^T\mathbf{x} + b \leq 0\quad\rightarrow\quad \mathbf{a}^T\mathbf{x} + b + s = 0 $$

On the other hand, if some constraints could be violated, we can introduce 'slack variables' to make them 'soft constraints', like $$ \mathbf{a}^T\mathbf{x} + b \leq 0\quad\rightarrow\quad \mathbf{a}^T\mathbf{x} + b - s \leq 0 $$

These two scenarios are different. In the simplex scenario, it is the equation constraint that is slacked to be an inequation, and in the second scenario, it is the inequation that is slacked. But in both scenarios, we say $s$ is the slack variable of constraint $\mathbf{a}^T\mathbf{x} + b \leq 0$.

It seems a little bit strange to me , so I wonder if I am wrong somewhere.

$\endgroup$

1 Answer 1

4
$\begingroup$

You are correct that there are two different scenarios where slack variables are introduced in linear programming: one for converting inequality constraints to equality constraints, and another for introducing soft constraints.

In the first scenario, where inequality constraints are converted to equality constraints, slack variables are introduced to represent the amount by which the left-hand side of the constraint falls short of the right-hand side. In this case, the slack variable represents the "slack" or surplus in the constraint, and we add it to the left-hand side of the constraint to convert it to an equality.

In the second scenario, where we introduce soft constraints, slack variables are also introduced, but in this case they represent the amount by which the left-hand side of the constraint can be violated. In other words, the slack variable represents the "slack" or flexibility in the constraint, and we subtract it from the left-hand side of the constraint to allow for some degree of violation.

Despite the different interpretations of the slack variable in each scenario, it is still called a slack variable in both cases because it represents some degree of slack or flexibility in the constraint.

$\endgroup$
1
  • $\begingroup$ Is it an AI answer? $\endgroup$
    – xd y
    Mar 19, 2023 at 10:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.