1 Introduction

In a traditional combinatorial optimization problem we seek a cheapest object composed of elements chosen from a finite element set E. For example, E can be a set of arcs of a given graph with specified arc costs, and we wish to compute an \(s-t\) path, spanning tree, perfect matching etc. with minimum costs (see, for example, Ahuja et al. (1993), Papadimitriou and Steiglitz (1998)). In many practical situations the exact values of the element costs are unknown. An uncertainty (scenario) set \({\mathcal {U}}\) is then provided, which contains all realizations of the element costs, called scenarios, which may occur. The probability distribution in \({\mathcal {U}}\) can be known, partially known, or unknown. In the latter case the robust optimization framework can be used, which consists in computing a solution minimizing the cost in a worst case. Single-stage robust combinatorial optimization problems, under various uncertainty sets, have been extensively discussed over the last decade. Survey of the results in this area can be found in Aissi et al. (2009), Kasperski and Zieliński (2016), Goerigk and Schöbel (2016), Buchheim and Kurtz (2018). For these problems a complete solution must be determined before the true scenario is revealed.

In many practical applications a solution can be constructed in more than one stage. For combinatorial problems, a part of the object can be chosen now (in the first stage) and completed in a future (in the second stage), after the structure of the costs has been changed. Typically, the first stage costs are known while the second stage costs can only be predicted to belong to an uncertainty set \({\mathcal {U}}\). First such models were discussed in Dhamdhere et al. (2005), Flaxman et al. (2006), Katriel et al. (2008), Kasperski and Zieliński (2011), where the robust two-stage spanning tree and perfect matching problems were considered. In these papers, the uncertainty set \({\mathcal {U}}\) contains K explicitly listed scenarios. Several negative and positive complexity results for this uncertainty representation were established. Some of them have been recently extended in Goerigk et al. (2020), where also the robust two-stage shortest path problem has been investigated. In Kasperski and Zieliński (2017) and Chassein et al. (2018) the robust two-stage selection problem has been explored. The problem is NP-hard for discrete uncertainty representation but it is polynomially solvable under a special case of polyhedral uncertainty set, called continuous budgeted uncertainty (see (Chassein et al. 2018)).

Robust two-stage problems belong to the class of three-level, min-max-min optimization problems. In mathematical programming, this approach is also called adjustable robustness (see, e.g., Ben-Tal et al. 2004; Yanıkoğlu et al. 2019; Ardestani-Jaafari and Delage 2016). Namely, some variables must be determined before the realization of the uncertain parameters, while the other part are variables that can be chosen after the realization. Several such models have been recently considered in combinatorial optimization, which can be represented as a 0-1 programming problem. Among them there is the robust two-stage problem discussed in this paper, but also the robust recoverable models (Büsing 2011, 2012) and the K-adaptability approach (Buchheim and Kurtz 2017; Hanasusanto et al. 2015). In general, problems of this type can be hard to solve exactly. A standard approach is to apply row and column generation techniques, which consists in solving a sequence of MIP formulations (see, e.g., Zeng and Zhao (2013)). However, this method can be inefficient for larger problems, especially when the underlying deterministic problem is already NP-hard. Therefore, some faster approximation algorithms can be useful in this case.

In this paper we consider the class of robust two-stage combinatorial problems under convex uncertainty, i.e. when the uncertainty set \({\mathcal {U}}\) modeling the uncertain second-stage costs is convex. Important special cases are polyhedral and ellipsoidal uncertainty, which are widely used in the single-stage robust optimization. Notice that in the problems discussed in Dhamdhere et al. (2005), Flaxman et al. (2006), Katriel et al. (2008), Kasperski and Zieliński (2011), \({\mathcal {U}}\) contains a fixed number of scenarios, so it is not a convex set. The problem formulation and description of the uncertainty sets are provided in Sect. 2. The complexity status of basic problems, in particular network optimization and selection problems, has been open to date. In Sect. 3 we show that all these basic problems are NP-hard, under both polyhedral and ellipsoidal uncertainty. In Sect. 4, we construct compact MIP formulations for a special class of robust two-stage combinatorial problems and show several of its properties. In Sect. 5, we propose an algorithm for the general problem, which returns an approximate solution with some guaranteed worst-case ratio. This algorithm does not run in polynomial time. However, it requires solving only one (possibly NP-hard) MIP formulation, while a compact MIP formulation for the general case is unknown. Finally, in Sects 67, and 8 we study the robust two-stage versions of three particular problems, namely the selection, representatives selection and shortest path ones. We show some additional negative and positive complexity results for them. There is still a number of open questions concerning the robust two-stage approach. We state them in the last section.

2 Problem formulation

Consider the following generic combinatorial optimization problem \({\mathcal {P}}\):

$$\begin{aligned} \begin{array}{llll} \min \, &{} \pmb {c}^T\pmb {x} \\ &{} \pmb {x}\in {\mathcal {X}} \subseteq \{0,1\}^n,\\ \end{array} \end{aligned}$$

where \(\pmb {c}=[c_1,\dots ,c_n]^T\) is a vector of nonnegative costs and \({\mathcal {X}}\) is a set of feasible solutions. In this paper we consider the general problem \({\mathcal {P}}\), as well as the following special cases:

  1. 1.

    Let \(G=(V,A)\) be a given network, where \(c_i\) is a cost of arc \(a_i\in A\). Set \({\mathcal {X}}\) contains characteristic vectors of some objects in G, for example the simple \(s-t\) paths or spanning trees. Hence \({\mathcal {P}}\) is the Shortest Path or Spanning Tree problem, respectively. These basic network optimization problems are polynomially solvable, see, e.g., (Ahuja et al. 1993; Papadimitriou and Steiglitz 1998).

  2. 2.

    Let \(E=\{e_1,\ldots ,e_n\}\) be a set of items. Each item \(e_i\in E\) has a cost \(c_i\) and we wish to choose exactly p items out of set E to minimize the total cost. Set \({\mathcal {X}}\) contains characteristic vectors of the feasible selections, i.e. \({\mathcal {X}}=\{\pmb {x}\in \{0,1\}^n: \sum _{i\in [n]} x_i = p\}\). We will denote by [n] the set \(\{1,\dots ,n\}\). This is the Selection problem whose robust single and two-stage versions were discussed in Averbakh (2001), Conde (2004), Kasperski and Zieliński (2017), Chassein et al. (2018).

  3. 3.

    Let \(E=\{e_1,\ldots ,e_n\}\) be a set of tools (items). This set is partitioned into a family of disjoint sets \(T_l\), \(l\in [\ell ]\). Each tool \(e_i\in E\) has a cost \(c_i\) and we wish to select exactly one tool from each subset \(T_l\) to minimize their total cost. Set \({\mathcal {X}}\) contains characteristic vectors of the feasible selections, i.e. \({\mathcal {X}}=\{\pmb {x}\in \{0,1\}^n: \sum _{i\in T_l} x_i= 1, l\in [\ell ]\}\). This is the Representatives Selection problem (RS for short) whose robust single-stage version was considered in Dolgui and Kovalev (2012), Deineko and Woeginger (2013), Kasperski et al. (2015).

Given a vector \(\pmb {x}\in \{0,1\}^n\), let us define the following set of recourse actions:

$$\begin{aligned} {\mathcal {R}}(\pmb {x})=\{\pmb {y}\in \{0,1\}^n: \pmb {x}+\pmb {y}\in {\mathcal {X}}\} \end{aligned}$$

and a set of partial solutions is defined as follows:

$$\begin{aligned} {\mathcal {X}}'=\{\pmb {x}\in \{0,1\}^n: {\mathcal {R}}(\pmb {x})\ne \emptyset \}. \end{aligned}$$

Observe that \({\mathcal {X}}\subseteq {\mathcal {X}}'\) and \({\mathcal {X}}'\) contains all vectors which can be completed to a feasible solution in \({\mathcal {X}}\). A partial solution \(\pmb {x}\in {\mathcal {X}}'\) is completed in the second stage, i.e. we choose \(\pmb {y}\in {\mathcal {R}}(\pmb {x})\) which yields \((\pmb {x}+\pmb {y})\in {\mathcal {X}}\). The overall cost of the solution constructed is \(\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}\) for a fixed second-stage cost vector \(\tilde{\pmb {c}}=[{\tilde{c}}_1,\ldots ,{\tilde{c}}_n]^T\). We assume that the vector of the first-stage costs \(\pmb {c}\) is known but the vector of the second-stage costs is uncertain and belongs to a specified uncertainty (scenario) set \({\mathcal {U}}\subset {\mathbb {R}}^n_{+}\). In this paper, we discuss the following robust two-stage problem:

$$\begin{aligned} \textsc {RTSt}:\; \min _{\pmb {x}\in {\mathcal {X}}'}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})}(\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}). \end{aligned}$$

The RTSt problem is a robust two-stage version of the problem \({\mathcal {P}}\). It is worth pointing out that RTSt is a generalization of four problems, which we also examine in this paper. Namely, given \(\pmb {x}\in {\mathcal {X}}'\) and \(\tilde{\pmb {c}}\in {\mathcal {U}}\), we consider the following incremental problem:

$$\begin{aligned} \textsc {Inc}(\pmb {x},\tilde{\pmb {c}})=\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})} \tilde{\pmb {c}}^T\pmb {y}. \end{aligned}$$

Given scenario \(\tilde{\pmb {c}}\in {\mathcal {U}}\), we study the following two-stage problem:

$$\begin{aligned} \textsc {TSt}(\tilde{\pmb {c}})=\min _{\pmb {x}\in {\mathcal {X}}'}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}). \end{aligned}$$

Finally, given \(\pmb {x}\in {\mathcal {X}}'\), we also consider the following evaluation problem:

$$\begin{aligned} \textsc {Eval}(\pmb {x})=\pmb {c}^T\pmb {x}+\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})} \tilde{\pmb {c}}^T\pmb {y}=\pmb {c}^T\pmb {x}+\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\textsc {Inc}(\pmb {x},\tilde{\pmb {c}}). \end{aligned}$$

A scenario \(\tilde{\pmb {c}}\) which maximizes \(\textsc {Inc}(\pmb {x},\tilde{\pmb {c}})\) is called a worst scenario for \(\pmb {x}\). The inner maximization problem is called the adversarial problem, i.e., the problem

$$\begin{aligned} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})}(\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}) \end{aligned}$$

Notice that the robust two stage problem can be equivalently represented as follows:

