0% found this document useful (0 votes)
18 views16 pages

Solved Problems

This document presents four examples of linear programming problems solved using the graphical method and the simplex method. In each example, the variables, the objective function, and the constraints are defined, and the optimal solution that maximizes the benefits is found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views16 pages

Solved Problems

This document presents four examples of linear programming problems solved using the graphical method and the simplex method. In each example, the variables, the objective function, and the constraints are defined, and the optimal solution that maximizes the benefits is found.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

EXAMPLE 1.

In a farm, it is desired to raise rabbits and chickens as a complement in its


economy, so that the total does not exceed 180 hours per month
intended for this activity. Their warehouse can only accommodate a maximum of 1000
kilograms of feed. If it is assumed that a rabbit needs 20 kilograms of
I think of the month and a chicken weighing 10 kilograms per month, that the monthly hours of

The care required for a rabbit is 3 and for a chicken is 2, and the benefits.
the reported sales amount to 500 and 300 pesetas per head respectively,
findthenumberofanimalsthatmustberaisedforprofittobemaximum.

Solution:

Wedefinetheoriginalvariablesas:

x1numberofrabbits.
x2=numberofchickens.

The function to maximize, profit obtained, will be:

f (x1 ,x2) = 500x1+ 300x2

Thelinearconstraintsoftheproblemareformulatedas:

20x 1+ 10x2≤ 1000 (for the availability of feed)


3x 1+ 2x 2≤ 180 (for the availability of hours)

Finally,wehavethenon-negativityconstraintsofthevariables:

x1 ,x2≥ 0

1
The problem statement is therefore as follows:

max f (x1 ,x2) = 500x1+ 300x2


s.a.:20x1+ 10x 2≤ 1000
3x 1+ 2x 2≤ 180
x1 ,x2≥ 0

The next step will be to convert to standard form, that is,


we introduce slack variables in the two true constraints,
obtaining,oncetheappropriatesimplificationshavebeenmade:

max500x1+ 300x2
s.a.:2x1+ x2+ x3H= 100
3x 1+ 2x 2+ x4H= 180
x1 ,x2,x3H,x4H≥ 0

The initial basic feasible solution is:

x1= x2= 0,x3H= 100 x4H= 180

Thus, we obtain the initial table of the Simplex algorithm:

x1 x2 x3H x4H
x3H 100 2 3 1 0
H
x 4 180 3 2 0 1
500 300 0 0

Wecontinuewiththefollowingiterations:

x1 x2 x3H x4H
x1 50 1 1/ 2 1/ 2 0
x4H 30 0 1/ 2 -3/2 1
0 50 -250 0

2
x1 x2 x3H x4H
x1 20 1 0 2 -1
x2 60 0 1 -3 2
0 0 -100 -100

Weobtain,therefore,theoptimalsolutionwhosevalueis:

x1*= 20 rabbits,x2= *
60 chickens,Z= *
28000 pesetas.

Thisproblemcanalsobesolvedgraphically:

A
B 3x + 2y = 180
500x + 300y = 0 20x + 10y = 1000

Now, we calculate the vertices and the value that the function takes at them
objective:

(0,0)
f (A) = 0, f(B) = 25000, f(C) = 28000, f(D) = 27000

Therefore, we obtain the same solution: 20 rabbits and 60 chickens, with a


maximum benefit of 28000 pesetas.

3
EXAMPLE 2.

In a Christmas candy factory, two assortments are prepared to launch them to


market. The first one is sold for 450 pesetas and contains 150 grams of polvorones,
100gramsofmantecadosand80gramsofwinerings.Thesecondassortmentis
sells for 560 pesetas and contains 200 grams of polvorones, 100 grams of
mantecados and 100 grams of wine donuts. A total of 200 is available.
kilograms of polvorones, 130 kilograms of mantecados and 104 kilograms of
wine rings. The packaging company can only supply you with 1200 boxes.
How many assortments of each type should be manufactured to achieve the profit?
maximum?

Solution:

Wedefinetheoriginalvariablesas:

x1numberoftype1assortments.
x2numberoftype2assortments.

The function to be maximized, obtained benefit, will be:

f (x1 ,x2) = 450x1+ 560x2

Thelinearconstraintsoftheproblemareformulatedas:

