Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Linear programming practice

Original practice questions (PDF)

These exercises use the standard form min⁡{c⊺x:Ax=b,x≥0}\min\{c^\intercal x:Ax=b,\ x\ge 0\}, where A∈ℝm×nA\in\mathbb R^{m\times n} has rank m<nm<n. A basis SS has mm indices and an invertible ASA_S. It gives a basic feasible solution (BFS) when xS=AS−1b≥0x_S=A_S^{-1}b\ge 0 and xS‾=0x_{\bar S}=0.

1. Slack variables and free variables

Rewrite min⁡{−2x1+x2}\min\{-2x_1+x_2\} subject to 2x1+3x2≤52x_1+3x_2\le 5, x1∈ℝx_1\in\mathbb R, and x2≥0x_2\ge 0 in standard form. Introduce a slack variable, split the free variable, and specify the decision vector and data.

Solution to exercise 1

Set x1=x1+−x1−x_1=x_1^+-x_1^- and use slack s≥0s\ge 0. For y=(x1+,x1−,x2,s)≥0y=(x_1^+,x_1^-,x_2,s)\ge 0, take A=[2−231],b=5,c=(−2,2,1,0). A=\begin{bmatrix}2&-2&3&1\end{bmatrix},\qquad b=5,\qquad c=(-2,2,1,0). The equality is 2x1+−2x1−+3x2+s=52x_1^+-2x_1^-+3x_2+s=5.

2. Active constraints

Let F={(x1,x2):x1+2x2≤4,x1≥0,x2≥0}F=\{(x_1,x_2):x_1+2x_2\le 4,\ x_1\ge 0,\ x_2\ge 0\} and x=(0,2)x=(0,2).

  1. List the active constraints at xx.
  2. Write the slack form Ax+s=bAx+s=b of x1+2x2≤4x_1+2x_2\le 4 and give the slack at xx.
Solution to exercise 2

The active constraints are x1+2x2=4x_1+2x_2=4 and x1=0x_1=0. The inequality x2≥0x_2\ge 0 has strict slack. The slack equation is x1+2x2+s=4x_1+2x_2+s=4, with s≥0s\ge 0. At x=(0,2)x=(0,2), s=0s=0.

3. Feasibility and the column cone

Let A=[A1A2A3]A=[A_1\ A_2\ A_3] with A1=(1,0)A_1=(1,0), A2=(0,1)A_2=(0,1), and A3=(1,1)A_3=(1,1). For b=(1,2)b=(1,2), decide whether {x≥0:Ax=b}\{x\ge 0:Ax=b\} is feasible by checking membership in the column cone. If feasible, give a nonnegative combination.

Solution to exercise 3

Since b=A2+A3b=A_2+A_3, it belongs to the column cone. The combination gives the feasible vector x=(0,1,1)x=(0,1,1).

4. Fewer cone generators

Use the same columns as in Exercise 3. The vector b=(2,3)b=(2,3) equals A1+2A2+A3A_1+2A_2+A_3. Find a nonnegative representation using at most two generators, as guaranteed by the conic version of Carathéodory’s theorem.

Solution to exercise 4

Use A3=A1+A2A_3=A_1+A_2 to combine terms. Then b=A2+2A3b=A_2+2A_3.

5. Enumerating bases

For A=[101011]A=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}, b=(1,1)b=(1,1), and x≥0x\ge 0, list every basis S⊆{1,2,3}S\subseteq\{1,2,3\} that gives a BFS, and give the corresponding xx.

Solution to exercise 5

All three pairs of columns are linearly independent. The pair {1,2}\{1,2\} gives x=(1,1,0)x=(1,1,0). Each of {1,3}\{1,3\} and {2,3}\{2,3\} gives x=(0,0,1)x=(0,0,1). There are three feasible bases and two distinct basic feasible points.

6. Exposing a basic feasible point

Let xx be a BFS of F={z:Az=b,z≥0}F=\{z:Az=b,\ z\ge 0\} with basis SS. Construct cc so that xx is the unique minimizer of c⊺zc^\intercal z over FF, and use that fact to show xx is a vertex.

Solution to exercise 6

Set cj=0c_j=0 for j∈Sj\in S and cj=1c_j=1 otherwise. Every feasible cost is nonnegative, and xx has cost zero. Any feasible point of cost zero has zS‾=0z_{\bar S}=0, which forces zS=AS−1b=xSz_S=A_S^{-1}b=x_S. If xx were a strict convex combination of distinct feasible points, both would have cost zero by linearity, contradicting uniqueness.

7. One simplex pivot

Consider A=[102011]A=\begin{bmatrix}1&0&2\\0&1&1\end{bmatrix}, b=(1,1)b=(1,1), and c=(0,0,−1)c=(0,0,-1). Start at the BFS with basis S={1,2}S=\{1,2\}.

  1. Give the basic direction d(3)d^{(3)} for entering index 3.
  2. Compute c‾3=c3−cS⊺AS−1A3\bar c_3=c_3-c_S^\intercal A_S^{-1}A_3 and decide whether the direction improves the objective.
  3. Find the largest θ≥0\theta\ge 0 with x+θd(3)≥0x+\theta d^{(3)}\ge 0 and give a new basis.
