2 Linear Programming Problems

Operations Research · Unit 2

Linear Programming Problems

Exam-focused notes for Linear Programming Problems (Operations Research, ORS255): what the TU syllabus asks and how it has actually been tested, with 12 solved past questions from this unit.

Linear Programming Problems in short

A linear programming problem (LPP) finds the best value of a linear goal, such as maximum profit or minimum cost, when resources are limited. It is the most used tool in OR, and the simplex method solves it for any number of variables.

Linear Programming Problems: notes

Formulation of linear programming problems

To formulate a problem, turn the words into a mathematical model in three parts: decision variables, an objective function and constraints.

Assumptions of LP: The objective and constraints are linear (proportionality and additivity). Variables may take fractional values (divisibility). All numbers are known for sure (certainty).

Example. A workshop makes tables ($x_1$) and chairs ($x_2$). A table gives profit Rs 40 and a chair Rs 30. Cutting time available is 12 hours and assembly time is 16 hours. A table needs 1 hour of cutting and 2 hours of assembly. A chair needs 1 hour of each.

$$\begin{aligned} \text{Maximize } Z &= 40x_1 + 30x_2 \ \text{subject to } x_1 + x_2 &\le 12 \quad \text{(cutting)} \ 2x_1 + x_2 &\le 16 \quad \text{(assembly)} \ x_1, x_2 &\ge 0 \end{aligned}$$

Objective function and constraints

The objective function is the linear expression we want to maximize (profit, output) or minimize (cost, time). Constraints are linear inequalities or equations that show the limits on resources, demand or quality.

  • A "$\le$" constraint is a capacity limit, such as machine hours.
  • A "$\ge$" constraint is a minimum need, such as the vitamins in a diet.
  • An "$=$" constraint is an exact requirement, such as total work of 150 hours.

Non-negativity constraints

The non-negativity constraints $x_j \ge 0$ say that no variable can be negative. We cannot make minus 3 tables. They also keep the feasible region in the first quadrant, so the corner points are easy to find. The simplex method works only with non-negative variables.

Graphical method (two variables). Draw each constraint as a line, shade the feasible region (points that satisfy all constraints), and check the corner points. The best value of a linear objective is always at a corner.

Corner$x_1$$x_2$$Z = 40x_1 + 30x_2$
O000
A80320
B (cutting and assembly meet)48400
C012360

Point B comes from $x_1 + x_2 = 12$ and $2x_1 + x_2 = 16$, which give $x_1 = 4$ and $x_2 = 8$. The best value is $Z = 400$ at B.

What this unit covers

  • Formulation of linear programming problems
  • Objective function and constraints
  • Simplex method for solving LPP
  • Interpretation of simplex results
  • Minimization and maximization problems
  • Non-negativity constraints

Simplex method for solving LPP

2082 · 10 marks

A software company is working on two new IT projects – Project A (Mobile App) and Project B (Web Portal). Each project generates profit contributions of Rs. 20,000 per unit for Project A and Rs. 30,000 per unit for Project B. Both projects require resources from three specialized departments: Design (D1), Programming (D2), and Testing (D3). Project A requires 3 hours of design department, 5 hours of programming department and 2 hours of testing department while Project B requires 3 hours of design department, 2 hours of programming department and 6 hours of testing department. The available time in hours per week are 36, 50 and 60 for the department of design, programming and testing respectively. Formulate this problem as a L.P.P. How should the company schedule his production in order to maximize contribution? Use simplex method.[10]

Show solved answer

LPP Formulation and Simplex Solution

Given

Profit per unit: Project A = Rs. 20,000; Project B = Rs. 30,000

Resource requirements (hours per unit):

DepartmentProject AProject BAvailable
Design (D1)3336
Programming (D2)5250
Testing (D3)2660

Solution

Formulation

Let $x_1$ = units of Project A, $x_2$ = units of Project B.

$$\text{Max } Z = 20000x_1 + 30000x_2$$

Subject to: $$3x_1 + 3x_2 \le 36$$ $$5x_1 + 2x_2 \le 50$$ $$2x_1 + 6x_2 \le 60$$ $$x_1, x_2 \ge 0$$

Standard form (slacks $s_1,s_2,s_3$)

