Types of Constraints

A simple and student-friendly explanation of different types of constraints in linear programming, including equality, inequality, non-negativity, and upper-bound limits with intuitive examples.

1. Introduction

In every linear programming model, certain conditions restrict how the variables can take their values. These conditions are called constraints. They describe what is allowed and what is not allowed in the situation. Without constraints, the variables could take any value, and the problem would not represent the real scenario.

Different types of constraints capture different kinds of limitations such as exact requirements, upper limits, lower limits, or conditions that must always be followed. Understanding these helps in building and analysing linear programming models easily.

2. What Are Constraints?

A constraint is simply a rule that the variables must satisfy. In linear programming, a constraint usually appears in the form of an equation or an inequality. Each constraint removes certain unwanted values for the variables and keeps only those that make sense in the real-life situation.

For example, if a task cannot exceed 10 hours, or if the total amount of a resource must exactly match a fixed quantity, these become part of the constraints.

3. Equality Constraints

An equality constraint is a condition where the expression on the left side must be exactly equal to the value on the right side. It fixes the relationship between the variables very strictly.

3.1. Meaning and Use

An equality constraint looks like:

\( ax + by = c \)

This means that the combination \( ax + by \) must be exactly equal to \( c \). There is no flexibility above or below. Such constraints appear when something must be used completely or must match a required total.

3.2. Simple Example

Consider the relationship:

\( x + y = 20 \)

This tells that the total of \( x \) and \( y \) must be exactly 20. If \( x = 8 \), then \( y \) must be 12. If \( x = 15 \), then \( y \) must be 5. No other combinations are allowed.

4. Inequality Constraints

Inequality constraints allow the variables to take values within a range instead of fixing them exactly. These are the most common type of constraints in linear programming because many real-life situations involve limitations rather than exact requirements.

4.1. Less Than or Equal To (\( \le \))

An inequality of the form

\( ax + by \le c \)

means that the combination on the left cannot exceed the limit \( c \). It can be equal or smaller. Many resource limitations (time, material, money, etc.) fall in this category.

Example:

\( 2x + y \le 50 \)

This can represent a resource that allows at most 50 units of usage.

4.2. Greater Than or Equal To (\( \ge \))

An inequality of the form

\( ax + by \ge c \)

means that the value on the left must be at least \( c \). It cannot fall below the minimum requirement.

Example:

\( x + 3y \ge 12 \)

This ensures that the expression meets or exceeds the required minimum level of 12.

4.3. Example Illustrations

Suppose a situation requires that the total time spent must not go beyond 40 hours. If each unit of activity consumes 2 hours of \( x \) and 1 hour of \( y \), the constraint becomes:

\( 2x + y \le 40 \)

This inequality expresses the allowed region of values for \( x \) and \( y \).

5. Non-Negativity Constraints

In many linear programming problems, the variables represent quantities like time, distance, items produced, or resources used. Such quantities cannot logically be negative. Therefore, special constraints are added to ensure that the variables remain at zero or above.

5.1. Why Variables Cannot Be Negative

If a variable represents something physical, such as amount produced or hours spent, then negative values do not make sense. Hence the conditions:

\( x \ge 0, \; y \ge 0 \)

These are called non-negativity constraints, and they ensure that the variables stay within meaningful limits.

5.2. Example

If \( x \) represents the number of items made, then:

\( x \ge 0 \)

Because it is not possible to make a negative number of items. This simple rule keeps all variables in the acceptable region.

6. Upper-Bound (Limit) Constraints

Sometimes a variable itself has a limit independent of other variables. In such cases, the constraint directly restricts the maximum allowable value of that variable.

6.1. Meaning

An upper-bound constraint looks like:

\( x \le k \)

where \( k \) is the highest value that the variable can reach. These constraints usually arise when a quantity cannot exceed a fixed cap due to availability or physical capacity.

6.2. Example

If a particular task can be performed at most 30 times due to capacity, then:

\( x \le 30 \)

This directly limits how large the variable \( x \) can become.

7. Logical or Conditional Constraints

Certain situations involve relationships that are not purely numeric but logical. These constraints decide whether a variable must stay within a certain range based on another variable or a specific condition.

7.1. When They Appear

Logical constraints appear when choices depend on decisions. For example, if an action is taken only when another action happens, or a variable becomes valid only when certain requirements are met.

These are often written using binary variables, or through additional inequalities that enforce the logical rule.

7.2. Small Example

Suppose a certain process \( x \) can only operate if another process \( y \) runs at least once. One way to express this idea is:

\( x \le M y \)

Here, \( M \) is a large constant. If \( y = 0 \), then \( x \) must also be 0. If \( y > 0 \), then \( x \) is free to take larger values within the limit.

8. Quick Reference Table of Constraint Types

TypeGeneral FormMeaning
Equality\( ax + by = c \)Exact requirement, no flexibility
Inequality (Upper Limit)\( ax + by \le c \)At most \( c \)
Inequality (Lower Limit)\( ax + by \ge c \)At least \( c \)
Non-Negativity\( x \ge 0 \)Variable cannot be negative
Upper-Bound\( x \le k \)Variable cannot exceed limit \( k \)
Logical Constraint\( x \le M y \)Links variables through a condition