返回题库

线性规划:基可行解与仅用 x1,x2,x3x_1,x_2,x_3

Linear Programming Basis and Reformulation

专题
Algorithmic Programming / 算法编程
难度
L4

题目详情

考虑线性规划

max  x4+x5+x6+x7s.t.Ax=b,  x0,\max\; x_4 + x_5 + x_6 + x_7 \quad \text{s.t.} \quad Ax = b,\; x \ge 0,

其中

A=(1101100001100000021100200101),b=(2243),A = \begin{pmatrix} 1 & -1 & 0 & -1 & -1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 & 1 & 1 & 0 \\ 0 & 2 & 0 & 0 & 1 & 0 & 1 \end{pmatrix}, \quad b = \begin{pmatrix} -2 \\ 2 \\ 4 \\ 3 \end{pmatrix},

以及点 v=(0,0,0,2,0,0,3)Tv = (0, 0, 0, 2, 0, 0, 3)^T

(a) vv 是否是该线性规划的一个基本可行解(basic feasible solution)?

(b) B={4,5,6,7}B = \{4,5,6,7\} 是否是一个可行基(feasible basis)?

(c) 将该 LP 重写为一个(非等式形式的)只涉及 x1,x2,x3x_1,x_2,x_3 的 LP。(提示:用 x1,x2,x3x_1,x_2,x_3 参数化集合 {xR7:Ax=b}\{x\in\mathbb{R}^7: Ax=b\}。)

(d) 用 (c) 的表述证明 vv 是该 LP 的最优解。

Consider the objective

maxx4+x5+x6+x7s.t.Ax=b and x0\max x_4 + x_5 + x_6 + x_7 \quad \text{s.t.} \quad Ax = b \text{ and } x \geq 0

where

A=(1101100001100000021100200101),b=(2243)A = \begin{pmatrix} 1 & -1 & 0 & -1 & -1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 0 & 0 \\ 0 & 0 & 0 & 2 & 1 & 1 & 0 \\ 0 & 2 & 0 & 0 & 1 & 0 & 1 \end{pmatrix}, \quad b = \begin{pmatrix} -2 \\ 2 \\ 4 \\ 3 \end{pmatrix}

and the point v=(0,0,0,2,0,0,3)Tv = (0, 0, 0, 2, 0, 0, 3)^T.

(a) Is vv a basic feasible solution to this linear program?

(b) Is B={4,5,6,7}B = \{4, 5, 6, 7\} a feasible basis?

(c) Reformulate this LP as an LP (not in equational form) involving only x1,x2,x3x_1, x_2, x_3. (Hint: parametrize {xR7:Ax=b}\{x \in \mathbb{R}^7 : Ax = b\} using the variables x1,x2,x3x_1, x_2, x_3 as parameters.)

(d) Use your formulation in (c) to show that vv is an optimal solution to this LP.

解析

(a) 先验算可行性:代入 vv

  • 第 1 行:x4x5=2-x_4-x_5=-2 成立;
  • 第 2 行:x3+x4=2x_3+x_4=2 成立;
  • 第 3 行:2x4+x5+x6=42x_4+x_5+x_6=4 成立;
  • 第 4 行:2x2+x5+x7=32x_2+x_5+x_7=3 成立;

v0v\ge 0,所以 vv 可行。

再看是否为 BFS:只需存在一个 4 列组成的可逆子矩阵作为基,使得非基变量为 0 时得到 vv。下题 (b) 给出的 B={4,5,6,7}B=\{4,5,6,7\} 正好做到,因此 vv 是一个基本可行解(并且是退化的,因为 x5=x6=0x_5=x_6=0 但可作为基变量)。

(b) 取基变量 (x4,x5,x6,x7)(x_4,x_5,x_6,x_7),令非基变量 x1=x2=x3=0x_1=x_2=x_3=0,由 Ax=bAx=b 解得

  • 第 2 行:x4=2x_4=2
  • 第 1 行:x4x5=2x5=0-x_4-x_5=-2\Rightarrow x_5=0
  • 第 3 行:2x4+x5+x6=4x6=02x_4+x_5+x_6=4\Rightarrow x_6=0
  • 第 4 行:x5+x7=3x7=3x_5+x_7=3\Rightarrow x_7=3

得到 xB=(2,0,0,3)0x_B=(2,0,0,3)\ge 0,故 BB 是可行基。

(c)x1,x2,x3x_1,x_2,x_3 参数化。由等式组:

  • x3+x4=2x_3+x_4=2x4=2x3x_4=2-x_3
  • 从第 1 行 x1x2x4x5=2x_1-x_2-x_4-x_5=-2x5=x1x2+x3x_5=x_1-x_2+x_3
  • 从第 3 行 2x4+x5+x6=42x_4+x_5+x_6=4x6=x3x1+x2x_6=x_3-x_1+x_2
  • 从第 4 行 2x2+x5+x7=32x_2+x_5+x_7=3x7=3x1x2x3x_7=3-x_1-x_2-x_3

于是原目标函数

max(x4+x5+x6+x7)=max(5x1x2),\max (x_4+x_5+x_6+x_7)=\max (5-x_1-x_2),

并且约束 x0x\ge 0 等价于以下关于 x1,x2,x3x_1,x_2,x_3 的不等式:

x10,  x20,  x30,  x32,x1x2+x30,x3x1+x20,x1+x2+x33.\begin{aligned} &x_1\ge 0,\;x_2\ge 0,\;x_3\ge 0,\;x_3\le 2,\\ &x_1-x_2+x_3\ge 0,\\ &x_3-x_1+x_2\ge 0,\\ &x_1+x_2+x_3\le 3. \end{aligned}

这就是只含 x1,x2,x3x_1,x_2,x_3 的 LP。

(d) 在 (c) 中,目标是最大化 5x1x25-x_1-x_2。由于 x1,x20x_1,x_2\ge 0,故

5x1x25.5-x_1-x_2\le 5.

x1=x2=0x_1=x_2=0 且例如 x3=0x_3=0(满足所有约束)即可达到目标值 5。

(x1,x2,x3)=(0,0,0)(x_1,x_2,x_3)=(0,0,0) 时,对应

(x4,x5,x6,x7)=(2,0,0,3),(x_4,x_5,x_6,x_7)=(2,0,0,3),

即点 vv,其目标值为 2+0+0+3=52+0+0+3=5,达到上界,因此 vv 最优。