150 times1+ 200 times2≤ 200000 (for the availability of the polvorones)
100x1+ 100x2≤ 130000 (for the availability of the shortbreads)
80x 1+ 100x2≤ 104000 (for the availability of the donuts)
x1+ x2≤ 1200 (for the availability of the boxes)

Finally, by definition, we have the non-negativity constraints.


ofthevariables:

x1 ,x2≥ 0

4
The problem statement is therefore as follows:

max f (x1 ,x2) = 450x1+ 560x2


s.a.:150x1+ 200x2≤ 200000
100x1+ 100x2≤ 130000
80 times1+ 100x2≤ 104000
x1+ x2≤ 1200
x1 ,x2≥ 0

We observe that the restriction of box availability implies the


restriction of the availability of the mantecados, which is the latest
itcanberemovedfromtheproblem.Takingthiscircumstanceintoaccount,and
simplifyingintherestoftheconstraints,weobtainthestandardform:

max450x1+ 560x2
3
x1+ 2x 2+ x3H= 2000
2
4
x1+ x2+ x4H= 1040
5
x1+ x2+ x5=H 1200
x1,x2x, 3,x4Hx,5≥ H H
0

The initial basic feasible solution is:

H H H
x1= x2= 0,x3= 2000,x 4= 1040 ,x5= 1200

Thus, we obtain the initial table of the Simplex algorithm:

x1 x2 x3H x4H x5H


x3H 2000 3/2 2 1 0 0
x4H 1040 4/5 1 0 1 0
x5H 1200 1 1 0 0 1
450 560 0 0 0

5
Wecontinuewiththefollowingiterations:

x1 x2 x3H x4H x5H


x2 1000 3/4 1 1/ 2 0 0
H
x 4 40 1/20 0 -1/2 1 0
x5H 200 1/4 0 -1/2 0 1
30 0 -280 0 0

x1 x2 x3H x4H x5H


x2 400 0 1 8 -15 0
x1 800 1 0 -10 20 0
x5H 0 0 0 2 -5 1
0 0 20 -600 0

x1 x2 x3H x4H x5H


x2 400 0 1 0 5 -4
x1 800 1 0 0 -5 5
x3H 0 0 0 1 -5/2 1/ 2
0 0 0 -550 -10

Wethereforeobtaintheoptimalsolutionwhosevalueis:

x1* = 800 assorted type 1, x2* = 400 assorted type 2, Z* = 584,000 pesetas.

Wenoticedthatjustashappenedinexample1,thisproblemcanbe
resolved also graphically, where we identify the variables by
comfort comoxey (number of assortments of type 1 and type 2
respectively). The graphical resolution method will be as follows
way

6
D

150x + 200y = 200000


A B
x + y = 1200
80x + 100y = 104000
450x + 560y = 0

Now we calculate the vertices and the value that the function takes at them
Objective. We noticed that the intersection point of the three lines of the restrictions
takentwobytwo,itisthesamepointC:

(0,0)
f (A) = 0, f(B) = 540000, f(C) = 584000, f(D) = 560000

Therefore, we obtain the same solution: 800 assortments of type 1 and 400 of
type 2, with a maximum benefit of 584,000 pesetas.

EXAMPLE 3.

Acertain manufacturer produces chairs and tables for which the use of two is required
production sections: the assembly section and the painting section. The
The production of a chair requires 1 hour of work in the assembly section and 2
hours in painting. For its part, the manufacture of a table takes 3 hours.
in the assembly section and 1 hour in the painting section. The assembly section only
It can operate for 9 hours a day, while the painting one can only do so for 8.
hours. The profit from producing tables is double that of chairs. What should be the
daily production of tables and chairs to maximize profit?

7
Solution:

Wedefinetheoriginalvariablesas:

x1numberofchairs.
x2numberoftables.

The function to be maximized, obtained benefit, will be:

f (x1 ,x2) = x1+ 2x 2

Thelinearconstraintsoftheproblemareformulatedas:

x1+ 3x 2≤ 9 availability of hours in the assembly section


2x 1+ x2≤ 8 availability of hours in the painting section

Finally,wehavethenon-negativityconstraintsofthevariables:

x1 ,x2≥ 0

The problem statement is therefore as follows:

max f (x1 ,x2) = x1+ 2x 2


