• Nem Talált Eredményt

Linear Programming

In document Mathematics for agricultural engineers (Pldal 151-174)

Practice problems

Exercise 1. A farmer wants to use his labour and feed grain in the most profitable way to raise feeder cattle and hogs. He has 600 hours to spend on this project, and one head of hog requires 2.4 hours, while one head of feeder cattle requires 12 hours of labour. There are 2,700 bushels of feed grain available, and a hog needs 15 of it, while a feeder cattle needs 45. The income after the sales of the animals is $25 and $79 per one hog and cattle, respectively. Calculate the optimal allocation of resources to maximize the farmer’s income and illustrate your solution in an appropriate coordinate system.

Solution. Let x be the number of hogs and y be the number of feeder cattle to be raised up.

Since they represent quantities, we have two trivial restrictions:

x≥0 and y≥0.

Considering the necessary resources, the animals consume 15x+ 45y bushels of feed grain, but our resources are limited:

15x+ 45y2,700.

We have a very similar restriction for the labour. A hog requires 2.4 hours, a cattle needs 12 hours, but we have only 600 hours in total:

2.4x+ 12y600.

The farmer’s income can be measured by the objective function z = 25x+ 79y. We look for a feasible solution such that maximize this function:

z = 25x+ 79ymax.

147

Gathering all the information above, we have the following linear programming problem.

x≥0 y≥0 15x+ 45y2,700 2.4x+ 12y600 z = 25x+ 79ymax.

Illustrate the feasible (x, y) pairs in a Cartesian coordinate system. We start with the points that satisfy the conditiony≥0, these points are on or above thex-axis(brown). The condition x≥0 gives the points on or right from the y-axis(light blue).

x y

50 50 100 150 200 250

20 20 40 60

x y

50 50 100 150 200 250

20 20 40 60

To draw the image corresponding to the condition 15x+ 45y2,700 we have to rearrange the variables to get a “function” y of variable x:

45y≤ −15x+ 2,700 y≤ −15

45+ 2700 45 y≤ −1

3x+ 60.

The function

y=1

3x+ 60

is a linear function, its graph is a straight line.

The inequality

y≤ −1 3x+ 60

gives the points on or below this line (blue).

x y

180 60

With a similar argument, 2.4x+ 12y600 gives

y≤ −0.2x+ 50,

the red region. x

y

250 50

Putting these four regions into a common coordinate system we get the set of feasible points as the intersection of all regions.

x y

180 250

50 60

The optimum of the function z can be ob-tained on the boundary of the feasible region and at least one of its vertices provides an op-timal solution. Three of the four corners can be identified easily:

(0,0), (0,50), (180,0),

and the last one is the intersection of the lines y=0.2x+ 50 and y =1

3x+ 60.

x y

180 50

Solving the equation

0.2x+ 50 =1

3x+ 60

we have

0.2 + 1 3

x= 10

that is

2

15x= 10.

Therefore, the x coordinate of this intersection point is 75, substituting this value into one of the functions we get y= 35, hence the last vertex is (75,35).

Evaluating the objective function at the vertices we have get the following results.

x y z = 25x+ 79y

(0,0) 0 0 25·0 + 79·0 = 0 (0,50) 0 50 25·0 + 79·50 = 3950 (180,0) 180 0 25·180 + 79·0 = 4500 (75,35) 75 35 25·75 + 79·35 = 4640

As we can see, the income is maximized if the farmer raises 75 hogs and 35 cattle. In this case the income equation is 4640 = 25x+ 79y, that is

y=25

79 +4640 79 .

Together with the constraints, we can see that this line has only one intersection pont with the feasible set.

x y

180 50

Exercise 2. A winemaker factory has recently bought a 110 hectares of land. Due to the amount of sunny hours and the region’s excellent climate, the entire batch of Sauvignon Blanc and Chardonnay grapes can be sold. What is the optimal planting variety in the 110 hectares if the costs, net profits and labour requirements are as shown below in the table. The available budget is $10,000 and we have 1,200 work days for this business plan.

Variety Cost ($/Hect) Net Profit ($/Hect) Man-days/Hect

Sauvignon Blanc 100 50 10

Chardonnay 200 120 30

