0% found this document useful (0 votes)
32 views14 pages

Linear Programming

Uploaded by

Okitoi Joseph
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)
32 views14 pages

Linear Programming

Uploaded by

Okitoi Joseph
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/ 14

© Light Academy Secondary School

Linear programming

Linear programming is a method used to find the best solution to problems that can be expressed
in terms of linear equations or inequalities. Solutions are usually found by drawing graphs of
inequalities and looking for optimum values that satisfy the required conditions. This method is
widely used in business and industrial contexts and the problems often relate to obtaining
maximum profits for given costs and production levels.

Forming linear inequalities


Some of the terms and symbols that imply inequality include:
 less than (<).
 Greater than / more than (>).
 Less than or equal to (≤)
 Greater than or equal to. (≥)
In forming inequalities, we need to define the variables that represent the various quantities
under consideration. For example in a game using a pair of dice, a player must score a total of
more than 9 in order to win. Using y for a number on one dice and x for a number on the other
die, inequalities can be formed

The phrase used to imply inequalities in this case is must score a total of more than 9.
Therefore, the inequality for the winner is x + y > 9 and the statement for the loser is x + y ≤ 9.

Example 4.1
A student went shopping with sh. 15,000 to buy exercise books and pens. An exercise book costs
sh. 500, while a pen costs sh. 200. He had to buy at least 3 exercise books and not more than 2
pens. Write down inequalities to represent this information.

Solution
We should first define the variables that represent the quantities.
Let x represent the number of exercise books purchased and let y represent the number of pens
purchased.
The inequalities that show the number of exercise books and pens purchased are x ≥ 3 and y ≤ 2.
Each exercise book costs sh. 500 and a pen costs sh. 200. The total amount must not exceed sh.
15,000. Therefore, 500x + 200y ≤ 15,000. This can be simplified to 5x + 2y ≤ 150
The required inequalities are:
x ≥ 3; y ≤ 2; and 5x + 2y ≤ 150.

68
© Light Academy Secondary School

Exercise 4.1
1. Mary went shopping with sh. 8,500 to buy magazines and exercise books. The cost of a
magazine was sh. 1700, while that of an exercise book was sh. 450. She had to buy at
least 2 magazines and 6 exercise books. Write down three inequalities to represent this
information.

2. John has x five thousand shillings notes and y ten-thousand shillings notes. He has more
than sh.30,000 but less than sh. 50,000 in total. The five-thousand shillings notes are
more than the ten-thousand shillings notes. Write down inequalities relating x and y.

3. On a farm, sh. 750,000 is available for the preparation of planting beans. Two types of
beans, A and B, are to be planted on 4ha. Planting Type A costs sh. 120,000 a hectare,
while planting type B costs sh. 150,000 a hectare. Each type is planted on at least 1 ha.
Assuming that labour is available for planting, form inequalities to represent this
information.

4. A wholesaler for animal feeds wishes to transport 240 bags of feed. She has a lorry that
can take 90 bags at a time and a pick-up that can take 20 bags at a time. The cost of each
trip is sh. 50,000 by lorry and sh. 35,000 by pick-up. The pick-up should make more trips
than the lorry. The cost must not be more than sh. 800,000. Write down inequalities to
represent this information.

5. A businessperson had 96 m3 of space available for storage of boxes. There were two
types of boxes, A and B. The volume of type A boxes is 8 m3 each while the volume of
type B boxes is 8 m3 each. The businessperson had sh. 720,000 to buy the boxes. Type A
boxes cost sh. 3,000 each and type B boxes cost sh. 4,200 each. Write down inequalities
to represent this information.

6. A pick-up can carry a mass of 2000 kg. It is supposed to carry type A and type B bags of
animal feed. Type A bags weigh 40 kg each, while type B bags weigh 70 kg each. Type
A bags cost sh. 32,000 a bag while type B bags cost sh. 56,000 a bag. A farmer had sh.
1,600,000 to purchase the feed.
(a) Write down inequalities to represent this information.
(b) Show the inequalities on a graph.

69
© Light Academy Secondary School

Forming and solving inequalities


Example 4.2
A girl went to a book shop with sh. 1200. She bought x exercise books at sh. 200 each and y
exercise books at sh. 250 each.
(a) Form inequalities to represent this information.
(b) Draw graphs to represent this information.
(c) Use the graphs to list all the possible solutions.
Solutions
(a) The inequalities are:
 x ≥ 0 and y ≥ 0, because x and y cannot be negative.
 200x + 250y ≤ 1200, because she could not spend more than