$$\begin{aligned} \textsc {RTSt}:\; \min _{\pmb {x}\in {\mathcal {X}}'} \textsc {Eval}(\pmb {x}). \end{aligned}$$

Further notice that the two-stage problem is a special case of RTSt, where \({\mathcal {U}}=\{\tilde{\pmb {c}}\}\) contains only one scenario. The following fact is exploited later in this paper:

Observation 1

Computing \(\textsc {TSt}(\tilde{\pmb {c}})\) for a given \(\tilde{\pmb {c}}\in {\mathcal {U}}\) (solving the two-stage problem) has the same complexity as solving the underlying deterministic problem \({\mathcal {P}}\).

Proof

Let \({\hat{c}}_i=\min \{c_i, {\tilde{c}}_i\}\) for each \(i\in [n]\) and let \(\hat{\pmb {z}}\) be an optimal solution to problem \({\mathcal {P}}\) for the costs \(\hat{\pmb {c}}\). Consider solution \((\hat{\pmb {x}},\hat{\pmb {y}})\) constructed as follows: set \({\hat{x}}_i=0\), \({\hat{y}}_i=0\) if \({\hat{z}}_i=0\); set \({\hat{x}}_i=1\), \({\hat{y}}_i=0\) if \({\hat{z}}_i=1\) and \({\hat{c}}_i=c_i\le {\tilde{c}}_i\); set \({\hat{x}}_i=0\), \({\hat{y}}_i=1\) if \({\hat{z}}_i=1\) and \({\hat{c}}_i={\tilde{c}}_i<c_i\). Of course, \(\hat{\pmb {x}}\in {\mathcal {X}}'\) and \(\hat{\pmb {y}}\in {\mathcal {R}}(\hat{\pmb {x}})\). It is easy to verify that \((\hat{\pmb {x}},\hat{\pmb {y}})\) is an optimal solution to the two-stage problem with the objective value of \(\textsc {TSt}(\tilde{\pmb {c}})\). \(\square \)

In this paper, we examine the following three types of convex uncertainty sets:

$$\begin{aligned} {\mathcal {U}}^{\mathcal {H\!P}}&=\{\underline{\pmb {c}}+\pmb {\delta }: \pmb {A}\pmb {\delta }\le \pmb {b},\pmb {\delta }\ge \pmb {0}\}\subset {\mathbb {R}}^n_{+}, \end{aligned}$$
(1)
$$\begin{aligned} {\mathcal {U}}^{\mathcal {V\!P}}&=\mathrm{conv}\{\tilde{\pmb {c}}_1,\ldots ,\tilde{\pmb {c}}_K\}\subset {\mathbb {R}}^n_{+}, \end{aligned}$$
(2)
$$\begin{aligned} {\mathcal {U}}^{{\mathcal {E}}}&=\{\underline{\pmb {c}}+\pmb {A\delta }: ||\pmb {\delta }||_{2}\le 1\}\subset {\mathbb {R}}^n_{+}, \end{aligned}$$
(3)

where \(\underline{\pmb {c}}=[\underline{c}_1,\dots ,\underline{c}_n]^T\) is a vector of the nominal second stage costs. Vector \(\pmb {\delta }\) and matrix \(\pmb {A}\) represent deviations of the second stage costs from their nominal values. Notice that \(\pmb {\delta }\in {\mathbb {R}}^n\), \(\pmb {A}\in {\mathbb {R}}^{m\times n}\) in \({\mathcal {U}}^{\mathcal {H\!P}}\) and \(\pmb {\delta }\in {\mathbb {R}}^m\), \(\pmb {A}\in {\mathbb {R}}^{n\times m}\) in \({\mathcal {U}}^{{\mathcal {E}}}\) and the dimensions of \(\pmb {\delta }\) and \(\pmb {A}\) will be clear from the context. We assume that all the uncertainty sets are bounded. The uncertainty sets \({\mathcal {U}}^{\mathcal {H\!P}}\) and \({\mathcal {U}}^{\mathcal {V\!P}}\) are two representations of the polyhedral uncertainty. By the decomposition theorem (Schrijver 1998, Chapter 7.2), both representations are equivalent, i.e. bounded \({\mathcal {U}}^{\mathcal {H\!P}}\) can be represented as \({\mathcal {U}}^{\mathcal {V\!P}}\) and vice versa. However, the corresponding transformations need not be polynomial. Thus the complexity results from one type of polytope do not carry over to the other, and we consider them separately.

The set \({\mathcal {U}}^{{\mathcal {E}}}\) represents ellipsoidal uncertainty, which is a common uncertainty representation in robust optimization (see, e.g., Ben-Tal et al. (2009)). We also study the following special cases of \({\mathcal {U}}^{\mathcal {H\!P}}\):

$$\begin{aligned} {\mathcal {U}}^{\mathcal {H\!P}}_0&=\{\underline{\pmb {c}}+\pmb {\delta }: \pmb {0}\le \pmb {\delta }\le \pmb {d},||\pmb {\delta }||_1\le \Gamma \}, \\ {\mathcal {U}}^{\mathcal {H\!P}}_1&= \{\underline{\pmb {c}}+\pmb {\delta }: \sum _{i\in U_j} \delta _i \le \Gamma _j, j\in [K], \pmb {\delta }\ge \pmb {0}\} \end{aligned}$$

Set \({\mathcal {U}}^{\mathcal {H\!P}}_0\) is called continuous budgeted uncertainty (Nasrabadi and Orlin 2013; Chassein et al. 2018) and can be considered as a variant of the classic set defined in Bertsimas and Sim (2004a). It bounds the total amount of deviations instead of limiting the number second-stage costs that can deviate. However, the computational properties of RTSt with \({\mathcal {U}}^{\mathcal {H\!P}}_0\) and budgeted sets from Bertsimas and Sim (2004a) can be different (see,.e.g., Pessoa et al. 2021; Bougeret et al. 2020; Tadayon and Smith 2015). In set \({\mathcal {U}}^{\mathcal {H\!P}}_1\) we have K budget constraints defined for some (not necessarily disjoint) subsets \(U_1,\dots ,U_K\subseteq [n]\).

The uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}\) is a general polyhedron and thus generalizes more specialized cases such as locally budgeted uncertainty sets (Goerigk and Lendl 2020) or knapsack uncertainty set discussed in Poss (2018), Pessoa et al. (2021), where coefficients of \(\pmb {A}\) need to be non-negative (note that for non-negative decision variables, constraints of such type are sufficient to define the relevant down-monotone closure of the uncertainty set).

3 General hardness results

The robust two-stage problem is not easier than the underlying deterministic problem \({\mathcal {P}}\). So, it is interesting to characterize the complexity of RTSt when \({\mathcal {P}}\) is polynomially solvable. In this section we focus on a core problem, which is a special case of all the particular problems studied in Sect. 2. We will show that it is NP-hard under \({\mathcal {U}}^{\mathcal {V\!P}}\), \({\mathcal {U}}^{\mathcal {H\!P}}\) and \({\mathcal {U}}^{{\mathcal {E}}}\). Hence we get hardness results for all the particular problems. Consider the following set of feasible solutions

$$\begin{aligned} {\mathcal {X}}_{\pmb {1}}=\{\pmb {x}\in \{0,1\}^n: x_1+\dots +x_n= n\}=\{\pmb {1}\}, \end{aligned}$$

i.e. \({\mathcal {X}}_{\pmb {1}}\) contains only the vector of ones. We have \({\mathcal {X}}_{\pmb {1}}'=\{\pmb {x}\in \{0,1\}^n: x_1+\dots +x_n\le n\}\) and \({\mathcal {R}}(\pmb {x})=\{\pmb {1}-\pmb {x}\}\) contains only one solution, as there is only one recourse action for each \(\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'\). Hence, the robust two stage version of the problem with \({\mathcal {X}}_{\pmb {1}}\) can be rewritten as follows:

$$\begin{aligned} \textsc {RTSt}_{\pmb {1}}: \min _{\pmb {x}\in {\mathcal {X}}_1'} \left( \pmb {c}^T\pmb {x}+ \max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\tilde{\pmb {c}}^T(\pmb {1}-\pmb {x}) \right) . \end{aligned}$$
(4)

The following result is known:

Theorem 1

( Kasperski and Zieliński 2017; Goerigk et al. 2020) The \(\textsc {RTSt}_{\pmb {1}}\) problem with \({\mathcal {U}}=\{\tilde{\pmb {c}}_1,\tilde{\pmb {c}}_2\}{\subset {{\mathbb {R}}}^n_+}\) is NP-hard. Furthermore, if \({\mathcal {U}}=\{\tilde{\pmb {c}}_1,\dots , \tilde{\pmb {c}}_K\}{\subset {{\mathbb {R}}}^n_+}\) and K is a part of the input, then \(\textsc {RTSt}_{\pmb {1}}\) is strongly NP-hard.

We use Theorem 1 to prove the next complexity results. First observe that the value of \(\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\tilde{\pmb {c}}^T(\pmb {1}-\pmb {x}) \) does not change if we replace a convex set \({\mathcal {U}}\) by its extreme points. This means that by constructing a convex uncertainty set with vectors \(\tilde{\pmb {c}}_1,\ldots ,\tilde{\pmb {c}}_K\) as its extreme points, we can conclude hardness results. This is straightforward in case of uncertainty sets of type \({\mathcal {U}}^{\mathcal {V\!P}}\). Hence, we immediately get the following corollary:

Corollary 1

The \(\textsc {RTSt}_{\pmb {1}}\) problem with uncertainty set \({\mathcal {U}}^{\mathcal {V\!P}}\) is NP-hard when \(K=2\) and strongly NP-hard when K is a part of the input.

For uncertainty sets \({\mathcal {U}}^{\mathcal {H\!P}}\) and \({\mathcal {U}}^{{\mathcal {E}}}\), proofs along the same idea require slight technical additions.

Theorem 2

The \(\textsc {RTSt}_{\pmb {1}}\) problem with uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}\) is strongly NP-hard.

Proof

Let \({\mathcal {I}}=(n,\pmb {c},{\mathcal {U}}=\{\tilde{\pmb {c}}_1,\dots , \tilde{\pmb {c}}_K\})\), be an instance of the strongly NP-hard \(\textsc {RTSt}_{\pmb {1}}\) problem. Consider an instance \({\mathcal {I}}_1=(n+K,[\pmb {\pmb {c}}, \pmb {0}]^T,{\mathcal {U}}^{\mathcal {H\!P}})\) of \(\textsc {RTSt}_{\pmb {1}}\), where \([\pmb {\pmb {c}}, \pmb {0}]^T\in {\mathbb {R}}^{n+K}\) are the first stage costs and

$$\begin{aligned} {\mathcal {U}}^{\mathcal {H\!P}}= \left\{ \pmb {0} + \begin{bmatrix}\pmb {\pmb {\delta }}\\ \pmb {\lambda }\end{bmatrix}\ :\ \pmb {\delta }= \sum _{j\in [K]} \lambda _j \tilde{\pmb {c}}_j, \sum _{j\in [K]} \lambda _j = 1, \lambda _j \ge 0, j\in [K] \right\} \subset {\mathbb {R}}^{n+K}. \end{aligned}$$

Since the first stage costs of variables \(x_{n+1},\dots ,x_{n+K}\) are 0, we can fix \(x_{n+1}=\dots =x_{n+K}=1\) in every optimal solution to the instance \({\mathcal {I}}_1\). The problem then reduces to

$$\begin{aligned} \min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'}\max _{\{\pmb {\lambda }\ge \pmb {0}:|| \pmb {\lambda } ||_{1}=1\}} \left( \pmb {c}^T\pmb {x} + \sum _{j\in [K]} \lambda _j \tilde{\pmb {c}}^T_j(\pmb {1}-\pmb {x}) \right) =\min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'}\max _{\tilde{\pmb {c}}\in \{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}} \left( \pmb {c}^T\pmb {x} + \tilde{\pmb {c}}^T(\pmb {1}-\pmb {x}) \right) , \end{aligned}$$

where \({\mathcal {X}}_{\pmb {1}}'=\{\pmb {x}\in \{0,1\}^n: x_1+\dots +x_n\le n\}\). Consequently, the problem with instance \({\mathcal {I}}_1\) is equivalent to the strongly NP-hard problem with the instance \({\mathcal {I}}\). \(\square \)

Note that the reduction in the proof of Theorem 2 constructs an uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}\) with a non-constant number of constraints. We will show in Sect. 4 that if the number of constraints in the description of \({\mathcal {U}}^{\mathcal {H\!P}}\) (except for the nonnegativity constraints) is constant, then the problem \(\textsc {RTSt}_{\pmb {1}}\) is polynomially solvable.

Theorem 3

The \(\textsc {RTSt}_{\pmb {1}}\) problem with uncertainty set \({\mathcal {U}}^{{\mathcal {E}}}\) is NP-hard.

Proof

Given an instance \({\mathcal {I}}=(n,\pmb {c},{\mathcal {U}}=\{\tilde{\pmb {c}}_1,\tilde{\pmb {c}}_2\})\) of \(\textsc {RTSt}_{\pmb {1}}\), define \(\underline{\pmb {c}}=\tilde{\pmb {c}}_1+\tilde{\pmb {c}}_2\) and \(\pmb {y}=\pmb {1}-\pmb {x}\). We use the following equality (see Bertsimas and Sim 2004b):

$$\begin{aligned}&2\cdot \max \{\tilde{\pmb {c}}_1^T\pmb {y},\tilde{\pmb {c}}_2^T\pmb {y}\}=(\tilde{\pmb {c}}_1^T\pmb {y}+\tilde{\pmb {c}}_2^T\pmb {y}) +\sqrt{\pmb {y}^T(\tilde{\pmb {c}}_1-\tilde{\pmb {c}}_2)(\tilde{\pmb {c}}_1-\tilde{\pmb {c}}_2)^T\pmb {y}}\\&\quad =(\tilde{\pmb {c}}_1^T\pmb {y}+\tilde{\pmb {c}}^T_2\pmb {y}) +\sqrt{\pmb {y}^T\pmb {A}\pmb {A}^T\pmb {y}}, \end{aligned}$$

where \((\tilde{\pmb {c}}_1-\tilde{\pmb {c}}_2)(\tilde{\pmb {c}}_1-\tilde{\pmb {c}}_2)^T=\pmb {A}\pmb {A}^T\) with \(\pmb {A}=[\tilde{\pmb {c}}_1-\tilde{\pmb {c}}_2]\). We get

$$\begin{aligned} 2\cdot&\min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'}(\pmb {c}^T\pmb {x}+\max \{\tilde{\pmb {c}}_1^T\pmb {y},\tilde{\pmb {c}}_2^T\pmb {y}\})= \min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'} (2\pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\sqrt{\pmb {y}^T\pmb {A}\pmb {A}^T\pmb {y}}) \\&\quad = \min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'}(2\pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+||\pmb {A}^T\pmb {y}||_{2})= \min _{\pmb {x}\in {\mathcal {X}}_{\pmb {1}}'} (2\pmb {c}^T\pmb {x}+ \max _{\tilde{\pmb {c}}\in \{\underline{\pmb {c}}+\pmb {A}\delta : |\delta |\le 1\}} \tilde{\pmb {c}}^T\pmb {y}). \end{aligned}$$

In consequence, the NP-hard problem with the instance \({\mathcal {I}}\) is equivalent to \(\textsc {RTSt}_{\pmb {1}}\) with the first stage costs \(2\pmb {c}\) and ellipsoidal uncertainty set \({\mathcal {U}}^{{\mathcal {E}}}=\{\underline{\pmb {c}}+\pmb {A\delta }: ||\pmb {\delta }||_{2}\le 1\}\), where \(\pmb {A}\) is an \(n\times 1\) matrix and \(\pmb {\delta }\) is 1-dimensional vector (intuitively, we map the unit sphere to the line segment joining \(2\tilde{\pmb {c}}_1\) and \(2\tilde{\pmb {c}}_2\)).