Solution. Let x and y be the amount of planted Sauvignon Blanc and Chardonnay, respec-tively. Considering the requirements and limits, we have the following model:

x≥0 y≥0

x+y≤110 (land) 100x+ 200y10,000 (cost)

10x+ 30y1,200 (labour) z = 50x+ 120ymax.

Rearranging the indeterminates, we have to draw the following regions:

x≥0, y≥0, y≤ −x+ 100, y≤ −1

2x+ 50, y≤ −1

3x+ 40.

x y

100 120 40

50 100

x y

100 40

The feasible set has 4 vertices, so we have to calculate the intersection of the red and the orange lines. Solving the equation

1

2x+ 50 =1

3x+ 40,

we obtain x = 60, that implies y = 20. The vertices, where the function z may take its maximum are

(0,0), (0,40), (60,20), (100,0).

x y z = 50x+ 120y

(0,0) 0 0 50·0 + 120·0 = 0 (0,40) 0 40 50·0 + 120·40 = 4800 (60,20) 60 20 50·60 + 120·20 = 5400 (100,0) 100 0 50·100 + 120·0 = 5000

The maximum obtainable net profit is 5400, via the plantation 60 hectares of Sauvignon Blanc and 20 hectares of Chardonnay.

Exercise 3. The agricultural research institute recommended a farmer to spread out at least 5000 kg of phosphate fertilizer and no less than 7000 kg of nitrogen fertilizer to raise the productivity of his crops on the farm. There are two mixtures, A and B, each weighs 100 kg.

The costs of Mixture A and B are 40 and 25 bitcoins, respectively. Mixture A contains 40 kg of phosphate and 60 kg of nitrogen, while the Mixture B contains 60 kg of phosphate and 40 kg of nitrogen. How many bags of each type should the farmer buy to get the desired amount of fertilizers while minimizing costs?

Solution. Let x and y denote the purchased amount of Mixture A and B, respectively. The linear programming model is the following.

x≥0 y≥0

40x+ 60y 5000 (phosphate) 60x+ 40y 7000 (nitrogen) z = 40x+ 25y min.

Therefore, we need to sketch the following regions:

x≥0, y≥0, y≥ −2

3x+ 250

3 , y≥ −3

2x+ 175.

In this case, our feasible region is unbounded, as is the general situation for a minimization problem.

x y

350 3 125

250 3

175

x y

125 175

The vertex along with the intersection of the red and blue line can be obtained by solving the following equation

2

3x+250

3 =3

2x+ 175 3

2 2 3

x= 175 250 3 5

6x= 275 3 x= 6

5 ·275

3 = 110.

The corresponding y-value is y= 175 32 ·110 = 10, so the last vertex is (110,10).

x y z = 40x+ 25y

(0,175) 0 175 40·0 + 25·175 = 4375 (125,0) 125 0 40·125 + 25·0 = 5000 (110,10) 110 10 40·110 + 25·10 = 4650

The optimal solution for the problem is to buy 175 kg of MixtureB and nothing else.

Exercise 4. In a chair factory two kinds of chairs are produced. One of these requires 1 unit of wood, 2 units of metal and 4 units of plastic. The other one requires 2 units of wood, 3 units of metal and 1 unit of plastic. The sale prices of these chairs are$400 and $600 per unit, respectively. The factory has 140 units of wood, 220 units of metal and 240 units of plastic in storage. If the owner wants to maximize profit, how many chairs should be produced of each type?

Solution. Let x be the produced amount of the first type of chair and y is the produced amount of the second one. In this case, we have the following model.

x≥0 y≥0

x+ 2y140 (wood) 2x+ 3y220 (metal) 4x+y≤240 (plastic) z = 400x+ 600ymax.

The corresponding regions are x≥0, y 0, y≤ −1

2x+ 70, y≤ −2

3x+220

3 , y≤ −4x+ 240.

x y

60 110 140

70 240

x y

60 70

The feasible solution shows that the optimal solution can occur at 5 different points.

The intersection of the red and blue lines gives

1

2x+ 70 =2

3x+220 3

3x+ 420 =4x+ 440 x= 20

and this implies y= 60.

The intersection of the red and brown lines provide

2

3x+ 220

3 =4x+ 240

2x+ 220 =12x+ 720 10x= 500