sh. 1200. This simplifies to 4x + 5y ≤ 24
(b) The graphs of the inequalities are shown in the figure below.

The required region is usually determined by substituting selected values of x and y into the
inequalities to check whether they satisfy the inequalities. The coordinates of the origin are often
used. The unwanted region is usually shaded.
(c) From the graphs, the values of x and y must be integers.
Therefore, the possible solutions are the integral coordinates in the wanted region.
That is, points such as (1, 1), (2, 1), (4, 1).
Which other points satisfy the inequalities?

Example 4.3
To transport 165 crates of bread, a pick-up and a van are used. The pick-up can carry 15 crates
per trip while the van can carry 33 crates per trip. The pick-up makes x trips and the van makes y
trips. The total number of trips must be less than 8.
(a) Write the inequalities that represent this information.
(b) Using graphs, determine the possible number of trips each vehicle should make in order
to transport the crates most economically.

70
© Light Academy Secondary School

Solution
(a) The inequalities representing the information are:
 x ≥ 0, the number of trips the pick-up makes.
 y ≥ 0, the number of trips the van makes.
 15x + 33y ≥ 165, the total number of crates to be transported.
This simplifies to 5x + 11y ≥ 55.
 x + y < 8, the maximum number of the sum of the trips the pick-up and the van make.

(b) The graphs in the following figure represent these inequalities.

The solutions are in the unshaded region and on the continuous line. The integral coordinates in
the unshaded region are possible solutions but the most cost effective ones are close to or on the
continuous line. These include (1, 5), (0, 6), (0, 7), (3, 4), e.t.c.
 list other points that give cost effective solutions

Exercise 4.2

1. Ali is 3 years older than Moses. Their total age is less than 30 years but more than 26
years.
(a) Form inequalities to represent this information.
(b) Represent this information on graphs.
(c) List all the possible ages of Ali and Moses.

2. A home library should not have more than 140 books. More than 60 of the books should
be fiction and at least 40 non-fictions.
(a) Write inequalities to represent this information.
(b) Use graphs to find the possible number of books of each type in the library

71
© Light Academy Secondary School

3. Nadia had sh. 2000, enough to buy some mandazi and cakes. She had to buy at least 3
pieces of each item. Mandazi cost sh. 200 and cakes cost sh. 300 each.
(a) Form inequalities to represent this information.
(b) Represent this information on graphs.
(c) Use the graphs to find all the possible numbers of each item bought.
4. Transport is to be arranged for 420 students. There are two types, A and B, of passenger
vehicles to be used. Type A carries 14 passengers and type B carries 35 passengers. There
are to be at least 10 vehicles of type A and not more than 9 vehicles of type B.
(a) Write down inequalities to represent this information.
(b) Draw graphs to represent the information.
(c) List three solutions which satisfy all the inequalities.
5. Some fruit juice is obtained from x oranges and y lemons. For a pleasant taste, 3x + 5y
must be at least 30. For an attractive colour, 3x must be greater than y.
(a) Write inequalities to represent this information.
(b) Represent the information on graphs.
(c) List three solutions having integral values that satisfy the inequalities.

6. A transport company has buses that carry 70 passengers each, and minibuses that carry 35
passengers each. There should be at least 10 drivers available and more than 700
passengers should be transported in a day.
(a) Write down inequalities to represent this information.
(b) Draw graphs to show this information.
(c) List solutions having integral coordinates that satisfy these inequalities.
7. A magazine is to be produced with at least 32 pages but not more than 40 pages. The
number of advertisement pages must be at lest half the number of text pages. There
must be at least 27 text pages.
(a) Form inequalities to represent this information.
(b) Draw graphs to represent this information.
(c) List three possible coordinates that satisfy these inequalities.
8. A man had sh. 192,000 to buy trousers and shirts. A pair of trousers costs sh, 24,000 and a
shirt costs sh. 16,000. He had to buy at least two shirts.
(a) Write down inequalities representing this information.
(b) Draw graphs to represent the information.
(c) List the possible coordinates that satisfy the inequalities.
9. A vegetable seller bought x tones of cabbages and y tones of carrots. Cabbages cost sh.
1000 per kg and carrots cost sh. 2000 per kg. He had sh. 96,000 to spend.
(a) Write down inequalities to represent this information.
(b) Show the inequalities on graphs.
(c) Use your graphs to list the possible solutions that would satisfy the inequalities.

72
© Light Academy Secondary School