\(\square \)

Theorem 4

The robust two-stage versions of the Selection, RS, Spanning Tree, and Shortest Path problems are strongly NP-hard under \({\mathcal {U}}^{\mathcal {V\!P}}\) and \({\mathcal {U}}^{\mathcal {H\!P}}\), and NP-hard under \({\mathcal {U}}^{{\mathcal {E}}}\).

Proof

It is easy to see that \(\textsc {RTSt}_{\pmb {1}}\) is a special case of the RTSt Selection problem, with \(p=n\), and the RTSt RS problem, with \(T_i=\{e_i\}\), \(i\in [n]\). To see that it is also a special case of the basic network problems, consider the (chain) network \(G=(V,A)\) shown in Fig. 1. This network contains exactly one \(s-t\) path and spanning tree. So the problem is only to decide for each arc, whether to choose it in the first or in the second stage, which is equivalent to solving \(\textsc {RTSt}_{\pmb {1}}\).

\(\square \)

In Sect. 8 we will show that the hardness result from Theorem 4 can be strengthened for the two-stage version of the Shortest Path problem.

Fig. 1
figure 1

Illustration of the proof of Theorem 4

4 Compact formulations

In this section we construct compact formulations for a special class of problems under uncertainty sets \({\mathcal {U}}^{\mathcal {H\!P}}\) and \({\mathcal {U}}^{{\mathcal {E}}}\). We will assume that

$$\begin{aligned} {\mathcal {X}}=\{\pmb {x}\in \{0,1\}^n: \pmb {H}\pmb {x}\ge \pmb {g}\} \end{aligned}$$
(5)

and the polyhedron

$$\begin{aligned} {\mathcal {N}}=\{\pmb {x}\in {\mathbb {R}}^n: \pmb {H}\pmb {x}\ge \pmb {g}, \pmb {0}\le \pmb {x} \le \pmb {1}\} \end{aligned}$$
(6)

is integral, i.e. \({\mathcal {N}}\) is the convex hull of all integral vectors in \({\mathcal {N}}\) or, equivalently, \(\min (\max )\{\pmb {c}^T\pmb {x}: \pmb {x}\in {\mathcal {N}}\}\) is attained by an integral vector, for each \(\pmb {c}\) (see (Schrijver 1998, Chapter 16.3)). Important examples, where the set of feasible solutions is described by \({\mathcal {N}}\) are the shortest path and the selection problems discussed in Sect. 2. We can also use the constraints \(\pmb {H}\pmb {x}=\pmb {g}\) to describe \({\mathcal {X}}\) and the further reasoning will be the same. We can rewrite the inner adversarial problem (notice that \(\pmb {x}\in \{0,1\}^n\) is fixed) as follows:

$$\begin{aligned}&\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})} \tilde{\pmb {c}}^T\pmb {y} \\&\quad =\max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\{\pmb {y}\in \{0,1\}^n:\pmb {y}+\pmb {x}\in {\mathcal {X}}\}} \tilde{\pmb {c}}^T\pmb {y} \\&\quad = \max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\{\pmb {y}\in \{0,1\}^n:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}} \tilde{\pmb {c}}^T\pmb {y}\\&\quad = \max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\min _{\{\pmb {y}\in {\mathbb {R}}^n:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}} \tilde{\pmb {c}}^T\pmb {y}, \end{aligned}$$

where the last equality follows from the integrality assumptions and the fact that \(\pmb {x}\) is a fixed binary vector (note that \({\mathcal {N}}\) is integral if and only if \(\{\pmb {y}\in {\mathbb {R}}^n: \pmb {H}(\pmb {x}+\pmb {y})\ge \pmb {g}, \pmb {0}\le \pmb {x} + \pmb {y} \le \pmb {1}\}\) is integral for all binary \(\pmb {x}\), see (Goerigk et al. 2021, Lemma 6)).

Since \({\mathcal {U}}\) and \(\{\pmb {y}:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}\) are convex (compact) sets and \(\tilde{\pmb {c}}^T\pmb {y}\) is a concave-convex function, by the minimax theorem (von Neumann 1928) we can rewrite the adversarial problem as follows (a similar technique to cope with adjustable integer variables was used in Ardestani-Jaafari and Delage (2016), Hanasusanto et al. (2015)):

$$\begin{aligned} \min _{\{\pmb {y}\in {\mathbb {R}}^n:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \tilde{\pmb {c}}^T\pmb {y}. \end{aligned}$$
(7)

The robust two-stage problem thus becomes the following min-max problem:

$$\begin{aligned} \min _{\pmb {x}\in {\mathcal {X}}'} \min _{\{\pmb {y}\in {\mathbb {R}}^n:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}} \max _{\pmb {c}\in {\mathcal {U}}} \left( \pmb {c}^T \pmb {x} + \tilde{\pmb {c}}^T\pmb {y}\right) . \end{aligned}$$
(8)

If \({\mathcal {U}}={\mathcal {U}}^{\mathcal {H\!P}}\), then we can dualize the inner maximization problem in (8), obtaining

$$\begin{aligned} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}}\tilde{\pmb {c}}^T\pmb {y}=\max _{\{\pmb {\delta }\ge \pmb {0}: \pmb {A\delta }\le \pmb {b}\}} (\underline{\pmb {c}}+\pmb {\delta })^T\pmb {y}=\underline{\pmb {c}}^T\pmb {y}+\min _{\{\pmb {u}\ge \pmb {0}: \pmb {u}^T\pmb {A}\ge \pmb {y}^T\}} \pmb {u}^T\pmb {b}. \end{aligned}$$

As the result we get the following compact MIP formulation for RTSt under \({\mathcal {U}}^{\mathcal {H\!P}}\):

$$\begin{aligned} \begin{array}{lllll} \min \, &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\pmb {u}^T\pmb {b}\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {u}^T\pmb {A}\ge \pmb {y}^T \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}, \pmb {u}\ge \pmb {0} \end{array} \end{aligned}$$
(9)

Observation 2

The integrality gap of (9) is at least \(\Omega (n)\) for the RTSt Shortest Path problem under the uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}_0\).

Proof

Consider an instance of RTSt Shortest Path shown in Fig. 2. Set \({\mathcal {X}}\) contains characteristic vectors of the simple paths from s to t in graph G composed of arcs (si) and (it), \(i\in [m]\). Notice that \(m=n/2\), where n is the number of arcs in G (variables) and m is the number of \(s-t\) paths in G (solutions). It is easy to see that the optimal objective value of (9) equals m. In the relaxation of (9) (see also the relaxation of (8)) we can fix \(x_{si}=\frac{1}{m}\), \(y_{si}=0\) and \(x_{it}=0\) and \(y_{it}=\frac{1}{m}\) for each \(i\in [m]\). The cost of this solution is 1, which gives the integrality gap of \(m=\Omega (n)\). \(\square \)

Fig. 2
figure 2

An instance of the robust two-stage shortest path problem with \({\mathcal {U}}^{\mathcal {H\!P}}_0\), \(\Gamma =m\). For each arc a triple \((c_i, \underline{c}_i, d_i)\) is specified which is (0, M, 0) for solid and (M, 0, m) for dashed arcs; M is a big constant

Problem (9) can be solved in polynomial time for RTSt Selection under \({\mathcal {U}}^{\mathcal {H\!P}}_0\) (Chassein et al. 2018). In Sect. 7 we will show that the same result holds for RTSt RS under \({\mathcal {U}}^{\mathcal {H\!P}}_0\). On the other hand, (9) is strongly NP-hard for arbitrary \({\mathcal {U}}^{\mathcal {H\!P}}\), when the constraint \(\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g}\) becomes \(y_1+\dots +y_n+x_1+\dots +x_n= n\), i.e. when (9) models the \(\textsc {RTSt}_{\pmb {1}}\) problem (see Sect. 3). We now show that \(\textsc {RTSt}_{\pmb {1}}\) is polynomially solvable, when there is only a constant number of constraints in \({\mathcal {U}}^{\mathcal {H\!P}}\), except for the nonnegativity constraints (note that the hardness result in Sect. 2 requires an unbounded number of constraints).

Theorem 5

The \(\textsc {RTSt}_{\pmb {1}}\) problem can be solved in polynomial time if the matrix \(\pmb {A}\) in \({\mathcal {U}}^{\mathcal {H\!P}}\) has a constant number of rows.

Proof

The basic idea of the proof is to enumerate all possible bases to the dual of the adversarial problem. As the number of constraints in \(\pmb {A}\) is constant, it is then possible to check each basis separately in polynomial time (compare also to (Poss 2018, Theorem 3)).

To this end, consider the formulation (9) for \(\textsc {RTSt}_{\pmb {1}}\) with \(\pmb {u}=(u_1,\ldots ,u_m)\) for a constant m. Let us assume that \(\pmb {x}\) and \(\pmb {y}=\pmb {1}-\pmb {x}\) are fixed. The remaining optimization problem can be rewritten as the following linear program with additional n slack variables \(\pmb {s}\):

$$\begin{aligned} \min \&\pmb {b}^T \pmb {u} \\ \text {s.t. }&\pmb {A}^T\pmb {u}- \pmb {s} = \pmb {y} \\&u_i \ge 0&i\in [m] \\&s_i \ge 0&i\in [n] \end{aligned}$$

where \(\pmb {A}\in {\mathbb {R}}^{m\times n}\) and \(\mathrm {rank}(\pmb {A})=m\). The coefficient matrix of this problem is \(\begin{bmatrix}\pmb {A}^T&{-\pmb {I}_n}\end{bmatrix}\in {\mathbb {R}}^{n\times (m+n)}\), where \({\pmb {I}_n}\) denotes the identity \(n\times n\) matrix. Since \({\mathcal {U}}^{\mathcal {H\!P}}\) is nonempty and bounded, there is an optimal \(n \times n\) basis matrix \(\pmb {B}\) to this problem, corresponding to basic variables \(\pmb {u}_{\pmb {B}}\), \(\pmb {s}_{\pmb {B}}\), so that

$$\begin{aligned} \begin{bmatrix}\pmb {u}_{\pmb {B}}\\ \pmb {s}_{\pmb {B}}\end{bmatrix} ={\pmb {B}^{-1}}\pmb {y}. \end{aligned}$$
(10)

We will use the fact that the matrix \({\pmb {B}^{-1}}\) has a special structure. Namely, by reordering the constraints and variables, we can assume that