x= 50 and by this, we have y= 40.

The points, where we have to check the value of the objective function are (0,0), (0,70), (20,60), (50,40), (60,0).

x y z = 400x+ 600y

(0,0) 0 0 0

(0,70) 0 70 42000

(20,60) 20 60 44000 (50,40) 50 40 44000

(60,0) 60 0 24000

Since the optimal solution is taken at two different points, each point of the linear segment between these points represents an optimal solution with the maximum income $44000.

x y

60 70

Supplementary Exercises

Exercise 1. A coffee machine makes 2 types of coffee, both types consist of some coffee beans, sugar and milk. The first coffee requires 2 units of coffee bean, 2 units of sugar and 4 units of milk. The second coffee needs 4 units of coffee bean and 2 units of sugar. The actual capacity of the machine is 20 units of coffee, 12 units of sugar and 16 units of milk. The price of the first coffee is $2 per unit and the price of the second one is $3 per unit. How many units of each coffee should be sold by the barman to maximize income?

Solution. The maximum income is $16 and it can be reached by selling 2 units of the first coffee and 4 units of the second coffee.

Exercise 2. A coffee machine makes 2 types of coffee, both types consist of some coffee beans, sugar and milk. The first coffee requires 2 units of coffee bean, 2 units of sugar and 4 units of milk. On the other hand, the second coffee needs 4 units of coffee bean and 2 units of sugar.

The actual capacity of the machine is 20 units of coffee, 12 units of sugar and 16 units of milk.

The price of both types of coffee is $3 per unit. How many units of each coffee should be sold by the barman to maximize income?

Solution. The maximum income is $18 and it can be reached by producing 2, 4 or 3, 3 or 4, 2 units of the first and second coffee, respectively.

Exercise 3. A carpenter makes tables and chairs. Each table can be sold for a profit of £30 and each chair for a profit of £10. The carpenter can afford to spend up to 40 hours per week working and he takes six hours to make a table and three hours to make a chair. Customer demand requires that he makes at least three times as many chairs as tables. Tables take up four times as much storage space as chairs and there is room for at most four tables each week. How many tables and chairs should be produced to maximize profit, while satisfying the customer demand and storage requirements?

Solution. The maximum profit is£146.667, reached by producing 1.33 tables and 10.67 chairs.

Exercise 4. Because of a government rule, domestic animals needto be fed a minimum amount of different nutrients. The farmer has 3 kinds of forage. The amount of the nutrients in the forage are show in the following table.

Nutrient Forage #1 Forage #2

A 2 1

B 2 4

C 0 4

By the rule, each animal needs at least 6 units of nutrientA, 12 units of nutrientB and 4 units of nutrient C. The cost of one unit of the Forage #1 is $5, the cost of type #2 is $6. How much of each forage should the farmer buy to minimize his costs?

Solution. The minimum cost is $22, which can be reached buying 2 units of each forage.

Exercise 5. A container manufacturer is considering the purchase of two different types of cardboard-folding machines: modelAand model B. ModelAcan fold 30 boxes per minute and requires 1 attendant, whereas modelB can fold 50 boxes per minute and requires 2 attendants.

Suppose the manufacturer must fold at least 320 boxes per minute and cannot afford more than 12 employees for the folding operation. If a model A machine costs $15,000 and a model B machine costs $20,000, how many machines of each type should be bought to minimize cost?

Solution. The minimum cost is $140,000, reached by buying 4 pieces of each model.

Exercise 6. A coffee packer blends Brazilian coffee and Colombian coffee to prepare two products: Super and Deluxe brands. Each kilogram of Super coffee contains 0.5 kg of Brazilian coffee and 0.5 kg of Colombian coffee, whereas each kilogram of Deluxe coffee contains 0.25 kg of Brazilian coffee and 0.75 kg of Colombian coffee. The packer has 120 kg of Brazilian coffee and 160 kg of Colombian coffee on hand. If the profit on each kilogram of Super coffee is 20 cents and the profit on each kilogram of Deluxe coffee is 30 cents, how many kilograms of each type of coffee should be blended to maximize profit?

Solution. The maximum profit is 6420 cents, and it can be achieved by infinitely many choices.

