Totally Unimodular Multistage Stochastic Programs Ruichen (Richard) Sun a, Oleg V. Shylo b, Andrew J. Schaefer a, a Department of Industrial Engineering, University of Pittsburgh, Pittsburgh, PA 15261 b Department of Industrial & Systems Engineering, University of Tennessee, Knoxville, TN 37996-2315 Abstract We consider totally unimodular multistage stochastic programs, that is, multistage stochastic programs whose extensive-form constraint matrices are totally unimodular. We establish several sufficient conditions and identify examples that have arisen in the literature. Keywords: Stochastic mixed integer programming; Total unimodularity; Multistage optimization 1. Introduction We consider a class of multistage stochastic programs (MSP) whose extensiveform constraint matrices are totally unimodular (TU). TU matrices have been well studied in deterministic mixed integer programming and combinatorial optimization. When the constraint matrix of a mixed integer program (MIP) is TU and the right-hand side is integral, the polyhedron described by the linear relaxation of the MIP is integral [7]. Kong et al. [10] provided several sufficient conditions for two-stage totally unimodular stochastic programs. These conditions used a generalization of TU matrices that we revisit in Section 2. This paper can be viewed as a multistage generalization of Kong et al. [10]. Romeijnders et al. [12] studied two-stage stochastic mixed integer programs in which the only uncertainty is on the right-hand side. They established that if the probability distribution over the right-hand side is independent and uniform and the recourse matrices are totally unimodular, a certain approximation of the integer recourse Corresponding author Email address: schaefer@pitt.edu (Andrew J. Schaefer) Preprint submitted to Operations Research Letters November 23, 2014
function is precisely its convex hull. Huang [8] reformulated the stochastic single item, uncapacitated dynamic lot-sizing problem without setup costs and proved that the reformulation is totally unimodular. We revisit the problem and show that the total unimodularity of Huang [8] s original formulation follows from the characterizations in Section 3. 2. Preliminaries Consider a multistage stochastic mixed-integer program with recourse. For notational convenience and without loss of generality, we assume that the number of continuous decision variables, l, the number of integer decision variables, n l, and the number of constraints, m, are the same in every stage by introducing zero row and column vectors if necessary. The deterministic equivalent program (DEP) of an MSP is (DEP ) min c 1 x 1 + Q 2 (x 1 ) (1a) s.t. W 1 x 1 h 1, x 1 R l + Z n l +, (1b) where Q 2 (x 1 ) = E ξ 2 (ω)[ Q 2 (x 1, ξ 2 (ω)) ], and Q τ (x τ 1, ξ [τ 1] (ω)) = E ξ τ (ω) ξ [τ 1] (ω) [ Q τ (x τ 1, ξ [τ] (ω)) ] for 2 < τ H, with Q τ (x τ 1, ξ [τ ] (ω)) = min { c τ (ω) x τ (ω) + Q τ +1 (x τ, ξ [τ ] (ω)) : W τ (ω)x τ (ω) } h τ (ω) T τ 1 (ω)x τ 1, x τ (ω) R l + Z+ n l for 2 τ H 1, and Q H (x H 1, ξ [H] (ω)) = min { c H (ω) x H (ω) : W H (ω)x H (ω) h H (ω) } T H 1 (ω)x H 1, x H (ω) R l + Z n l +. The vectors c 1 R n, h 1 R m, and the matrix W 1 R m n are nown. For each τ = 2,..., H and for all ω, W τ (ω) is an m n matrix, and T τ 1 (ω) is an m n matrix. ξ τ (ω) = [c τ (ω), h τ (ω), T1, τ 1 (ω),..., Tm, τ 1 (ω), W1, (ω), τ..., Wm, (ω)] τ is a random (n+m+2mn)-vector, and ξ [τ] (ω) = (ξ 2 (ω),..., ξ τ (ω)). In the following discussion, we assume that ξ = (ξ 2,..., ξ H ) follows a discrete distribution with a finite support Ξ with Ξ = K. The justification of this assumption was provided by Schultz [14], while a more thorough treatment of multistage stochastic integer programs can be found in Römisch and Schultz [13]. We call ξ i = (ξi 2,..., ξi H ) Ξ the scenario indexed by i S = {1,..., K}. Each path from the root node to a leaf node at level 2
(a) Example of a scenario tree. Stage 1 Stage 2 Stage 3 Stage 4 W 1 T 2 W 2 T 3 W 3 T 4 W 4 T 5 W 5 T 6 W 6 T 7 W 7 T 8 W 8 T 9 W 9 T 10 W 10 }{{} } Λ 1 {{ } } Λ 2 {{ } } Λ 3 {{ } Λ 4 =Λ (b) Schematic of an extensive-form constraint matrix. Figure 1: A scenario tree and a schematic of the corresponding extensive-form constraint matrix. H in the scenario tree corresponds to one scenario i S. An example of a scenario tree is illustrated in Figure 1a. For a scenario tree T = {N, A}, let Node 1 be the root node, and N τ be the set of nodes on level 1 τ H, so N 1 = {1}. Let α() N be the immediate ancestor (or parent) of a non-root node N \ {1}, Φ() N be the set of immediate children of a node N, and ρ() = τ if N τ. Note that Φ() = if ρ() = H. Then the extensive form of (DEP) (also called the arborescent form by Dupa cová et al. [3]) based on the scenario tree is given by: min p c x (2a) N s.t. W 1 x 1 h 1, (2b) T x α() + W x h, N \ N 1, (2c) x R l + Z n l +, N. 3
A schematic of the extensive-form constraint matrix corresponding to the MSP with the scenario tree in Figure 1a is shown in Figure 1b. Let Λ denote the extensive-form constraint matrix, and Λ τ denote the submatrix of Λ up to stage τ as illustrated in Figure 1b. Note that Λ = Λ H. For every N, let A denote the submatrix of Λ formed only by W and T for all Φ(). In particular, we have A = W if N H. We are interested in sufficient conditions for the extensive-form constraint matrix of an MSP to be TU. When the right-hand sides are integral, such stochastic programs may be solved as multistage stochastic linear programs, even if there are integrality restrictions. Definition 1. An m n matrix A is totally unimodular (TU) if and only if every square submatrix of A has determinant in {0, ±1}. Theorem 1 (Hoffman and Krusal [7]). An integral matrix A is totally unimodular if and only if the polyhedron defined by {x : Ax b, x 0} is integral for all integral b for which it is nonempty, i.e., the extreme points of the polyhedron are integral. Theorem 2 (Ghouila-Houri [6]). A m n matrix A is TU if and only if for any column subset J {1,..., n}, there exists a partition (J 1, J 2 ) of J such that a ij a ij {0, ±1} for i = 1,..., m. (3) j J 1 j J 2 Definition 2 (Kong et al. [10]). Let A = {A 1,..., A T } be a set of m n matrices, and let v {0, ±1} m. The set A is TU with respect to v, denoted by TU(v), if for any column subset J {1,..., n}, there exist partitions (J 1 t, J 2 t ), 1 t T, such that for i = 1,..., m, and j J 1 t j J 1 t j J 1 t a t ij j J 2 t a t ij j J 2 t a t ij j J 2 t a t ij {0, 1}, t = 1,..., T, if v i = 1, (4) a t ij {0, ±1}, t = 1,..., T, if v i = 0, (5) a t ij {0, 1}, t = 1,..., T, if v i = 1. (6) 4
3. Characterizations of Total Unimodular Multistage Stochastic Programs Applying Theorem 2 to (2) yields the following: Proposition 1. Let J be a subset of the columns of the extensive-form constraint matrix of an MSP, and for each N, let J be the set of the columns in J corresponding to A in Λ so that J = {J } N. Then the MSP is TU if and only if for any J, there exists a partition (J 1, J 2 ) := ({J 1} N, {J 2} N ) such that for i = 1,..., m, wij 1 w 1 ij 1, (7) j J1 1 j J 2 1 and j J 1 α() t ij + j J 1 w ij j J 2 α() t ij j J 2 w ij 1, N \ N 1. (8) Corollary 1. An MSP is TU if for every N, W is TU, and for every N \ N 1, T is a {0, ±1} matrix with a single nonzero entry. A more interesting question is determining when an MSP is TU based on its submatrices A. Theorem 3. An MSP is TU if (i) A 1 is TU, and (ii) For every N \ N 1, {A } is TU(v) for all v {0, ±1} m {0} Φ() m. Proof. Λ 1 is TU by condition (i). Suppose Λ τ 1 is TU for some τ 1, 2 τ H. Consider any column subset J = {J } τ t=1 Nt of Λ τ. By the induction hypothesis, {J } τ 1 t=1 Nt can be partitioned into ({J 1 } τ 1 {J 2} τ 1 Nt) satisfying (7) and (8) for all τ 1 t=1 N τ, the vector v defined by v i = t ij t=1 Nt, t=2 N t, and for every t ij, (9) j J 1 α() j J 2 α() 5
for i = 1,..., m, satisfies v {0, ±1} m. Using condition (ii), {A } is TU(v 0 Φ() m ), implying that there exists a partition (J 1, J 2) of J satisfying (8) for every N τ, and j J 1 t Thus, Λ = Λ H is TU. ij j J 2 t ij 1, i = 1,..., m, Φ(). (10) Corollary 2. An MSP is TU if A 1 is TU, and for all N \ N 1, N \ { N 1 N2 }, W and T are (0, ±1) matrices with at most one nonzero entry in every row. Corollary 3. An MSP is TU if A 1 is TU, and for every N \ N 1, W are (0, ±1) matrices with at most one nonzero entry in every column, and for all Φ(), T are the same matrices of which only one row contains more than one nonzero entry, and all but one of those nonzero entries corresponding columns in W are 0. Remar 1. A simple recourse matrix W = [I I] satisfies the recourse conditions of Corollary 2 and Corollary 3. Theorem 4. An MSP is TU if (i) W 1 is TU, and (ii) For every N \ N 1, W can be written as [ ] ˆT written as satisfying 0 [Ŵ 1 Ŵ 2 ] and T can be (a) Ŵ 1 and ˆT have the same dimensions, (b) Ŵ 2 is a matrix with at most one nonzero entry in every row, and (c) Ŵ 1 and ˆT satisfy the conditions for W and T in Corollary 2 or Corollary 3. Proof. By condition (i), (7) is satisfied. Let M 1 and M 2 be the union of the row subsets corresponding to Ŵ 1 and Ŵ 2 for all N \N 1, respectively. By Corollary 2 (or Corollary 3), (8) is satisfied for all the rows in M 1. Meanwhile, (8) also holds for all the rows in M 2. 6
Theorem 5. An MSP is TU if for all N, {A } is TU({1} m+ Φ() m ). Proof. For every N and any column subset J of A, there exists a partition (J 1, J 2 ) such that for all i = 1,..., m, wij { 1, 0}, (11) wij j J 1 j J 2 j J 1 t ij j J 2 t ij { 1, 0}, Φ(). (12) Hence, for any column subset J = {J } N, we can construct a partition (J 1, J 2 ) that satisfies (7) and (8), by setting J 1 = J 1 odd J 2 even, and J 2 = J 2 odd J 1 even, where for i = 1, 2, J i odd := {:ρ() is odd} J i, J i even := {:ρ() is even} J i. Remar 2. An MSP is TU if for all N, {A } is TU({ 1} m+ Φ() m ). Definition 3 (Fulerson and Gross [5], Nemhauser and Wolsey [11]). An m n (0, 1) matrix A is called an interval matrix if in each column the 1 s appear consecutively; that is, if a ij = a j = 1 and > i + 1, then a lj = 1 for all l with i < l <. Given an interval matrix A, for each column j = 1,..., n, let α j (β j ) index the first (last) row in which a non-zero element appears in column j. Definition 4 (Kong et al. [10]). An interval matrix is a nested interval matrix if there exists an ordering of the columns such that α j α j and β j β j, for all 1 j j n. Corollary 4. An MSP is TU if for all N and N \ N 1, W and T are nested interval matrices. Proof. For any column subset J of A, N, we assign the g th column of J to J 1 if g is an odd number. Otherwise, we assign it to J 2. We have for i = 1,..., m, wij {0, 1}, (13) and j J 1 t j J 1 w ij j J 2 ij j J 2 t ij {0, 1}, Φ(). (14) 7
Therefore, {A } is TU({ 1} m+ Φ() m ) for all N. Proposition 2. An MSP is TU if for every N, {A } is TU({1} m { 1} Φ() m ). Proof. For every N, by the hypothesis, there exists a partition (J 1, J 2) of any column subset J of A, such that for i = 1,..., m, wij { 1, 0}, (15) wij j J 1 j J 2 j J 1 t ij j J 2 t ij {0, 1}, Φ(). (16) Hence, for any column subset J = {J } N, we can construct a partition (J 1, J 2 ) satisfying (7) and (8), by setting J 1 = J 1, and J 2 = J 2. Remar 3. An MSP is also TU if {A } is TU({ 1} m {1} Φ() m ). 4. Applications of Totally Unimodular Multistage Stochastic Programs N 4.1. Dynamic Lot-Sizing Problems without Setup Costs El Agizy [4] introduced a stochastic programming extension of the deterministic single item, finite-horizon, uncapacitated dynamic lot-sizing problem without setup costs, where the production volume must be determined before the demand is realized. Let T = {N, A} be the corresponding scenario tree. For node N, let the unit production cost, the unit shortage cost, the unit holding cost and the demand be c, γ, β and δ, respectively. Let M x, M I and M u be the capacities of the production level, the inventory level and the shortage for node, respectively, which are infinity in the uncapacitated case. The decision variables x α(), I and u represent the production level for node decided at period ρ() 1, the inventory level at the end of period ρ() and the shortage amount for node, respectively. We create a dummy ancestor (Node 0) for the root node (Node 1) and assign initial inventory N 8
level I 0 to it. The extensive form is: min (c x α() + β I + γ u ) (17a) N s.t. I α() + x α() + u I δ, N, (17b) x α() M x, N, (17c) I M I, N, (17d) u M u, N, (17e) x α(), I, u Z +, N. El Agizy [4] studied the uncapacitated version of this problem, and showed that it can be reduced to a networ flow problem. Theorem 4 indicates that both the uncapacitated and capacitated versions of the original formulation (17) are TU. Note that because the production decision for must be made at period ρ() 1, the coefficient of the left-hand side of (17c) appears in W α() instead of T. Huang [8], extending El Agizy [4], developed a similar dynamic inventory model, where the production level decisions are postponed until the beginning of the current period after the demand becomes nown. Note that the production level variable for node is x instead of x α() in this case. Using Corollary 1, the extensive form constraint matrix under such circumstances is also TU, since for every N \ N 1, the inventory level variable, I α(), corresponds to the only nonzero entry in T. The special case without shortages and without capacities, i.e., u = 0 and M x = M I =, was also considered by Huang [8], who reformulated the problem by aggregating the demands and summing production along a path in the scenario tree, and proved that it is TU. In fact, both Corollary 1 and Corollary 2 imply that the original formulation by Huang [8] is TU. 4.2. Stochastic Machine Setup Problem The classical single-day machine setup problem [1] requires several tass to be accomplished according to their predefined start and end times. Each tas requires a single worer, and there is a tas-specific setup time for worers who transition between tass. The problem can be modeled as a minimum networ flow problem to find the minimum number of worers needed to process all the tass. Suppose there are p tass, and for i = 1,..., p, the start time and the end time for tas i are π(i) and π (i), respectively. 9
For i j, the setup time from tas i to tas j is Π(i, j). Then we can construct a directed graph G = (V, E), where V = V 1 V 2 V 3 V 4 with V 1 = {s 1 (the source)}, V 2 = {i i = 1,..., p}, V 3 = {i i = 1,..., p}, V 4 = {s 2 (the sin)}, and E = E 1 E 2 E 3 E 4 with E 1 = {(s 1, i) i V 2 }, E 2 = {(i, i ) i V 2, i V 3, i = i }, E 3 = {(i, j) j V 2, i V 3, π (i ) + Π(i, j) π(j)}, E 4 = {(i, s 2 ) i V 3 }. The capacities of all the arcs in E 2 have lower bounds of 1 and upper bounds of 1, enforcing the requirement to complete all the tass, while others have lower bounds of 0 and upper bounds of 1 [2]. An optimal solution to the minimum networ flow problem on this graph provides an optimal solution to the corresponding machine setup problem. We consider a stochastic and dynamic multi-period extension of the machine setup problem, where the number of the tass, the labor costs and the setup times are unnown until the beginning of the day. The problem can be formulated as an MSP. Let T = {N, A} be the scenario tree. Consider a node N, representing an instance of the single-day machine setup problem. As discussed above, we can define an equivalent instance of the networ flow problem on some graph G. Let N be the node arc incidence matrix of this graph, while vectors u and l denote the upper and lower capacities of its arcs. Let x ij be the flow on the arc (i, j), where x = [xij ] ij, and let y be the worforce level with a cost of c per worer. The number of worers can be changed daily, either by hiring + worers or laying off worers with a nonnegative cost of b + and b per worer, respectively. The extensive form can be written as: min p (c y + b + + + b ) N s.t. y α() + + y 0, N \ N 1, [ ] y + N 0 x 0, N, l I x u, N, x, y, +, Z +, N, N \ N 1. It follows from Corollary 1 that the extensive-form constraint matrix Λ is TU, where for every N \ N 1, the only nonzero entry in T corresponds to the variable of the previous worforce level y α(). Remar 4. A multistage extension of the nursing staff scheduling prob- 10
lem proposed by Khan and Lewis [9], which assigned nurses to different shifts across different departments with minimum and maximum number constraints, can be also formulated as a stochastic machine setup problem. 4.3. Dynamic Outside Sourcing Networ Flow Problems Consider a directed networ flow problem in which only one node receives goods from an external supplier to fulfill the demand of the networ. The networ structure may change over time. For example, the delivery over some arcs may not be available for some periods. The demand of each node, the purchasing cost and the delivery cost are also stochastic. There is a linear penalty associated with changing the order quantity. Moreover, emergency purchases may be allowed if the demands are not satisfied for some nodes. Accordingly, each node in the scenario tree T = {N, A} corresponds to a realization of the networ structure, the demand and the costs in a specific period. For any node N, let N be the node arc incidence matrix for the realized directed networ whose first row corresponds to the node receiving goods from the outside source. Let y be the order quantity from outside with a cost of c per unit, +, be the amount of increase and decrease in order quantity with a nonnegative cost of b + and b per unit, respectively, x ij be the flow amount on arc (i, j) in the networ with a transportation cost of a ij per unit, dl be the demand for node l in the networ, and zl be the amount of emergency purchase for node l with a unit-price q l. Let x = [xij ] ij, a = [aij ] ij, d = [dl ] l, z = [zl ] l and q = [ql ] l. The extensive form, which is TU from Corollary 1, is as follows: min p (c y + b + + + b + a x + q z ) N s.t. y α() + + y 0, N \ N 1, [ ] y + N 0 x + Iz d, N, Acnowledgments x, y, z, +, Z +, N, N \ N 1. The authors than Rüdiger Schultz and an anonymous referee for their insight. This research of the authors was partially supported by National Science Foundation grants CMMI-1100082, CMMI-1333758 and CMMI-1400009. 11
References [1] R.K. Ahuja, T.L. Magnanti, and J.B. Orlin. Networ Flows: Theory, Algorithms, and Applications. Prentice Hall, 1993. [2] E. Ciurea and L. Ciupalâ. Sequential and parallel algorithms for minimum flows. Journal of Applied Mathematics and Computing, 15(1-2):53 75, 2004. [3] J. Dupačová, G. Consigli, and S.W. Wallace. Scenarios for multistage stochastic programs. Annals of Operations Research, 100(1-4):25 53, 2000. [4] M.N. El Agizy. Dynamic inventory models and stochastic programming. IBM Journal of Research and Development, 13(4):351 356, 1969. [5] D.R. Fulerson and O.A. Gross. Incidence matrices and interval graphs. Pacific Journal of Mathematics, 15(3):835 855, 1965. [6] A. Ghouila-Houri. Caractérisation des matrices totalement unimodulaires. Comptes Rendus Hebdomadaires des Séances de l Académie des Sciences, 254(7):1192, 1962. [7] A.J. Hoffman and J.B. Krusal. Integral boundary points of convex polyhedra. In H.W. Kuhn and A. W. Tucer, editors, Linear Inequalities and Related Systems, pages 49 76. Princeton University Press, Princeton, 2010. [8] K. Huang. Multi-stage stochastic programming models in production planning. PhD thesis, Georgia Institute of Technology, 2005. [9] M.R. Khan and D.A. Lewis. A networ model for nursing staff scheduling. Zeitschrift für Operations Research, 31(6):B161 B171, 1987. [10] N. Kong, A.J. Schaefer, and S. Ahmed. Totally unimodular stochastic programs. Mathematical Programming, 138(1-2):1 13, 2013. [11] G.L. Nemhauser and L.A. Wolsey. Integer and Combinatorial Optimization, volume 18. Wiley New Yor, 1988. 12
[12] W. Romeijnders and M.H. van der Vler. Convex hull approximation of TU integer recourse models: Counterexamples, sufficient conditions, and special cases. Stochastic Programming E-Print Series. Institut für Mathemati, 2012. Available: http://edoc.hu-berlin.de/docviews/ abstract.php?id=39817; accessed 15-August-2014. [13] W. Römisch and R. Schultz. Multistage stochastic integer programs: An introduction. In M. Grötschel, S.O. Krume, and J. Rambau, editors, Online Optimization of Large Scale Systems, pages 581 600. Springer Berlin Heidelberg, 2001. [14] R. Schultz. On structure and stability in stochastic programs with random technology matrix and complete integer recourse. Mathematical Programming, 70(1-3):73 89, 1995. 13