Optimization
Optimization is the process of finding the ordered pairs of variables that give the maximum or
the minimum values of given expressions. These ordered pairs of variables are found in the
region that satisfies all the inequalities. The process of finding the maximum and minimum
values of linear functions under limiting conditions is called linear programming.

Example 4.4
(a) Draw the graphs of x ≥ 0, y ≥ 0, 3x + 2y ≥ 12 and y + 2x ≤ 10.
(b) Find the maximum and the minimum values of 3x + y.

Solutions
(a) The graphs of the inequalities and the required region are shown in the following figure.
(b) To find the maximum and minimum values of 3x + y, we consider the values of the
integral coordinates at the vertices of the required region.
These are P(0, 10), Q(0, 6), R(4, 0) and S(5, 0).
At P(0, 10); 3x + y = 10.
At Q(0, 6); 3x + y = 6.
At R(4, 0); 3x + y = 12.
At S(5, 0); 3x + y = 15.
The maximum value of 3x + y in the given situation is 15 and the minimum value is 6. All
the other coordinates give values between these two.

73
© Light Academy Secondary School

Example 4.5
A shopkeeper bought two types of animal feed. Type A costs sh. 750 per kilogram and type B
costs sh. 600 per kilogram. She had sh. 15,000 available and decided to buy at least 18 kilograms
altogether. She also decided to buy at least 6 kg of type A feed. She made a profit of sh.200 per
kg of type A and sh. 250 per kg of type B.

(a) Write down inequalities to represent this information.


(b) Show these inequalities on graphs.
(c) Assuming that she can sell all the feed, find how many kilograms of each type of feed she
should buy to maximize her profits and find how much the profit is.

Solution
(a) Let x represent the number of kilograms of type A and y represent the number of
kilograms of type B. The inequalities are:
 x ≥ 6, the number of kg of type A.
 y ≥ 0, the number of kg of type B.
 x + y ≥ 18, the total number of kg.
 750x + 600y ≤ 15000, the amount of money available. This simplifies to 5x + 4y ≤ 100.

(b) The graphs in the following figure represent the above information.

(c) From the information, the profit made is 200x + 250y. To find the maximum profit, we
substitute the integral values of x and y at points S, T, U and V in the expression 200x + 250y.
At S(6, 17); (200 × 6) + (250 × 17) = 5,450
At T(8, 14); (200 × 8) + (250 × 14) = 5,100
At U(10, 12); (200 × 10) + (250 × 12) = 5,000
At V(18, 2); (200 × 18) + (250 × 2) = 4,100
She should buy 6 kg of type A and 17 kg of type B to make maximum profit.
The maximum profit is sh. 5,450.
When looking for the maximum value, we use the integral values near or on the upper
boundary of the region.

74
© Light Academy Secondary School

The objective function


In the above examples, we used trial and error method in order to determine the maximum or the
minimum values of a situation. An alternative method is to use the objective function or a
search line. The line is of the form ax + by = k, where a, b, and k are constants.

Example 4.6
(a) Draw the graphs of the following inequalities: x ≥ 0, y ≥ 0, x + y ≤ 6 and 9x + 4y ≤ 36.
(b) From the graphs, find the maximum value of 2x + y.
Solutions
(a) The graphs of the inequalities are shown in the following figure.

(b) To find the maximum value of 2x + y, the objective function would be


2x + y = k. The constant k can take any value, but it is appropriate to take a value of k that
is a common multiple of the coefficients of x and y. The multiples of 1 and 2 are 2, 4, 6, … In
this case, we can take k = 4. The equation becomes 2x + y = 4.
When y = 0, x = 2. when x = 0, y = 4. We can draw the graph of this line using the points
(0, 4) and (2, 0). The graph drawn is called a search line.
With a ruler and a set square, draw a parallel line to the search line as follows:
 Place the longest side of the set square on the search line.
 With the ruler firmly held onto one of the shorter sides of the set square, slide the set
square along the ruler until the last point in the required region nearest to the upper boundary is
reached.
 If the last point does not have integral values, take the nearest point within the
neighborhood that has integral values. This is the required point.
In this case, the line passes through (2, 4), (4, 0) and (3, 2) all of which give 2x + y = 8. Thus the
maximum value of 2x + y is 8.
To find the minimum value of a function you follow the same steps, but this time you look for
integral values on the lower boundary of the region.

75
© Light Academy Secondary School

