Algorithm Search⌘K

Proofs: Balas additive algorithm

These are the human proofs of Balas additive algorithm, at full length.

The Balas additive algorithm returns an optimal 0-1 vector full

This proof shows: correctness, termination.

We use the pseudocode of the page. The problem is to minimize c⊤xc^\top x over X={x∈{0,1}n:Ax≤b}X = \{x \in \{0, 1\}^n : A x \le b\}, with c≥0c \ge 0. Let z∗=min⁡x∈Xc⊤xz^* = \min_{x \in X} c^\top x, or ∞\infty if X=∅X = \emptyset. For a node N=(O,v,s,F)N = (O, v, s, F), let X(N)X(N) be the set of x∈{0,1}nx \in \{0, 1\}^n with xj=1x_j = 1 for j∈Oj \in O and xj=0x_j = 0 for j∉O∪Fj \notin O \cup F. For such xx, write U={j∈F:xj=1}U = \{j \in F : x_j = 1\}; then c⊤x=v+∑j∈Ucjc^\top x = v + \sum_{j \in U} c_j and b−Ax=s−∑j∈UAjb - A x = s - \sum_{j \in U} A_j.

Claim 1 (node data). For every node on the stack, v=∑j∈Ocjv = \sum_{j \in O} c_j, s=b−∑j∈OAjs = b - \sum_{j \in O} A_j, and OO and FF are disjoint. Proof. True for the root. Line L11 adds j∈Fj \in F to OO, adds cjc_j to vv, subtracts AjA_j from ss, and removes jj from FF; line L10 removes jj from FF only. □\square

Claim 2 (children cover the parent). If NN is split on jj at lines L10 and L11 into N0N_0 and N1N_1, then X(N)=X(N0)∪X(N1)X(N) = X(N_0) \cup X(N_1). Proof. A vector in X(N)X(N) has xj=0x_j = 0, and lies in X(N0)X(N_0), or xj=1x_j = 1, and lies in X(N1)X(N_1). □\square

Claim 3 (a node that is not split loses nothing). Let NN be popped at line L3 with the current value zz. If the loop continues at line L6, then after line L5, every x∈X(N)∩Xx \in X(N) \cap X has c⊤x≥zc^\top x \ge z. If the loop continues at line L8, then every x∈X(N)∩Xx \in X(N) \cap X has c⊤x≥zc^\top x \ge z.

Proof. Line L6: s≥0s \ge 0, so the vector with U=∅U = \emptyset is in XX and costs vv. Line L5 makes z≤vz \le v, and every x∈X(N)x \in X(N) has c⊤x=v+∑j∈Ucj≥v≥zc^\top x = v + \sum_{j \in U} c_j \ge v \ge z since c≥0c \ge 0.

Line L8: suppose that x∈X(N)∩Xx \in X(N) \cap X has c⊤x<zc^\top x < z. Every j∈Uj \in U has v+cj≤c⊤x<zv + c_j \le c^\top x < z. Let I−={i:si<0}I^- = \{i : s_i < 0\}, which is not empty because line L4 failed. For i∈I−i \in I^-, feasibility gives si−∑j∈Uaij≥0s_i - \sum_{j \in U} a_{ij} \ge 0, so si−∑j∈U,aij<0aij≥si−∑j∈Uaij≥0s_i - \sum_{j \in U, a_{ij} < 0} a_{ij} \ge s_i - \sum_{j \in U} a_{ij} \ge 0. Every j∈Uj \in U with aij<0a_{ij} < 0 for some i∈I−i \in I^- is in TT. As si<0s_i < 0, some j∈Uj \in U has aij<0a_{ij} < 0, so T≠∅T \ne \emptyset; and ∑j∈Tmin⁡(0,aij)≤∑j∈U,aij<0aij\sum_{j \in T} \min(0, a_{ij}) \le \sum_{j \in U, a_{ij} < 0} a_{ij}, so si−∑j∈Tmin⁡(0,aij)≥0s_i - \sum_{j \in T} \min(0, a_{ij}) \ge 0 for every i∈I−i \in I^-. Then the test of line L8 fails, a contradiction. □\square

Claim 4 (invariant). At the start of each iteration of line L2, every x∈Xx \in X with c⊤x<zc^\top x < z lies in X(N)X(N) for some node NN on the stack, and z=∞z = \infty with best=NILbest = \text{NIL}, or bestbest gives a vector in XX of cost zz.

Proof. At the start, the root has X(root)={0,1}nX(\text{root}) = \{0, 1\}^n. Suppose the claim holds at the start of an iteration that pops NN, and let x∈Xx \in X have c⊤x<zc^\top x < z after the iteration. Since zz never increases, c⊤xc^\top x was below zz at the start too, so xx was in X(N′)X(N') for some N′N' on the stack. If N′≠NN' \ne N, then N′N' is still there. If N′=NN' = N, Claim 3 rules out lines L6 and L8, so NN was split, and by Claim 2, xx is in a child, which is pushed. For the second part, line L5 sets best=Obest = O, whose vector, by Claim 1 and s≥0s \ge 0, is in XX with cost v=zv = z. □\square

Claim 5 (termination). Each child has ∣F∣|F| one less than its parent, so every path of the search tree has at most nn splits, and the tree has at most 2n+1−12^{n+1} - 1 nodes. Each node is pushed once and popped once, so the loop ends. □\square

Theorem. BALAS(c,A,b)(c, A, b) returns z∗z^* and an optimal vector if X≠∅X \ne \emptyset, and (∞,NIL)(\infty, \text{NIL}) otherwise.

Proof. By Claim 5 the loop ends with an empty stack. By Claim 4, no x∈Xx \in X then has c⊤x<zc^\top x < z, so z≤z∗z \le z^*; and zz is ∞\infty or the cost of a vector in XX, so z≥z∗z \ge z^*. Hence z=z∗z = z^*, and if z<∞z < \infty, bestbest gives an optimal vector. If X=∅X = \emptyset, line L5 never runs, since s≥0s \ge 0 at line L4 means that the zero completion is in XX; so best=NILbest = \text{NIL}. ■\blacksquare

Back to Balas additive algorithm