with \(\pmb {A}_1, \pmb {A}_2 \in {\mathbb {R}}^{n\times m'}\) and \(\pmb {\mathrm {O}}\) being the \(m'\times (n-m')\) zero matrix, where \(m'\le m\) is the size of \(\pmb {u}_{\pmb {B}}\). Fixing a basis matrix \(\pmb {B}\), problem \(\textsc {RTSt}_{\pmb {1}}\) thus simplifies to

where \(\pmb {b}^T_{\pmb {B}}\) and \(\pmb {0}^T_{\pmb {B}}\) are coefficients corresponding to \(\pmb {u}_{\pmb {B}}\) and \(\pmb {s}_{\pmb {B}}\), respectively. Notice that \(y_i\in \{0,1\}\) for each \(i\in [n]\), because \(x_i\in \{0,1\}\) and \(x_i+y_i=1\) for all \(i\in [n]\). Let us write \(\pmb {y} = (\tilde{\pmb {y}}, \hat{\pmb {y}})\), where \(\tilde{\pmb {y}}\) denotes the first \(m'\) variables of \(\pmb {y}\), and \(\hat{\pmb {y}}\) denotes the remaining \(n-m'\) variables. Using this notation, the constraint \(\pmb {B}^{-1}\pmb {y} \ge \pmb {0}\) becomes

$$\begin{aligned} \pmb {A}_2 \tilde{\pmb {y}} \ge \begin{bmatrix} \pmb {\mathrm {O}} \\ \pmb {I}_{(n-m')} \end{bmatrix} \hat{\pmb {y}} \end{aligned}$$

If we fix the values of \(\pmb {{\tilde{y}}}\), these constraints result in upper bounds on \(\hat{\pmb {y}}\). The remaining optimization problem is hence trivial to solve by packing the cheaper version of each item, where this is possible with respect to these upper bounds.

There are \(\left( {\begin{array}{c}n+m\\ n\end{array}}\right) =O( (m+n)^m )\) many different candidates to choose a basis, and for each candidate, we enumerate \(O(2^m)\) values for the \(\tilde{\pmb {y}}\)-variables involved. For fixed m, the resulting complexity is thus polynomial in the input size. \(\square \)

Let us now focus on ellipsoidal uncertainty. If \({\mathcal {U}}={\mathcal {U}}^{{\mathcal {E}}}\), then (7) can be rewritten as

$$\begin{aligned} \min _{\{\pmb {y}:\pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g},\; \pmb {0}\le \pmb {y}\le \pmb {1}-\pmb {x}\}} \underline{\pmb {c}}^T\pmb {y}+ ||\pmb {A}^T\pmb {y}||_{2}. \end{aligned}$$

Consequently, we get the following compact program for RTSt under \({\mathcal {U}}^{{\mathcal {E}}}\):

$$\begin{aligned} \begin{array}{lllll} \min \, &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+||\pmb {A}^T\pmb {y}||_{2}\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}\ge \pmb {0} \end{array} \end{aligned}$$
(11)

Problem (11) is a quadratic 0-1 optimization problem, which can be difficult to solve. In Sect. 5 we will propose some methods of computing approximate solutions to (11).

Observation 3

The integrality gap of (11) is at least \(\Omega (n)\) for the RTSt Shortest Path problem under the uncertainty set \({\mathcal {U}}^{{\mathcal {E}}}\).

Proof

Consider the network from Fig. 2. Let \(\pmb {A}=m \pmb {I}_{2m}\) be the \(2m\times 2m\) diagonal matrix having the values m on the diagonal. Hence

$$\begin{aligned} {\mathcal {U}}^{{\mathcal {E}}}=\{\underline{\pmb {c}}+m\pmb {\delta }: ||\pmb {\delta }||_{2}\le 1\}\subset {\mathbb {R}}^{2m}. \end{aligned}$$

The reasoning is then the same as in the proof of Observation 2. \(\square \)

5 Computing approximate solutions

A compact formulation for the general RTSt problem is unknown. Therefore, solving the problem requires applying special row and column generation techniques (see, e.g., Zeng and Zhao (2013)). As this method may consist of solving many hard MIP formulations, it can be inefficient for large problems. In this section we propose algorithms, which return solutions with some guaranteed distance to the optimum. We will discuss a general case as well as cases that can be modeled as the min-max problem (8).

5.1 General approximation results

Let \({\mathcal {X}}\) be expressed as (5), but now no assumptions on the polyhedron \({\mathcal {N}}\) (see (6)) are imposed. So, the underlying deterministic problem can be NP-hard and also hard to approximate. By interchanging the min-max operators we get the following lower bound on the optimal objective value of the RTSt problem:

$$\begin{aligned} LB=\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \min _{\pmb {x}\in {\mathcal {X}}'}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y})=\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \min _{(\pmb {x},\pmb {y}) \in {\mathcal {Z}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}), \end{aligned}$$

where

$$\begin{aligned} {\mathcal {Z}}=\{(\pmb {x},\pmb {y}): \pmb {H}(\pmb {x}+\pmb {y})\ge \pmb {g}, \pmb {x}+\pmb {y}\le \pmb {1}, \pmb {x} \in \{0,1\}^n,\pmb {y}\in \{0,1\}^n\}. \end{aligned}$$

Consider the following relaxation of \({\mathcal {Z}}\):

$$\begin{aligned} {\mathcal {Z}}'=\{(\pmb {x},\pmb {y}): \pmb {H}(\pmb {x}+\pmb {y})\ge \pmb {g}, \pmb {x}+\pmb {y}\le \pmb {1}, \pmb {0}\le \pmb {x}\le \pmb {1}, \pmb {0} \le \pmb {y}\le \pmb {1}\}. \end{aligned}$$

Since \({\mathcal {U}}\) and \({\mathcal {Z}}'\) are convex sets, by the minimax theorem (von Neumann 1928), we have

$$\begin{aligned} LB\ge \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}'} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y})= \min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}'}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}) \end{aligned}$$

We also get the following upper bound on the optimal objective value (the min-max problem):

$$\begin{aligned} UB=\min _{\pmb {x}\in {\mathcal {X}}'}\min _{\pmb {y}\in {\mathcal {R}}(\pmb {x})}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y})=\min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y}). \end{aligned}$$
(12)

We thus get

$$\begin{aligned} \frac{UB}{LB}\le \frac{\displaystyle \min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y})}{\displaystyle \min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}'}\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\pmb {x}+\tilde{\pmb {c}}^T\pmb {y})}=\rho . \end{aligned}$$
(13)

Let \((\pmb {x}^*,\pmb {y}^*)\in {\mathcal {Z}}\) be an optimal solution to the min-max problem (12). Then

$$\begin{aligned} \textsc {Eval}(\pmb {x}^*)\le \pmb {c}^T\pmb {x}^*+\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \tilde{\pmb {c}}^T \pmb {y}^*=UB. \end{aligned}$$

We thus get

$$\begin{aligned} \textsc {Eval}(\pmb {x}^*)\le \rho \cdot LB \end{aligned}$$
(14)

and \(\pmb {x}^*\in {\mathcal {X}}'\) is a \(\rho \)-approximate, first-stage solution to RTSt, i.e. a solution whose value \(\textsc {Eval}(\pmb {x}^*)\) is within a factor of \(\rho \) of the value of an optimal solution to RTSt. For the uncertainty sets \({\mathcal {U}}^{\mathcal {H\!P}}\) and \({\mathcal {U}}^{{\mathcal {E}}}\) the value of LB can be computed in polynomial time by solving convex optimization problems and for \({\mathcal {U}}^{\mathcal {V\!P}}\) by solving an LP problem. On the other hand, the upper bound and approximate solution \(\pmb {x}^*\) can be computed by solving a compact 0-1 problem (after dualizing the inner maximization problem in (12)). In the next part of this section we will show a special case of the problem for which \(\pmb {x}^*\) can be computed in polynomial time.

We now consider the polyhedral uncertainty. Using duality, the min-max problem (12) under \({\mathcal {U}}^{\mathcal {H\!P}}\), can be represented as the following MIP formulation:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\pmb {u}^T\pmb {b}\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {u}^T\pmb {A}\ge \pmb {y}^T \\ &{} \pmb {x}, \pmb {y}\in \{0,1\}^n \\ &{} \pmb {u}\ge \pmb {0} \end{array} \end{aligned}$$
(15)

The relaxation of (15), used to compute LB, is an LP problem, so it can be solved in polynomial time. The problem (15) can be more complex. However, it can be easier to solve than the original robust two-stage problem. Using (13) and (14), we get the following theorem:

Theorem 6

Let \(\pmb {x}^*\) be optimal to (15). Then \(\pmb {x}^*\) is a \(\rho \)-approximate first-stage solution to the RTSt problem and \(\rho \) is the integrality gap of (15).

We now describe the case in which \(\pmb {x}^*\) can be computed in polynomial time, which yields a \(\rho \)-approximation algorithm for the robust two-stage problem. Namely, we consider the continuous budgeted uncertainty \({\mathcal {U}}^{\mathcal {H\!P}}_0\). Fix \(\pmb {y}\) and consider the following problem:

$$\begin{aligned} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}^{\mathcal {H\!P}}_0} \tilde{\pmb {c}}^T\pmb {y}. \end{aligned}$$

This problem can be solved by observing that either the whole budget \(\Gamma \) is allocated to \(\pmb {y}\) or the allocation is blocked by the upper bounds on the deviations. So

$$\begin{aligned} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}^{\mathcal {H\!P}}_0} \tilde{\pmb {c}}^T\pmb {y}=\min \{\underline{\pmb {c}}^T\pmb {y}+\Gamma , (\underline{\pmb {c}}+\pmb {d})^T\pmb {y}\}. \end{aligned}$$

Hence the min-max problem can be rewritten as follows:

$$\begin{aligned}&\min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}}\max _{\pmb {c}\in {\mathcal {U}}^{\mathcal {H\!P}}_0} (\pmb {c}^T\pmb {x}+\pmb {c}^T\pmb {y}) \\&\quad =\min _{(\pmb {x},\pmb {y})\in {\mathcal {Z}}}\min \{\pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\Gamma , \pmb {c}^T\pmb {x}+(\underline{\pmb {c}}+\pmb {d})^T\pmb {y}\} \\&\quad =\min \{\textsc {TSt}(\underline{\pmb {c}})+\Gamma , \textsc {TSt}(\underline{\pmb {c}}+\pmb {d})\}. \end{aligned}$$

In consequence, the minmax problem reduces to solving two two-stage problems, which can be done in polynomial time if the underlying problem \({\mathcal {P}}\) is polynomially solvable (see Observation 1). So, in this case a \(\rho \)-approximate solution \(\pmb {x}^*\) can be computed in polynomial time.

5.2 Approximating the problems with the integrality property

In this section we propose some methods of constructing approximate solutions for the RTSt problem if the polyhedron \({\mathcal {N}}\) (see (6)) satisfies the integrality property. Recall that in this case we can represent RTSt as the min-max formulation (8), so from now on we explore the approximability of (8). Let \(\hat{\pmb {c}}\in {\mathcal {U}}\) be any fixed scenario. Thus the two-stage problem (see Sect. 2) with \(\tilde{\pmb {c}}\), in the second stage, can be then formulated as follows:

$$\begin{aligned} \begin{array}{llll} \min &{} \pmb {c}^T\pmb {x}+\hat{\pmb {c}}^T\pmb {y} \\ &{} \pmb {H}(\pmb {x}+\pmb {y})\ge \pmb {g}\\ &{} \pmb {x}+\pmb {y}\le \pmb {1}\\ &{} \pmb {x}, \pmb {y}\in \{0,1\}^n \end{array} \end{aligned}$$
(16)

Using Observation 1, we can solve (16) in polynomial time, by solving one underlying deterministic problem \({\mathcal {P}}\). We now show how to obtain an approximate solution to (8) by solving (16) for an appropriately chosen scenario \(\hat{\pmb {c}}\). Let \((\hat{\pmb {x}}, \hat{\pmb {y}})\in {\mathcal {Z}}\) be an optimal solution to (16).

Lemma 1

If \({\tilde{c}}_i \le t {\hat{c}}_i\), \(i\in [n]\) (\(\tilde{\pmb {c}}\le t \hat{\pmb {c}}\) for short) for each \(\tilde{\pmb {c}}\in {\mathcal {U}}\), then \((\hat{\pmb {x}},\hat{\pmb {y}})\) is a t-approximate solution to (8).

Proof

Let \((\pmb {x}^*,\pmb {y}^*)\) be an optimal solution to (8). We then have \(\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} (\pmb {c}^T\hat{\pmb {x}} + \tilde{\pmb {c}}^T\hat{\pmb {y}}) \overset{(1)}{\le } t \left( \pmb {c}^T\hat{\pmb {x}} + \hat{\pmb {c}}^T \hat{\pmb {y}} \right) \overset{(2)}{\le } t \left( \pmb {c}^T\pmb {x}^* + \hat{\pmb {c}}^T\pmb {y}^* \right) \le t \left( \pmb {c}^T\pmb {x}^* + \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \tilde{\pmb {c}}^T\pmb {y}^* \right) \). The inequality (1) follows from the assumption that \(\tilde{\pmb {c}}\le t \hat{\pmb {c}}\) for all \(\tilde{\pmb {c}}\in {\mathcal {U}}\) and \(t\ge 1\). The inequality (2) holds because \((\hat{\pmb {x}}, \hat{\pmb {y}})\) is an optimal solution to (16) and this optimal solution will not change when we relax \(\pmb {y}\in \{0,1\}^n\) with \(\pmb {0}\le \pmb {y}\le \pmb {1}\) in (16) due to the integrality property assumed. \(\square \)

Accordingly, we can construct the best guarantee t, by solving the following convex optimization problem:

$$\begin{aligned} \begin{array}{lllll} \max \ &{}t^{-1} \\ \text {s.t. } &{} t^{-1} \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} {\tilde{c}}_i \le {\hat{c}}_i &{} i\in [n] \\ &{} \hat{\pmb {c}}\in {\mathcal {U}}\\ &{} t^{-1} \ge 0 \end{array} \end{aligned}$$

where the values \(\max _{\tilde{\pmb {c}}\in {\mathcal {U}}} {\tilde{c}}_i\), \(i\in [n]\), have to be precomputed by solving additional n convex problems.

5.2.1 Polyhedral uncertainty

The next two theorems are consequences of Lemma 1.

Theorem 7

Problem (8) with \({\mathcal {U}}^{\mathcal {V\!P}}=\mathrm{conv}\{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}\) is approximable within K.

Proof

Fix \(\hat{\pmb {c}}=\frac{1}{K} \sum _{k\in [K]} \tilde{\pmb {c}}_k\in {\mathcal {U}}^{\mathcal {V\!P}}\). Then for each \(\tilde{\pmb {c}}\in \mathrm{conv}\{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}\), the inequality \(\tilde{\pmb {c}}\le K\hat{\pmb {c}}\) holds. Thus by fixing \(t=K\) in Lemma 1 the theorem follows. \(\square \)

Theorem 8

If \(\underline{\pmb {c}} \ge \alpha (\underline{\pmb {c}}+\pmb {d})\), \(\alpha \in (0,1]\), in \({\mathcal {U}}^{\mathcal {H\!P}}_0\), then (8) with \({\mathcal {U}}^{\mathcal {H\!P}}_0\) is approximable within \(\frac{1}{\alpha }\).

Proof