If x denotes the amount of Super coffee and y denotes the amount of Deluxe coffee, then all points on the line segment between the points (0,213.33) and (200,80) provide maximum profit.

Exercise 7. Solve the following linear programming problems.

(a)

x≥0 y≥0 2x+y≤20

x−y≤ −10 x+ 2y30 z = 5x+ 2ymin.

(b)

x≥0 y≥0 x+y≤10 x−y≥3 5x+ 4y35 z = 5x+ 6ymax.

(c)

x≥0 y 0 5x+ 4y 10

3−x≤6y 3y 6 z = 3x−y min.

Solution.

(a) The optimal value of the objective function is 20 whenx= 0 and y= 10.

(b) Choosing x= 47

9 and y = 20

9 , the maximum value of the objective function is 355 9 . (c) The feasible set is unbounded, the objective function has no optimum.

Quizzes

Version A

Exercise. A manufacturer of artificial sweeteners blends 14 kg of saccharin and 18 kg of dextrose to prepare two new products: SWEET and LO-SUGAR. Each kilogram of SWEET contains 0.4 kg of dextrose and 0.2 kg of saccharin, whereas each kilogram of LO-SUGAR contains 0.3 kg of dextrose and 0.4 kg of saccharin. If the profit on each kilogram of SWEET is 20 cents and the profit on each kilogram of LO-SUGAR is 30 cents, how many kilograms of each should be made to maximize profit?

Version B

Exercise. A new rose dust is being prepared by using two available products: PEST and BUG.

Each kilogram of PEST contains 30 g of carbaryl and 40 g of Malathion, whereas each kilogram of BUG contains 40 g of carbaryl and 20 g of Malathion. The final blend must contain at least 120 g of carbaryl and at most 80 g of Malathion. If each kilogram of PEST costs $3.00 and each kilogram of BUG costs $2.50, how many kilograms of each pesticide should be used to minimize cost?

Solution of Quizzes

Version A

Solution of Exercise. Let x and y denote the number of kilograms of SWEET and LO-SUGAR, respectively. Then, we have the following model to solve.

x≥0 y≥0 0.4x+ 0.3y18 0.2x+ 0.4y14 z = 20x+ 30ymax.

The last two restrictions can be written as y≤ −4

3x+ 60 and y≤ −1

2x+ 35, so the feasible set can be illustrated like in the following picture.

x y

45 70

35 60

Solving 4

3x+ 60 =1

2x+ 35, we get

8x+ 360 =3x+ 210 x= 30,

that implies y= 20.

Evaluating the objective function at the vertices of the feasible set, we have the following table.

x y z = 20x+ 30y

(0,35) 0 35 1050

(30,20) 30 20 1200

(45,0) 45 0 900

(0,0) 0 0 0

1 pt

2 pt

3 pt

4 pt

5 pt The maximum profit is $1,200 and it can be achieved by producing 30 kg of SWEET and

20 kg of LOW-SUGAR artificial sweetener.

Version B

Solution of Exercise. After gathering the informations from the text, we have the following table and model.

PEST BUG

amount (kg) x y

carbaryl (g) 30 40 Malathion (g) 40 20

x≥0, y 0 30x+ 40y120 40x+ 20y80

z = 3x+ 2.5ymin. 1 pt

The last two restrictions are y≥ −3

4x+ 3 and y≤ −2x+ 4,

so the feasible set can be illustrated like in the picture below. 2 pt

x y

2 4

3 4

3 pt Solving

3

4x+ 3 =2x+ 4

3x+ 12 =8x+ 16 x= 4

5 we obtain the intersection of the two lines: x= 4

5, y= 12 5 .

4 pt x y z= 3x+ 2.5y

(2,0) 2 0 6

(4,0) 4 0 12

4 5,12

5 4

5 12

5 8.4

The minimum cost is $6, that can be achieved by 2 kg of PEST and nothing from BUG. 5 pt

160

Version A

Exercise 1. Investigate the domain, limits, monotonicity and concavity of the function f(x) = 112x+ 3x2+ 2x3

and sketch its graph.

Exercise 2. A particle is moving along a line with velocityv(t) =

t−t2, wheret≥0 measures time.

(a) What is the average speed of the particle between t= 0 and t= 2.