Solution to exercise 7

Here x=(1,1,0)x=(1,1,0). The basic coordinates of the direction solve ASdS=−A3A_Sd_S=-A_3, so d(3)=(−2,−1,1)d^{(3)}=(-2,-1,1). Its reduced cost is −1-1, so a positive step lowers the objective. The ratio test gives θ=min⁡{1/2,1}=1/2\theta=\min\{1/2,1\}=1/2. Index 1 leaves, giving x+=(0,1/2,1/2)x^+=(0,1/2,1/2) with basis {2,3}\{2,3\}.

8. The reduced-cost optimality test

Define the reduced cost c‾j\bar c_j for j∉Sj\notin S. Prove that a BFS with c‾j≥0\bar c_j\ge 0 for all j∉Sj\notin S is optimal. Does the proof require a nondegenerate BFS?

Solution to exercise 8

For j∉Sj\notin S, set c‾j=cj−cS⊺AS−1Aj\bar c_j=c_j-c_S^\intercal A_S^{-1}A_j. For any feasible zz, zS=xS−AS−1AS‾zS‾,c⊺z−c⊺x=∑j∉Sc‾jzj≥0. z_S=x_S-A_S^{-1}A_{\bar S}z_{\bar S}, \qquad c^\intercal z-c^\intercal x =\sum_{j\notin S}\bar c_j z_j\ge 0. The proof also holds at a degenerate BFS. Degeneracy can instead cause a zero-length pivot when an entering index has negative reduced cost. The PDF asks why the sufficient optimality proof fails, but that premise is false.

9. Vertices and reduced costs

Minimize x1−x2x_1-x_2 subject to x1+2x2≤4x_1+2x_2\le 4, 2x1+x2≤52x_1+x_2\le 5, and x1,x2≥0x_1,x_2\ge 0.

  1. List the BFS by choosing pairs of active constraints.
  2. Compute each objective value and identify the optimal BFS.
  3. Verify its optimality with reduced costs.
Solution to exercise 9

The vertices (0,0),(5/2,0),(2,1),(0,2)(0,0),(5/2,0),(2,1),(0,2) have respective objective values 0,5/2,1,−20,5/2,1,-2. At the last vertex, introduce slacks (s1,s2)=(0,3)(s_1,s_2)=(0,3) and take (x2,s2)(x_2,s_2) as the basic variables. The row multipliers solving AS⊺y=cSA_S^\intercal y=c_S are y=(−1/2,0)y=(-1/2,0). The nonbasic reduced costs are 3/23/2 for x1x_1 and 1/21/2 for s1s_1, so the vertex is optimal.

10. Feasible directions at a BFS

For F={x:Ax=b,x≥0}F=\{x:Ax=b,\ x\ge 0\}, start from a nondegenerate BFS xx with xS>0x_S>0. What must dd satisfy for x+θdx+\theta d to be feasible for some θ>0\theta>0? Give generators for the cone of such directions. Consider setting one nonbasic component to 1 and the others to 0.

Solution to exercise 10

Feasibility for a positive step requires Ad=0Ad=0 and dS‾≥0d_{\bar S}\ge 0. These conditions suffice because xS>0x_S>0 leaves room for a sufficiently small step in the basic coordinates. For each j∉Sj\notin S, set the nonbasic coordinates of d(j)d^{(j)} to the corresponding unit vector and dS(j)=−AS−1Ajd_S^{(j)}=-A_S^{-1}A_j. Every feasible direction is ∑j∉Sdjd(j)\sum_{j\notin S}d_jd^{(j)} with dj≥0d_j\ge 0.

11. An initial basis for the auxiliary LP

Minimize 𝟏⊺z\mathbf 1^\intercal z subject to Ax+Dz=bAx+Dz=b and x,z≥0x,z\ge 0, where DD is diagonal with Dii=1D_{ii}=1 for bi≥0b_i\ge 0 and Dii=−1D_{ii}=-1 otherwise.

  1. What conditions must a BFS satisfy?
  2. Give a BFS for the auxiliary problem.
  3. If the original LP with Ax=bAx=b and x≥0x\ge 0 is feasible, what is the optimal value of the auxiliary problem?
Solution to exercise 11

A BFS satisfies the constraints and has an invertible set of mm columns of [AD][A\ D] with all other variables zero. Use the columns of DD as the basis, with x=0x=0 and z=D−1b=|b|z=D^{-1}b=|b| entrywise. When x̂\widehat x is feasible for the original LP, (x̂,0)(\widehat x,0) is feasible for the auxiliary LP and has objective zero. The objective is always nonnegative, so zero is optimal.