Fix \(\hat{\pmb {c}}=\underline{\pmb {c}}\). Then for each scenario \(\tilde{\pmb {c}}\in {\mathcal {U}}^{\mathcal {H\!P}}_0\), we get \(\tilde{\pmb {c}}\le \underline{\pmb {c}}+\pmb {d}\le \frac{1}{\alpha }\hat{\pmb {c}}\). Thus by fixing \(t=\frac{1}{\alpha }\ge 1\) in Lemma 1 the result follows. \(\square \)

The next result characterizes the approximability of the problem under \({\mathcal {U}}^{\mathcal {H\!P}}_1\).

Theorem 9

Assume that the number of budget constraints in \({\mathcal {U}}^{\mathcal {H\!P}}_1\) is constant and the following problem is polynomially solvable:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}\\ \text { s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {0}\le \pmb {y} \le \pmb {d}\\ &{} \pmb {x}\in \{0,1\}^n \\ \end{array} \end{aligned}$$
(17)

where \(d_i\in {\mathcal {E}}=\{0,\epsilon , 2\epsilon , \dots , 1\}\), \(i\in [n]\). Then (8) under \({\mathcal {U}}^{\mathcal {H\!P}}_1\) admits an FPTAS.

Proof

The compact MIP formulation (9) for (8) takes the following form:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+ \displaystyle \sum _{j\in [K]} u_j\Gamma _j\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1}\\ &{} \displaystyle \sum _{\{j\in [K]: i\in U_j\}} u_j\ge y_i &{} i\in [n] \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}, \pmb {u}\ge \pmb {0} \end{array} \end{aligned}$$
(18)

Since \(y_i\in [0,1]\) for each \(i\in [n]\), we get \(u_j\in [0,1]\) for each \(j\in [K]\). Let us fix \(\epsilon =\frac{1}{t}\) for some integer \(t\ge 0\), and consider the numbers \({\mathcal {E}}=\{0,\epsilon , 2\epsilon , 3\epsilon , \dots ,1\}\). Fix vector \((u_1,\dots ,u_K)\), where \(u_j\in {\mathcal {E}}\). The problem (18) reduces then to (17), where \(d_i=\min \{\sum _{\{j\in [K]: i\in U_j\}} u_j,1\}\), \(i\in [n]\). Let us enumerate all \((\frac{1}{\epsilon })^K\) vectors \(\pmb {u}\), with components \(u_j\in {\mathcal {E}}\), \(j\in [K]\), and let us solve (17) for each such a vector. Assume that \((\hat{\pmb {x}},\hat{\pmb {y}}, \hat{\pmb {u}})\) is the enumerated solution having the minimum objective value in (18) (notice that \((\hat{\pmb {x}},\hat{\pmb {y}}, \hat{\pmb {u}})\) is feasible to (18)). Let \((\pmb {x}^*,\pmb {y}^*, \pmb {u}^*)\) be an optimal solution to (18). Let us round up the components of \(\pmb {u}^*\) to the nearest values in \({\mathcal {E}}\). As the result we get a feasible solution with the cost at most \((1+\epsilon )\) greater than the optimum. Furthermore the cost of this solution is not greater than the cost of \((\hat{\pmb {x}},\hat{\pmb {y}}, \hat{\pmb {u}})\), because the rounded vector \(\pmb {u}^*\) has been enumerated. By the assumption that K is constant and (18) can be solved in polynomial time, we get an FPTAS for (8) under \({\mathcal {U}}^{\mathcal {H\!P}}_1\). \(\square \)

We will show how to solve (17) for particular problems in Sects 67 and 8 .

5.2.2 Ellipsoidal uncertainty

In this section we will focus on constructing approximate solutions to (11), which is a compact formulation of (8) under ellipsoidal uncertainty \({\mathcal {U}}^{{\mathcal {E}}}\). As (11) is a 0-1 quadratic problem, it can be hard to solve. Consider the following linearization of (11):

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+||\pmb {A}^T\pmb {y}||_{1}\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}\ge \pmb {0} \end{array} \end{aligned}$$
(19)

which can be represented as the following linear MIP problem:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+ \displaystyle \sum _{i\in [n]} z_i\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} z_i\ge \pmb {A}_i^T\pmb {y} &{} i\in [n] \\ &{} z_i\ge -\pmb {A}_i^T\pmb {y} &{} i\in [n]\\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}\ge \pmb {0} \end{array} \end{aligned}$$
(20)

where \(\pmb {A}_i\) is the ith column of \(\pmb {A}\).

Theorem 10

Let \((\hat{\pmb {x}},\hat{\pmb {y}})\) be an optimal solution to (20) and \((\pmb {x}^*,\pmb {y}^*)\) be an optimal solution to (11). Then \(\textsc {Eval}(\hat{\pmb {x}})\le \sqrt{n}\cdot \textsc {Eval}(\pmb {x}^*)\)

Proof

We use the following well known inequalities:

$$\begin{aligned} \frac{1}{\sqrt{n}}\cdot ||\pmb {A}^T\pmb {y}||_{1}\le ||\pmb {A}^T\pmb {y}||_{2} \le ||\pmb {A}^T\pmb {y}||_{1} \end{aligned}$$

Using them, we get

$$\begin{aligned}&\pmb {c}^T\hat{\pmb {x}}+\underline{\pmb {c}}^T\hat{\pmb {y}}+||\pmb {A}^T\hat{\pmb {y}}||_{2}\le \pmb {c}^T\hat{\pmb {x}}+\underline{\pmb {c}}^T\hat{\pmb {y}}+||\pmb {A}^T\hat{\pmb {y}}||_{1} \le \pmb {c}^T\pmb {x}^*+\underline{\pmb {c}}^T\pmb {y}^*+||\pmb {A}^T\pmb {y}^*||_{1}\\&\quad \le \pmb {c}^T\pmb {x}^*+\underline{\pmb {c}}^T\pmb {y}^*+\sqrt{n}\cdot ||\pmb {A}^T\pmb {y}^*||_{2} \le \sqrt{n}\cdot (\pmb {c}^T\pmb {x}^*+\underline{\pmb {c}}^T\pmb {y}^*+||\pmb {A}^T\pmb {y}^*||_{2}), \end{aligned}$$

and the theorem follows. \(\square \)

Problem (20) is a linear MIP, so it can be easier to solve than (11). Unfortunately, it is still NP-hard even if the underlying deterministic problem is polynomially solvable.

Observation 4

Problem (20) is NP-hard when \({\mathcal {X}}_{\pmb {1}}=\{\pmb {x}\in \{0,1\}^n: x_1+\dots +x_n=n\}\).

Proof

It follows directly from the proof of Theorem 3. It is easy to see that \(||\pmb {A}^T\pmb {y}||_{2}=||\pmb {A}^T\pmb {y}||_{1}\) for the matrix \(\pmb {A}\) constructed in the proof. \(\square \)

Theorem 11

If all the entries of \(\pmb {A}\) are nonnegative and \({\mathcal {P}}\) is polynomially solvable, then (11) is approximable within \(\sqrt{n}\).

Proof

If all the entries of \(\pmb {A}=[a_{ij}]\) are nonnegative, then  (19) can be rewritten as follows:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\displaystyle \sum _{i\in [n]} \pmb {A}^T_i\pmb {y}\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}\ge \pmb {0} \end{array} \end{aligned}$$
(21)

which is equivalent to

$$\begin{aligned} \begin{array}{lllll} \min &{} \displaystyle \sum _{i\in [n]} (c_i x_i + {\hat{c}}_i y_i)\\ \text {s.t.} &{} \pmb {H}(\pmb {y}+\pmb {x})\ge \pmb {g} \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} \pmb {x}\in \{0,1\}^n \\ &{} \pmb {y}\ge \pmb {0} \end{array} \end{aligned}$$
(22)

where \({\hat{c}}_i=\underline{c}_i+\sum _{j\in [n]} a_{ji}\), \(i\in [n]\). Problem (22) is a two-stage problem with one second stage scenario \(\hat{\pmb {c}}\) and it is polynomially solvable according to Observation 1, if problem \({\mathcal {P}}\) is solvable in polynomial time. Notice that relaxing \(\pmb {y}\in \{0,1\}^n\) with \(\pmb {y}\ge \pmb {0}\) does not change an optimal solution to (22), due to the integrality assumption. Now Theorem 10 implies the result. \(\square \)

6 Robust two-stage selection problem

In this section we investigate in more detail the robust two-stage version of the Selection problem. In Sect. 3 we have proved that this problem is NP-hard. Let us also recall that RTSt Selection is polynomially solvable under \({\mathcal {U}}^{\mathcal {H\!P}}_0\) (Chassein et al. 2018). We will show that the problem is approximable within 2 for a wide class of uncertainty sets. In the following we will make the following assumption:

Assumption 1

The problem of computing \(\arg \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \tilde{\pmb {c}}^T\pmb {y}\), for any fixed \(\pmb {y}\in [0,1]^n\), can be solved in polynomial time.

Assumption 1 is satisfied for all convex uncertainty sets considered in this paper. We prove the following result:

Theorem 12

If Assumption 1 is satisfied, then RTSt Selection with convex uncertainty is approximable within 2.

Proof

Using the results from Sect. 4 (see (8)), the RTSt Selection problem can be represented as the following program:

$$\begin{aligned} \min \,\,&\pmb {c}^T\pmb {x} + t \end{aligned}$$
(23)
$$\begin{aligned} \text {s.t. }&t\ge \tilde{\pmb {c}}^T\pmb {y}&\tilde{\pmb {c}}\in {\mathcal {U}} \end{aligned}$$
(24)
$$\begin{aligned}&\sum _{i\in [n]} (x_i + y_i) = p \end{aligned}$$
(25)
$$\begin{aligned}&\pmb {x} + \pmb {y} \le \pmb {1} \end{aligned}$$
(26)
$$\begin{aligned}&\pmb {x} \in \{0,1\}^n \end{aligned}$$
(27)
$$\begin{aligned}&\pmb {y}\ge \pmb {0} \end{aligned}$$
(28)

Consider the following linear programming relaxation of (23)-(28):

$$\begin{aligned} \min \,\,&\pmb {c}^T\pmb {x} + t \end{aligned}$$
(29)
$$\begin{aligned} \text {s.t. }&t\ge \tilde{\pmb {c}}^T\pmb {y}&\tilde{\pmb {c}}\in {\mathcal {U}} \end{aligned}$$
(30)
$$\begin{aligned}&\sum _{i\in [n]} (x_i + y_i) = p \end{aligned}$$
(31)
$$\begin{aligned}&\pmb {x} + \pmb {y} \le \pmb {1} \end{aligned}$$
(32)
$$\begin{aligned}&\pmb {x} \in [0,1]^n \end{aligned}$$
(33)
$$\begin{aligned}&\pmb {y}\ge \pmb {0} \end{aligned}$$
(34)

The set of feasible solutions to the relaxation is convex. Hence, one can solve (29)-(34) in polynomial time by the ellipsoid algorithm, after providing a separation oracle for this set (see, e.g., Grötschel et al. (1993)). We have to check if \((\pmb {x},\pmb {y},t)\in {\mathbb {R}}^{2n+1}\) satisfies (30)-(34) and, if not, a violating constraint must be indicated. This is trivial for the constraints (31)-(34). For the infinite family of constraints (30) Assumption 1 can be used. Namely, we find in polynomial time \(\pmb {c}^*=\arg \max _{\tilde{\pmb {c}}\in {\mathcal {U}}} \tilde{\pmb {c}}^T\pmb {y}\). If \(t<\pmb {c}^{*T}\pmb {y}\), then a violating constraint is identified. Otherwise, all constraints (30) are satisfied.

Assume w.l.o.g that \(c_1\le c_2\le \dots \le c_n\). Let \((\pmb {x}^*, \pmb {y}^*,t^*)\) be an optimal solution to the relaxation (29)-(34). We first note that given \(\pmb {y}^*\), the optimal values of \(\pmb {x}^*\) can be obtained in the following greedy way. Set \(p^*:=p-\sum _{i\in [n]} y^*_i\). For \(i=1,\dots ,n\), assign \(x^*_i:=\min \{p^*, 1-y^*_i\}\) and update \(p^*:=p^*-x^*_i\). Let \(\ell \in [n]\) be such that \(x^*_i>0\) for every \(i\le \ell \) and \(x^*_i=0\) for every \(i>\ell \). It is easily seen that \(x^*_i+y^*_i=1\) for all \(i\in [\ell -1]\). Therefore, the quantity \(p-\sum _{i\in [\ell -1]} (x^*_i+y^*_i)\) must be integral. By the construction, we get

$$\begin{aligned} \sum _{i\in [n]} (x^*_i+y^*_i)= p. \end{aligned}$$

Notice also that \(0<x^*_{\ell }+y^*_{\ell }<1\) may happen.

