Final answer:
Slack variables are added to inequality constraints in a linear programming problem to transform them into equations. The number needed is equal to the number of "<=" constraints.
Step-by-step explanation:
The number of slack variables needed in a linear programming problem is equal to the number of inequality constraints that are in the form of "<=" (less than or equal to). Slack variables are added to transform these inequalities into equalities, allowing the problem to be solved using the simplex method. For example, if a linear programming problem has three constraints of the type "<=", three slack variables would be required. Each slack variable corresponds to one inequality constraint and effectively measures the amount of unused resources or slack in that constraint.