(b) What is the acceleration at time 4? At this time is the particle accelerating or slowing?

Exercise 3. Give the sum of the series n=5

34n+3 52n1 . Exercise 4. Calculate the definite integral

4

−2

f(x) dx where f(x) is given by the following graph.

2 1 1 2 3 4 5

1

1 f(x)

Exercise 5. Solve the following linear system.

x1+ 2x2+ 3x3 + 11x4 = 0 x1+x2+x3+ 8x4 = 1 2x1+ 3x2+ 4x3 + 20x4 = 5

Exercise 6. Consider a chocolate manufacturing company which produces only two types of chocolate – A and B. Both chocolate mixes require Milk and Choco only. To manufacture them the following quantities are required: each unit of A requires 1 unit of Milk and 3 units of Choco, while each unit of B requires 1 unit of Milk and 2 units of Choco. The company kitchen has a total of 5 units of Milk and 12 units of Choco. On each sale, the company makes a profit of $6 per unit A sold and $5 per unit B sold. The company wishes to maximize its profit. How many units ofA and B should it produce respectively?

Version A – Solutions

Solution of Exercise 1.

• The function is polynomial, its domain is R.

• Limits:

xlim→∞

112x+ 3x2+ 2x3

= lim

x→∞x3 1

x3 12 x2 + 3

x + 2

= “∞ ·2 ” =

x→−∞lim

112x+ 3x2+ 2x3

= lim

x→−∞x3 1

x3 12 x2 + 3

x + 2

= “− ∞ ·2 ” =−∞

• Monotonicity: the first derivative of the function is f(x) = 6x2+ 6x12, and the critical points are the solutions of

6x2+ 6x12 = 0,

that are x1 = 2 and x2 = 1. Since f(3) = 541812 > 0, f(0) = 12 < 0 and f(2) = 24 + 1212>0, the following table summarizes the monotonicity.

x <−2 x=2 2< x <1 x= 1 1< x

f(x) + 0 0 +

f(x) MAX MIN

MAX: f(2) = 1 + 24 + 1216 = 21, MIN: f(1) = 1−12 + 3 + 2 =6

• Concavity: the second derivative of the function is f(x) = 12x+ 6, and the critical point is x = 1

2. Since f(1) = 6 < 0 and f(0) = 6 > 0, the following table summarizes the concavity.

x <−1/2 x=1/2 1/2< x

f(x) 0 +

f(x) IP

IP: f

1 2

= 1 + 6 + 3 4 1

4 = 7.5

• Sketch:

2 1 1

6 7.5 21

Solution of Exercise 2.

(a) The average speed is

s(2)−s(0) the acceleration is a(4) = 1

4 8 and the particle is slowing because this acceleration is negative.

Solution of Exercise 3.

Solution of Exercise 4. To calculate the definite integral we have to determine the signed area of the marked regions.

2 1 1 2 3 4 5 Solution of Exercise 5.

Now, the augmented matrix is in row echelon form, so we can determine the solution

• Variable x3 is free:

x3 R.

• Third row:

x4 = 4.

• Second row:

−x22x33x4 = 1

x2 =12x33x4

x2 =12x312 x2 =132x3

• First row:

x1+ 2x2+ 3x3+ 11x4 = 0

x1 =2x23x311x4 x1 = 26 + 4x33x344 x1 =18 +x3

Solution of Exercise 6.

ChocolateA ChocolateB

Units x y

Milk 1 1

Choco 3 2

Profit 6 5

x≥0, y 0 x+y 5 3x+ 2y 12 z = 6x+ 5y max.

Rearranging the inequalities, we get the following regions.

y ≤ −x+ 5, y≤ −3 2x+ 6 The nodes of the feasible set are (0,0),

(4,0), (0,5) and the intersection of the lines y=−x+ 5 andy=3

2x+ 6.

Since

−x+ 5 =3 2x+ 6 1

2x= 1 x= 2

y=2 + 5 = 3, the last node is (2,3).

x y

4 5

5 6

Checking the objective function at the nodes, we get the following table.

x y z = 6x+ 5y

(0,0) 0 0 0

(4,0) 4 0 24

(0,5) 0 5 25

(2,3) 2 3 27

The maximum profit is $27 and the factory has to produce 2 units ofA and 3 units ofB to reach it.