We now construct a solution \((\hat{\pmb {x}},\hat{\pmb {y}},{\hat{t}})\) that is feasible to (23)-(28). Fix \({\hat{t}}=2t^*\). For each \(i\in [n]\) we set \({\hat{x}}_i = 1\) if \(x^*_i \ge 1/2\), and \({\hat{x}}_i = 0\) otherwise. We further set \({\hat{y}}_i = 1-{\hat{x}}_i\) for \(i=1,\ldots ,\ell -1\), \({\hat{y}}_\ell = 0\) if \({\hat{x}}_\ell = 1\), and \({\hat{y}}_\ell = \min \{2y^*_\ell ,1\}\) otherwise. For all \(i>\ell \), we set \({\hat{y}}_i = \min \{2y^*_i,1\}\). It holds that

$$\begin{aligned} \sum _{i\in [n]} ({\hat{x}}_i + {\hat{y}}_i) = \ell -1 + {\hat{x}}_\ell + {\hat{y}}_\ell + \sum _{i>\ell } \min \{2y^*_i,1\}. \end{aligned}$$

If \({\hat{x}}_\ell = 1\), then \(\sum _{i\in [n]} ({\hat{x}}_i + {\hat{y}}_i) \ge \sum _{i\in [n]} (x^*_i+y^*_i)=p\). Otherwise, we have \(\sum _{i\in [n]} ({\hat{x}}_i + {\hat{y}}_i) = l-1 + \sum _{i\ge \ell } \min \{2y^*_i,1\}\). To show that this is at least \(p=\ell -1+x^*_\ell +y^*_\ell +\sum _{i>\ell }y^*_i\), we need to show that \(\sum _{i\ge \ell } \min \{y^*_i,1/2\} \ge x^*_\ell \). This is true since \(x^*_\ell < 1/2\) in this case, and \(\sum _{i\ge \ell } y^*_i + x^*_\ell \) is an integer that is at least 1. By the construction \(\hat{\pmb {y}}\le 2 \pmb {y}^*\). Hence, \(\tilde{\pmb {c}}^T\hat{\pmb {y}}\le 2\tilde{\pmb {c}}^T\hat{\pmb {y}^*}\le 2t^*={\hat{t}}\) for each \(\tilde{\pmb {c}}\in {\mathcal {U}}\), so the constraints (24) are satisfied. Notice that \(\sum _{i\in [n]} ({\hat{x}}_i + {\hat{y}}_i)\) can be greater than p. However, it is easy to reduce this sum to p without increasing the objective value and violating (24), by decreasing the values of \( {\hat{x}}_i\) and \({\hat{y}}_i\), \(i\in [n]\). Because \(\hat{\pmb {x}} \le 2 \pmb {x}^*\), we get \(\pmb {c}^T\hat{\pmb {x}} \le 2 \pmb {c}^T\pmb {x}^*\), which together with \({\hat{t}}=2t^*\) completes the proof. \(\square \)

Theorem 13

The approximation guarantee of the rounding algorithm presented in the proof of Theorem 12 is tight, even if \(p=n\) and \({\mathcal {U}}={\mathcal {U}}^{\mathcal {H\!P}}\) has a single constraint.

Proof

Consider the following problem instance with \(p=n=2\), \(\pmb {c}=\begin{bmatrix}10\\ \gamma \end{bmatrix}\),

$$\begin{aligned} {\mathcal {U}}=\left\{ \begin{bmatrix}0\\ \epsilon \end{bmatrix} + \begin{bmatrix}\delta _1\\ \delta _2\end{bmatrix} : \delta _1 + \left( \frac{1}{2}+\mu \right) \delta _2 \le 1 \right\} \end{aligned}$$

with \(\mu >0\) and \(\gamma> \epsilon > 0\) being small values. An optimal solution to this problem is to set \(y_1=x_2=1\), with objective function value of \(1+\gamma \). An optimal solution to the relaxation is \(y_1 = 1\), \(x_2=\frac{1}{2}-\mu \) and \(y_2=\frac{1}{2}+\mu \). Applying the algorithm from the proof of Theorem 12, we round \(x_2\) to 0 and \(y_2\) to 1. The objective value of this solution is \(2(\frac{1}{1+2\mu })+\epsilon \). As \(\mu ,\gamma ,\epsilon \) approach 0, the ratio of optimal objective value and objective value of the approximate solution approaches 2. \(\square \)

Let us now investigate the problem with uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}\). The compact MIP formulation (9) for this case takes the following form:

$$\begin{aligned} \min \,\,&\pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}+\pmb {u}^T\pmb {b} \end{aligned}$$
(35)
$$\begin{aligned} \text {s.t.}&\displaystyle \sum _{i\in [n]} (x_i+y_i) = p \end{aligned}$$
(36)
$$\begin{aligned}&\pmb {x}+\pmb {y}\le \pmb {1} \end{aligned}$$
(37)
$$\begin{aligned}&\pmb {u}^T\pmb {A}\ge \pmb {y}^T \end{aligned}$$
(38)
$$\begin{aligned}&\pmb {x}\in \{0,1\}^n \end{aligned}$$
(39)
$$\begin{aligned}&\pmb {y}, \pmb {u}\ge \pmb {0} \end{aligned}$$
(40)

Theorem 14

The integrality gap of problem (35)-(40) is at least 4/3.

Proof

Consider the problem with \(n=p=2\), \(\pmb {c}=\begin{bmatrix}10\\ 1 \end{bmatrix}\),

$$\begin{aligned} {\mathcal {U}}=\left\{ \pmb {0} + \pmb {\delta } : \delta _1 + \frac{1}{2}\delta _2 \le 1 \right\} \end{aligned}$$

The corresponding problem formulation is

$$\begin{aligned} \min&10x_1 + x_2 + u \\ \text {s.t. }&x_1 + y_1 + x_2 + y_2 = 2 \\&x_1 + y_1 \le 1 \\&x_2 + y_2 \le 1 \\&u \ge y_1 \\&\frac{1}{2}u \ge y_2 \\&x_1,x_2 \in \{0,1\} \\&y_1,y_2 \in [0,1] \\&u \ge 0 \end{aligned}$$

An optimal solution to this problem is \(y_1=x_2=1\) with objective value 2, while an optimal solution to the LP relaxation is \(y_1=u=1\) and \(x_2=y_2=1/2\) with costs 3/2. \(\square \)

Notice that there is still a gap between the 2-approximation algorithm and the integrality gap 4/3 of the LP relaxation of (35)-(40). Closing this gap is an interesting open problem. We now show a positive approximation result a the uncertainty set \({\mathcal {U}}^{\mathcal {H\!P}}_1\) being a special case of \({\mathcal {U}}^{\mathcal {H\!P}}\).

Theorem 15

If the number of budget constraints in \({\mathcal {U}}^{\mathcal {H\!P}}_1\) is constant, then RTSt Selection with \({\mathcal {U}}^{\mathcal {H\!P}}_1\) admits an FPTAS.

Proof

Using Theorem 9 it is enough to show that the following problem is polynomially solvable:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}\\ \text {s.t.} &{}\displaystyle \sum _{i\in [n]} (x_i+y_i) = p \\ &{} \pmb {x}+\pmb {y}\le \pmb {1} \\ &{} 0\le y_i\le d_i &{} i\in [n] \\ &{} \pmb {x}\in \{0,1\}^n \end{array} \end{aligned}$$
(41)

where \(d_i\in {\mathcal {E}}=\{0,\epsilon , 2\epsilon ,\dots ,1\}\), \(i\in [n]\). We will show first the following property of (41): \(\square \)

Property 1

There is an optimal solution to (41) in which \(y_i\in {\mathcal {E}}\) for each \(i\in [n]\).

Proof

Let \((\pmb {x},\pmb {y})\) be an optimal solution to (41). Since \(\sum _{i\in [n]} (x_i+y_i) = p\), the quantity \(\sum _{i\in [n]} y_i=p-\sum _{i\in [n]} x_i\) must be integral. Let us sort the variables so that \(\underline{c}_1\le \underline{c}_2\le \dots \le \underline{c}_n\). Let \(\ell \) be the first index such that \(y_\ell \notin {\mathcal {E}}\). Notice that \(0<y_\ell <d_\ell \). We get \(\sum _{i\in [\ell -1]} y_i= k\epsilon \) for some integer \(k\ge 0\). Hence \(k\epsilon +y_\ell \) cannot be integral and \(\sum _{j>\ell } y_j>0\). Set \(y_\ell =\min \{\sum _{j>\ell } y_j,d_\ell \}\) and decrease the values of appropriate number of \(y_j\), \(j>\ell \), so that still \(\sum _{i\in [n]} (x_i+y_i)=p\) holds. If \(y_\ell =d_\ell \), then we are done as \(d_\ell \in {\mathcal {E}}\). If \(y_\ell =\sum _{j>\ell } y_j\le 1\), then \(k\epsilon +y_\ell =p\) and thus \(y_\ell \in {\mathcal {E}}\). Observe that this transformation does not destroy the feasibility of the solution. Furthermore, it also does not increase the solution cost. After applying it a finite number of times we get an optimal solution satisfying the property. \(\square \)

Property 1 allows us to solve (41) by applying a dynamic programming approach. Indeed, using the fact that \(x_i\in \{0,1\}\) and \(y_i\in {\mathcal {E}}\) for every \(i\in [n]\), in each stage \(i\in [n]\), we have to fix the pair \((x_i, y_i)\), where the feasible assignments are \((0,\epsilon ), (0,2\epsilon ),\dots , (0,d_i),(1,0)\). A fragment of the computations is shown in Fig. 3. For each arc we can compute a cost \(c_ix_i+\underline{c}_iy_i\). Notice that sometimes there may exist two feasible pairs between two states (see the transition (s, 1) in Fig. 3). In this case, we choose the assignment with smaller cost.

The running time of the dynamic algorithm is \(O(np^2\frac{1}{\epsilon ^2})\), so it is polynomial when \(\epsilon >0\) is fixed. By Theorem 9, the overall running time of the FPTAS is \(O(np^2(1/\epsilon )^{K+2})\).

Fig. 3
figure 3

Illustration of the dynamic algorithm

7 Robust two-stage RS problem

In this section we investigate in more detail the robust two-stage version of the RS problem. In Sect. 3 we proved that this problem is NP-hard. First observe that for each set \(T_l\), \(l\in [\ell ]\), we have to decide whether to choose a tool in the first or in the second stage. In the former case we always choose the cheapest tool. Hence the problem can be simplified and the MIP formulation (8) takes the following form

$$\begin{aligned} \min \,\,&{\hat{\pmb {c}}}^T\pmb {x} + t \end{aligned}$$
(42)
$$\begin{aligned} \text {s.t. }&t\ge \tilde{\pmb {c}}^T\pmb {y}&\tilde{\pmb {c}}\in {\mathcal {U}} \end{aligned}$$
(43)
$$\begin{aligned}&\displaystyle x_l+\sum _{j\in T_l} y_j = 1&l\in [\ell ] \end{aligned}$$
(44)
$$\begin{aligned}&\pmb {x} \in \{0,1\}^\ell \end{aligned}$$
(45)
$$\begin{aligned}&\pmb {y}\ge \pmb {0} \end{aligned}$$
(46)

In the above formulations \(\pmb {x}\) is a vector of \(\ell \) binary variables corresponding to the tool sets \(T_1,\dots , T_{\ell }\), and \({\hat{\pmb {c}}}=[{\hat{c}}_1,\ldots , {\hat{c}}_{\ell }]^T\), where \({\hat{c}}_l\), \(l\in [\ell ]\), is the smallest first stage cost of the tools in \(T_l\), i.e. \({\hat{c}}_l=\min _{j\in T_l}\{c_j\}\). Note also that there are no constraints \(x_l+y_j\le 1\), \(l\in [\ell ]\), \(j\in T_l\), as they are implied by (44). The resulting problem can be 2-approximated by a simple rounding algorithm (Shmoys and Swamy 2006). For the sake of completeness, the proof is presented here.

Theorem 16

If Assumption 1 is satisfied, then RTSt RS with convex uncertainty is approximable within 2.

Proof

Using the same argument as in the proof of Theorem 12 we can solve the relaxation of (42)-(46) in polynomial time. Consider an optimal solution \((\pmb {x}^*, \pmb {y}^*,t^*)\) to the relaxation. We form a corresponding rounded solution \((\hat{\pmb {x}}, \hat{\pmb {y}},{\hat{t}})\) as follows. We fix \({\hat{t}}=2t^*\). For each \(l\in [\ell ]\), if \(x^*_l\ge 0.5\), then we fix \({\hat{x}}_l=1\) and \({\hat{y}}_j=0\) for each \(j\in T_l\); if \(\sum _{j\in T_l} y^*_j\ge 0.5\), then we set \({\hat{x}}_l=0\) and \({\hat{y}}_j=y^*_j/\sum _{k\in T_l} y^*_k\) for each \(j\in T_l\). Obviously in this case \(\sum _{j\in T_l} {\hat{y}}_j=1\) and \({\hat{y}}_j\le 2y^*_j\) for each \(j\in T_l\). Hence \(\tilde{\pmb {c}}^T\hat{\pmb {y}}\le 2t^*={\hat{t}}\) for all \(\tilde{\pmb {c}}\in {\mathcal {U}}\). Thus the rounded solution is feasible in (42)-(46)and its cost is at most 2 times the optimum. \(\square \)

