• No results found

Chapter 3. Methodology

3.7 About Linear Programming

As linear programming (LP) is the mathematical topic that would be used in

understanding mathematical software, it is necessary to understand what it is and studies

that have been conducted using software in the teaching and learning of LP. First of all,

LP is a mathematical principle that seeks to find the best possible solution for a set of

linear inequalities. It is often used to maximize profit or minimize cost in the production

of items which is subjected to a number of constraints. Figure 8 illustrates a LP problem

for a toy store producing soldiers and trains with labour hour constraints and it is similar

to Problem 1 in the post-test.

There are usually three main topics in LP, the formulation of the problem, the

solution to the problem and the sensitivity analysis. In the formulation of the problem,

the students are required to take a word problem and transform this into a list of linear

inequalities (Figure 8). In the solution to the problem, students are required to solve this

problem either by hand or software. By hand these methods are the graphical method or

the simplex algorithm. The graphical method, which is used for two variable problems,

requires the students to draw the linear inequalities and find the optimal solution by

using the intersection of these lines, a process similar to the graphical solution of

Linear Programming Problem:

Giapetto’s Woodcarving Inc. manufactures two types of wooden toys: soldiers and trains. A soldier sells for $27 and uses $10 worth of raw materials. Each soldier that is manufactured increases Giapetto’s variable labour and overhead costs by $14. A train sells for $21 and uses $9 worth of raw material. Each train built increases Giapetto’s variable labour and overhead costs by $10. The manufacture of wooden soldiers and trains requires two types of skilled labour: carpentry and finishing. A soldier requires 2 hours of finishing labour and 1 hour of carpentry labour. A train requires 1 hour of finishing and 1 hour of carpentry labour. Each week, Giapetto can obtain all the needed raw material but only 100 finishing hours and 80 carpentry hours. Demand for trains is unlimited but at most 40 soldiers are bought each week. Formulate a

mathematical method of Giapetto’s situation that can be used to maximize Giapetteo’s weekly profit.

Solution:

Figure 8: An example of a formulated linear programming problem

0 20 40 60 80 100 0 20 40 60 80 100 120

T, No. of trains sold / wk

S , N o . o f s o ld ie rs s o ld / w k

Figure 9: Illustration of the graphical method for solving linear programming problems Feasibility Region Finishing: 2S + T < 100 Demand: S ≤ 40 Carpentry: S + T < 80 Profit: 3S + 2T Optimal Point: Z=180, S = 20, T = 60

The simplex algorithm is an iterative process where students use similar

principles to the linear algebra elementary row operations to solve the problem. In the

simplex algorithm, several iterations have to be performed. First, however, all the

inequalities are made into equations by adding something call a slack variable (the slack

variables are represented as S1, S2 and S3). The equations are then manipulated by

placing all variables on the left hand side (LHS) of the equal sign and all numbers are

placed to the right hand side (RHS) of the equation. This generates what is termed the

canonical form which is the first shaded portion in Table 10.

Table 10: Simplex algorithm method for solving linear programming problems

Row Calculations Z S T S1 S2 S3 RHS BV Ratio Row 1 -3 -2 0 0 0 0 Z PV = S 0 0 2 1 1 0 0 100 S1 50 1 0 1 1 0 1 0 80 S2 80 2 0 1 0 0 0 1 40 S3 40 3 3*R3 + R0 1 0 -2 0 0 3 120 Z PV = T 0 -2*R3 + R1 0 0 1 1 0 -2 20 S1 20 1 -R3 + R2 0 0 1 0 1 -1 40 S2 40 2 1*R3 0 1 0 0 0 1 40 S N/A 3 2*R1 + R0 1 0 0 2 0 -1 160 Z PV = S3 0 1*R2 0 0 1 1 0 -2 20 T N/A 1 -1*R1 + R2 0 0 0 -1 1 1 20 S2 20 2 0 1 0 0 0 1 40 S 40 3 1 0 0 1 1 0 180 Z 0 0 0 1 -1 2 0 60 T 1 0 0 0 -1 1 1 20 S3 2 0 1 0 1 -1 0 20 S 3

The simplex algorithm then involves students choosing a variable that would

this variable is usually the one with the highest positive coefficient in the objective

function or the most negative coefficient when the objective function is changed to an

equation (in this case S). Using this variable, elementary row operations are performed

by manipulating the equation rows (R) either by the multiplication or addition of row

coefficients from which a new set of equations are formed. The effect of increasing the

pivot variable changes the coefficients of all the equations and the profit of Z.

The iteration occurs again with these new set of equations, from which the pivot

variable is chosen from the new set of equations. Each iteration in the table is shaded.

The term ‘basic variable’ is also used in linear programming and was mentioned to the

students. This term refers to the variables for which a value was found for it. Thus, in

the example provided when the last iteration was performed, the basic variables would

have been Z, T, S3 and S. More information on linear programming is available in

Appendix 5 (p.304).

There have been few studies that investigate the teaching and learning of LP.

Some studies such as that by Albritton, McMullen and Gardiner (2003) and Hosein

(2005) have used surveys of lecturers to investigate how LP is taught but few have

looked empirically at how students learn LP except for Smith (1994). In her

investigation of students learning LP with a CAS software called DERIVE, Smith found

that students thought studying lecture notes and handouts were the most helpful in

understanding LP. The students however found that working with computer individually

and computer demonstrations were not very useful.

It is unclear whether the approach of teaching could have influenced the learning

preference of the students and their views on the use of computers. Perhaps also, the

way the computer was integrated into the teaching of LP into the class may have

influenced students’ opinion of software in the learning of LP. The preference of

approach by the students (Kember, 1997). Therefore, it may be useful to see how the

studying approach may influence students’ use of software. Further, since the course

targeted business and social science students, probably their attitudes towards CAS may

have been more negative, as spreadsheets were preferred in these disciplines (Hosein,

2005). Thus, students probably may have different attitudes towards different software

depending on their discipline and this probably could influence their preference of

studying approach.