# Module MA3484: Sample Paper

Available here are the following:---

• A sample paper for the MA3484 examination
• worked solutions for the sample paper
• ## Checking Solutions using the lp_solve Command Line Tool

Also available are lp_solve input files, in lp-format (the native lp_solve format) for the Transportation Problem (Q1) and the Simplex Method Problem (Q3), together with output from the Transportation Problem (Q1) and output from the Simplex Method Problem (Q3).

## Checking Solutions using the easycalculation.com Website

In using the simplex method calculator provided by www.easycalculation.com to find the optimal solution to Question 3, the data

p = - 3 x1 - 2 x2 - 5 x3 - 9 x4 - 4 x5

was entered into the 'Maximize' box, and the data

9 x1 + 3 x2 + 5 x3 + 2 x4 + x5 = 14
2 x1 + 7 x2 + 3 x3 + 4 x4 + 3 x5 = 26
4 x1 + 2 x2 + 3 x3 + 6 x4 + 2 x5 = 13

was entered into the 'Subject to' box.

## Checking Solutions using the zweigmedia.com Website

In using the Simplex Method Tool provided by www.zweigmedia.com to find the optimal solution to Question 1, the data

Minimize p = 6 x11 + 8 x12 + 9 x13 + 6 x14
+ 5 x21 + 10 x22 + 3 x23 + 7 x24
+ 3 x31 + 9 x32 + 2 x33 + 4 x34
subject to x11 + x12 + x13 + x14 = 7,
x21 + x22 + x23 + x24 = 10, x31 + x32 + x33 + x34 = 13,
x11 + x21 + x31 = 5, x12 + x22 + x32 = 10,
x13 + x23 + x33 = 9, x14 + x24 + x34 = 6

was entered into the relevant box. The following solution was obtained:---

Optimal Solution: p = 150; x11 = 0, x12 = 7, x13 = 0, x14 = 0,
x21 = 0, x22 = 1, x23 = 9, x24 = 0, x31 = 5, x32 = 2, x33 = 0, x34 = 6

Similarly, to find the optimal solution to Question 1, the data

Minimize p = 3 x1 + 2 x2 + 5 x3 + 9 x4 + 4 x5 subject to
9 x1 + 3 x2 + 5 x3 + 2 x4 + x5 = 14,
2 x1 + 7 x2 + 3 x3 + 4 x4 + 3 x5 = 26,
4 x1 + 2 x2 + 3 x3 + 6 x4 + 2 x5 = 13

was entered into the relevant box. The following solution was obtained:---

Optimal Solution: p = 4171/270; x1 = 43/135, x2 = 418/135,
x3 = 0, x4 = 83/90, x5 = 0

## Some Resources

Solutions to linear programming problems can be checked at the webpage https://www.easycalculation.com/operations-research/simplex-method-calculator.php

Solutions to linear programming problems can also be checked at the webpage http://www.zweigmedia.com/RealWorld/simplex.html

A command-line program called lp_solve is installed on the computer system of the School of Mathematics, TCD. One can specify the objective function and constraints in an input file which can be supplied as standard input. A reference guide can be found online at the webpage http://lpsolve.sourceforge.net/5.5/

Back to D.R. Wilkins: Lecture Notes