s.a.:x1+ 3x 2≤ 9
2x 1+ x2≤ 8
x1 ,x2≥ 0

Weobtainthestandardformbyintroducingthecorrespondingvariablesof
clearance

maxx1+ 2x 2
s.a.:x1+ 3x 2+ x3H= 9
2x 1+ x2+ x4H= 8
x1 ,x2,x3H,x4H≥ 0

8
The initial basic feasible solution is:

x1= x2= 0, x3H= 9 x4H= 8

Thus, we obtain the initial table of the Simplex algorithm:

x1 x2 x3H x4H
x3H 9 1 3 1 0
x4H 8 2 1 0 1
1 2 0 0

Wecontinuewiththefollowingiterations:

x1 x2 x3H x4H
x2 3 1/3 1 1/3 0
H
x 4 5 5/3 0 -1/3 1
1/3 0 -2/3 0

x1 x2 x3H x4H
x2 2 0 1 2/5 -1/5
x1 3 1 0 -1/5 3 out of 5

0 0 -3/5 -1/5

Weobtain,therefore,theoptimalsolutionwhosevalueis:

x1* = 3 chairs, x2* = 2tables,Z* = 7 times the selling price of a chair.

We noticed that again this problem can be solved by applying the


graphical method, where we identify the variables for convenience as x and y
(number of chairs and tables respectively). Thus, we obtain:

9
D

C
x + 3y = 9
A
B

2x + y = 8
x + 2y = 0

Now, we calculate the vertices and the value that the function takes at them.
objective:

(0,0)
f (A) = 0, f(B) = 4, f(C) = 7, f(D) = 6

Therefore, we obtain the same solution: 3 chairs and 2 tables, with a profit
maximum of 7 times the value of a chair.

EXAMPLE 4.

In a factory, three types of tools A, B, and C are produced.


three workers work for 8 hours a day and a supervisor, to verify the
toolsoncebuilt,thatwork1hourdaily.Forconstruction
A uses 3 hours of labor daily and requires 6 minutes of
Review: 3 hours of labor are also used for the construction of B.
4 minutes for its review, and for C, 1 hour of labor per day is required.
3 minutes of review. Due to production problems in the factory, they cannot be.
to manufacture more than 12 tools daily and the price of each toolA, B, and C is
4000,3000and2000pesetasrespectively.Findouthowmanyunitsshouldbe
elaborateeachdayofthedecadeinordertoobtainmaximumbenefit.

10
Solution:

Wedefinetheoriginalvariablesas:

x1numberofdailyunitsoftypeA.
x2=numberofdailyunitsoftypeB.
x3numberofdailyunitsoftypeC.

The function to be maximized, obtained benefit, will be:

f (x1 ,x2,x3) = 4000x1+ 3000x2+ 2000x3

Thelinearconstraintsoftheproblemareformulatedas:

3x 1+ 3x 2+ x3≤ 24 availability of labor time


6x 1+ 4x 2+ 3x 3≤ 60 availability of review time
x1+ x2+ x3≤ 12 restriction on the number of tools

Finally, by definition, we have the non-negativity constraints.


ofthevariables:

x1 ,x2,x3≥ 0

The problem statement is, therefore, as follows:

max f (x1 ,x2,x3) = 4000x1+ 3000x2+ 2000 times3


s.a.:3x1+ 3x 2+ x3≤ 24
6x 1+ 4x 2+ 3x 3≤ 60
x1+ x2+ x3≤ 12
x1 ,x2,x3≥ 0

Weobtainthestandardformbyintroducingthecorrespondingvariablesof
slack

11
max4000x1+ 3000x2+ 2000x3
s.a.:3x1+ 3x 2+ x3+ x4H= 24
6x 1+ 4x 2+ 3x 3+ x5H= 60
x1+ x2+ x3+ x6H= 12
x1 ,x2,x3 ,x4H,x5H,x6H≥ 0

The initial basic feasible solution is:

x1= x2= x3= 0 , x4H= 24 x5H = 60 x6H= 12

Thus, we obtain the initial table of the Simplex algorithm:

x1 x2 x3 x4H x5H x6H


x4H 24 3 3 1 1 0 0
x5H 60 6 4 3 0 1 0
H
x6 12 1 1 1 0 0 1
4000 3000 2000 0 0 0

Wecontinuewiththefollowingiterations:

x1 x2 x3 x4H x5H x6H


x1 8 1 1 1/3 1/3 0 0
x5H 12 0 -2 1 -2 1 0
H
x 6 4 0 0 2/3 -1/3 0 1
0 -1000 2000/3 -4000/3 0 0

x1 x2 x3 x4H x5H x6H


x1 6 1 1 0 1/2 0 -1/2
x5H 6 0 -2 0 -3/2 1 -3/2
x3 6 0 0 1 -1/2 0 3/2
0 -1000 0 -5000/ 3 0 -1000

12
Weobtain,therefore,theoptimalsolutionwhosevalueis:

x1* = 6 tools A, x2* = 0toolsB, x3* = 6 tools C,


Z * = 36000 pesetas of maximum profit.

EXAMPLE 5.

Adentist employs three assistants. In the two chairs of his office, procedures are carried out.
endodontics and general stomatology work. An endodontics service
requires 0.75 hours of sitting, 1.5 hours of work from an assistant, and 0.25 hours of work
fromthedentist.Ageneraldentistryservicerequires,respectively,0.75
hours, 1 hour and 0.5 hours. For each endodontic service, a profit is obtained.
5000pesetasandforeachgeneraldentistryservice4000pesetas.Ifboth
the dentist and his assistants work 8 hours a day, how should the time be distributed
work, between endodontics and general dentistry sessions, so that the
Isthedailybenefitatamaximum?

Solution:

Wedefinetheoriginalvariablesas:

x1numberofrootcanals.
x2numberofgeneraldentistrysessions.

The function to maximize, obtained benefit, will be:

f (x1 ,x2) = 5000x1+ 4000x2

Thelinearconstraintsoftheproblemareformulatedas:

0.75x1+ 0.75x2≤ 16 availability of chair time


1.5x1+ x2≤ 24 availability of attendees' time
0.25x1+ 0.5x2≤ 8 dentist's availability

13
Finally, by definition, we have the non-negativity restrictions.
ofthevariables:

x1 ,x2≥ 0

The problem statement is, therefore, as follows:

max f (x1 ,x2) = 5000x1+ 4000x2


s.a.:0.75x1+ 0.75x2≤ 16
1.5x1+ x2≤ 24
0.25x1+ 0.5x2≤ 8
x1 ,x2≥ 0

Simplifying the objective function by 1000, we obtain the standard form at


introducethecorrespondingslackvariables:

max5x1+ 4x 2
s.a.:0.75x1+ 0.75x2+ x3H= 16
1.5x1+ x2+ x4H= 24
0.25x1+ 0.5x2+ x5H= 8
x1 ,x2,x3H,x4H,x5H≥ 0

The initial basic feasible solution is:

x1= x2= 0,x3H= 16 x4H= 24, x5H= 8

Thus, we obtain the initial table of the Simplex algorithm:

x1 x2 x3H x4H x5H


x3H 16 3/4 3/4 1 0 0
H
x 4 24 3/2 1 0 1 0
x5H 8 1/4 1/ 2 0 0 1
5 4 0 0 0

14
Wecontinuewiththefollowingiterations:

x1 x2 x3H x4H x5H


x3H 4 0 1/ 4 1 -1/2 0
x1 16 1 2/3 0 2/3 0
x5H 4 0 1/3 0 -1/6 1
0 2/3 0 -10/3 0

x1 x2 x3H x4H x5H


x3H 1 0 0 1 -3/8 -3/4
x1 8 1 0 0 1 -2
x2 12 0 1 0 -1/2 3
0 0 0 -3 -2

Weobtain,therefore,theoptimalsolutionwhosevalueis:

x1* = 8 endodontics, x2* = 12 sessions of general stomatology,


Z * = 88000 pesetas of maximum profit.

Thisproblemcanbesolvedbyapplyingthegraphicalmethod:

A 0.25x + 0.5y = 8
B

1.5x+y= 24 0.75x+ 0.75y= 16


5000x + 4000y = 0

15
Now, we calculate the vertices and the value that the function takes at them.
objective:

(0,0)
f (A) = 0, f(B) = 80000, f(C) = 88000, f(D) = 64000

Therefore, we obtain the same solution: 8 root canals and 12 sessions of


general stomatology, with a maximum benefit of 88,000 pesetas.

16

You might also like