Maths Linear Programming Solved Examples

Advertisement

Maths linear programming is a vital mathematical technique used for optimization. It involves maximizing or minimizing a linear objective function, subject to a set of linear inequalities or equations called constraints. Linear programming is widely applied in various fields such as economics, business, engineering, and military applications. This article explores the principles of linear programming, provides solved examples, and discusses its applications.

Understanding Linear Programming



Linear programming can be defined through a few core concepts:

1. Objective Function


The objective function is the function that needs to be optimized, either maximized or minimized. It is expressed in a linear form:

\[ Z = c_1x_1 + c_2x_2 + \ldots + c_nx_n \]

where:
- \( Z \) is the objective function,
- \( c_i \) represents the coefficients,
- \( x_i \) are the decision variables.

2. Constraints


Constraints are the restrictions placed on the decision variables. They are expressed in the form of linear inequalities or equations:

\[ a_1x_1 + a_2x_2 \leq b \]

where:
- \( a_i \) are the coefficients of the constraints,
- \( b \) is the limit or boundary for the constraint.

3. Feasible Region


The feasible region is the set of all possible points that satisfy the constraints. It is typically represented graphically as a polygonal area, where each vertex represents a potential solution.

4. Optimal Solution


The optimal solution is the point in the feasible region that yields the best value for the objective function, either maximized or minimized.

Formulating a Linear Programming Problem



To illustrate how to formulate a linear programming problem, consider the following scenario:

Problem Statement: A factory produces two types of products: A and B. Each unit of product A requires 2 hours of labor and 3 units of raw material. Each unit of product B requires 4 hours of labor and 2 units of raw material. The factory has a maximum of 40 hours of labor and 30 units of raw material available. The profit from product A is $3 per unit, and from product B is $5 per unit. Determine the number of units of products A and B that should be produced to maximize profit.

Step 1: Define Decision Variables


Let:
- \( x_1 \) = number of units of product A produced
- \( x_2 \) = number of units of product B produced

Step 2: Formulate the Objective Function


The objective is to maximize profit:

\[ Z = 3x_1 + 5x_2 \]

Step 3: Identify Constraints


From the problem, we derive the following constraints:

1. Labor constraint:
\[ 2x_1 + 4x_2 \leq 40 \]

2. Raw material constraint:
\[ 3x_1 + 2x_2 \leq 30 \]

3. Non-negativity constraint:
\[ x_1 \geq 0, \quad x_2 \geq 0 \]

Step 4: Summary of the Linear Programming Model


The linear programming model can be summarized as follows:

Maximize:
\[ Z = 3x_1 + 5x_2 \]

Subject to:
\[ 2x_1 + 4x_2 \leq 40 \]
\[ 3x_1 + 2x_2 \leq 30 \]
\[ x_1 \geq 0, \quad x_2 \geq 0 \]

Graphical Solution of the Linear Programming Problem



To find the optimal solution graphically, we will plot the constraints and identify the feasible region.

Step 1: Graph the Constraints


Each constraint can be rewritten in terms of one variable:

1. From \( 2x_1 + 4x_2 = 40 \):
- When \( x_1 = 0 \), \( x_2 = 10 \) (Point A)
- When \( x_2 = 0 \), \( x_1 = 20 \) (Point B)

2. From \( 3x_1 + 2x_2 = 30 \):
- When \( x_1 = 0 \), \( x_2 = 15 \) (Point C)
- When \( x_2 = 0 \), \( x_1 = 10 \) (Point D)

Step 2: Identify the Feasible Region


The feasible region is the area where all constraints overlap. The vertices of this region will be the points where we evaluate the objective function.

Step 3: Evaluate the Objective Function at Each Vertex


To find the optimal solution, we evaluate the objective function \( Z \) at each vertex:

1. Point A (0, 10):
\( Z = 3(0) + 5(10) = 50 \)

2. Point B (20, 0):
\( Z = 3(20) + 5(0) = 60 \)

3. Point C (0, 15):
\( Z = 3(0) + 5(15) = 75 \)

4. Point D (10, 0):
\( Z = 3(10) + 5(0) = 30 \)

5. Intersection of constraints (calculate simultaneously):
- Solve the equations:
- \( 2x_1 + 4x_2 = 40 \)
- \( 3x_1 + 2x_2 = 30 \)

Solving this gives \( x_1 = 10 \), \( x_2 = 5 \):
\( Z = 3(10) + 5(5) = 55 \)

Step 4: Determine the Optimal Solution


The highest value of \( Z \) is 75 at Point C (0, 15). Thus, the optimal solution is to produce 0 units of product A and 15 units of product B.

Applications of Linear Programming



Linear programming is used in various fields, including:

- Business Optimization: Companies use linear programming to maximize profits or minimize costs while considering constraints like budget, resources, and manpower.

- Transportation Problems: Linear programming helps in optimizing routes and schedules, minimizing transportation costs while meeting supply and demand.

- Manufacturing: In production planning, linear programming assists in determining optimal product mix and resource allocation.

- Finance: It is used in portfolio optimization, where investors aim to maximize returns while minimizing risks.

- Telecommunications: Linear programming helps in network design and optimization, ensuring efficient resource allocation.

Conclusion



Maths linear programming provides a structured approach to decision-making in various fields. By defining an objective function and constraints, one can model real-world problems and find optimal solutions. The graphical method, as illustrated, offers an intuitive way to visualize and solve linear programming problems, although larger problems may necessitate more advanced computational methods such as the Simplex algorithm or duality theory. Understanding linear programming not only equips individuals with problem-solving skills but also enhances strategic planning capabilities across diverse sectors.

Frequently Asked Questions


What is linear programming and how is it applied in real-world scenarios?

Linear programming is a mathematical method used to determine the best outcome in a given model with linear relationships. It is commonly applied in various fields such as economics, business, engineering, and military applications to maximize profits or minimize costs while satisfying certain constraints.

Can you explain the steps involved in solving a linear programming problem?

The steps to solve a linear programming problem typically include defining the objective function, identifying the constraints, graphing the feasible region, finding the corner points, evaluating the objective function at these points, and selecting the point that provides the optimal value.

What are some common methods used to solve linear programming problems?

Common methods for solving linear programming problems include the graphical method for two-variable problems, the Simplex method for larger problems, and the use of software tools like Excel Solver, MATLAB, or specialized linear programming software.

Could you provide a simple example of a linear programming problem and its solution?

Sure! For example, maximize the objective function Z = 3x + 2y subject to the constraints: x + 2y ≤ 6 and x ≥ 0, y ≥ 0. By graphing the constraints and finding the feasible region, we evaluate Z at the corner points (0,3), (2,2), and (6,0) to find that the maximum Z = 12 occurs at the point (0, 3).

What role does the feasible region play in linear programming?

The feasible region in linear programming represents all possible solutions that satisfy the given constraints. It is typically a polygonal area on a graph, and the optimal solution is found at one of the corner points of this region.

How can software tools enhance the solving of linear programming problems?

Software tools like Excel Solver, MATLAB, or Python libraries (e.g., SciPy, PuLP) can significantly streamline the solving of linear programming problems by automating calculations, allowing for the handling of larger datasets, and providing graphical representations of feasible regions and optimal solutions.