2. Linear Programming
Task
A nutritionist advises an individual who is suffering from
iron and vitamin B deficiency to take at least 2400
milligrams (mg) of iron, 2100 mg of vitamin B1, and 1500
mg of vitamin B2 over a period of time.
3. Linear Programming
Two vitamin pills are suitable, brand-A and brand-B.
Each brand-A pill costs K6 and contains 40 mg of iron,
10 mg of vitamin B1, and 5 mg of vitamin B2.
Each brand-B pill costs K8 and contains 10 mg of iron
and 15 mg each of vitamins B1 and B2.
4. Linear Programming
What combination of pills should the individual purchase
in order to meet the minimum iron and vitamin
requirements at the lowest cost?
5. Linear Programming
Let’s first tabulate the given information before we engage
GeoGebra:
Brand-A Brand-B Minimum
Requirement
Cost/Pill K6 K8
Iron 40mg 10mg 2400mg
Vitamin B₁ 10mg 15mg 2100mg
Vitamin B₂ 5mg 15mg 1500mg
6. Linear Programming
Let x be the number of brand-A pills and y the number of
brand-B pills to be purchased. The cost C (Kwacha) is given by
and is the objective function to be minimized.
y
x
C 8
6
7. Linear Programming
In short, we want to minimize the objective function
y
x
C 8
6
subject to the system of inequalities
2400
10
40
y
x
2100
15
10
y
x
1500
15
5
y
x
0
x
0
y
8. Graphical Solutions of Linear Programming Problems
Open
GeoGebra and
make sure
that both the
Algebra and
Graphic views
are activated
9. Linear Programming
Click the input bar and
enter all the system of
inequalities. Don’t
worry about the
shading and or color.
10. Linear Programming
Make sure that you
scale the grid so that
all the system of
inequalities are visible
in the graphics view.
12. Linear Programming
Inverse the shading for
the system of
inequalities so that the
required region is left
un-shaded. Right Click
on the selection Ribbon
and then on the
settings. Click style in
the popup menu and
check inverse filling.
Check Inverse filling
13. Linear Programming
Apply different colors
to the shading of each
inequality. Open the
style bar and enhance
your construction.
Apply any colors of
your choice.
14. Linear Programming
Plot the lines
corresponding with
your inequalities.
240
4
y
x
420
3
2
y
x
300
5
y
x
0
x
0
y
Plotted Lines
16. Linear Programming
Create a slider for the
objective function to
be minimized. Give
your slider a name;
e.g. C or any letter of
your choice. Enter
interval, max and min
as shown.
Enter values as shown
Slider Name
18. Linear Programming
Next Identify the
vertices of the feasible
set S by using the
intersection tool or by
plotting them with the
point tool.
As your can see from
your graph, the vertices
are A=(0,240),
B=(30,120), C=(120,60)
and D=(300,0).
A(0,240)
B(30,120)
C(120,60)
C(300,0)
s
19. Linear Programming
Create a check box for the
Objective function. (This is
optional, you can do away
with it)
Objective function
20. Linear Programming
Create check box for
the Vertices. Make
sure you select all
vertices as shown.
(This is optional, you
can do away with it)
Vertices
21. Linear Programming
Create a Text box for
the objective function.
Remember to include
both static and
dynamic text. Color
the background of
your text .
Static Text
Dynamic Text
24. Linear Programming
Recalling what the
symbols x, y, and C
represent, we
conclude that the
individual should
purchase 30 brand-A
pills and 120 brand-B
pills at a minimum
cost of K1140. Minimum Cost
25. Do It Yourself
The following problem require you to use GeoGebra for the
purpose of simulation. A mathematical model has already
been formulated for you. All you need to do is just to use
GeoGebra to simulate the Graphical Solutions.
30. END
Try as many problems as possible. Practice
GeoGebra by following commands in the
GeoGebra Manual posted earlier. You can also
find many applets and resources on the GeoGebra
website.
Next:….