$$3x_1+3x_2+s_1=36,\quad 5x_1+2x_2+s_2=50,\quad 2x_1+6x_2+s_3=60$$

Initial Tableau

Basis$x_1$$x_2$$s_1$$s_2$$s_3$RHS
$s_1$3310036
$s_2$5201050
$s_3$2600160
$Z$-20000-300000000

Iteration 1

Entering: $x_2$ (-30000). Ratios: 36/3=12, 50/2=25, 60/6=10. Leaving: $s_3$, pivot 6.

New $x_2$ row = $s_3$/6: $(1/3, 1, 0, 0, 1/6 \mid 10)$

  • $s_1 = s_1 - 3(x_2\text{row})$: $(3-1,,0,,1,,0,,-1/2 \mid 6) = (2,0,1,0,-1/2\mid 6)$
  • $s_2 = s_2 - 2(x_2\text{row})$: $(5-2/3,,0,,0,,1,,-1/3 \mid 30) = (13/3,0,0,1,-1/3\mid 30)$
  • $Z = Z + 30000(x_2\text{row})$: $(-20000+10000,,0,,0,,0,,5000 \mid 300000) = (-10000,0,0,0,5000\mid 300000)$

Note: the $s_1$ row $x_1$ coefficient is $3 - 3(1/3) = 2$, not $7/3$.

Basis$x_1$$x_2$$s_1$$s_2$$s_3$RHS
$s_1$2010-1/26
$s_2$13/3001-1/330
$x_2$1/31001/610
$Z$-100000005000300000

Iteration 2

Entering: $x_1$ (-10000). Ratios: 6/2=3, 30/(13/3)=90/13≈6.92, 10/(1/3)=30. Leaving: $s_1$, pivot 2.

New $x_1$ row = $s_1$/2: $(1, 0, 1/2, 0, -1/4 \mid 3)$

  • $s_2 = s_2 - (13/3)(x_1\text{row})$: RHS $= 30 - (13/3)(3) = 30-13 = 17$ coefficients: $s_1: -13/6,; s_2:1,; s_3: -1/3-(13/3)(-1/4)= -1/3+13/12 = 3/4$ → $(0,0,-13/6,1,3/4\mid 17)$
  • $x_2 = x_2 - (1/3)(x_1\text{row})$: RHS $= 10 - (1/3)(3) = 9$ coefficients: $s_1: -1/6,; s_3: 1/6-(1/3)(-1/4)= 1/6+1/12 = 1/4$ → $(0,1,-1/6,0,1/4\mid 9)$
  • $Z = Z + 10000(x_1\text{row})$: RHS $= 300000+10000(3)=330000$ $s_1: 0+10000(1/2)=5000,; s_3: 5000+10000(-1/4)=2500$
Basis$x_1$$x_2$$s_1$$s_2$$s_3$RHS
$x_1$101/20-1/43
$s_2$00-13/613/417
$x_2$01-1/601/49
$Z$00500002500330000

All $Z$-row coefficients $\ge 0$ → Optimal.

Optimal Solution

$$x_1 = 3,\quad x_2 = 9,\quad Z = 330000$$

Verification:

  • Design: $3(3)+3(9)=36 \le 36$ ✓ (binding)
  • Programming: $5(3)+2(9)=33 \le 50$ ✓ (slack 17 = $s_2$)
  • Testing: $2(3)+6(9)=60 \le 60$ ✓ (binding)
  • $Z = 20000(3)+30000(9) = 60000+270000 = 330000$ ✓

Recommendation

Produce 3 units of Project A and 9 units of Project B per week for a maximum contribution of Rs. 330,000.

Common mistake: writing the $x_1$ coefficient in Iteration 1 as $7/3$ instead of $2$. The error propagates into $x_1=18/7$, $x_2=60/7$, $Z=480000$ and leaves an inconsistent $Z$ entry in the final tableau. The correct optimum is integer-valued, with $Z = 330000$.

Open this answer on its own page →

2081 · 10 marks

Find the optimum solution of the given LPP by using the simplex method.Min Z=20A+10BMin; Z = 20A + 10BMinZ=20A+10BSubject to:Subject;to:Subjectto:A+2B≤40A + 2B \le 40A+2B≤404A+3B≥604A + 3B \ge 604A+3B≥603A+B≥303A + B \ge 303A+B≥30A,B≥0A, B \ge 0A,B≥0[10]