Version B

Exercise 1. Investigate the concavity of the function f(x) = x33x2+ 5. Give the points of inflections and give the intervals where the function is convex or concave.

Exercise 2. In a factory the cost of producingxunits of a product is measured by the function C = 8x215x+32. Since the factory has limits in capacity, maximum 10 units can be produced and at least one unit is required for tests.

(a) How many products define the minimum cost? How much is this cost?

(b) How many products give the minimum average cost? How much is that?

Exercise 3. Calculate the limits of the following sequences.

(a) 1−√ n

n23 (b) n−5 + 22n

3n−n7 Exercise 4. Give the number

1.˙7˙8 = 1.78 = 1.787878787878. . . as the ratio of two integers.

Exercise 5. Calculate the following integrals.

(a) 2

1

2

x2 3−√3 x

dx (b)

xe3x22 dx Exercise 6. Calculate the matrices AC−2B and (2A−BT)C, if

A=

1 1 0

2 3 1

, B =

 1 2

3 0

0 2

, C =

1 1 2 0 2 1

1 1 3

.

Exercise 7. Bridgeway Company manufactures a printer and a keyboard. The contribution margins of the printer and keyboard are $30 and $20, respectively. Two types of skilled labor are required to manufacture these products: soldering and assembling. A printer requires 2 hours of soldering and 1 hour of assembling. A keyboard requires 1 hour of soldering and 1 hour of assembling. Bridgeway has 1,000 soldering hours and 800 assembling hours available per week. There are no constraints on the supply of raw materials. Bridgeway wishes to maximize its weekly total contribution margin. How many items do they have to produce to reach this maximum?

Version B – Solutions

Solution of Exercise 1. The function is polynomial, so its domain is R. The second derivative of f is

f(x) = 6x6.

The only zero point off isx= 1. Sincef(0) =6<0 andf(2) = 6>0, we can summarize our information in the following table.

x <1 x= 1 1< x

f(x) 0 +

f(x) IP

IP: f(1) = 1−3 + 5 = 3 Solution of Exercise 2.

(a) Since C(x) = 16x15, the critical point for extremum is x= 15

16.

This point is out of the investigated interval, so we have to check the values of the function only at the endpoints of this interval.

C(1) = 8−15 + 32 = 25 C(10) = 800−150 + 32 = 682

The minimum cost is 25 by producing 1 unit.

(b) The average cost function is AC = 8x15 + 32

x and its derivative is AC(x) = 832x2 = 8 32

x2. Critical points can be obtained by solving the equation

8 32 x2 = 0

8 = 32 x2 x2 = 4,

that givesx1 = 2 andx2 =2. Since x2 does not lie in the investigated interval, we have to evaluate the function AC at x= 1, x= 10 and x= 2.

AC(1) = 8−15 + 32 = 25 AC(10) = 80−15 + 3.2 = 68.2

AC(2) = 16−15 + 16 = 17 The minimum average cost is 17 by producing 2 units.

Solution of Exercise 3. Solution of Exercise 4.

1.˙7˙8 = 1 + 78 Solution of Exercise 5.

(a) that implies

xe3x22 dx= 1

Solution of Exercise 6.

• The matrix AC−2B does not exist, becauseAC is of size 2×3, but 2B is of size 3×2.

Solution of Exercise 7.

Printer Keyboard

Units x y

soldering 2 1

assembling 1 1

cont. margin 30 20

x≥0, y0 2x+y≤1000

x+y≤800 z = 30x+ 20ymax.

Investigating the inequalities, we have

y≤ −2x+ 1000 and y≤ −x+ 800.

x y

500 800

800 1000

The intersection of the corresponding lines can be computed by solving the equation

2x+ 1000 =−x+ 800 x= 200,

hence the intersection point is (200,600). Checking the objective function at the nodes of the feasible set, we get the following table.

x y z = 30x+ 20y

(0,0) 0 0 0

(0,800) 0 800 16000

(200,600) 200 600 18000

(500,0) 500 0 15000

The maximum of the weekly total contribution margin is $18,000 which can be obtained by producing 200 printers and 600 keyboards.

Preliminaries

In document Mathematics for agricultural engineers (Pldal 151-174)