Using the same instance as in the proof of Theorem 13, one can show that the worst case ratio of the approximation algorithm is attained.

Theorem 17

If the number of budget constraints in \({\mathcal {U}}^{\mathcal {H\!P}}_1\) is constant, then RTSt RS with \({\mathcal {U}}^{\mathcal {H\!P}}_1\) admits an FPTAS

Proof

According to Theorem 9, it is enough to show that the following problem is polynomially solvable:

$$\begin{aligned} \begin{array}{lllll} \min &{} {\hat{\pmb {c}}}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}\\ \text {s.t.} &{} x_l+ \displaystyle \sum _{j\in T_l} y_j = 1 &{} l\in [\ell ] \\ &{} 0\le y_j\le d_j &{} j\in [n] \\ &{} \pmb {x}\in \{0,1\}^{\ell } \end{array} \end{aligned}$$
(47)

where \(d_j\in {\mathcal {E}}=\{0,\epsilon ,2\epsilon ,\dots ,1\}\), \(j\in [n]\). We first renumber the variables in each set \(T_l\), \(l\in [\ell ]\), so that they are ordered with respect to nondecreasing values of \(\underline{c}_j\). For each tool set \(T_l\), we greedily allocate the largest possible values to \(y_j\), \(j\in T_l\), so that the total amount allocated does not exceed 1. If \(\sum _{j\in T_l} y_j<1\) or \({\hat{c}}_l\le \sum _{j\in T_l} \underline{c}_jy_j\), then we fix \(x_l=1\) and set \(y_j=0\) for \(j\in T_l\); otherwise we fix \(x_i=0\) and keep the allocated values for \(y_j\), \(j\in T_l\). Using the fact that the variables were initially sorted, the optimal solution can be found in O(n) time. Using Theorem 9, we can construct an FPTAS for the problem with running time \(O(n\log n+n(1/\epsilon )^K)\). \(\square \)

Theorem 18

The RTSt RS problem under \({\mathcal {U}}^{\mathcal {H\!P}}_0\) can be solved in \(O(n^2\log n)\) time.

Proof

The MIP formulation for the problem under \({\mathcal {U}}^{\mathcal {H\!P}}_0\) takes the following form (see (9)):

$$\begin{aligned} \begin{array}{llllll} \min \ &{} {\hat{\pmb {c}}}^T\pmb {x}+ \underline{\pmb {c}}^T\pmb {y}+ \Gamma \pi + \displaystyle \sum _{j\in [n]} \rho _j d_j \\ \text {s.t.} &{} x_l + \displaystyle \sum _{j\in T_l} y_j = 1 &{} l\in [\ell ] \\ &{} \pi + \rho _j \ge y_j &{} j\in [n] \\ &{} x_l\in \{0,1\} &{} l\in [\ell ] \\ &{} y_j \in [0,1] &{} j\in [n] \\ &{}\pi , \pmb {\rho } \ge 0 \end{array} \end{aligned}$$

which can be represented, equivalently, as follows

$$\begin{aligned} \begin{array}{llllll} \min \ &{} {\hat{\pmb {c}}}^T\pmb {x}+ \underline{\pmb {c}}^T\pmb {y}+ \Gamma \pi + \displaystyle \sum _{j\in [n]} d_j \max \{0,y_j-\pi \} \\ \text {s.t.} &{} x_l + \displaystyle \sum _{j\in T_l} y_j = 1 &{} l\in [\ell ] \\ &{} x_l\in \{0,1\} &{} l\in [\ell ] \\ &{} y_j \in [0,1] &{} j\in [n] \\ &{}\pi \in [0,1] \end{array} \end{aligned}$$
(48)

Substituting \(u_j+v_j\) into \(y_j\) yields

$$\begin{aligned} \begin{array}{llllll} \min &{} {\hat{\pmb {c}}}^T\pmb {x}+ \underline{\pmb {c}}^T\pmb {u} + \Gamma \pi + \displaystyle \sum _{j\in [n]} (\underline{c}_j + d_j) v_j \\ \text {s.t.} &{} x_l + \displaystyle \sum _{j\in T_l} (u_j+ v_j) = 1 &{}l\in [\ell ] \\ &{} x_l\in \{0,1\} &{} l\in [\ell ] \\ &{} u_j \in [0,\pi ] &{} j\in [n] \\ &{} v_j \in [0,1-\pi ] &{} j\in [n] \\ &{}\pi \in [0,1] \end{array} \end{aligned}$$
(49)

We now show the following claim: \(\square \)

Claim 1

There is an optimal solution to (49) in which \(\pi =0\) or \(\pi =\frac{1}{p}\), \(p\in [n]\).

Let an optimal \(\pmb {x}\) in (49) be fixed and define \(S=\{l\in [\ell ]: x_l = 0\}\). Define \(n' = \sum _{l\in S} |T_l|\) and \(m'=|S|\). The optimal values of \(\pmb {u}\), \(\pmb {v}\) and \(\pi \) to (49) can then be computed by solving the following LP problem:

$$\begin{aligned} \begin{array}{lllll} \min &{} \displaystyle \sum _{l\in S} \sum _{j\in T_l} \underline{c}_j u_j + \Gamma \pi + \sum _{l\in S}\sum _{j\in T_l} (\underline{c}_j+d_j)v_j \\ \text {s.t.} &{} \displaystyle \sum _{j\in T_l} (u_j + v_j)= 1 &{} l\in S \\ &{} u_j + w_j = \pi &{} j \in T_l, l\in S \\ &{} v_j + t_j = 1 - \pi &{} j \in T_l, l\in S \\ &{} \pmb {u},\pmb {v},\pmb {w},\pmb {t} \in {\mathbb {R}}^{n'}_+ \\ &{} \pi \in [0,1] \end{array} \end{aligned}$$
(50)

This problem has \(4n'+1\) variables, and \(2n'+m'\) constraints. In an optimal basis solution, equivalently optimal vertex solution, \((\pmb {u},\pmb {v},\pmb {w},\pmb {t},\pi )\in {\mathbb {R}}^{4n'+1}_+\), we therefore have \(2n'+m'\) basis and \(2n'+1-m'\) non-basis variables. We start with the following observation, which is due to the definitions of \(u_j\) and \(v_j\) in (49) and the optimality of \((\pmb {u},\pmb {v},\pmb {w},\pmb {t},\pi )\).

Observation 5

If \(v_j>0\) then \(u_j=\pi \) (if \(u_j<\pi \) then \(v_j=0\)), \(j \in T_l\), \(l\in S\).