Objective: Minimize $Z = 20A + 10B$ Constraints: - (1) $A + 2B \le 40$ - (2) $4A + 3B \ge 60$ - (3) $3A + B \ge 30$ - $A, B \ge 0$ $$A + 2B + S1 = 40$$ $$4A + 3B - S2 + A1 = 60$$ $$3A + B - S3 + A2 = 30$$ Big-M objective (minimization): $$Z = 20A + 10B + 0S1 + 0S2 + 0S3 + MA1 + MA2$$ $CB$ row:

Open this answer on its own page →

2080 · 10 marks

Solve the given linear programming problem (LPP) by using simplex method and interpret the findings.

Maximize Z = $4A+3B+6C$

Subject to Constraints:

$2A+3B+2C \leq 440$

$4A+3C \leq 470$

$2A+5B \leq 430$

$A,B,C \geq 0$

[10]

Objective: Maximize $Z = 4A + 3B + 6C$ Constraints: - $2A + 3B + 2C \le 440$ - $4A + 0B + 3C \le 470$ - $2A + 5B + 0C \le 430$ - $A, B, C \ge 0$ Add slack variables $s1, s2, s3$: - $2A + 3B + 2C + s1 = 440$ - $4A + 0B + 3C + s2 = 470$ - $2A + 5B + 0C + s3 = 430$ Maximize

Open this answer on its own page →

2079 · 10 marks

Solve the given Linear Programming Problem (LPP) by using simplex method and interpret the results.

Minimize $Z = 25A + 10B$

subject to constraints:

$$\begin{aligned} A + B &= 50 \ A &\geq 20 \ B &\leq 40 \end{aligned}$$

Where $A, B \leq 0$

[10]

Objective: Minimize $Z = 25A + 10B$ Constraints: - $A + B = 50$ - $A \geq 20$ - $B \leq 40$ - $A, B \geq 0$ (the problem statement writes "$\leq 0$" which is inconsistent with a meaningful minimization; standard non-negativity $A, B \geq 0$ is assumed as the intended condition) --- Introduce surp...

Open this answer on its own page →

2080.2 · 10 marks

Solve the given linear programming problem (LPP) by using simplex method and interpret the findings.

Min Z = $20A+10B$

Subject to

$A+2B \leq 40$

$4A+3B \geq 60$

$3A+B \geq 30$

$A,B \geq 0$

[10]

Objective: Minimize $Z = 20A + 10B$ Constraints: - $A + 2B \leq 40$ - $4A + 3B \geq 60$ - $3A + B \geq 30$ - $A, B \geq 0$ Add slack $S1$ (for $\leq$), surplus $S2, S3$ and artificial $A1, A2$ (for $\geq$): - $A + 2B + S1 = 40$ - $4A + 3B - S2 + A1 = 60$ - $3A + B - S3 + A2 = 30$ $$\text{Min } Z ...

Open this answer on its own page →

0 · 10 marks

Solve the given Linear Programming Problem (LPP) by using simplex method and interpret the results.

Maximize: $Z = 10X_1 + 20X_2$

Subject to: $$4X_1 + 2X_2 \leq 60$$ $$4X_1 + 10X_2 \leq 100$$ $$2X_1 + 3X_2 \leq 38$$ $$X_1, X_2 \geq 0$$

[10]

Maximize: $Z = 10X1 + 20X2$ Subject to: - $4X1 + 2X2 \leq 60$ - $4X1 + 10X2 \leq 100$ - $2X1 + 3X2 \leq 38$ - $X1, X2 \geq 0$ Add slack variables $S1, S2, S3$: - $4X1 + 2X2 + S1 = 60$ - $4X1 + 10X2 + S2 = 100$ - $2X1 + 3X2 + S3 = 38$ $Z = 10X1 + 20X2 + 0S1 + 0S2 + 0S3$ Basis X₁ X₂ S₁ S₂ S₃ RHS --...

Open this answer on its own page →

Formulation of linear programming problems

2082 · 5 marks