Exercise 4.3
1. Draw graphs t represent the following inequalities by shading the unwanted regions:
x + y ≤ 10, y ≥ 2, and y ≤ 2x.
Use the graphs to find the maximum value of:
(a) 2x + 3y. (b) 3y – x.

2. Show the region represented by the following inequalities: 5x + 4y ≤ 40,


9x + 12y ≥ 36, y > x, and x ≥ 1.
(a) List all the solutions having integral coordinates.
(b) From the graphs, find the minimum and maximum values of 3x + 5y.

3. Show the region represented by the inequalities: x + y > 10, x < 3, 2x + y <16, and x > 0.
Find the points with integral coordinates which satisfy all the inequalities simultaneously.
For these points find:
(a) the maximum value of 2x + y.
(b) the minimum value of 2x + y.
(c) the maximum value of x – y.

4. Graphically show the region represented by the inequalities: y ≥ 0


x + y ≥ 6 and x + 3y ≤ 12.
(a) Find the values of 3x + 2y at each point with integral coordinates in the region.
(b) Which is the greatest value?
(c) Find the maximum and minimum value of 4x + 5y.

5. Caroline had sh. 1,500 to buy oranges and mangoes. Oranges cost sh. 150 each, while
mangoes cost sh. 100 each. She bought at least 11 fruits altogether.
Let x be the number of oranges and let y be the number of mangoes she bought.
(a) Write down the inequalities representing this information.
(b) Represent the information in a graph.
(c) Find the possible combinations of the number of fruits she could buy.

6. Jackline was to buy pens and pencils. She had sh. 9,000 to spend. Each pencil cost sh. 100,
while a pen cost sh. 150. She had to buy at most 30 pencils and more than 20 pens. She
was supposed to buy not more than 70 pens and pencils altogether.
(a) Write down inequalities to represent this information.
(b) Draw graphs to represent the information.
(c) Use your graphs to find the maximum number of pens and pencils she could buy.

7. A chef makes cakes of type A and type B. He has 2 kg of flour and 1.2 kg of sugar. Type
A cakes use 500g of flour and 100g of sugar. Type B cakes use 300g of flour and 200 g of
sugar. He wishes to make more than 4 cakes altogether.
(a) Write down inequalities to represent this information.
(b) Represent this information on graphs.
(c) Find the number of type A and type B cakes that he can make.

76
© Light Academy Secondary School

8. A painter can spray a van in 3 hours and a car in 2 hours. He sprays for at least 15 hours a
week. He must spray at least three times as many cars as vans and not more than 8 cars in
a week.
Let x be the number of vans and y be the number of cars he sprays each week.
(a) Write down inequalities representing this information.
(b) Draw graphs to represent the information.
(c) Use the graphs to list the combination of the vehicles he could spray in a week.
(d) Find the maximum number of vehicles he could spray in a week.

9. The manager of a badminton team has sh. 180,000 to buy new uniforms for the players.
She can buy type A uniform for sh. 36,000 each and type B uniform for sh. 27,000 each.
She must buy at least two uniforms of type A. The total number of uniforms must be at
least 5.
(a) Write down inequalities to represent this information.
(b) Draw graphs to represent the information.
(c) Use your graphs to list down the combinations of the uniforms she could possibly buy.

10. An electronic dealer wishes to stock 20 television sets. She can buy Coloured ones for sh.
150,000 each, and black and white at sh. 90,000 each. She has a total of sh. 2,700,000 to
spend and must have at least 6 sets of each type.

(a) If she buys x sets of black and white and y sets of coloured TVs, write down the
inequalities representing this information.
(b) If she makes a profit of sh. 60,000 on each of the black and white TV set and sh.
80,000 on each colour TV set:
(i) Write down the equation for the profit.
(ii) Use a search line to find the maximum profit.

11. Mubarak has 36 acres of land. He declares to prepare the land for planting wheat and
maize. The cost of planting maize is sh. 30,000 per acre, while it cost sh. 90,000 to plant
an acre of wheat. Maize takes 3 labourers per acre, while wheat takes 6 labourers per acre.
He hired 72 labourers and spent sh. 1,500,000 for labour costs. He hopes to make a profit
of sh. 200,000 per acre of maize and sh. 450,000 per acre of wheat.
(a) Write down inequalities representing this information.
(b) Show the inequalities on graphs.
(c) Find the maximum profit Mubarak should make.
(d) What would be the most profitable arrangement?

12. Ten students went to buy snacks from a restaurant. They each bought either a scone or a
cake. A scone cost sh. 50, while a cake cost sh. 200. The students had sh. 10,000
altogether. They bought more scones than cakes.
(a) Form inequalities to represent this information.
(b) Graph these inequalities, showing the wanted region.
(c) List the possible solutions.

