Chapter 7
Linear Programming and Optimization
TU BSc past exam questions
Past questions and answers
5 questions set from this chapter. Most repeated first.
- 2082 · Linear Programming MAT : 404 · 1+1+3 marks
[a] Define hyperplane and a convex set. Show that the set of all feasible solutions of an LP (Linear Programming) problem is a convex set. [1+1+3]
[b] If and are two convex sets in then for any scalars and , prove that is a convex set. By using this, show that is also a convex set. [4+1]
Answer
[a] Hyperplane, convex set and convexity of LP feasible region
Hyperplane. A hyperplane in is a set of the form
where , , and . It is an affine set of dimension .
Convex set. A set is called convex if for every and every ,
That is, the line segment joining any two points of lies completely inside .
LP feasible set is convex. Consider a general LP in the form
The feasible set is
For each inequality , define the halfspace
We show is convex. Let and . Then
Hence , so is convex.
Similarly, each nonnegativity condition defines a halfspace and is convex. Therefore the feasible set is the intersection of finitely many convex sets:
The intersection of convex sets is convex. Hence the set of all feasible solutions of an LP problem is a convex set.
If the LP has equality constraints , then each equality is a hyperplane, which is also convex, so the same conclusion holds.
[b] Convexity of and of
Let be convex sets and let . Define
Take any two points . Then there exist and such that
Let . Consider
Since is convex,
Since is convex,
Therefore
Thus is a convex set.
Now put and . Then
By the result just proved, is a convex set. Hence is convex.
Answer checked by Claude Haiku · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · Linear Programming MAT : 404 · 2+2+1 marks
[a] Rewrite the following LP problem:
Max
Subject to,
In standard form and convert it into the canonical form. Also, convert this problem into minimization problem. [2+2+1]
[b] Show that the three forms of LP problem are equivalent. [5]
Answer
(a) Given: Max subject to , , .
Standard form (all constraints are equations, all variables non-negative): subtract a surplus variable from the constraint and add a slack variable to the constraint.
Canonical form (for a maximization problem every constraint is of the type, variables ): multiply the constraint by .
Minimization form: since , put :
subject to the same constraints, , , . (In its own canonical form, a minimization problem has all constraints of the type, so the second constraint becomes .) The optimal are the same, and .
(b) The three forms are the general form (constraints mixed; variables may be unrestricted), the canonical form (all constraints for Max, or all for Min; variables ) and the standard form (all constraints equations; variables ). They are equivalent because any one can be converted into another without changing the set of optimal solutions:
- Max to Min: , with at the same solution.
- Inequality direction: .
- Equation to inequalities: and (so the general form becomes canonical).
- Inequality to equation: (slack); (surplus). Slack and surplus variables carry zero cost, so is unchanged and any feasible gives a feasible and conversely (so canonical becomes standard).
- Unrestricted variable: if is unrestricted in sign, write with (so the general form's variables become non-negative).
- Variable with : substitute , .
Since each step maps feasible solutions one-to-one onto feasible solutions with the same objective value, the general, canonical and standard forms of an LP problem have the same optimal solution, so the three forms are equivalent.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · Linear Programming MAT : 404 · 1+1+2 marks
[a] What do you mean by a basic feasible solution? When does the solution become degenerate or non-degenerate? [1+1+2]
[b] Describe the steps of the simplex method for computing an optimal solution in a linear programming problem. [5]
OR
Solve the following LP problem using Two Phase method:
Max
Subject to,
[5]
Answer
(a) For a system of equations in variables (), a basic solution is obtained by setting variables (non-basic) to zero and solving for the remaining (basic) variables. A basic feasible solution (BFS) is a basic solution in which all variables are non-negative (); it corresponds to a corner (extreme) point of the feasible region.
A BFS is non-degenerate if all basic variables are strictly positive, and degenerate if at least one basic variable is zero.
(b) Steps of the simplex method
- Formulate the problem and convert it to standard form: make the objective Max, make all RHS , add slack variables for constraints, subtract surplus variables and add artificial variables for constraints, add artificial variables for constraints.
- Find an initial BFS (slack/artificial variables form the starting basis) and write the initial simplex table with , , and the body matrix.
- Compute and the net evaluations for every column.
- Optimality test: if all (Max problem), the current solution is optimal; stop. Otherwise go on.
- Entering variable: choose the column with the largest positive (key column).
- Leaving variable: compute the ratio for positive entries only; the row with the minimum ratio is the key row. If no entry is positive, the problem is unbounded.
- The element at the intersection is the pivot. Divide the key row by the pivot, and make the other entries of the key column zero by row operations to obtain the new table.
- Repeat steps 3 to 7 until all . The optimal values are the column and .
OR (Two-phase method)
Max s.t. , , .
Standard form: , .
Phase I: Min (i.e. Max ). Starting basis .
| Basis | RHS | ratio | |||||
|---|---|---|---|---|---|---|---|
| 1 | 1 | 1 | 0 | 0 | 6 | 6 | |
| 2 | 1 | 0 | -1 | 1 | 8 | 4 |
enters and leaves. New row: and row: . Now and no artificial variable remains in the basis, so a feasible solution exists. Drop the column.
Phase II: original objective, basis .
| Basis | RHS | ratio | ||||
|---|---|---|---|---|---|---|
| 0 | 1 | 2 | 4 | |||
| 1 | 0 | 4 | - | |||
| 0 | 3 | 0 | 5 |
enters, leaves. After the pivot:
| Basis | RHS | ||||
|---|---|---|---|---|---|
| 0 | 1 | 2 | 1 | 4 | |
| 1 | 1 | 1 | 0 | 6 | |
| 0 | -2 | -10 | 0 |
All , so the solution is optimal:
(Check: corner points give .)
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · Linear Programming MAT : 404 · 5 marks
[a] Convert the following LP problem into the duality [5]
Min
Subject to
[b] If the constraint of the primal is an equality constraint then prove that the dual variable will be unrestricted in sign. [5]
Answer
(a) The primal is a minimization problem with . Write with zero cost in the objective and bring all constraints to the same form, one dual variable per constraint:
- Constraint 1 (): , dual variable .
- Constraint 2 (): multiply by to get , so the dual variable is ; with this is a variable for the original constraint.
- Constraint 3 (): unrestricted in sign.
Primal: Min .
Dual:
subject to
(Equivalently, with : Max with the corresponding signs changed.)
(b) Let the primal be Min with a set of constraints, of which the -th is an equality:
An equality is equivalent to two inequalities:
(the second is the constraint multiplied by , so that all constraints are of the type). Assign the dual variables to the first and to the second. In the dual, the column of the -th constraint contributes
to the -th dual constraint, and to the dual objective. So the dual depends on and only through their difference. Define
Since and are both non-negative, their difference can be positive, negative or zero, so takes any real value. Replacing the pair by the single variable gives a dual with the -th variable unrestricted in sign. Hence if the -th primal constraint is an equality, the -th dual variable is unrestricted in sign.
Answer checked by Claude Sonnet · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
- 2082 · Linear Programming MAT : 404 · 4+1 marks
[a] Formulate the LP model for a Transportation problem, including a description of the essential variables, constraints, and objective function. Additionally, provide an example of a real-life application of this problem. [4+1]
[b] Formulate the LP model for a Diet problem, including a description of the essential variables, constraints, and objective function. Additionally, provide an example of a real-life application of this problem. [4+1]
OR
Write a general LP model for the maximum flow problem and justify the model is linear. Describe briefly the two applications of the problem. [4+1]
Answer
[a] LP Model for a Transportation Problem
Statement of the problem. A commodity is to be shipped from sources (supply points) to destinations (demand points). Source has a supply of units, destination requires units, and the cost of shipping one unit from source to destination is . The aim is to decide the shipment quantities so that total transportation cost is minimum.
Decision variables. Let
with for all .
Objective function. Minimize total transportation cost:
Constraints.
- Supply (capacity) constraints — the total shipped out of each source cannot exceed its supply:
- Demand (requirement) constraints — each destination must receive at least its requirement:
- Non-negativity constraints: for all .
Balanced case. If total supply equals total demand, , the problem is balanced and the inequalities become equalities:
If supply exceeds demand, a dummy destination is added with demand and zero cost; if demand exceeds supply, a dummy source is added similarly. This makes the model balanced and feasible.
Real-life application. A cement company in Nepal (for example, Hetauda Cement) has plants at Hetauda and Bhairahawa and depots at Kathmandu, Pokhara, Biratnagar and Nepalgunj. Given the production capacity of each plant, the demand at each depot and the per-bag freight rate on each route, the LP model above determines how many bags to send on each route so that total freight cost is minimum. The same model is used for distributing petroleum products from depots, fertilizers from warehouses to districts, and goods from factories to retail outlets.
[b] LP Model for a Diet Problem
Statement of the problem. A person must choose quantities of available foods so that the diet supplies at least the required amounts of nutrients at minimum cost. Food costs per unit and contains units of nutrient per unit of food. The minimum daily requirement of nutrient is .
Decision variables. Let
with for all .
Objective function. Minimize the total cost of the diet:
Constraints.
- Nutritional requirement constraints — the diet must supply at least the required amount of each nutrient:
- Non-negativity constraints: for all .
Remarks. If a food can be taken only in limited quantity (taste, availability), upper bounds are added. If the requirement is an exact amount, the constraint becomes an equality. The model is a minimization LP with "greater than or equal to" constraints, so it is solved by the simplex method after adding surplus and artificial variables (Big-M or two-phase method).
Real-life application. Hospital and hostel messes, army and police canteens, and school feeding programmes use this model to prepare a daily menu that meets calorie, protein, fat, vitamin and mineral requirements at the lowest possible cost. In Nepal, the Mid-Day Meal programme and Nepal Food Corporation ration planning are typical examples. It is also used in planning cattle and poultry feed mixtures and in blending problems in industry.
OR — LP Model for the Maximum Flow Problem
Statement of the problem. A directed network has nodes with node 1 as the source and node as the sink. Each arc has capacity . The aim is to send the maximum possible amount of flow from source to sink without exceeding any arc capacity, and with flow conserved at every intermediate node.
Decision variables. Let
Objective function. Maximize the total flow leaving the source:
Constraints.
- Capacity constraints: for every arc .
- Flow conservation at intermediate nodes :
- Non-negativity: for all arcs.
Why the model is linear. Every term in the objective function and in every constraint is of the form — each variable appears with power one and is multiplied only by a constant (capacity or coefficient 1). There are no products or powers of variables, no variables in denominators, and no other non-linear terms. Hence both the objective function and the constraint set are linear functions of the decision variables, so the model is a linear programming problem. Moreover, the flow conservation equations are linear "balance" equations, exactly of the LP form .
Applications.
- Communication and computer networks. The model finds the maximum data rate that can be sent from a server to a client through routers and links of limited bandwidth, and identifies the bottleneck links.
- Transportation and pipeline systems. It determines the maximum volume of water, gas or petroleum that can be pumped from a supply point to a demand point through a pipeline network of fixed pipe capacities; similarly, it gives the maximum number of vehicles or goods that a road network can carry between two cities.
Answer checked by Claude Haiku · Oct 21, 2026
Test yourself · 2 MCQs
Loading…
Questions from TU 4 Years BSc 4th Yr Plant Pathology (Bachelor Level [4 Yrs.]/Science & Tech. / IV Year · Plant Pathology and Protection [Bot.403] · 2082), TU 4 Years BSc 4th Yr Linear (Bachelor Level (4 Yrs.)/Science & Tech. / IV Year · Linear Programming MAT : 404 · 2082), TU 4 Years BSc 4th Yr Computational (Bachelor Level (4 Yrs.)/Science & Tech./IV Year · Computational Course (COM 408) · 2082), TU 4 Years BSc 4th Yr Computational (Bachelor Level (4 Yrs.) Science & Tech. /IV Year · Computational Course (COM 408) · 2080), TU 4 Yrs BSc 4th Yr Computational (Bachelor Level (4 Yrs.)/Science & Tech./IV Year · Computational Course (COM 408) · 2081), TU 4 Years BSc 4th Yr Mechanics 2082 (Bachelor Level (4 Yrs.) /Science & Tech. / IV Year · Mechanics (MAT : 403) · 2082), TU 4 Years BSc 4th Yr Modern Algebra (Bachelor Level (4 Yrs.) Science & Tech. / IV Year · MAT : 401 · 2082), TU 4 Years BSc 4th Yr Quantum Mechanics (Bachelor Level (4 Yrs.)/Science & Tech. / IV year · PHY-401 (New Course) · 2082), TU 4 Years BSc 4th Yr Spatial and (Bachelor Level [4 Yrs.]/Science & Tech. / IV Year · Spatial and Survey Technology [STAT. 407] (Interdisciplinary Paper) · 2081) and TU 4 Years BSc 4th Yr Econophysics (Bachelor Level (4 Yrs.)/Science & Tech. / IV Year · Econophysics-Interdisciplinary (Phy. 407) · 2078). Answers are written for this site; check them against your class notes.