The TechZone Software Company combines two key resources - Front-End Developers (A) and Back-End Developers (B) - to complete a software system that must involve exactly 150 person-hours of total work. Each Front-End Developer hour costs Rs. 2,000, and each Back-End Developer hour costs Rs. 8,000. The company must use at least 14 hours of Back-End work and no more than 20 hours of Front-End work in a project. Formulate objective function and constraints of this LPP. [5]

Show solved answer

Given

Decision variables:

  • $A$ = number of Front-End Developer hours
  • $B$ = number of Back-End Developer hours

Numeric inputs:

  • Total work required: exactly 150 person-hours
  • Cost per Front-End hour: Rs. 2,000
  • Cost per Back-End hour: Rs. 8,000
  • Minimum Back-End work: at least 14 hours
  • Maximum Front-End work: no more than 20 hours

STEP 2 - Formulation

Objective Function

Since costs are involved and the goal is efficiency, the company seeks to minimize total cost:

$$\text{Minimize } Z = 2000A + 8000B$$

where:

  • $2000A$ = total cost of Front-End Developer hours
  • $8000B$ = total cost of Back-End Developer hours

Constraints

1. Total work requirement (exactly 150 person-hours): $$A + B = 150$$

2. Minimum Back-End Developer hours (at least 14): $$B \geq 14$$

3. Maximum Front-End Developer hours (no more than 20): $$A \leq 20$$

4. Non-negativity: $$A \geq 0, \quad B \geq 0$$


Complete LPP Formulation

$$\boxed{\text{Minimize } Z = 2000A + 8000B}$$

Subject to: $$A + B = 150$$ $$B \geq 14$$ $$A \leq 20$$ $$A, B \geq 0$$

Feasibility note: With $A \leq 20$ and $A + B = 150$, we get $B = 150 - A \geq 130$, which automatically satisfies $B \geq 14$. So the binding constraint on cost is $A \leq 20$. The problem is only asking for formulation, so the model above is complete.

Open this answer on its own page →

2081 · 5 marks

ABC Manufacturing Company produces three products: Tables, Chairs, and Desks. These products require processing through three departments: Cutting, Assembly, and Painting. These three departments have limited working time to 300 hours, 450 hours, and 200 hours per week respectively. Each table requires 4 hours for cutting, 5 hours for assembly, and 1 hour for painting and contributes Rs. 1000 to profit. Each chair requires 3 hours for cutting, 4 hours for assembly, and 1 hour for painting and contributes Rs. 800 to profit. Each desk requires 2 hours for cutting, 3 hours for assembly, and 2 hours for painting and contributes Rs. 1200 to profit. To maintain balance, the total production of all three products must not exceed 150 units per week. Formulate objective (profit) function and constraints for this LPP. [5]

Show solved answer

Given

Products: Tables ($x_1$), Chairs ($x_2$), Desks ($x_3$)

Department time limits per week:

  • Cutting: 300 hours
  • Assembly: 450 hours
  • Painting: 200 hours

Resource requirements and profit:

ProductCutting (hr)Assembly (hr)Painting (hr)Profit (Rs.)
Table ($x_1$)4511000
Chair ($x_2$)341800
Desk ($x_3$)2321200

Balance constraint: Total production $\leq 150$ units per week.


STEP 2 - SOLVE: LPP Formulation

Decision Variables

Let:

  • $x_1$ = number of Tables produced per week
  • $x_2$ = number of Chairs produced per week
  • $x_3$ = number of Desks produced per week

Objective Function (Maximize Profit)

$$\text{Maximize } Z = 1000x_1 + 800x_2 + 1200x_3 \quad \text{(Rs. per week)}$$

Constraints

Cutting department (300 hours): $$4x_1 + 3x_2 + 2x_3 \leq 300$$

Assembly department (450 hours): $$5x_1 + 4x_2 + 3x_3 \leq 450$$

Painting department (200 hours): $$1x_1 + 1x_2 + 2x_3 \leq 200$$

Production balance (max 150 total units): $$x_1 + x_2 + x_3 \leq 150$$

Non-negativity: $$x_1, x_2, x_3 \geq 0$$

Complete Model

$$\text{Max } Z = 1000x_1 + 800x_2 + 1200x_3$$