77
© Light Academy Secondary School

13. A transportation firm has 6 lorries which can carry 8 tonnes each The firm also has 4
lorries which can carry 12 tonnes each. The cost of running an 8-tonne lorry is sh. 80,000
per trip, while that of a 12-tonne lorry is sh. 100,000. There are 600 tonnes of rice to be
transported and sh. 1,200,000 available to run the lorries.
(a) Write inequalities to represent the information.
(b) Draw the inequalities on graphs.
(c) How should the firm use the lorries in order to incur the lowest costs possible?

14. Some fruit juice is made from x oranges and y lemons. For a strong taste, 3x + y should be
at least 24. For an attractive colour, 2x must be greater than y. An orange costs sh. 200,
while a lemon costs sh. 150
(a) Form inequalities to represent to represent this information.
(b) Show the inequalities on graphs.
(c) Find the cheapest way of making the fruit juice.
15. Ali has sh. 240,000 to buy shirts and trousers. The cost of a shirt is sh. 32,000, while the cost of
a pair of trousers is sh. 50,000. He has to buy at least two shirts and one pair of trousers.
(a) Write down inequalities representing this information.
(b) Draw graphs to represent the information.
(c) List the possible number of shirts and pairs of trousers Ali can buy.
(d) What is the maximum number of shirts and pairs of trousers he can buy?

16. A factory makes two types of items, A and B. To produce item A costs sh. 800 plus a
labour cost of sh.1,200. To produce item B costs sh.700 plus a labour cost of sh. 1,600.
The cost of producing the items should not exceed sh.140,000 and labour costs should not
exceed sh. 25,000.
(a) Write down the inequalities representing this information.
(b) Draw graphs of the inequalities in (a).
(c) Find the maximum number of items A and B that can be produced when the production
cost is maximum.

17. A cultural theatre has a capacity of 240 seats. The seats are sold at sh. 8000 or sh. 12000.
To cover the costs, the management has to collect at least sh. 144,000.
(a) Write down linear inequalities to represent this information.
(b) Graph the inequalities, showing the wanted region.
(c) List down the possible solutions.
(d) Determine the solution that gives the maximum profit.

18. A firm is planning to build a factory which will occupy a space of 720 m2. Two types of
machines, X and Y, are to be installed. Machine X occupies a space of 60 m2, requires 3
labourers and produces 8 units. Machine Y requires a space of 80 m2, 5 labourers and
produces 12 units. There are 75 workers available.
Determine the number of machines of each type that should be installed in order to
maximize production and profits.

78
© Light Academy Secondary School

19. A hotel is to buy at most 5 bags of cabbages and at most 7 bags of potatoes. A bag of
cabbages costs sh. 45,000, while a bag of potatoes costs sh. 80,000. The total cost must
not exceed sh. 600,000.
(a) Form inequalities to represent this information.
(b) Draw graphs of the inequalities, showing the wanted region.
(c) Determine the maximum number of bags of cabbages and potatoes that can be
purchased.

20. A depot for famine relief should have at most 20 bags of rice and 35 bags of maize. The
mass, volume and number of meal ratios per bag are as shown in the table below.

Bag of Mass (kg) Volume (m3) No. of meals


Rice 25 0.05 800
Maize 10 0.05 160

A delivery van is to carry the largest possible number of bags. It can carry a mass of up to
600 kg occupying 2 m3.
(a) If a load is made up of x bags of rice and y bags of maize, write down four inequalities
(other than x ≥ 0 and y ≥ 0) which govern the relationship between x and y.
(b) Draw a graph to show the inequalities in (a) above.
(c) Determine the number of bags of rice and maize that should be delivered to make
the total number of meal ratios the largest.

21. Give the inequalities that define the unshaded region R in each of the following.
(a)

79
© Light Academy Secondary School

(b)

(c)

80
© Light Academy Secondary School

22. Give the points whose coordinates are integers and lie in the unshaded region.

23. Draw a graph and give the integral coordinates of the points that lie in the region defined
by the inequalities:
y > x – 2, 2y < 3x + 6, x + y > -2 and x + y  3

24. The graph below shows regions A to F enclosed by lines x + y = 4,


1 5
y = x and y = x  4 .
3 3

Use inequalities to describe region:


(a) A (b) B (c) C (d) D (e) E (f) F

Constructions and Loci

81

You might also like