What is Linear Programming?

Linear programming is used to optimize a linear objective function and a system of linear inequalities or equations. The limitations set on the objective function are called as constraints. The objective function represents the quantity which needs to be minimized or maximized. Linear programming's main objective is to optimize the objective function.

The assumptions for a linear programming problem are given below:

  • The limitations on the objective function known as constraints are written in the form of quantitative values.
  • The objective function must be a linear function.
  • The relationship between the objective function and the constraints must be linear.

Linear programming problems can be solved using multiple methods. The most common methods are simplex method, solving the problems using R or open solver, and graphical method. In this article, we will solve the linear programming problems using the graphucal method.

The best Maths tutors available
Paolo
5
5 (63 reviews)
Paolo
£30
/h
Gift icon
1st lesson free!
Hiren
5
5 (23 reviews)
Hiren
£150
/h
Gift icon
1st lesson free!
Shane
5
5 (33 reviews)
Shane
£30
/h
Gift icon
1st lesson free!
Akash
5
5 (58 reviews)
Akash
£45
/h
Gift icon
1st lesson free!
Intasar
5
5 (48 reviews)
Intasar
£79
/h
Gift icon
1st lesson free!
Johann
5
5 (35 reviews)
Johann
£35
/h
Gift icon
1st lesson free!
Luke
5
5 (76 reviews)
Luke
£125
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (156 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Paolo
5
5 (63 reviews)
Paolo
£30
/h
Gift icon
1st lesson free!
Hiren
5
5 (23 reviews)
Hiren
£150
/h
Gift icon
1st lesson free!
Shane
5
5 (33 reviews)
Shane
£30
/h
Gift icon
1st lesson free!
Akash
5
5 (58 reviews)
Akash
£45
/h
Gift icon
1st lesson free!
Intasar
5
5 (48 reviews)
Intasar
£79
/h
Gift icon
1st lesson free!
Johann
5
5 (35 reviews)
Johann
£35
/h
Gift icon
1st lesson free!
Luke
5
5 (76 reviews)
Luke
£125
/h
Gift icon
1st lesson free!
Harjinder
4.9
4.9 (156 reviews)
Harjinder
£25
/h
Gift icon
1st lesson free!
Let's go

Example 1

A store has requested a manufacturer to produce pants and sports jackets.

For materials, the manufacturer has $750 m ^2$ of cotton textile and $1000 m^2$ of polyester. Every pair of pants (1 unit) needs $1 m^2$ of cotton and $2 m ^2$ of polyester. Every jacket needs $1.5 m ^2$ of cotton and $1 m^2$ of polyester. The price of the pants is fixed at $50 and the jacket, $40. What is the number of pants and jackets that the manufacturer must give to the stores so that these items obtain a maximum sale?

Solution

Step 1 - Identify the Decision Variables

Choose the unknowns.

x = number of pants

y = number of jackets

 

Step 2 - Write the objective function.

$f(x,y)= 50x + 40y$

 

Step 3 - Identify the set of Constraints

To write the constraints, use a table:

pants jackets available
cotton 1 1,5 750
polyester 2 1 1,000

$x + 1.5y leq 750$

$ 2x+3y leq 1500$

$2x + y leq 1000$

As the number of pants and jackets are natural numbers, there are two more constraints:

x ≥ 0

y ≥ 0

 

Step 4 - Choose the method for solving the problem

There are many methods to solve a linear programming method. In this problem, we will find the solution of the problem graphically.

 

Step 5 - Construct the graph

Represent the constraints graphically.

As x ≥ 0 and y ≥ 0, work in the first quadrant.

Represent the straight lines from their points of intersection with the axes.

Example 1 - Graph

Solve the inequality graphically: $2x +3y leq 1500$, and take a point on the plane, for example (0,0).

$2 cdot 0 + 3 cdot 0 leq 1500$

Since $0 leq 1500$ then the point (0,0) is in the half plane where the inequality is satisfied.

Similarly, solve $2x + y leq 1000$.

$2 cdot 0 + 0 leq 1000$

 

Step 6 - Identify the feasible region

The area of intersection of the solutions of the inequalities would be the solution to the system of inequalities, which is the set of feasible solutions.

 

Step 7 - Find the optimum point

Calculate the coordinates of the vertices from the compound of feasible solutions.

The optimal solution, if unique, is in a vertex. These are the solutions to the systems:

$2x + 3y = 1500 ; x = 0           (0, 500)$

$2x + y = 1000; y = 0           (500, 0)$

$2x + 3y =1500$; $2x + y = 1000    (375, 250)$

Now, we will calculate the value of the objective function at each of the vertices to determine which of them has the maximum or minimum values. It must be taken into account the possible non-existence of a solution if the compound is not bounded.

In the objective function, place each of the vertices that were determined in the previous step.

$f(x, y) = 50x + 40y$

$f(0, 500) = 50 cdot 0 + 40cdot 500 = $20000$

$f(500, 0) = 50 cdot 500 + 40 cdot 0 = $25000$

$f(375, 250) = 50 cdot 375 + 40 cdot 250 = $28750$   Maximum

The optimum solution is to make 375 pants and 250 jackets to obtain a benefit of $28,750.

The solution is not always unique, so we can also find other solutions.

 

Example 2

Maria has an online shop where she sells hand made paintings and cards. She sells the painting for $50 and the card for $20. It takes her 2 hours to complete 1 painting and 45 minutes to make a single card. She also has a day job and makes paintings and cards in her free time. She cannot spend more than 15 hours a week to make paintings and cards. Additionally, she should make not more than 10 paintings and cards per week.

She makes a profit of $25 on painting and $15 on each card. How many paintings and cards should she make each week to maximize her profit.

 

Solution

Follow these steps to solve the above problem.

 

Step 1 - Identify the decision variables

x = number of paintings

y = number of cards

 

Step 2 - Write the objective function

Since she makes  $25 profit in each sold painting and $15 on each sold card, therefore the objective function is:

$P = 25x + 15y$

 

Step 3 - Identify the set of constraints

It takes her 2 hours to complete a painting and 45 minutes to make a card. She cannot spend more than 15 hours a week in making cards and painting.

$2x + 0.75y leq 15$

She should make at most 10 paintings and cards a week.

$x + y leq 10$

We also have two other constraints:

$x geq 0$ and $y geq 0$

 

Step 4 - Choose the method for solving the problem

We will use the graphical method to solve this problem.

 

Step 5 - Construct the graph

Graph- Example 2

 

Step 6 - Identify the feasible region

The green highlighted area is the feasibility region of the graph

Feasibility region of the graph
Feasibility region of the graph

 

Step 7 - Find the optimum point

Use the coordinates of the vertices and substitute them in the objective function to yield the maximum point.

$(7, 0)              P = 25(7) + 15(0) = 175$

$(6, 4)              P = 25(6) + 15(4) = 210$       Maximum 

$ (0,11)             P = 25(0) + 15 (11) = 155$

The above calculations show that Maria can make the maximum profit of $210 a week by making 6 paintings and 4 cards.

Did you like this article? Rate it!

1 Star2 Stars3 Stars4 Stars5 Stars 4.00 (34 rating(s))
Loading...
Emma

Emma

I am passionate about travelling and currently live and work in Paris. I like to spend my time reading, gardening, running, learning languages and exploring new places.