Subject to: $$ \begin{aligned} 4x_1 + 3x_2 + 2x_3 &\leq 300 \ 5x_1 + 4x_2 + 3x_3 &\leq 450 \ x_1 + x_2 + 2x_3 &\leq 200 \ x_1 + x_2 + x_3 &\leq 150 \ x_1, x_2, x_3 &\geq 0 \end{aligned} $$

All coefficients match the given data exactly. The formulation is correct and complete.

Open this answer on its own page →

2080 · 5 marks

Food X contains 6 units of vitamin A and 7 units of vitamin B and costs Rs. 5 per gram. Food Y contains 8 units of vitamin A and 12 units of vitamin B and costs Rs. 18 per gram. The daily minimum requirement of vitamins A and B are respectively 100 units and 138 units respectively. Formulate the problem as a LPP with the objective function minimizing the cost. [5]

Item Vitamin A (units/gram) Vitamin B (units/gram) Cost (Rs./gram) ------------------------------------------------------------------- Food X 6 7 5 Food Y 8 12 18 Minimum daily requirement 100 138 - Objective: minimize cost. Let: - $x$ = number of grams of Food X - $y$ = number of grams of Food Y...

Open this answer on its own page →

2079 · 5 marks

Linear Programming Problem: Minimizing Cost of Food with Vitamin Requirements

Decision Variables: Let $x_1$, $x_2$, and $x_3$ be the units of foods $F_1$, $F_2$, and $F_3$ respectively.

Objective Function: Minimize $Z = 20x_1 + 24x_2 + 18x_3$

Constraints: $$20x_1 + 10x_2 + 10x_3 \geq 300 \quad \text{(Vitamin } V_1 \text{ requirement)}$$ $$10x_1 + 10x_2 + 10x_3 \geq 200 \quad \text{(Vitamin } V_2 \text{ requirement)}$$ $$10x_1 + 20x_2 + 10x_3 \geq 240 \quad \text{(Vitamin } V_3 \text{ requirement)}$$ $$x_1, x_2, x_3 \geq 0 \quad \text{(Non-negativity constraints)}$$

Vitamin content per unit of food: Vitamin $F1$ $F2$ $F3$ Daily Requirement ------------------------------------------------- $V1$ 20 10 10 300 $V2$ 10 10 10 200 $V3$ 10 20 10 240 Cost per unit: $F1 = 20$, $F2 = 24$, $F3 = 18$ (Rs.) --- Let: - $x1$ = number of units of food $F1$ - $x2$ = number of...

Open this answer on its own page →

2080.2 · 5 marks

A food company at Kathmandu produce three types of a healthy food P, Q and R for children which contains three types of vitamin A, B, and C. Each unit of food P contains 2, 2 and 1 unit of vitamin A, B and C. One unit of food Q contains 2, 3 and 1 units while each unit of food R contains 1, 1 and 5 units of vitamin A, B and C respectively. Daily minimum requirements of vitamin A, B and C are 10, 12 and 14 units respectively. Formulate objective function and its constraints of LPP if cost per unit of food P, Q and R are Rs. 9, Rs. 12 and Rs. 15 respectively. [5]

Vitamin content per unit of food: Food Vitamin A Vitamin B Vitamin C Cost (Rs.) --------------------------------------------------- P 2 2 1 9 Q 2 3 1 12 R 1 1 5 15 Daily minimum requirements: - Vitamin A: 10 units - Vitamin B: 12 units - Vitamin C: 14 units Let: - $x$ = number of units of food P ...

Open this answer on its own page →

0 · 5 marks

The XYZ Company combines factors A and B to form a product which must weigh 50 pounds. At least 20 pounds of A and no more than 40 pounds of B can be used. The cost of A is Rs. 25 per pound and of B is Rs. 10 per pound. Formulate LPP to find the amount of factor A and B which should be used to minimize the cost. [5]

Given data: - Product must weigh exactly = 50 pounds - Factor A: at least 20 pounds (minimum) $\Rightarrow A \geq 20$ - Factor B: no more than 40 pounds (maximum) $\Rightarrow B \leq 40$ - Cost of A = Rs. 25 per pound - Cost of B = Rs. 10 per pound - Objective: minimize total cost Let: - $x$ = po...

Open this answer on its own page →