Suppose that \(\pi \in (0,1)\). Thus \(\pi \) is a basis variable. Then each constraint of the types \(u_j + w_j = \pi \) and \(v_j + t_j = 1-\pi \) must contain at least one basis variable apart from \(\pi \). There are \(m'-1\) of these constraints that have two basis variables apart from \(\pi \). Hence at most \(m'-1\) variables among \(\pmb {u}, \pmb {v}\) have the values different than \(\pi \), \(1-\pi \), respectively. Accordingly, there is at least one constraint \(l\in S\), such that \(\sum _{j\in T_{l}}(u_j + v_j) = 1\), where \(u_j \in \{0,\pi \}\) and \(v_j \in \{0,1-\pi \}\) for every \(j\in T_{l}\). Let us denote by \(S'\) the set of such constraints, \(\emptyset \not =S'\subseteq S\). The value of \(\sum _{j\in T_{l}}(u_j+ v_j)\) for each \(l\in S'\) can be expressed by \(p_l\pi +q_l(1-\pi )\), where \(p_l\) and \(q_l\) are the numbers of variables \(u_j=\pi \) and \(v_j=1-\pi \), respectively, in the constraint l. Thus

$$\begin{aligned} \sum _{j\in T_{l}}(u_j + v_j)=p_l\pi +q_l(1-\pi )=1, \; l\in S'. \end{aligned}$$
(51)

By Observation 5, the form of (51) and the fact that \(\pi \in (0,1)\) one can easily deduce that \(p_l\ge 1\) and \(0\le q_l\le 1\), and \(q_l=1\) iff \(p_l=1\); if \(p_l\ge 2\) then \(q_l=0\).

Furthermore we claim, for the case \(\pi \in (0,1)\), that there always exists at least one constraint \(l'\in S'\), such that \(\sum _{j\in T_{l'}}(u_j + v_j)=p_{l'}\pi =1\), i.e. \(q_{l'}=0\), where \(p_{l'}\ge 2\). On the contrary, suppose that for each \(l\in S'\), the constraint l has the form of \(\sum _{j\in T_{l}}(u_j + v_j)=p_l\pi +q_l(1-\pi )=1\), where \(p_l=1\) and \(q_l=1\). We need to consider two cases. The first case \(S'=S\). Thus \(u_j \in \{0,\pi \}\) and \(v_j \in \{0,1-\pi \}\) for every \(j \in T_l\), \(l\in S\), and \(u_j=\pi \) iff \(v_j=1-\pi \). Let us construct a vector \(\pmb {0}\not =(\pmb {u}^{\epsilon },\pmb {v}^{\epsilon },\pmb {w}^{\epsilon },\pmb {t}^{\epsilon },\pi ^{\epsilon })\in {\mathbb {R}}^{4n'+1}\) as follows: for every \(j \in T_l\), \(l\in S\), set \(u^{\epsilon }_j=\epsilon \) and \(w^{\epsilon }_j=0\) if \(u_j=\pi \); \(v^{\epsilon }_j=-\epsilon \) and \(t^{\epsilon }_j=0\) if \(v_j=1-\pi \); \(u^{\epsilon }_j=0\) and \(w^{\epsilon }_j=\epsilon \) if \(u_j=0\); \(v^{\epsilon }_j=0\) and \(t^{\epsilon }_j=-\epsilon \) if \(v_j=0\); and \(\pi ^{\epsilon }=\epsilon \). It is easily seen that \((\pmb {u}-\pmb {u}^{\epsilon },\pmb {u}-\pmb {u}^{\epsilon },\pmb {w}-\pmb {w}^{\epsilon }, \pmb {t}-\pmb {t}^{\epsilon },\pi -\pi ^{\epsilon })\) and \((\pmb {u}+\pmb {u}^{\epsilon },\pmb {u}+\pmb {u}^{\epsilon },\pmb {w}+\pmb {w}^{\epsilon }, \pmb {t}+\pmb {t}^{\epsilon },\pi +\pi ^{\epsilon })\) are feasible solutions to (50) for sufficiently small \(\epsilon >0\). Such \(\epsilon \) exists since \(\pi \in (0,1)\). This contradicts our assumption that \((\pmb {u},\pmb {v},\pmb {w},\pmb {t},\pi )\) is a vertex solution (basis feasible solution). The proof for the second case \(S'\subset S\) may be handled in much the same way. It suffices to notice that for each constraint l, \(\sum _{j\in T_{l}}(u_j + v_j)=1\), \(l\in S\setminus S'\), there exits at least one \(j'\in T_{l}\) such that \(0<u_{j'}<\pi \) or \(0<v_{j'}<1-\pi \). Using this fact one can build \(\pmb {0}\not =(\pmb {u}^{\epsilon },\pmb {v}^{\epsilon },\pmb {w}^{\epsilon },\pmb {t}^{\epsilon },\pi ^{\epsilon })\in {\mathbb {R}}^{4n'+1}\) to arrive to a contradiction with the assumption that \((\pmb {u},\pmb {v},\pmb {w},\pmb {t},\pi )\) is a vertex solution. We thus have proved that there always exists at least one constraint \(l'\in S'\), such that \(\sum _{j\in T_{l'}}(u_j + v_j)=p_{l'}\pi =1\), where \(p_{l'}\ge 2\). Hence \(\pi =\frac{1}{p_{l'}}\) for \(\pi \in (0,1)\). After adding the boundary values of \(\pi \), i.e. 0 and 1, Claim 1 follows.

Problem (49) can be rewritten as follows:

$$\begin{aligned} \begin{array}{lllllll} \min &{} {\hat{\pmb {c}}}^T\pmb {x}+ \pi \underline{\pmb {c}}^T\hat{\pmb {u}} + \Gamma \pi + \displaystyle \sum _{j\in [n]} (\underline{c}_j + d_j)(1-\pi ) {\hat{v}}_i \\ \text {s.t.} &{} x_l + \sum _{j\in T_l} (\pi {\hat{u}}_j + (1-\pi ) {\hat{v}}_j )= 1 &{} l\in [\ell ] \\ &{} x_l\in \{0,1\} &{} l\in [\ell ] \\ &{} {\hat{u}}_j\in [0,1] &{} j\in [n] \\ &{} {\hat{v}}_j \in [0,1] &{} j\in [n] \\ &{}\pi \in [0,1] \end{array} \end{aligned}$$
(52)

where the original variables \(y_j\), \(j\in [n]\), in (48) are restored as follows: \(y_j=\pi {\hat{u}}_j + (1-\pi ) {\hat{v}}_j\). Using Claim 1, let us fix a candidate value for \(\pi \). We can now sort with respect to nondecreasing values of the costs \(\underline{c}_j\) and \(\underline{c}_j+d_j\) of \( {\hat{u}}_j\) and \( {\hat{v}}_j\) within each set \(T_l\), and either set \(x_l=1\) or pack from \(\hat{\pmb {u}}\) and \(\hat{\pmb {v}}\) in nondecreasing order until \(\sum _{j\in T_l} \pi {\hat{u}}_j + (1-\pi ){\hat{v}}_j\) reaches 1. As there are O(n) values for \(\pi \) to check, the overall time required by this method is thus \(O(n^2\log n)\) Fig. 4.

8 Robust two-stage shortest path problem

In Sect. 3 we have shown that RTSt Shortest Path problem is strongly NP-hard even in a very restrictive case, when the cardinality of the set of feasible solutions is 1. We now show that the hardness result can be strengthened.

Theorem 19

The RTSt Shortest Path problem under \({\mathcal {U}}^{\mathcal {V\!P}}=\mathrm{conv}\{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}\) is hard to approximate within \(\log ^{1-\epsilon }K\) for any \(\epsilon >0\) unless \(\mathrm{NP}\subseteq \mathrm{DTIME}(n^{\mathrm{polylog}\;n})\), even for series-parallel graphs.

Proof

Consider the following Min-Max Shortest Path problem. We are given a series-parallel graph \(G=(V,A)\), with scenario set \({\mathcal {U}}=\{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}{\subseteq {\mathbb {R}}^{|A|}_+}\), where scenario \(\tilde{\pmb {c}}_j\) is a realization of the arc costs. We seek an \(s-t\) path P in G whose maximum cost over \({\mathcal {U}}\) is minimum. This problem is hard to approximate within \(\log ^{1-\epsilon }K\) for any \(\epsilon >0\) unless \(\mathrm{NP}\subseteq \mathrm{DTIME}(n^{\mathrm{polylog}\;n})\) (Kasperski and Zieliński 2009). We construct a cost preserving reduction from Min-Max Shortest Path to RTSt Shortest Path with \({\mathcal {U}}^{\mathcal {V\!P}}\). Let us define network \(G'=(V',A')\) by splitting each arc \((v_i,v_j)\in A\) into two arcs, namely \((v_i, v_{ij})\) (dashed arc) and \((v_{ij}, v_j)\) (solid arc). Let \(M=|A| c_{\max }+1\), where \(c_{\max }\) is the maximal arc cost which appears in \({\mathcal {U}}\). The first stage costs of all dashed arcs \((v_i, v_{ij})\) are 0 and the first stage costs of all solid arcs \((v_{ij}, v_j)\) are M. For each scenario \(\tilde{\pmb {c}}_k\in {\mathcal {U}}\) we form scenario \(\tilde{\pmb {c}}_k'\) under which the costs of dashed arcs \((v_i, v_{ij})\) are M and the costs of solid arcs \((v_{ij},v_j)\) are equal to the costs of \((v_i, v_j)\) under \(\tilde{\pmb {c}}_k\). Finally, we set \({\mathcal {U}}^{\mathcal {V\!P}}=\mathrm{conv}\{\tilde{\pmb {c}}_1',\dots ,\tilde{\pmb {c}}_K'\}\). Note that \(G'\) is series-parallel as well.

Observe that only dashed arcs can be selected in the first stage for any partial solution \(\pmb {x}\) with \(\textsc {Eval}(\pmb {x}) < M\), and only solid arcs can be selected in the second stage. Furthermore if a dashed arc \((v_i, v_{ij})\) is selected in the first stage, then, in order to ensure that a solution built is an \(s-t\) path in \(G'\), the solid arc \((v_{ij}, v_j)\) must be selected in the second stage. So, the choice of the arcs in the first stage uniquely gives the set of arcs chosen in the second stage. Let \(\pmb {x}\) and \(\pmb {y}\in {\mathcal {R}}(\pmb {x})\) be such a solution to the RTSt problem with total costs less than M. The pair \((\pmb {x},\pmb {y})\) is a characteristic vector of an \(s-t\) path in \(G'\). Since the first stage costs of the dashed arcs are 0, we get

$$\begin{aligned} \textsc {Eval}(\pmb {x})=\max _{\tilde{\pmb {c}}\in {\mathcal {U}}^{\mathcal {V\!P}}} \tilde{\pmb {c}}^T \pmb {y}=\max _{\tilde{\pmb {c}}\in \{\tilde{\pmb {c}}_1',\cdots ,\tilde{\pmb {c}}_K'\}} \tilde{\pmb {c}}^T\pmb {y}. \end{aligned}$$
(53)

Suppose there is an \(s-t\) path \(P=(v_s,v_{i_1},v_{i_2},\dots ,v_t)\) in G whose maximum cost over \({\mathcal {U}}\) is equal to c. Path P corresponds to path \(P'=(v_s,v_{si_1},v_{i_1},v_{i_1i_2},\dots ,v_t)\) composed of alternated dashed and solid arcs. If \(\pmb {x}\) is the characteristic vector of all dashed arcs in \(P'\), then \(\pmb {y}\) is the characteristic vector of all solid arcs in \(P'\). According to (53) and the construction of \(\tilde{\pmb {c}}'_k\), \(k\in [K]\), we have \(\textsc {Eval}(\pmb {x})=c\).

Suppose that there is a solution \(\pmb {x}\), \(\pmb {y}\in {\mathcal {R}}(\pmb {x})\) to RTSt such that \(\textsc {Eval}(\pmb {x})=c\). The characteristic vectors \(\pmb {x}, \pmb {y}\) describe a path \(P'=(v_s,v_{si_1},v_{i_1},v_{i_1i_2},\dots ,v_t)\) in \(G'\) with alternated dashed and solid arcs, where \(\pmb {x}\) is the characteristic vector of the dashed arcs and \(\pmb {y}\) is the characteristic vector of the solid arcs in \(P'\). Using (53), we get \(\max _{\tilde{\pmb {c}}\in \{\tilde{\pmb {c}}_1',\cdots ,\tilde{\pmb {c}}_K'\}} \tilde{\pmb {c}}^T\pmb {y}=c\). By the construction of the scenarios, we conclude that the maximum cost of the path \(P=(v_s,v_{i1},v_{i2},\dots ,v_t)\) over \({\mathcal {U}}\) in G equals c. \(\square \)

Fig. 4
figure 4

Illustration of the proof of Theorem 19

Recall that the problem has a K-approximation algorithm under \({\mathcal {U}}^{\mathcal {V\!P}}\) (see Theorem 7).

Theorem 20

The RTSt Shortest Path problem under \({\mathcal {U}}^{\mathcal {H\!P}}\) is hard to approximate in graph \(G=(V,A)\) within \(\log ^{1-\epsilon }|A|\) for any \(\epsilon >0\) unless \(\mathrm{NP}\subseteq \mathrm{DTIME}(n^{\mathrm{polylog}\;n})\), even if G is a series-parallel graph.

Proof

Given an instance of the Min-Max Shortest Path problem with a series parallel graph \(G=(V,A)\) and scenario set \({\mathcal {U}}=\{\tilde{\pmb {c}}_1,\dots ,\tilde{\pmb {c}}_K\}{\subseteq {\mathbb {R}}^{|A|}_+}\), we construct a cost preserving reduction from this problem to RTSt Shortest Path with \({\mathcal {U}}^{\mathcal {H\!P}}\). The reduction is similar to the one from the proof of Theorem 19. We build a series parallel graph \(G'=(V',A')\) and only add K additional dashed arcs as shown in Fig. 5. These additional dashed arcs have the first stage costs equal to 0 and the second stage costs equal to M (\(M=|A| c_{\max }+1\), where \(c_{\max }\) is the maximal arc cost in \({\mathcal {U}}\)), so they are all chosen in the first stage.

Define

$$\begin{aligned} {\mathcal {U}}^{\mathcal {H\!P}}= \left\{ \pmb {0} + \begin{bmatrix}\pmb {\pmb {\delta }}\\ \pmb {\lambda }\end{bmatrix}\ :\; \pmb {\delta }= \sum _{j\in [K]} \lambda _i \tilde{\pmb {c}}'_j, \sum _{j\in [K]} \lambda _j = 1, \lambda _j \ge 0, j\in [K] \right\} \subseteq {\mathbb {R}}^{2|A|+K}_{+}, \end{aligned}$$

where deviations \(\pmb {\delta }\) correspond to the arcs of the original graph G and deviations \(\pmb {\lambda }\) correspond to the new dashed arcs. The rest of the proof is similar to the proof of Theorem 19. Note that in the hardness proof from (Kasperski and Zieliński 2009, Theorem 1), we have \(|A|\ll K\). Thus \(O(\log |A'|) = O(\log K)\), and the proof is complete. \(\square \)

Fig. 5
figure 5

Illustration of the proof of Theorem 20

Theorem 21

If the number of budget constraints in \({\mathcal {U}}^{\mathcal {H\!P}}_1\) is constant, then RTSt Shortest Path in network \(G=(V,A)\) with \({\mathcal {U}}^{\mathcal {H\!P}}_1\) admits an FPTAS

Proof

Using Theorem 9 we need to show that the following problem is polynomially solvable:

$$\begin{aligned} \begin{array}{lllll} \min &{} \pmb {c}^T\pmb {x}+\underline{\pmb {c}}^T\pmb {y}\\ \text {s.t.} &{} \displaystyle \sum _{(i,j)\in A} (x_{ij}+y_{ij})-\sum _{(j,i)\in A}(x_{ji}+y_{ji})=\left\{ \begin{array}{lll} 1 &{} i=s \\ -1 &{} i=t &{}\\ 0&{} i=V\setminus \{s,t\} \end{array} \right. \\ &{}0\le y_{ij}\le d_{ij} &{} (i,j)\in A \\ &{} \pmb {x}\in \{0,1\}^{|A|} \end{array} \end{aligned}$$
(54)

where \(d_{ij} \in {\mathcal {E}}=\{0,\epsilon , 2\epsilon ,\dots ,1\}\), \((i,j)\in A\).

Table 1 Summary of the results for the robust two-stage versions of problems \({\mathcal {P}}\). The symbol P means polynomially solvable

We will reduce the problem of solving (54) for fixed \(d_{ij}\) , \((i,j)\in A\), to the one of finding a shortest \(s-t\) path in an auxiliary directed multigraph \(G'=(V',A')\) that is built as follows. We first set \(V'=V\) and \(A'=A\) and associate with each arc \((i,j)\in A'\), the cost equal to \(c_{ij}\). We then compute for each pair of nodes \(i\in V\) and \(j\in V\), \(i\not = j\), a cheapest unit flow from i to j in the original graph G with respect to the costs \(\underline{c}_{ij}\) and arc capacities \(d_{ij}\) and add arc (ij) to \(A'\) with the cost equal to the cost of this flow, denoted by \({\hat{c}}_{ij}\). Note that \({\hat{c}}_{ij}\) is bounded, if a feasible unit flow exists, since \(\underline{c}_{ij}\) are nonnegative. If there is no feasible unit flow from i and j, then we do not include (ij) to \(A'\). The resulting \(G'\) is a multigraph with nonnegative arc costs.

Finally we find a shortest \(s-t\) path P in \(G'\). We can construct an optimal solution to (54) as follows. For each arc \((i,j)\in P\): if (ij) has the cost equal to \(c_{ij}\), then set \(x_{ij}=1\); otherwise (if (ij) has the cost equal to \({\hat{c}}_{ij}\)) fix \(y_{ij}\) to the optimal solution of the corresponding min-cost unit flow problem from i to j. The rest of variables in (54) are set to zero. Since the shortest path and the minimum cost flow problems are polynomially solvable, problem (54) is polynomially solvable as well. By Theorem 9, the problem admits an FPTAS. \(\square \)

9 Conclusions and open problems

In this paper we have discussed a class of robust two-stage combinatorial optimization problems, where the second-stage costs are uncertain and are specified as a convex uncertainty set. We have investigated the general problem as well as several its special cases. The results obtained for the particular problems are summarized in Table 1.

One can see that there is still a number of interesting open questions concerning the robust two-stage approach. The complexity status of the two network optimization problems under \({\mathcal {U}}^{\mathcal {H\!P}}_0\) are still open. The complexity status of all the problems under \({\mathcal {U}}^{\mathcal {H\!P}}_1\), when the number of budget constraints is a part of the input is also open. Also, no positive and negative approximation results have been established for the robust two-stage version of the Spanning Tree problem. For the selection problems, better approximation algorithms can exist. For the ellipsoid uncertainty, we only know that the basic problems are NP-hard. The question whether they are strongly NP-hard and hard to approximate remains open. Furthermore, a distinction between axis-parallel and general ellipsoids may further highlight differences in complexity. Additionally, it is an interesting question whether it is possible to approximate ellipsoids through polyhedra to derive approximation results in the two-stage setting, as in Han et al. (2016), Poss (2018). It is also interesting to consider the RTSt problem under the budgeted uncertainty sets from Bertsimas and Sim (2004a) or under more general knapsack uncertainty sets, which are special cases of the polyhedral uncertainty \({\mathcal {U}}^{\mathcal {H\!P}}\).