1 Introduction

This paper provides a review of results on Boolean programming problems of optimizing a particular objective function, known as the half-product. The function is a quadratic non-separable function of Boolean variables, and we consider the problems of its minimization and maximization either with no additional constraints or under a linear constraint of a knapsack type. The problems of this range serve as mathematical models for numerous scheduling problems. We pay special attention to developing fast approximation schemes and algorithms for the problems related to optimizing the half-product, as well as for the relevant scheduling applications.

This review is a modified version of the survey Kellerer and Strusevich (2012). The current version exhibits a shift of focus of the presentation. The earlier survey was centered around the symmetric quadratic knapsack problem, which consists in minimizing a special form of the half-product function under a linear knapsack constraint. Our interest in that specific model was justified by the fact that it would serve as a universal model of most scheduling applications. In this paper, the stress is on the half-product problem in its pure form, and on its variants of practical importance such as the positive half-product and the symmetric quadratic knapsack.

Our main goal is to review algorithmic ideas that help to develop approximation schemes for these Boolean quadratic problems, and to survey all known scheduling applications. New topics addressed in this paper compared to Kellerer and Strusevich (2012) include fast approximation schemes for minimizing the positive half-product and its scheduling applications, development of differential approximation schemes and approximability for the maximization counterparts of the problems under consideration.

The remainder of this paper is organized as follows. Section 2 gives formal descriptions of all versions of problems related to the half-product optimization, in various forms: Boolean, matrix and in terms of set-functions. In Sect. 3 we formulate a number of scheduling problems and for each problem present its reformulation in terms of a half-product related problem. Sections 4, 5 and 6 address the problems of minimizing the half-product, the positive half-product and the symmetric quadratic knapsack problem, respectively. For each of this models, we describe the principles of design of approximation schemes and discuss their adaptations to the relevant scheduling problems. Section 7 reviews the whole range of problems from the point of view of differential approximation. The maximization versions are discussed in Sect. 8. The concluding remarks and open questions can be found in Sect. 9.

2 Formulation of half-product and related problems

In this section, we present formulations of the half-product problem and its versions. In this section, and in fact in most of this paper, we focus on problems of minimization of the relevant functions. Their maximization counterparts are discussed in Sect. 8.

2.1 Boolean programming formulations

Let \(\mathbf {x}=\left( x_{1},x_{2},\ldots ,x_{n}\right) \) be a vector with n Boolean components. Consider the function

$$\begin{aligned} H\left( \mathbf {x}\right) =\sum _{1\le i<j\le n}^{n}\alpha _{i}\beta _{j}x_{i}x_{j}-\sum _{j=1}^{n}\gamma _{j}x_{j}, \end{aligned}$$
(1)

where for each \(j,~1\le j\le n\), the coefficients \(\alpha _{j}\) and \(\beta _{j}\) are non-negative integers, while \(\gamma _{j}\) is an integer that can be either negative or positive. Problems of minimizing quadratic functions similar to (1) were introduced in 1990s as mathematical models for various scheduling problems by Kubiak (1995) and Jurisch et al. (1997). Function (1) and the term “half-product” were introduced by Badics and Boros (1998), who considered the problem of minimizing the function \(H\left( \mathbf {x}\right) \) with respect to Boolean decision variables with no additional constraints. The function \(H\left( \mathbf {x}\right) \) is called a half-product since its quadratic part consists of roughly half of the terms of the product \(\left( \sum _{j=1}^{n}\alpha _{j}x_{j}\right) \left( \sum _{j=1}^{n}\beta _{j}x_{j}\right) \). Notice that we only are interested in the instances of the problem for which the optimal value of the function is strictly negative; otherwise, setting all decision variables to zero solves the problem.

In this paper, we refer to the problem of minimizing function \(H\left( \mathbf {x}\right) \) of the form (1), as Problem HP. This problem is NP-hard in the ordinary sense, even if \(\alpha _{j}=\beta _{j}\) for all \(j=1,2,\ldots ,n\), as proved by Badics and Boros (1998). It has numerous applications, mainly to machine scheduling; see Erel and Ghosh (2008) and Kellerer and Strusevich (2012) for reviews. Notice that in those applications a scheduling objective function usually is written in the form

$$\begin{aligned} F\left( \mathbf {x}\right) =H\left( \mathbf {x}\right) +K, \end{aligned}$$
(2)

where K is a given additive constant. We refer to the problem of minimizing function \(F\left( \mathbf {x}\right) \) of the form (2), as Problem HPAdd.

Consider the function

$$\begin{aligned} P\left( \mathbf {x}\right) =\sum _{1\le i<j\le n}^{n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{j=1}^{n}\mu _{j}x_{j}+\sum _{j=1}^{n}\nu _{j}\left( 1-x_{j}\right) +K, \end{aligned}$$
(3)

where all coefficients \(\alpha _{j},\beta _{j},\, \mu _{j},\, \nu _{j}\) and K are non-negative integers. Following Janiak et al. (2005), we call the problem of minimizing the function \(P\left( \mathbf {x}\right) \) of the form (3) the Positive Half-Product Problem or Problem PosHP.

In the two problems introduced above, the minimum is sought for over all \(n-\)dimensional Boolean vectors, i.e., they are quadratic Boolean programming problems with no additional constraints. In this paper, we review a restricted version of these problems, in which an additional knapsack constraint is introduced. In particular, the knapsack constrained variant of Problem PosHP can be written as

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \displaystyle P(\mathbf {x})=\sum _{1\le i<j\le n}^{n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{j=1}^{n}\mu _{j}x_{j}+\sum _{j=1}^{n}\nu _{j}\left( 1-x_{j}\right) +K \\ \hbox {Subject to} &{} \displaystyle \sum _{j=1}^{n}\alpha _{j}x_{j}\le A \\ &{} x_{j}\in \{0,1\},~j=1,2,\ldots ,n, \end{array} \end{aligned}$$
(4)

which we call the Positive Half-Product Knapsack Problem and denote Problem PosHPK.

Similarly to the classical Linear Knapsack Problem (see the comprehensive monographs Martello and Toth (1990) and Kellerer et al. (2004) on this most studied problem of Combinatorial Optimization), Problem PosHPK contains a linear knapsack constraint

$$\begin{aligned} \sum _{j=1}^{n}\alpha _{j}x_{j}\le A. \end{aligned}$$
(5)

We can view the value \(\alpha _{j}\) as the weight of item \(j,\, 1\le j\le n \), i.e., \(x_{j}=1\) means that item j is placed into a knapsack with capacity A, while \(x_{j}=0\) means that the corresponding item is not placed into the knapsack. An important feature is that the coefficients \( \alpha _{j}\) in the knapsack constraint are the same as in the quadratic terms of the objective function. The latter feature makes Problem PosHPK to be a special case of another quadratic knapsack problem, namely the problem

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \displaystyle Z(\mathbf {x})=\sum _{1\le i<j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{1\le i<j\le n}\alpha _{i}\beta _{j}(1-x_{i})(1-x_{j}) \\ &{} \displaystyle +\sum _{j=1}^{n}\mu _{j}x_{j}+\sum _{j=1}^{n}\nu _{j}(1-x_{j})+K \\ \text {Subject to} &{} \displaystyle \sum _{j=1}^{n}\alpha _{j}x_{j}\le A \\ &{} x_{j}\in \{0,1\},~j=1,2,\ldots ,n. \end{array} \end{aligned}$$
(6)

Following Kellerer and Strusevich (2010a, b), we call the latter problem the Symmetric Quadratic Knapsack Problem, or Problem SQK . We use the term “symmetric” because both the quadratic and the linear parts of the objective function are separated into two terms, one depending on the variables \(x_{j}\), and the other depending on the variables \((1-x_{j})\). Problem SQK is no easier than the Linear Knapsack Problem and therefore is at least NP-hard in the ordinary sense.

Clearly, Problem SQK is a generalization of Problem PosHPK, since its objective contain an additional quadratic term. The objective function \(Z( \mathbf {x})\) can be rewritten as

$$\begin{aligned} Z\left( \mathbf {x}\right)= & {} 2\sum _{1\le i<j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{i=1}^{n}\left( \mu _{i}-\alpha _{i}\sum _{j=i+1}^{n}\beta _{j}-\beta _{i}\left( \sum _{j=1}^{i-1}\alpha _{j}\right) -\nu _{i}\right) x_{i} \\&+\,K+\sum _{i=1}^{n}\left( \alpha _{i}\sum _{j=i+1}^{n}\beta _{j}+\nu _{i}\right) , \end{aligned}$$

i.e., in a form close to that used in the formulation of Problem HPAdd.

The half-product function and its variants above are special cases of the general quadratic function of Boolean variables. Let \(\left( q_{ij}\right) _{n\times n}\) be a symmetric quadratic matrix. For a Boolean vector \(\mathbf {x}=\left( x_{1},x_{2},\ldots ,x_{n}\right) \) define the function

$$\begin{aligned} Q\left( \mathbf {x}\right) =\sum _{1\le i<j\le n}q_{ij}x_{i}x_{j}-\sum _{j=1}^{n}\gamma _{j}x_{j}. \end{aligned}$$
(7)

We refer to a Boolean programming of optimizing function (7) subject to a linear constraint (5) as the Quadratic Knapsack Problem (Problem QK). In general, Problem QK is NP-hard in the strong sense. See Chapter 12 of the book by Kellerer et al. (2004) and a survey by Pisinger (2007) for an overview of principal results on Problem QK.

Table 1 summarizes the notation introduced above for all Boolean programming problems under consideration.

Table 1 Notation for Boolean programming problems under consideration

2.2 Matrix formulations and convexity

Sometimes it is convenient to reformulate the introduced functions in an alternative way, e.g., in the matrix form. Below we illustrate this for Problem SQK. Let \(q\left( \mathbf {x}\right) \) be the quadratic term of the objective function \(Z\left( \mathbf {x}\right) \) in (6). We can rewrite \(q\left( \mathbf {x}\right) \) in the form

$$\begin{aligned} q\left( \mathbf {x}\right) =2\sum _{i=1}^{n}\alpha _{i}x_{i}\sum _{j=i}^{n}\beta _{j}x_{j}-\sum _{i=1}^{n}\left( \alpha _{i}\sum _{j=i}^{n}\beta _{j}+\beta _{i}\left( \sum _{j=1}^{i}\alpha _{j}\right) \right) x_{i}+\sum _{i=1}^{n}\left( \alpha _{i}\sum _{j=i+1}^{n}\beta _{j}\right) . \end{aligned}$$

See Appendix A of Kellerer and Strusevich (2010b) for a detailed proof that uses the obvious fact that

$$\begin{aligned} x_{j}=x_{j}^{2} \end{aligned}$$
(8)

for a Boolean variable \(x_{j}\). This allows us to rewrite the objective function of (6) as

$$\begin{aligned} Z\left( \mathbf {x}\right)= & {} 2\sum _{i=1}^{n}\alpha _{i}x_{i}\sum _{j=i}^{n}\beta _{j}x_{j}+\sum _{i=1}^{n}\left( \mu _{i}-\alpha _{i}\sum _{j=i}^{n}\beta _{j}-\beta _{i}\left( \sum _{j=1}^{i}\alpha _{j}\right) -\nu _{i}\right) x_{i} \\&+\,K+\sum _{i=1}^{n}\left( \alpha _{i}\sum _{j=i+1}^{n}\beta _{j}+\nu _{i}\right) \end{aligned}$$

and to write down a matrix form of that function. Define the matrix

$$\begin{aligned} G(M)=\left[ \begin{array}{cccc} M\alpha _{1}\beta _{1} &{} \alpha _{1}\beta _{2} &{} \cdots &{} \alpha _{1}\beta _{n} \\ \alpha _{1}\beta _{2} &{} M\alpha _{2}\beta _{2} &{} \cdots &{} \alpha _{2}\beta _{n} \\ \vdots &{} \vdots &{} \ddots &{} \vdots \\ \alpha _{1}\beta _{n} &{} \alpha _{2}\beta _{n} &{} \cdots &{} M\alpha _{n}\beta _{n} \end{array} \right] . \end{aligned}$$
(9)

Lemma 1

[Kellerer and Strusevich (2010b)] The objective function in (6) admits a representation

$$\begin{aligned} Z\left( \mathbf {x}\right) =\mathbf {x}^{T}G\mathbf {x}+\gamma ^{T}\mathbf {x} +K^{\prime }, \end{aligned}$$
(10)

where G is a positive definite \(n\times n\) matrix G(2) of the form (9) with \(M=2,\, \mathbf {x}=\left( x_{1},x_{2},\ldots ,x_{n}\right) \) and \(\gamma =\left( \gamma _{1},\gamma _{2},\ldots ,\gamma _{n}\right) \) are \(n-\)dimensional column vectors and \(K^{\prime }\) is a constant such that

$$\begin{aligned} \gamma _{i}= & {} \mu _{i}-\alpha _{i}\sum _{j=i}^{n}\beta _{j}-\beta _{i}\sum _{j=1}^{i}\alpha _{i}-\nu _{i},\,i=1,2,\ldots ,n; \\ K^{\prime }= & {} K+\sum _{i=1}^{n}\left( \alpha _{i}\sum _{j=i+1}^{n}\beta _{j}\right) +\sum _{i=1}^{n}\nu _{i}. \end{aligned}$$

In fact, the objective functions of all versions of the formulated problems admit a matrix representation similar to (10) with matrix \(G=G\left( 2\right) \).

Skutella (2001) proves that matrix G(1) of the form (9) with \( \alpha _{i}\) and \(\beta _{j}\) numbered according to

$$\begin{aligned} \frac{\alpha _{1}}{\beta _{1}}\le \frac{\alpha _{2}}{\beta _{2}}\le \ldots \le \frac{\alpha _{n}}{\beta _{n}} \end{aligned}$$
(11)

is positive semi-definite. Thus, under condition (11) matrix G(M) is positive definite for each \(M>1\) (as the sum of a positive semi-definite matrix G(1) and a positive definite diagonal matrix). This implies that under condition (11) the half-product function and its variants are convex. The assumption on convexity is essential for developing fast approximation schemes for the relevant problems and their scheduling applications; see Sects. 5 and 6.

2.3 Set-function form and supermodularity

Another alternative form of the introduced problems of Boolean programming is based on reformulation of the objective functions as set-functions, rather than functions of 0–1 variables.

Following Kellerer et al. (2015), we illustrate this for the half-product function \(H(\mathbf {x})\) of the form (1). For a set \(N=\{1,2,\ldots ,n\}\), let \(2^{N}\) denote the family of all subsets of N. For a sequence \(\left( p_{1},p_{2},\ldots ,p_{n}\right) \) of n numbers define \(p(U)=\sum _{j\in U}p_{j}\) for every non-empty set \(U\in 2^{N}\) and define \(p(\emptyset )=0\). Similarly, we use notation \(\alpha \left( U\right) ,\, \gamma \left( U\right) \), etc. to denote partial sums of the corresponding sequences \(\left( \alpha _{1},\alpha _{2},\ldots ,\alpha _{n}\right) \) or \(\left( \gamma _{1},\gamma _{2},\ldots ,\gamma _{n}\right) \), etc.

Given a function \(\varphi \left( \mathbf {x}\right) \) with Boolean arguments \( x_{j}\in \left\{ 0,1\right\} \), we can associate it with a set-function \( \varphi \left( U\right) \). More precisely, a Boolean vector \(\mathbf {x}= \left( x_{1},x_{2},\ldots ,x_{n}\right) \) can be associated with a set \(U\in 2^{N}\) in such a way that element \(j\in N\) belongs to U if and only if \( x_{j}=1\). We see the Boolean and the set representation of a function as equivalent, and use both types of notation, \(\varphi \left( \mathbf {x} \right) \) and \(\varphi \left( U\right) \), whichever is more convenient. Using this notation, the knapsack constraint (5) can be written as \(\alpha \left( U\right) \le A.\) See Foldes and Hammer (2005) for a detailed discussion of the link between the set-functions and Boolean functions.

We can rewrite function \(H(\mathbf {x})\) in the set-function form as

$$\begin{aligned} H\left( U\right) =\sum _{i,j\in U;~i<j;}\alpha _{i}\beta _{j}-\gamma \left( U\right) , \end{aligned}$$
(12)

and the general quadratic function \(Q(\mathbf {x})\) as

$$\begin{aligned} Q\left( U\right) =\sum _{i,j\in U;~i<j}q_{ij}-\gamma \left( U\right) . \end{aligned}$$
(13)

In a similar way, the set-function representations can be derived for functions \(F(\mathbf {x}),\, P(\mathbf {x})\) and \(Z(\mathbf {x})\).

Problem HP of minimizing \(H(\mathbf {x})\) can be understood as the problem of finding a set-minimizer \(U_{*}\) such that the inequality \(H\left( U_{*}\right) \le H\left( U\right) \) holds for all sets \(U\in 2^{N}\). The concepts of set-minimizers for set-functions \(\varphi \in \left\{ F,P,S\right\} \) are defined analogously. In terms of the set-functions, the problems that we consider in this paper can be formulated as \(\min \left\{ \varphi \left( U\right) |U\in 2^{N}\right\} \) if no additional constraints are imposed, and as \(\min \left\{ \varphi \left( U\right) |\alpha \left( U\right) \le A,\,U\in 2^{N}\right\} ,\) if an additional knapsack constraint is introduced.

A set-function \(\varphi :2^{N}\rightarrow \mathbb {R}\) is called submodular if for all sets \(X,Y\in 2^{N}\) the inequality

$$\begin{aligned} \varphi (X\cup Y)+\varphi (X\cap Y)\le \varphi (X)+\varphi (Y) \end{aligned}$$

holds, and supermodular if for all sets \(X,Y\in 2^{N}\) the inequality

$$\begin{aligned} \varphi (X\cup Y)+\varphi (X\cap Y)\ge \varphi (X)+\varphi (Y) \end{aligned}$$

holds. A pseudo-Boolean function \(\varphi \left( \mathbf {x}\right) \) is submodular (supermodular) if and only if all its second order derivatives are non-positive (non-negative); see Nemhauser et al. (1978). Thus, a quadratic pseudo-Boolean function is submodular (supermodular) if and only if all its quadratic terms have non-positive (non-negative, respectively) coefficients while the signs of the coefficients in the linear part are irrelevant; see Boros and Hammer (2002). Since the half-product function \(H\left( U\right) \) is a special case of function \(Q\left( U\right) \) with non-negative coefficients \(q_{ij}=\alpha _{i}\beta _{j}\), it follows that \(H\left( U\right) \) is a supermodular function. This fact is useful for deciding the complexity status of the problem of maximizing the half-product function; see Sect. 8.

2.4 Approximation algorithms and schemes

Since Problem HP is NP-hard, the main focus of research of the outlined range of problems is on design and evaluation of approximation algorithms and schemes.

For a collection of decision variables \(\mathbf {x}\), consider a problem of minimizing a function \(\varphi (\mathbf {x})\) that takes positive values. Recall that a polynomial-time algorithm that finds a feasible solution \( \mathbf {x}^{H}\) such that \(\varphi (\mathbf {x}^{H})\) is at most \(\rho \ge 1\) times the optimal value \(\varphi (\mathbf {x}^{*})\) is called a \(\rho -\) approximation algorithm; the value of \(\rho \) is called a worst-case ratio bound. A family of \(\rho -\)approximation algorithms is called a fully polynomial-time approximation scheme (FPTAS) if \(\rho =1+\varepsilon \) for any \(\varepsilon >0\) and the running time is polynomial with respect to both the length of the problem input and \( 1/\varepsilon .\) If a function \(\varphi (\mathbf {x})\) takes both positive and negative values, then an FPTAS delivers a feasible solution \(\mathbf {x}^{H}\) such that \(\varphi (\mathbf {x}^{H})-\varphi (\mathbf {x}^{*})\le \varepsilon \left| \varphi (\mathbf {x}^{*})\right| \). The latter definition is applicable to Problem HP, while the former definition is suitable for problems PosHP, PosHPK, SQK and their scheduling applications. A special attention is paid to the design of FPTASs that require strongly polynomial running time, i.e., time bounded by a polynomial that depends on n and \(1/\varepsilon \) only.

Among the results on the general Problem QK a lack of approximation algorithms is especially noticeable, while for the linear knapsack problems the design of approximation algorithms and schemes is one of the major directions of research, see Kellerer et al. (2004) and Pisinger (2007). Unlike the general Problem QK, the problems related to minimization of the half-product are NP-hard only in the ordinary sense and are solvable in pseudopolynomial time, see Sects. 4.1, 5.1 and 6.1. This gives a hope for developing fully polynomial-time approximation schemes for these problems, at least under some additional conditions that may appear relevant for scheduling applications.

The problems of the outlined range, with and without a linear knapsack constraint, serve as mathematical models of many scheduling problems, and approximation algorithms and schemes for the Boolean programming problems can be adapted for the relevant scheduling problems.

An interesting feature of the problems under consideration initially brought by Janiak et al. (2005) and Erel and Ghosh (2008) is that from the point of view of approximability there is a difference between minimizing a pure half-product function \(H\left( \mathbf {x}\right) \) of the form (1) and minimizing the function \(F\left( \mathbf {x}\right) =H\left( \mathbf {x} \right) +K\). The presence of an additive constant K may influence the behavior of approximation algorithms, e.g., an FPTAS for the problem of minimizing function \(H\left( \mathbf {x}\right) \) does not need to yield an FPTAS for the problem of minimizing F. We discuss these issues in Sect.  4.

Additional aspects, also reviewed in this paper, include approximability issues of the problems of maximizing Boolean functions related to the half-product; see Sect. 8. Besides, we also discuss differential approximation algorithms and schemes, which rely on an alternative approach to evaluating the quality of an approximate solution; see Sect. 7.

3 Scheduling problems: formulations and reductions to Boolean programming

In this section, we present a number of scheduling problems that have initiated the study on the half-product minimization and on the symmetric quadratic knapsack problem. For each scheduling problem discussed below we only mention its complexity status and provide its reduction either to one of the Boolean programming problems introduced in Sect. 2 , such as Problems HP, HPAdd, PosHP, PosHPK or SQK. The issues of developing approximation schemes for these problems are discussed later in the paper.

In most scheduling problems reviewed in this paper, we are given a set \( N=\left\{ 1,2,\ldots ,n\right\} \) of jobs to be processed without preemption on a single machine. The processing of job \(j\in N\) takes \(p_{j}\) time units. There is a positive weight \(w_{j}\) associated with job j, which indicates its relative importance. All values \(p_{j}\) and \(w_{j}\) are positive integers. The machine processes at most one job at a time. The completion time of job \(j\in N\) in a feasible schedule S is denoted by \( C_{j}(S)\), or shortly \(C_{j}\) if it is clear which schedule is referred to. In a specific problem, it is required to minimize a function Z(S) that depends on the completion times \(C_{j}(S)\). For all problems under consideration \(S^{*}\) denotes an optimal schedule, i.e., \(Z(S^{*})\le Z(S)\) for any feasible schedule S.

For all scheduling problems we use a classification scheme widely accepted in scheduling theory that associates each problem with a three-field descriptor \(\alpha |\beta |\gamma \) where \(\alpha \) represents the machine environment, \(\beta \) defines the job characteristics, and \(\gamma \) is the optimality criterion.

Unless stated otherwise, the jobs are numbered in such a way that

$$\begin{aligned} \frac{p_{1}}{w_{1}}\le \frac{p_{2}}{w_{2}}\le \cdots \le \frac{p_{n}}{ w_{n}}. \end{aligned}$$
(14)

We call the sequence of jobs numbered in accordance with (14) a Smith sequence or a WSPT sequence (Weighted Shortest Processing Time). Recall that in an optimal schedule for the classical single machine problem of minimizing the sum of the weighted completion times, the jobs are processed according to the WSPT sequence, see Smith (1956).

Throughout this paper W denotes the sum of all weights, i.e.,

$$\begin{aligned} W=\sum _{j=1}^{n}w_{j}, \end{aligned}$$
(15)

while the total processing time of all jobs is denoted by

$$\begin{aligned} p(N)=\sum _{j=1}^{n}p_{j}. \end{aligned}$$
(16)

Similarly, for a non-empty subset \(N^{\prime }\) define \(p(N^{\prime }):=\sum _{j\in N^{\prime }}p_{j}\) and additionally define \(p(\varnothing ):=0.\)

3.1 Scheduling with machine non-availability

Consider a scheduling model that belongs to the family of scheduling models with machine availability constraints. We refer to the surveys by Lee (2004) and by Ma et al. (2010) for the most recent reviews of deterministic scheduling under availability constraints. Assume that for the processing machine there is a known non-availability interval \(I= \left[ s,t\right] \), during which the machine cannot perform the processing of any job. This non-availability interval can be due to some scheduled activity other than processing (a maintenance period, a rest period, etc.). The job that is affected by the non-availability interval is called the crossover job. There are several possible scenarios to handle the crossover job. Under the non-resumable scenario, the crossover job that cannot be completed by time s is restarted from scratch at time t. Under the resumable scenario the crossover job is interrupted at time s and resumed from the point of interruption at time t. It is required to minimize the total weighted completion time, i.e., the function

$$\begin{aligned} Z(S)=\sum _{j=1}^{n}w_{j}C_{j}(S). \end{aligned}$$

Extending standard scheduling notation, we denote the resulting problem under the non-resumable scenario by \(1|h(1),N-res|\sum w_{j}C_{j}\), and that under the resumable scenario by \(1|h(1),Res|\sum w_{j}C_{j}\). Both problems are NP-hard in the ordinary sense and solvable in pseudopolynomial time by dynamic programming (DP), see Adiri et al. (1989) and Lee (1996). On the other hand, if the weights are equal, the resulting problem \(1|h(1),Res|\sum C_{j}\) is solvable in \(O(n\log n)\) time, while \(1|h(1),N-res|\sum w_{j}C_{j}\) remains NP-hard in the ordinary sense; see Adiri et al. (1989) and Lee and Liman (1992).

For each problem \(1|h(1),N-res|\sum w_{j}C_{j}\) and \(1|h(1),Res|\sum w_{j}C_{j}\), there exists an optimal schedule in which the jobs sequenced before and after the crossover job follow the WSPT rule. Both problems can be formulated in terms of Problem SQK, as shown by Kellerer and Strusevich (2010a).

Given problem \(1|h(1),N-res|\sum w_{j}C_{j}\), introduce a Boolean variable \( x_{j}\) in such a way that

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if job } j \text { completes before interval }I \\ 0, &{} \quad \text {otherwise} \end{array} \right. \end{aligned}$$
(17)

for each job \(j,\,1\le j\le n\). If job j completes before the interval I , then

$$\begin{aligned} C_{j}=\sum _{i=1}^{j}p_{i}x_{i}, \end{aligned}$$
(18)

while if it completes after the interval I then

$$\begin{aligned} C_{j}=t+\sum _{i=1}^{j}p_{j}(1-x_{j}), \end{aligned}$$

Thus, the sum of the weighted completion times can be written as

$$\begin{aligned} Z\left( \mathbf {x}\right)= & {} \sum _{j=1}^{n}w_{j}x_{j}\sum _{i=1}^{j}p_{i}x_{i}+ \sum _{j=1}^{n}w_{j}(1-x_{j})\left( t+\sum _{i=1}^{j}p_{i}(1-x_{i})\right) \\= & {} \sum _{1\le i\le j\le n}p_{i}w_{j}x_{i}x_{j}+\sum _{1\le i\le j\le n}p_{i}w_{j}(1-x_{i})(1-x_{j})+t\sum _{j=1}^{n}w_{j}(1-x_{j}). \end{aligned}$$

Taking into account (8), we deduce that problem \(1\left| h(1),N-res\right| \sum w_{j}C_{j}\) can be formulated as the following Boolean quadratic programming problem

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \displaystyle Z\left( \mathbf {x}\right) =\sum _{1\le i<j\le n}p_{i}w_{j}x_{i}x_{j}+\sum _{1\le i<j\le n}p_{i}w_{j}(1-x_{i})(1-x_{j}) \\ &{} \displaystyle +\,t\sum _{j=1}^{n}w_{j}(1-x_{j})+\sum _{j=1}^{n}p_{j}w_{j} \\ \text {subject to} &{} \displaystyle \sum _{j=1}^{n}p_{j}x_{j}\le s \\ &{} x_{j}\in \{0,1\},~j=1,2,\ldots ,n. \end{array} \end{aligned}$$
(19)

If in (6) we define

$$\begin{aligned} \alpha _{j}=p_{j},\, \beta _{j}=w_{j},~\mu _{j}=0,\,\nu _{j}=w_{j}t,\,j=1,2,\ldots ,n;~A=s,~K=\sum _{j=1}^{n}p_{j}w_{j}, \end{aligned}$$

then (19) becomes an instance of (6).

For problem \(1|h(1),Res|\sum w_{j}C_{j}\), suppose that a certain job is chosen as the crossover job. Denote the processing time and the weight of the chosen crossover job by p and w, respectively, and renumber the remaining jobs taken according to the WSPT rule by the integers \(1,2,\ldots ,m\), where \(m=n-1\).

A feasible schedule for problem \(1|h(1),Res|\sum w_{j}C_{j}\) with a fixed crossover job can be found by inserting the crossover job into a schedule for processing the jobs \(1,2,\ldots ,m\) under the non-resumable scenario.

Let \(S^{*}\) denote the optimal schedule that delivers the smallest value \(Z(S^{*})\) of the objective function, while S(p) denote a feasible schedule with a fixed crossover job with the processing time p and weight w. Denote the smallest value of the function among all schedules with the chosen crossover job by \(Z^{*}(p)\).

Define the Boolean decision variables \(x_{j}\) such that (17) holds for each \(j,\,1\le j\le m\). It follows from (19) that for an arbitrary assignment of variables \(x_{j}\) the sum of the weighted completion times of the corresponding schedule \(S_{m}\) under the non-resumable scenario is given by

$$\begin{aligned} Z_{m}=\sum _{1\le i<j\le m}p_{i}w_{j}x_{i}x_{j}+\sum _{1\le i<j\le m}p_{i}w_{j}(1-x_{i})(1-x_{j})+t\sum _{j=1}^{m}w_{j}(1-x_{j})+ \sum _{j=1}^{m}p_{j}w_{j}, \end{aligned}$$

where

$$\begin{aligned} \sum _{j=1}^{m}p_{j}x_{j}\le s,\,x_{j}\in \{0,1\},\,j=1,2,\ldots ,m. \end{aligned}$$

To convert a schedule \(S_{m}\) into a schedule S(p) that is feasible for problem \(1|h(1), Res|\sum w_{j}C_{j}\) with the chosen crossover job, we process the crossover job for px time units before the non-availability interval starting at time

$$\begin{aligned} y_{m}=\sum _{j=1}^{m}p_{j}x_{j}, \end{aligned}$$

where either \(x=1\), if

$$\begin{aligned} p<s-y_{m}, \end{aligned}$$

or

$$\begin{aligned} x=\frac{s-y_{m}}{p}, \end{aligned}$$

otherwise. The former case should be ignored, since the chosen job completes earlier than time s and is not a crossover job. In the latter case, the chosen job is the crossover job that is additionally processed for \(p(1-x)\) time units starting at time t, and this increases the starting (and the completion) time of each job with \(x_{j}=0\) by \(p(1-x)\).

The value of the objective function of the resulting schedule S(p) can be written as

$$\begin{aligned} Z(p)=Z_{m}+F(y_{m},W_{m},x), \end{aligned}$$
(20)

where \(W_{m}=\sum _{j=1}^{m}w_{j}(1-x_{j})\) and

$$\begin{aligned} F(y_{m},W_{m},x)=w\left( t+p(1-x\right) )+W_{m}p(1-x). \end{aligned}$$

3.2 Scheduling with a floating maintenance period

In the problems in Sect. 3.1, the start time of the machine non-availability interval of duration \({\varDelta } =t-s\) is fixed. By contrast, a floating machine non-availability interval can be viewed as a non-availability period of length \({\varDelta } \) that may start at any time, provided that it is completed no later than a given deadline d. A possible meaningful interpretation of this situation is that the machine is subject to a compulsory maintenance during the planning period, the length of the maintenance is \({\varDelta } \) time units, it must be completed by the deadline d, and the decision-maker has to decide when to start the maintenance period (MP). We denote the problem of minimizing the total weighted completion time in these settings by \(1|C_{MP}\le d|\sum w_{j}C_{j},\) where \(C_{MP}\) means the completion time of the MP. This problem is closely related to one of the single machine scheduling problems with two competing agents, introduced and studied by Agnetis et al. (2004) together with other two-agent scheduling problems. Suppose that two agents intend to use a single machine, Agent A owns the \(A-\)jobs, while Agent B owns the \(B-\)jobs. Agent A wants to minimize the sum of the weighted completion times of the \(A-\)jobs, while Agent B wants to have all the \(B-\)jobs completed by a given deadline d. It is easily verified that there exists an optimal schedule the \(B-\)jobs can be processed as a block, without intermediate idle time, and this will not increase the objective function of Agent A. Thus, provided that the processing times and weights of the \(A-\)jobs are equal to \(p_{j}\) and \(w_{j}\), respectively, and the total processing time of the \(B-\)jobs is equal to \( {\varDelta } \), the two-agent problem is equivalent to problem \(1|C_{MP}\le d|\sum w_{j}C_{j}\). Notice that the two-agent problem is proved NP-hard in the ordinary sense; see Agnetis et al. (2004).

Given problem \(1|C_{MP}\le d|\sum w_{j}C_{j}\), introduce the associated problem \(1|h(1), Res|\sum w_{j}C_{j}\) discussed in Sect. 3.1, in which the fixed non-availability interval of length \({\varDelta }\) is defined by \(\left[ s,t\right] =\left[ d-{\varDelta } ,d\right] \), while the processing times of the jobs and their weights remain equal to \( p_{j}\) and \(w_{j}\), respectively. As proved by Kellerer and Strusevich (2010a), problem \( 1|C_{MP}\le d|\sum w_{j}C_{j}\) and the associated problem \(1|h(1),Res|\sum w_{j}C_{j}\) are equivalent, i.e., any schedule feasible for the associated problem \(1|h(1),Res|\sum w_{j}C_{j}\) can be transformed into a schedule for the original problem \(1|C_{MP}\le d|\sum w_{j}C_{j}\) and vice versa, without any change in the objective function value.

In practice, the main reason to run maintenance of a piece of equipment is to restore its conditions, that may get worse during the previous processing. Although scheduling models that address various deterioration effects have been extensively studied since the early 1990s, the integrated models that combine machine deterioration and its maintenance are fairly new, see, e.g., Yang and Yang (2010), Zhao and Tang (2010) and Rustogi and Strusevich (2014, 2015).

The model that we discuss below is based on the paper by Kellerer et al. (2013). A single machine is subject to a so-called cumulative deterioration. Each job \(j\in N\) is associated with an integer \(p_{j}\) that is called its “normal” processing time. A maintenance period has to be run exactly once during the planning period and it will restore the machine conditions completely, i.e., after the MP the machine is as good as new. Under cumulative deterioration, the actual processing time of a job depends on the sum of the normal times of the earlier sequenced jobs. Wu et al. (2011) list about a dozen of various cumulative effects. In this paper, we focus on the models with a specific cumulative deterioration effect, assuming that the actual processing time \(p_{j}^{\left[ r\right] }\) of a job j that is sequenced in position r\(1\le r\le n\), of a permutation \(\pi =\left( \pi (1),\pi (2),\ldots ,\pi (n)\right) \) is given by

$$\begin{aligned} p_{j}^{\left[ r\right] }=p_{j}\left( 1+\sum _{k=1}^{r-1}p_{\pi (k)}\right) . \end{aligned}$$
(21)

This formula is a variant of the most common model for cumulative deterioration, see Kuo and Yang (2006) and Gordon et al. (2008). We distinguish between two versions of the maintenance periods.

  1. (i)

    Constant Maintenance: the duration of the MP is \({\varDelta } \) time units, where \({\varDelta } >0\).

  2. (ii)

    Start Time Dependent Maintenance: the duration of the MP is \({\varPhi } \tau +{\varDelta } \) time units, provided that the MP starts at time \(\tau \); here \({\varPhi } >0\) and \({\varDelta } \ge 0\).

For the latter type of maintenance, the later a machine is sent for maintenance, the longer it takes to restore it to an acceptable condition. This type of maintenance has been introduced by Kubzin and Strusevich (2005, 2006). We denote the problem of minimizing the makespan, i.e., the maximum completion time, by \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\), provided that the machine is subject to cumulative deterioration and the duration of the MP is equal to \({\varPhi } \tau +{\varDelta } \). The version with constant maintenance, i.e., with \({\varPhi } =0\), is denoted by \(1\left| Cumu,MP(0)\right| C_{\max }\).

In a schedule with a single MP the jobs are split into two groups: group 1 consists of the jobs scheduled before the maintenance and group 2 contains all other jobs. For problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\), consider a schedule S with two groups. Let \(N_{i}\) be the set of jobs in group i and \(\left| N_{i}\right| =n_{i}\) for \(i\in \left\{ 1,2\right\} \). Let \(\pi =\left( \pi (1),\ldots ,\pi (n_{1})\right) \) and \(\sigma =\left( \sigma (1),\ldots ,\sigma (n_{2})\right) \) denote a sequence of jobs of set \(N_{1}\) and \(N_{2},\) respectively. In accordance with (21), the makespan of schedule S is given by

$$\begin{aligned} C_{\max }(S)= & {} p_{\pi (1)}+\sum _{r=2}^{n_{1}}p_{\pi (r)}\left( 1+\sum _{k=1}^{r-1}p_{\pi (k)}\right) \\&+\,{\varPhi } \left( p_{\pi (1)}+\sum _{r=2}^{n_{1}}p_{\pi (r)}\left( 1+\sum _{k=1}^{r-1}p_{\pi (k)}\right) \right) +{\varDelta } \\&+\,p_{\sigma (1)}+\sum _{r=2}^{n_{2}}p_{\sigma (r)}\left( 1+\sum _{k=1}^{r-1}p_{\sigma (k)}\right) \end{aligned}$$

which implies

$$\begin{aligned} C_{\max }(S)= & {} p(N)+\frac{1}{2}\left( p(N_{1})^{2}+p(N_{2})^{2}-\sum _{j\in N}p_{j}^{2}\right) \nonumber \\&+\,{\varPhi } \left( p(N_{1})+\frac{1}{2}\left( p(N_{1})^{2}-\sum _{j\in N_{1}}p_{j}^{2}\right) \right) +{\varDelta } \end{aligned}$$
(22)

for problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) and

$$\begin{aligned} C_{\max }(S)=p(N)+\frac{1}{2}\left( p(N_{1})^{2}+p(N_{2})^{2}\right) +{\varDelta } -\frac{1}{2}\sum _{j\in N}p_{j}^{2} \end{aligned}$$
(23)

for problem \(1\left| Cumu,MP(0)\right| C_{\max }.\)

Notice that (22) and (23) demonstrate that for problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) the order of jobs in each group does not affect the makespan. This complies with Gordon et al. (2008), where for the single machine problem with the deterioration effect (21) and no maintenance the makespan has been shown to be sequence independent. Thus, the main issue in solving problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\), including its simpler version \( 1\left| Cumu,MP(0)\right| C_{\max }\), is to find an appropriate partition of the jobs into two groups. It is proved by Kellerer et al. (2013) that both problems are NP-hard.

Given problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\), introduce a Boolean variable \(x_{j}\) in such a way that

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \text { if job }j \, \text {is scheduled in the first group} \\ 0, &{} \text { otherwise.} \end{array} \right. \end{aligned}$$

Then problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) reduces to minimizing the function

$$\begin{aligned} F_{{\varPhi } }\left( \mathbf {x}\right)= & {} \left( {\varPhi } +1\right) \left( \sum _{1\le i<j\le n}^{{}}p_{i}p_{j}x_{i}x_{j}+\sum _{j=1}^{n}p_{j}x_{j}\right) \nonumber \\&+\,\sum _{1\le i<j\le n}^{{}}p_{i}p_{j}(1-x_{i})(1-x_{j})+\sum _{j=1}^{n}p_{j}(1-x_{j})+{\varDelta } , \end{aligned}$$
(24)

which is a half-product plus a constant.

It is worth noticing that for \({\varPhi } =0\) the function (24) is the simplest form of function (6) with \(\alpha _{j}=\beta _{j}=\mu _{j}=\nu _{j}=p_{j},\, j=1,2,\ldots ,n\).

3.3 Minimizing total weighted earliness and tardiness

In this model, the jobs have a common due date d. In a schedule S, a job is said to be early if \(C_{j}(S)-d\le 0\), and its earliness is defined as \(E_{j}(S)=d-C_{j}(S)\). On the other hand, a job is said to be late if \(C_{j}(S)-d>0\), and its tardiness is defined as \( T_{j}(S)=C_{j}(S)-d\). The aim is to find a schedule that minimizes the function \(\sum _{j\in N}w_{j}\left( E_{j}\left( S\right) +T_{j}\left( S\right) \right) \).

Problems with an earliness-tardiness criterion are important in just-in-time manufacturing, where the earliness generates holding costs and the tardiness incurs a penalty for a late delivery. Notice that the weights are symmetric, i.e., for job j the same weight \(w_{j}\) is applied, no matter the job is late or early. Let p(N) be the total processing time of all jobs defined by (16). If \(p(N)\le d\), the due date is called large or nonrestrictive; otherwise, for \(p(N)>d\), the due date is called small or restrictive. This classification is traditional and is justified by the fact that the size of the due date may influence a possible structure of a feasible schedule, as well as the complexity and the approximability status of the problem. We denote the problems to minimize the total weighted earliness-tardiness by \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) if the due date is large and by \(1|d_{j}=d,p(N)>d|\sum w_{j}(E_{j}+T_{j})\) if the due date is small. As far as problem \( 1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) is concerned, it is solvable in \(O(n\log n)\) time, provided that the weights are equal; otherwise, it is NP-hard in the ordinary sense as proved by Hall and Posner (1991). If the due date is small then problem \(1|d_{j}=d,p(N)>d|\sum (E_{j}+T_{j})\) is NP-hard in the ordinary sense even if the weights are equal; see Hall et al. (1991) and Hoogeveen and van de Velde (1991).

As proved by Hall and Posner (1991), for problem \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) there exists an optimal schedule in which some job completes exactly at time d, i.e., it will have neither earliness nor tardiness. There is no intermediate idle time in job processing, but some idle time may occur before the first early job; we call this class of schedules Class 1.

As demonstrated by Hall et al. (1991), for problem \(1|d_{j}=d,p(N)>d||\sum w_{j}(E_{j}+T_{j})\), an optimal schedule can be sought for either in Class 1 described above or in Class 2 of schedules, in which the early jobs are processed starting at time zero and are followed by the straddling job that starts before time d and is completed after time d; in turn, the straddling job is followed by the block of late jobs.

In a schedule of either class the early jobs are processed in the order opposite to their numbering by the WSPT rule, while the jobs that start either at or after the due date are processed in the order of their numbering.

Following Kellerer and Strusevich (2010b), to establish the relevance of these two scheduling problems to Problem SQK and Problem HPAdd, introduce Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if job } j\text { completes by the due date } d \\ 0, &{} \quad \text {otherwise.} \end{array} \right. \end{aligned}$$
(25)

In order to find a Class 1 schedule that is optimal for problem \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\), consider the jobs in the order of their numbering defined by (14), and compute the completion time and the earliness of a job j that completes by time d as

$$\begin{aligned} C_{j}=d-\sum _{i=1}^{j-1}p_{i}x_{i},~E_{j}=\sum _{i=1}^{j-1}p_{i}x_{i}. \end{aligned}$$

If job j is starts after the due date, then its completion time and tardiness are given by

$$\begin{aligned} C_{j}=d+\sum _{i=1}^{j}p_{i}(1-x_{i}),~T_{j}=\sum _{i=1}^{j}p_{i}(1-x_{i}). \end{aligned}$$

Thus, we obtain that the objective function can be written as

$$\begin{aligned} \sum _{j=1}^{n}w_{j}(E_{j}+T_{j})=\sum _{1\le i<j\le n}p_{i}w_{j}x_{i}x_{j}+\sum _{1\le i<j\le n}p_{i}w_{j}(1-x_{i})(1-x_{j})+\sum _{j=1}^{n}p_{j}w_{j}(1-x_{j}), \end{aligned}$$
(26)

which implies that the problem reduces to Problem HPAdd. This fact has also been pointed out in Erel and Ghosh (2008).

On the other hand, for problem \(1|d_{j}=d,p(N)>d|\sum w_{j}\left( E_{j}+T_{j}\right) \) finding the best schedule in Class 1 reduces to minimizing (26) subject to the knapsack constraint, i.e., reduces to the problem

(27)

If we set

$$\begin{aligned} \alpha _{j}=p_{j},~\beta _{j}=w_{j},~\mu _{j}=0,~\nu _{j}=w_{j}p_{j},~j=1,2,\ldots ,n,~A=d,~K=0 \end{aligned}$$
(28)

it follows that (27) and (6) coincide, i.e., the problem defined by (27) is Problem SQK.

For problem \(1|d_{j}=d,p(N)>d|\sum w_{j}\left( E_{j}+T_{j}\right) \), in order to find the best schedule in Class 2 suppose that a certain job is chosen as the straddling job. Renumber the remaining jobs taken according to the WSPT rule by the integers \(1,2,\ldots ,m\), where \(m=n-1\).

A feasible schedule of Class 2 with a fixed straddling job can be found by inserting the chosen job into a schedule \(S_{m}\), the best Class 1 schedule for processing the jobs \(1,2,\ldots ,m\). If such an insertion is successful, it will increase the earliness of each early job and the tardiness of each tardy job in schedule \(S_{m}\).

Let p and w denote the processing time and the weight of the job that is chosen as a possible straddling job. Renumber the remaining jobs in the WSPT order by the numbers \(1,2,\ldots ,m\). Take a feasible schedule \(S_{m}\) for these jobs that belongs to Class 1. Such a schedule is defined by a partition of the jobs into early and late, i.e., by an assignment of the Boolean variables (25). The value of the objective function for schedule \(S_{m}\) is given by

$$\begin{aligned} Z_{m}=\sum _{1\le i<j\le m}p_{i}w_{j}x_{i}x_{j}+\sum _{1\le i<j\le m}p_{i}w_{j}(1-x_{i})(1-x_{j})+\sum _{j=1}^{m}p_{j}w_{j}\left( 1-x_{j}\right) , \end{aligned}$$

where

$$\begin{aligned} \sum _{j=1}^{m}p_{j}x_{j}\le d. \end{aligned}$$

The cases that either \(\sum _{j=1}^{m}p_{j}x_{j}=d\) or \(\sum _{j=1}^{m}p_{j}x_{j}+p\le d\) must be ignored, since the chosen job cannot be inserted as straddling. It is obvious that the problem of minimizing \(Z_{m}\) is of the same structure as problem (27).

Compute

$$\begin{aligned} x=\frac{d-\sum _{j=1}^{m}p_{j}x_{j}}{p}. \end{aligned}$$

We only need to consider the case that \(0<x<1\). To convert a schedule \(S_{m}\) into a schedule S that is feasible for the original problem with the chosen straddling job, we reduce the starting time of each early job by px and start the straddling job at time \(\sum _{j=1}^{m}p_{j}x_{j}\). The straddling job is processed for \(p(1-x)\) time units after time d, thereby creating tardiness and forcing all other tardy jobs to start \(p(1-x)\) time units later.

3.4 Minimizing total weighted tardiness

Here it is required to minimize the total weighted tardiness with respect to a common due date. We denote this problem by \(1|d_{j}=d|\sum w_{j}T_{j}\). Obviously, it only makes sense to consider the instances for which \(p(N)>d\). This problem is NP-hard in the ordinary sense, as proved by Yuan (1992). For this problem, Lawler and Moore (1969) provide a dynamic programming (DP) algorithm that requires \(O(n^{2}d)\) time and demonstrate that the problem with equal weights is solvable in \(O(n^{2})\) time.

This problem can be handled similarly to finding a schedule of Class 2 for problem \(1|d_{j}=d,p(N)>d|\sum w_{j}(E_{j}+T_{j})\), see Kellerer and Strusevich (2006). Introduce the Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if job }j \text { completes after the due}\,\mathrm {date} \, d \\ 0,&{} \quad \mathrm {otherwise.} \end{array} \right. \end{aligned}$$

Let p and w denote the processing time and the weight of the job that is chosen as a possible straddling job. Renumber the remaining jobs in the WSPT order by the numbers \(1,2,\ldots ,m\). The problem of scheduling the jobs \( 1,2,\ldots ,m\) reduces to maximizing the function

$$\begin{aligned} Z_{m}=\sum _{j=1}^{m}w_{j}\left( \sum _{i=1}^{j}p_{i}x_{i}\right) x_{j}=\sum _{1\le i\le j\le m}p_{i}w_{j}x_{i}x_{j}, \end{aligned}$$

subject to

$$\begin{aligned}&\sum _{j=1}^{m}p_{j}\left( 1-x_{j}\right) \le d \\&\quad x_{j}\in \{0,1\},~j=1,2,\ldots ,m. \end{aligned}$$

Given the values of \(x_{j}\in \{0,1\},~j=1,2,\ldots ,m\), we can create the corresponding schedule \(S_{m}\) scheduling the jobs with \(x_{j}=0\) as the block of early jobs and the jobs with \(x_{j}=1\) as the block of late jobs; the jobs of each block are sequenced in the order of their numbering. The chosen straddling job is inserted to start at time \(\sum _{j=1}^{m}p_{j} \left( 1-x_{j}\right) \).

Although the function \(Z_{m}\) above is not symmetric in the sense of the objective in (6), it possesses structural properties that allow us to use for its optimization and approximation the algorithmic ideas developed for the symmetric functions.

3.5 Minimizing completion time variance

Given a schedule S for a single machine scheduling problem, the average completion time is defined as

$$\begin{aligned} \overline{C}(S)=\frac{1}{n}\sum _{j=1}^{n}C_{j}(S), \end{aligned}$$

and the completion time variance (CTV) is defined as

$$\begin{aligned} V(S)=\frac{1}{n}\left( \sum _{j=1}^{n}C_{j}(S)-\overline{C}(S)\right) ^{2}. \end{aligned}$$

We denote the problem of minimizing the CTV by \(1\left| {}\right| V\) . Since the 1970s, the problem has been known to be applicable in various contexts, see, e.g., Merten and Muller (1972) where this objective function is first introduced. Cheng and Kubiak (2005) refer to Kanet (1981) to stress that the CTV as a measure of the schedule quality “is applicable to any service and manufacturing setting where it is desirable to provide jobs or customers with approximately the same level of service” .

An extended version of the problem in which the jobs have weights \(w_{j}\) and the purpose is to minimize the weighted CTV defined by

$$\begin{aligned} WV(S)=\sum _{j=1}^{n}w_{j}\left( C_{j}(S)-\frac{1}{W} \sum _{j=1}^{n}w_{j}C_{j}(S)\right) ^{2}, \end{aligned}$$

where W is the sum of all weights as defined by (15); see Merten and Muller (1972) and Cai (1995). We call this problem \(1\left| {}\right| WV\). As agreed earlier, the jobs are numbered in accordance with (14); in the non-weighted case this numbering reduces to \(p_{1}\le p_{2}\le \ldots \le p_{n}\).

The objective function V(S) possesses several interesting properties. One of them, established by Merten and Muller (1972), holds for any sequence \(\pi =\left( \pi (1),\pi (2),\ldots ,\pi (n)\right) \) of jobs. The value of the CTV for the jobs taken in this sequence is equal to that for the jobs taken in the “almost reversed” sequence \(\pi ^{\prime }=\left( \pi (1),\pi (n),\pi (n-1),\ldots ,\pi (2)\right) \).

A permutation \(\pi =\left( \pi (1),\pi (2),\ldots ,\pi (n)\right) \) in which the shortest job 1 is placed in a position k, \(1\le k\le n\), is called \(V-\) shaped if

$$\begin{aligned} p_{\pi (1)}\ge \cdots \ge p_{\pi (k)}\le p_{\pi (k+1)}\le \cdots p_{\pi (n)}. \end{aligned}$$

Eilon and Chowdhury (1972) show that for problem \(1\left| {}\right| V\) there exists an optimal sequence \(\pi \) that is \(V-\)shaped and the longest job is in the first position, i.e., \(\pi (1)=n.\)Cai (1995) extends this result to problem \(1\left| {}\right| WV\), provided that the weights are agreeable, i.e., the jobs can be numbered so that

$$\begin{aligned} p_{1}\le p_{2}\le \cdots \le p_{n} \,\mathrm {and} \,w_{1}\ge w_{2}\ge \cdots \ge w_{n}. \end{aligned}$$
(29)

It is pointed out by Bagchi et al. (1987) that problem \(1\left| {}\right| V\) is equivalent to problem \(1\left| d_{j}=d\right| \frac{1}{n}\sum \left( C_{j}-d\right) ^{2}\) of minimizing the mean squared deviation of the completion times with respect to a common due date d. De et al. (1989) discuss the differences in the properties of problem \( 1\left| d_{j}=d\right| \frac{1}{n}\sum \left( C_{j}-d\right) ^{2}\) that depend on a relative value of d; these issues are similar to restrictive and non-restrictive due dates for the problem from Sect. 3.3.

Kubiak (1993) settles the complexity status of problem \(1\left| {}\right| V\) by proving its NP-hardness in the ordinary sense. Several DP algorithms are known to solve the problem in pseudopolynomial time, but it remains unknown whether problem \(1\left| {}\right| WV\) with general weights is NP-hard in the strong sense. Kubiak (1995) reduces problem \(1\left| {}\right| V\) to (an NP-hard) problem of maximizing a quadratic submodular function.

Starting from Kubiak (1995), there have been several attempts to write out problem \(1\left| {}\right| V\) as a Boolean programming problem with a quadratic function, which we now call the half-product; see, e.g., Jurisch et al. (1997) and Badics and Boros (1998). In particular, Badics and Boros (1998) give a formulation of problem \(1\left| {}\right| V\) in terms of Problem HPAdd. The jobs are scanned in the order of their numbering and following decision variables are used:

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if job }j \hbox { is sequenced before job } 1 \\ 0, &{} \quad \mathrm {otherwise,} \end{array} \right. \end{aligned}$$

where \(x_{n}=1\), since an optimal \(V-\)shaped sequence starts with that job. In this case, the completion time of job \(j\in N\) is given by

$$\begin{aligned} C_{j}=\left( 1-x_{j}\right) \sum _{k=1}^{j}p_{k}+p_{j}+\sum _{k=j+1}^{n-1}p_{k}x_{k}+p_{n}, \end{aligned}$$

so that the objective function V as a function of n Boolean variables with \(x_{n}=1\) can be written as

$$\begin{aligned} n^{2}V\left( x_{1},x_{2},\ldots ,x_{n-1},1\right) =H\left( x_{1},x_{2},\ldots ,x_{n-1}\right) +K, \end{aligned}$$

where \(H\left( x_{1},x_{2},\ldots ,x_{n-1}\right) \) is a half-product with \( n-1\) variables and

$$\begin{aligned} K=\sum _{j=1}^{n}j\left( n-j\right) p_{j}^{2}+2\sum _{1\le i<j\le n}i\left( n-j\right) p_{i}p_{j}. \end{aligned}$$

Cheng and Kubiak (2005) reduce problem \(1\left| {}\right| WV\) with agreeable weights to Problem HPAdd with the decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if job }j \hbox { is sequenced after job}\,1 \\ -1, &{} \quad \text {otherwise,} \end{array} \right. \end{aligned}$$

where \(x_{1}=-1\).

3.6 Scheduling with controllable processing times

In scheduling with controllable processing times, the actual durations of the jobs are not fixed in advance, but have to be chosen from a given interval. This area of scheduling has been active since the 1980s, see surveys by Nowicki and Zdrzałka (1990) and by Shabtay and Steiner (2007).

Normally, for a scheduling model with controllable processing times two types of decisions are required: (i) each job has to be assigned its actual processing time, and (ii) a schedule has to be found that provides a required level of quality. There is a penalty for assigning shorter actual processing times, since the reduction in processing time is usually associated with an additional effort, e.g., allocation of additional resources or improving processing conditions. A quality of the resulting schedule is measured with respect to the cost of assigning the actual processing times that guarantee a certain scheduling performance.

The model that is of interest for the purpose of this survey is the following problem of scheduling jobs on a single machine. For each job \(j\in N\), its processing time \(p_{j}\) is not given in advance but has to be chosen by the decision-maker from a given interval \(\left[ \underline{p}_{j}, \overline{p}_{j}\right] \). That selection process can be seen as either compressing (also known as crashing) the longest processing time \(\overline{p }_{j}\) down to \(p_{j}\), and the value \(y_{j}=\overline{p}_{j}-p_{j}\) is called the compression amount of job j. Compression may decrease the completion time of each job j but incurs additional cost \(v_{j}y_{j}\), where \(v_{j}\) is a given non-negative unit compression cost. The goal is to find the actual processing times and the sequence of jobs such that the sum of the total weighted completion time \(\sum _{j\in N}w_{j}C_{j}\) and the total compression cost \(\sum _{j\in N}v_{j}y_{j}\) is minimized. We denote this problem by \(1\left| p_{j}=\overline{p}_{j}-y_{j}\right| \sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\).

Vickson (1980) proves that in an optimal schedule each job is either fully compressed, i.e., \(p_{j}=\underline{p}_{j}\) or fully decompressed, i.e., \(p_{j}=\overline{p}_{j}\).

In this review, we focus of a special case of the problem in which \(\underline{p}_{j}=0\). The resulting problem in NP-hard in the ordinary sense, as independently proved by Hoogeveen and Woeginger (2002) and by Wan et al. (2001). Combining the results by Vickson (1980) and the optimality of the WSPT rule (14) for minimizing \(\sum _{j\in N}w_{j}C_{j}\) on a single machine established by Smith (1956), it follows that in an optimal sequence some jobs will have zero processing times (and therefore zero completion times), while the other jobs will be sequenced in non-decreasing order of \(\overline{p}_{j}/w_{j}\) and for each of these jobs the compression cost is zero.

Janiak et al. (2005) and Kellerer and Strusevich (2013) show that problem \(1\left| p_{j}\!=\!\overline{p}_{j}-y_{j}\right| \sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\) reduces to Problem PosHP. Introduce the Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if }p_{j}=\overline{p}_{j} \\ 0, &{} \quad \mathrm {otherwise} \end{array} \right. . \end{aligned}$$

The completion time of job j satisfies (18), and the objective function can be written as as

$$\begin{aligned} \sum _{j=1}^{n}w_{j}C_{j}+\sum _{j=1}^{n}v_{j}y_{j}= & {} \sum _{j=1}^{n}w_{j}x_{j}\sum _{i=1}^{j}\overline{p}_{i}x_{i}+\sum _{j=1}^{n} \overline{p}_{j}v_{j}\left( 1-x_{j}\right) \\= & {} \sum _{1\le i<j\le n}^{n}\overline{p}_{i}w_{j}x_{i}x_{j}+\sum _{j=1}^{n} \overline{p}_{j}w_{j}x_{j}+\sum _{j=1}^{n}\overline{p}_{j}v_{j}\left( 1-x_{j}\right) , \end{aligned}$$

The last expression is a positive half-product function of the form (3) with

$$\begin{aligned} \alpha _{j}=\overline{p}_{j},~\beta _{j}=w_{j},~\mu _{j}=\overline{p} _{j}w_{j},~\nu _{j}=\overline{p}_{j}v_{j},~K=0. \end{aligned}$$

3.7 Scheduling with rejection

Consider the following model of scheduling with rejection introduced by Engles et al. (2003). The decision-maker has to decide which of the jobs of set N to accept for processing and which to reject. This decision splits the set of jobs into two subsets, \(N_{A}\) and \(N_{R}=N\backslash N_{A}\) of accepted and rejected jobs, correspondingly. Each rejected job j incurs a penalty of \( v_{j}\). The purpose is to minimize the sum of the total weighted completion time \(\sum _{j\in N_{A}}w_{j}C_{j}\) of the accepted jobs and the total rejection penalty \(\sum _{j\in N_{R}}v_{j}\). We denote this problem by \( 1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j} \). Engles et al. (2003) show that this problem is NP-hard in the ordinary sense.

In practice rejection decisions are often taken when the processing capabilities will not allow the completion of all jobs by a given deadline. Kellerer and Strusevich (2013) introduce a restricted version of the problem with rejection, in which all accepted jobs must be completed by a given time d. We denote this problem by \(1\left| rej,C_{j}\le d\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\).

The objective function in each of the problems \(1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) and \(1\left| rej,C_{j}\le d\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j} \) is a positive half-product function of the form (3).

As before, it follows from the optimality of the WSPT rule for minimizing the total weighted completion time \(\sum _{j\in N}w_{j}C_{j}\) on a single machine that in an optimal sequence the accepted jobs will be sequenced in accordance with (14). Renumber the jobs in this order, and introduce the Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1,&{} \quad \text {if }j \text { is accepted} \\ 0,&{} \quad \mathrm {otherwise} \end{array} .\right. \end{aligned}$$

Then an accepted job j completes at time \(C_{j}\) given by (18), and the objective function can be written as

$$\begin{aligned} \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}= & {} \sum _{j=1}^{n}w_{j}x_{j}\sum _{i=1}^{j}p_{i}x_{i}+\sum _{j=1}^{n}v_{j} \left( 1-x_{j}\right) \\= & {} \sum _{1\le i<j\le n}^{n}p_{i}w_{j}x_{i}x_{j}+\sum _{j=1}^{n}p_{j}w_{j}x_{j}+\sum _{j=1}^{n}v_{j} \left( 1-x_{j}\right) , \end{aligned}$$

i.e., as a positive half-product function of the form (3) with

$$\begin{aligned} \alpha _{j}=p_{j},~\beta _{j}=w_{j},~\mu _{j}=p_{j}w_{j},~\nu _{j}=v_{j},~K=0. \end{aligned}$$

Thus, problem \(1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) is Problem PosHP. For problem \( 1\left| rej,C_{j}\le d\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) the condition that all accepted jobs complete no later than time d can be written in the form of an additional knapsack constraint

$$\begin{aligned} \sum _{j=1}^{n}p_{j}x_{j}\le d, \end{aligned}$$

so that the problem can be seen as Problem PosHPK of the form (4).

3.8 Scheduling with controllable release dates

In scheduling with controllable release dates, the actual times at which the jobs enter the system are not fixed in advance, but have to be chosen from a given interval. These problems can serve as mathematical models of situations that arise in supply chain scheduling, i.e., when the times by which the supplier delivers the required materials to the manufacturer can be negotiated.

If the due dates \(r_{j}\) are fixed and the jobs are numbered in non-decreasing order of their values, then the optimal makespan, i.e., the maximum completion time, \(C_{\max }\) is given

$$\begin{aligned} C_{\max }(S^{*})=\max _{1\le u\le n}\left\{ r_{u}+\sum _{j=u}^{n}p_{j}\right\} . \end{aligned}$$

In this review, we focus on the model studied by Shakhlevich and Strusevich (2006), in which the processing times are fixed and equal to \(p_{j}\), and the decision-maker chooses the actual values of the release dates \(r_{j}\) from a given interval \(\left[ \underline{r},\bar{r}\right] \), the same for all jobs \(j\in N\). We further assume that the length of the interval exceeds the sum of all processing times. Reducing \(\bar{r}\) to some actual value \(r_{j}\), \( \underline{r}\le r_{j}\le \bar{r}_{{}}\), incurs additional cost \(\beta _{j}y_{j}\), where \(y_{j}=\bar{r}-r_{j}\) is the compression amount of the corresponding release date. The goal is to find the actual release dates and the sequence of jobs such that the sum of the makespan \(C_{\max }\) and the total compression cost of the release dates \(\sum _{j\in N}v_{j}y_{j}\) is minimized. We denote this problem by \(1\left| r_{j}\in \left[ \underline{ r},\bar{r}\right] \right| C_{\max }+\sum _{j\in N}v_{j}y_{j}\).

Let the jobs that become available earlier than time \(\bar{r}\) be called early jobs, while the other jobs are called late. Notice that the late jobs have a common release date \(\bar{r}\), while for the early jobs the release dates have been reduced individually. As proved by Shakhlevich and Strusevich (2006), in an optimal schedule either all jobs are late or there exists a sequence of early jobs with the last early job completed at time \(\bar{r}\). It follows from the optimality of the WSPT rule (14) for minimizing \(\sum _{j\in N}w_{j}C_{j}\) on a single machine established by Smith (1956), that in an optimal sequence the early jobs will be sequenced in non-increasing order of \(p_{j}/v_{j}\).

As in Kellerer and Strusevich (2013), considering the jobs in this order, introduce the Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \quad \text {if }j \text { is sequenced early} \\ 0, &{} \quad \text {otherwise} \end{array} .\right. \end{aligned}$$

Then \(1\left| r_{j}\in \left[ \underline{r},\bar{r}\right] \right| C_{\max }+\sum _{j\in N}v_{j}y_{j}\) reduces to minimizing the function

$$\begin{aligned} C_{\max }+\sum _{j\in N}v_{j}y_{j}=\left( \bar{r}+\sum _{j=1}^{n}p_{j}\left( 1-x_{j}\right) \right) +\sum _{1\le i<j\le n}^{n}v_{i}p_{j}x_{i}x_{j}+\sum _{j=1}^{n}p_{j}v_{j}x_{j}, \end{aligned}$$

i.e., to Problem PosHP.

3.9 Scheduling on two identical parallel machines

Unlike in all other scheduling problems previously discussed in this section, here the jobs have to be processed without preemption on two parallel identical machines \(M_{1}\) and \(M_{2}\). The processing time of job j on any of these two machines is \(p_{j}\). In one problem that we consider it is required to minimize the makespan \(C_{\max }\), while in the other problem the objective function is the weighted sum of the completion times. We denote these two problems by \(P2\left| {}\right| C_{\max }\) and \( P2\left| {}\right| \sum w_{j}C_{j}\), respectively. Assume that the jobs are numbered arbitrary in the case of problem \(P2\left| {}\right| C_{\max }\) and in accordance with the WSPT rule (14) in the case of problem \(P2\left| {}\right| \sum w_{j}C_{j}\).

Both problems can be formulated in terms of quadratic Boolean programming (although problem \(P2\left| {}\right| C_{\max }\) is essentially the well-known subset-sum problem, a special case of the linear knapsack problem). The first formulations are given by Jurisch et al. (1997). Below we present the formulations of these problems that are due to Kubiak (2005) and both use a half-product function, written with respect to the “exclusive OR” operation \(\oplus \). Recall that for two Boolean variables \(x_{i}\) and \(x_{j}\) we have that \( x_{i}\oplus x_{j}=1\) if and only if exactly one of these variables is equal to 1. More formally, for a Boolean variable \(x\in \left\{ 0,1\right\} \), define \(\overline{x}=1-x\). Then \(x_{i}\oplus x_{j}=x_{i}\overline{x}_{j}+ \overline{x}_{i}x_{j}\). For a scheduling problem with parallel machines define

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1 , &{} \quad \text {if job }j \text {is scheduled on machine }M_{1} \\ 0 , &{} \quad \text {otherwise} \end{array} .\right. \end{aligned}$$

Then for a schedule in which the jobs are considered in the order of a chosen numbering a job j assigned to machine \(M_{1}\) completes at time \( C_{j}\) that satisfies (18); otherwise, its completion time is

$$\begin{aligned} C_{j}=\sum _{k=1}^{j}p_{k}\left( 1-x_{k}\right) . \end{aligned}$$

For problem \(P2\left| {}\right| C_{\max }\), in order to minimize the makespan it suffices to minimize the product of the completion times of the last jobs assigned to the machines, i.e., to minimize \( \sum _{j=1}^{n}p_{j}x_{j}\sum _{j=1}^{n}p_{j}\left( 1-x_{j}\right) \). It can be verified that

$$\begin{aligned} \sum _{j=1}^{n}p_{j}x_{j}\sum _{j=1}^{n}p_{j}\left( 1-x_{j}\right)= & {} p(N)\sum _{j=1}^{n}p_{j}x_{j}-\sum _{j=1}^{n}p_{j}^{2}x_{j}-2\sum _{1\le i<j\le n}^{{}}p_{i}p_{j}x_{i}x_{j} \\= & {} \sum _{j=1}^{n}\left( p(N)-p_{j}\right) p_{j}x_{j}-2\sum _{1\le i<j\le n}^{{}}p_{i}p_{j}x_{i}x_{j} \\= & {} \sum _{1\le j<i\le n}^{{}}p_{i}p_{j}x_{i}\oplus x_{j}. \end{aligned}$$

For problem \(P2\left| {}\right| \sum w_{j}C_{j}\), we derive

$$\begin{aligned} \sum _{j=1}^{n}w_{j}C_{j}=\sum \limits _{j=1}^{n}w_{j}x_{j}\sum \limits _{i=1}^{j}p_{i}x_{i}+\sum \limits _{j=1}^{n}w_{j}\left( 1-x_{j}\right) \sum \limits _{i=1}^{j}p_{i}\left( 1-x_{i}\right) , \end{aligned}$$

i.e., the problem reduces to Problem HPAdd. It can be also seen that

$$\begin{aligned} \sum _{j=1}^{n}w_{j}C_{j}=\sum _{1\le j<i\le n}^{{}}w_{i}p_{j}x_{i}\oplus x_{j}. \end{aligned}$$

4 Half-product: approximation and scheduling applications

In this section, we review the known results regarding the existing FPTASs for Problem HP, the problem of minimizing the half-product function \( H(\mathbf {x})\) of the form (1). We also discuss the implications to the relevant scheduling problems.

4.1 Approximation schemes

Badics and Boros (1998) present the first systematic study on Problem HP, although similar problems of quadratic Boolean programming appeared in the literature earlier, normally in connection with scheduling problems, see, e.g., Kubiak (1995) and Jurisch et al. (1997). Badics and Boros (1998) give an \(O(n^{4})-\)time algorithm that recognizes whether a quadratic function of n Boolean variables is a half-product. They also give the first FPTAS for the problem of minimizing the half-product function \(H(\mathbf {x})\) of the form (1) that requires \(O(n^{2}\log \widehat{A}/\varepsilon )\) time, where \( \widehat{A}=\sum _{j=1}^{n}\alpha _{j}\). Notice that this running time is not strongly polynomial with respect to the length of the input.

Erel and Ghosh (2008) give the first FPTAS that requires strongly polynomial time \(O(n^{2}/\varepsilon )\). Below we present an extended version of their FPTAS adapted by Sarto Basso and Strusevich (2014) for solving Problem HP with an additional knapsack constraint (5). Thus, in terms of set-functions the problem under consideration is \(\min \left\{ H\left( U\right) |\alpha \left( U\right) \le A,U\subseteq N\right\} \).

We start by presenting a dynamic programming algorithm (DP) from Erel and Ghosh (2008) and Sarto Basso and Strusevich (2014) and then explain how this algorithm can be converted into an FPTAS. Our description is done in terms of set-functions. The DP algorithm scans the items in the sequence \(\left( 1,2,\ldots ,n\right) \) and manipulates the states of the form \(\left( U_{k},\alpha (U_{k}),H\left( U_{k}\right) \right) \), where \(U_{k}\subseteq \left\{ 1,2,\ldots ,k\right\} \) is the set of the selected elements that represents a partial solution, \(\alpha (U_{k})\) is the weight of the knapsack and \(H\left( U_{k}\right) \) is the value of the objective function for the partial solution. Given a state \(\left( U_{k},\alpha (U_{k}),H\left( U_{k}\right) \right) \), it is always feasible not to include the next element \(k+1\) into the knapsack, while a new element is included only if it fits the knapsack and decreases the current value of the objective. Notice that for all generated partial solutions the values of the objective function are negative. Formally, the algorithm can be stated as follows.

Algorithm DPHP

Step 1 :

Initialize \((U_{0},\alpha (U_{0}),H\left( U_{0}\right) )=(\varnothing ,0,0)\).

Step 2 :

For all k from 0 to \(n-1\) do:

(a):

Make transitions from each stored state of the form \( (U_{k},\alpha (U_{k}),H\left( U_{k}\right) )\) into the state \( (U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) by setting \( U_{k+1}=U_{k},~\alpha (U_{k+1})=\alpha (U_{k})\), \(H\left( U_{k+1}\right) =H\left( U_{k}\right) \). Additionally, if \(\alpha (U_{k})+\alpha _{k+1}\le A \) (i.e., item \(k+1\) fits into the knapsack) and \(\alpha (U_{k})\beta _{k+1}-\gamma _{k+1}<0\) (item \(k+1\) makes a negative contribution into the objective function), create another state \((U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) by setting \(U_{k+1}=U_{k}\cup \left\{ k+1\right\} ,~\alpha (U_{k+1})=\alpha (U_{k})+\alpha _{k+1}\), \(H\left( U_{k+1}\right) =H\left( U_{k}\right) +\alpha (U_{k})\beta _{k+1}-\gamma _{k+1}\).

(b):

For all generated states \((U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) with the same \(\alpha (U_{k+1})\) value, retain the one with smallest value of \(H\left( U_{k+1}\right) .\)

Step 3 :

Output the optimal value of the function that corresponds to the smallest value of \(H\left( U_{n}\right) \) among all found states of the form \((U_{n},\alpha (U_{n}),H\left( U_{n}\right) )\).

The running time of the algorithm is \(O\left( nA\right) \). Its correctness follows from the fact that for two states \((U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) and \((U_{k+1}^{\prime },\alpha (U_{k+1}^{\prime }),H\left( U_{k+1}^{\prime }\right) )\) generated in iteration k we can keep only the former state, provided \(\alpha (U_{k+1})\le \alpha (U_{k+1}^{\prime })\) and \(H\left( U_{k+1}\right) \le H\left( U_{k+1}^{\prime }\right) \). This is proved in Badics and Boros (1998) for their DP for problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \), and the proof carries over if the knapsack constraint is added.

To convert Algorithm DP into an FPTAS, Erel and Ghosh (2008) use a popular technique of thinning the solution space, making sure that the number of states kept after each iteration is \(O\left( n/\varepsilon \right) \). For an iteration \(k,\, 0\le k\le n-1\), compute \(LB_{k+1}\), the smallest objective function value among all states \((U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) generated after Step 2(a) of Algorithm DP. Recall that \( LB_{k+1}\), as well as all other function values computed by the algorithm, is negative. Thus, since \(LB_{k+1}\ge H\left( U_{*}\right) \), we deduce that \(\left| LB_{k+1}\right| \le \left| H\left( U_{*}\right) \right| \). For a given \(\varepsilon >0\), define \({\varDelta } _{k+1}=\left( \varepsilon \left| LB_{k+1}\right| \right) /n=-\varepsilon LB_{k+1}/n\). It follows that for each k, \(0\le k\le n-1,\) the inequality \({\varDelta }_{k+1}\le \varepsilon \left| H\left( U_{*}\right) \right| /n\) holds.

To convert Algorithm DPHP into an FPTAS for problem \(\min \left\{ H\left( U\right) |\alpha (U)\le A,U\subseteq N\right\} \) we only need to replace Step 2(b) by another storage mechanism:

  1. (i)

    Divide the interval \([LB_{k+1},0]\) into subintervals of width \({\varDelta }_{k+1}\).

  2. (ii)

    From all states \((U_{k+1},\alpha (U_{k+1}),H\left( U_{k+1}\right) )\) generated in Step 2(a) with \(H\left( U_{k+1}\right) \) in the same subinterval, retain the one with the smallest \(\alpha (U_{k+1})\).

Notice that the number of subintervals created in each iteration is \(O\left( n/\varepsilon \right) \). Since for each subinterval at most one state is kept with the function value in that subinterval, the total number of states kept in each iteration in \(O\left( n/\varepsilon \right) \). The resulting algorithm outputs a set \(U_{\varepsilon }\) such that \(H\left( U_{\varepsilon }\right) -H\left( U_{*}\right) \le \varepsilon \left| H\left( U_{*}\right) \right| \) and requires \(O\left( n^{2}/\varepsilon \right) \) time, i.e., behaves as an FPTAS for problem \(\min \left\{ H\left( U\right) |\alpha \left( U\right) \le A,U\subseteq N\right\} \), as well as for the less restricted Problem HP. Notice that time \(O\left( n^{2}/\varepsilon \right) \) is the fastest possible for an FPTAS for these problems, since computing the objective function for fixed values of decision variables (or, equivalently, a given set U) requires \(O\left( n^{2}\right) \) time.

Kubiak (2005) introduces another type of the half-product function that is defined in terms of the exclusive OR operation (see Sect. 3.9) as follows

$$\begin{aligned} H_{\alpha ,\beta }\left( \mathbf {x}\right) =-\sum _{1\le j<i\le n}^{{}}\alpha _{i}\beta _{j}x_{i}\oplus x_{j}. \end{aligned}$$
(30)

This function is called the symmetric half-product, since for any vector \(\mathbf {e}=\left( e_{1},e_{2},\ldots ,e_{n}\right) \) with positive components the equalities \(H_{\alpha ,\beta }\left( \mathbf {x}\right) =H_{\alpha -e,\beta }\left( \mathbf {x}\right) +H_{e,\beta }\left( \mathbf {x} \right) \) and \(H_{\alpha ,\beta }\left( \mathbf {x}\right) =H_{\alpha ,\beta -e}\left( \mathbf {x}\right) +H_{\alpha ,e}\left( \mathbf {x}\right) \) hold. For scheduling applications, the ordered symmetric half-products are of special interest, in which either the components of the vector \( \alpha =\left( \alpha _{1},\alpha _{2},\ldots ,\alpha _{n}\right) \) are non-decreasing or the components of the vector \( \beta =\left( \beta _{1},\beta _{2},\ldots ,\beta _{n}\right) \) are non-increasing. In either case, Kubiak (2005) shows that applying a dynamic programming algorithm to the instance of the problem with appropriately rounded components of the ordered vector results into an FPTAS that requires \(O(n^{2}/\varepsilon )\) time.

It is pointed by Badics and Boros (1998) that algorithms that behave as an FPTAS for the problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \), i.e., Problem HP, do not necessarily deliver an \(\varepsilon -\)approximate solution for the problem \(\min \left\{ F\left( U\right) |U\subseteq N\right\} \), i.e., Problem HPAdd with \(F\left( U\right) =H\left( U\right) +K\). In other words, the inequality \(H\left( U_{\varepsilon }\right) -H\left( U_{*}\right) \le \varepsilon \left| H\left( U_{*}\right) \right| \) does not imply \(F\left( U_{\varepsilon }\right) -F\left( U_{*}\right) \le \varepsilon \left| F\left( U_{*}\right) \right| \). This is due to the fact that \(H\left( U_{*}\right) <0\) and it is possible that \(\left| F\left( U_{*}\right) \right| =\left| H\left( U_{*}\right) +K\right| <\left| F\left( U_{*}\right) \right| \), despite the fact that both Problems HP and HPAdd have the same optimal solution \(U_{*}\) and for any set U the equality \(F\left( U\right) -F\left( U_{*}\right) =H\left( U\right) -H\left( U_{*}\right) \) holds.

A systematic discussion of these issues is provided by Kubiak (2005) and Janiak et al. (2005). Kubiak (2005) proves the following statement.

Theorem 1

[Kubiak (2005)] Let \(U_{\varepsilon }\) be a solution delivered by an FPTAS for problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \). If \(\left| H\left( U_{*}\right) /F\left( U_{*}\right) \right| \le \alpha \) for some positive \(\alpha >0\), then \(F\left( U_{\varepsilon }\right) -F\left( U_{*}\right) \le \varepsilon \alpha F\left( U_{*}\right) \).

If the condition of Theorem 1 holds for an \(\alpha \) that is bounded from above by a polynomial of the length of the input of Problem HPAdd, then an FPTAS by Erel and Ghosh applied to Problem HP with \(\varepsilon ^{\prime }=\varepsilon /\alpha \) gives a solution \(F\left( U_{\varepsilon }\right) -F\left( U_{*}\right) \le \varepsilon \alpha F\left( U_{*}\right) \), i.e., behaves as an FPTAS for minimizing the function \(F\left( U\right) \) that requires \(O\left( n^{2}\alpha /\varepsilon \right) \) time.

For various scheduling applications, there are examples for which \(\alpha \) is either a constant or a polynomial of n; see Sect. 4.2. On the other hand, Janiak et al. (2005) demonstrate for Problem HPAdd related to problem \(1\left| p_{j}=\overline{p}_{j}-y_{j}\right| \,\sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\) (see Sect. 3.6) that \(\left| H(\mathbf {x}^{*})/F(\mathbf {x}^{*})\right| >F(n) \) for any positive rational function of n.

Erel and Ghosh (2008) develop another approach to Problem HPAdd. Suppose that a lower bound \(F_{LB}\) and an upper bound \(F^{UB}\) on the optimal value of the function F are available, i.e., \(F_{LB}\le F\left( U_{*}\right) \le F^{UB}\).

Theorem 2

[Erel and Ghosh (2008)] For Problem HPAdd, let \(F_{LB}\) and \(F^{UB}\) denote a lower bound and an upper bound, respectively, on the optimal value of the objective function, i.e., for \(\min \left\{ F\left( U\right) |U\subseteq N\right\} \) the inequalities \(F_{LB}\le F\left( U_{*}\right) \le F^{UB}\) hold. The problem admits an approximation algorithm that delivers a solution \(U_{0}\) such that \(F\left( U_{0}\right) -F_{LB}\le \varepsilon F_{LB}\) in \(O(\beta n^{2}/\varepsilon )\) time, where \(\beta \ge F^{UB}/F_{LB}\).

For the algorithm that is guaranteed by Theorem 2 to be an FPTAS it is required that \(\beta \) should be bounded from above by a polynomial of the length of the input.

If for some initial lower and upper bounds the ratio \(\beta \ge F^{UB}/F_{LB}\) is not bounded by a polynomial, then Erel and Ghosh explain how to tighten the bounds by a procedure similar to binary search.

Theorem 3

[Erel and Ghosh (2008)] Under the conditions of Theorem  2, Problem HPAdd admits a general FPTAS that requires \( O(n^{2}\log \beta /\varepsilon )\) time.

In particular, if for problem \(\min \left\{ F\left( U\right) |U\subseteq N\right\} \) the initial \(F^{UB}\) is equal to K, and the initial \(F_{LB}\) is set to be equal to \(1/\varepsilon \), then the general FPTAS guaranteed by Theorem 3 requires \(O\left( n^{2}\log \left( K\varepsilon \right) /\varepsilon \right) \) time. Since normally we may assume that \(\varepsilon <1\), this gives the running time of \(O\left( n^{2}\log \left( K\right) /\varepsilon \right) \).

4.2 Scheduling applications

We start with the problem that is probably most studied in connection with the half-product minimization, namely problem \(1\left| {}\right| V\) of minimizing the completion time variance, see Section 3.5. The first FPTAS for problem \(1\left| {}\right| V\) is given by De et al. (1992). It takes \(O\left( n^{3}/\varepsilon \right) \) time and does not involve any reformulation in terms of quadratic Boolean programming. Badics and Boros (1998) adapt their FPTAS for Problem HP to problem \(1\left| {}\right| V\) but obtain an algorithm that requires \(O(n^{3}\log p(N)/\varepsilon )\).

The best time of an FPTAS for problem \(1\left| {}\right| V\) known so far is \(O(n^{2}/\varepsilon )\) and is achieved in several papers, all based on a quadratic Boolean reformulations of the problem:

  1. (i)

    Kubiak et al. (2002) use a reformulation of problem \(1\left| \right| V\) in terms of a function similar to (30);

  2. (ii)

    Kubiak (2005) reformulates the problem as a symmetric ordered half-product;

  3. (iii)

    it is shown by Kubiak et al. (2002) that for the half-product formulation of problem \(1\left| {}\right| V\) the inequality \(\left| H(\mathbf {x}^{*})/F(\mathbf {x}^{*})\right| \le 3\) holds, so that Theorem 1 with \(\alpha =3\) implies that the FPTAS of Erel and Ghosh (2008) gives an \(\varepsilon -\)approximate solution to problem \(1\left| {}\right| V\) in \(O(n^{2}/\varepsilon )\) time.

For problem \(1\left| {}\right| WV\) to minimize the weighted completion time variance with agreeable due dates Cai (1995) gives an approximation scheme that requires \(O\left( Wn^{2}/\left( w_{\min }\varepsilon \right) \right) \), where W is the sum of all weights defined by (15) and \(w_{\min }\) is the smallest weight. Notice that if applied to problem \(1\left| {}\right| V\) to minimize the completion time variance, this scheme is an FPTAS that requires \(O\left( n^{3}/\varepsilon \right) \) time, since \(W=n\) and \(w_{\min }=1\); this corresponds to best running time for the problem known at the time, see De et al. (1992).

Assume that in problem \(1\left| {}\right| WV\) the jobs are numbered in accordance with (29). The first FPTAS for problem \(1\left| {}\right| WV\) is due to Woeginger (1999) and requires \(O(n^{5}\log ^{5}\left( \max \left\{ p_{n},w_{1},\right. \right. \left. \left. n,1/\varepsilon \right\} \right) /\varepsilon ^{5})\) time. An improved algorithm by Cheng and Kubiak (2005) is based on an adaptation of the algorithm by Badics and Boros (1998) and requires \(O(n^{4}\log \left( \max \!\left\{ p_{n},w_{1},n\right\} \right) \!/\varepsilon )\) time.

Erel and Ghosh (2008) report on several improvements regarding the running time of an FPTAS for problem \(1\left| {}\right| WV\). They claim that their general FPTAS can be adapted in a similar way as it is done by Cheng and Kubiak (2005) with respect to the FPTAS by Badics and Boros (1998), and this results in a scheme that runs in \(O(n^{2}\log \left( \max \left\{ p_{n},w_{1}\right\} \right) /\varepsilon )\) time. Further, it is known from Cheng and Kubiak (2005) that the constant term K in the formulation of the problem in the form \(F(\mathbf {x})=H(\mathbf {x})+K\) can be seen as an upper bound \(F^{UB}\) on the optimal value of the function, while there exists a lower bound \(F_{LB}\le F(\mathbf {x}^{*})\) such that \(K\le 4n^{2}F_{LB}\) . Thus, \(\beta =4n^{2}\), and the algorithm guaranteed by Theorem 2 is an FPTAS that needs \(O(\beta n^{2}/\varepsilon )=O(n^{4}/\varepsilon )\) time, which is strongly polynomial in the length of the problem input. Moreover, for an FPTAS that is guaranteed by Theorem 3 the running time reduces to \(O(n^{2}\log \beta /\varepsilon )=O(n^{2}\log n/\varepsilon )\).

Consider now problem \(1|d_{j}=d,p(N)>d|\sum w_{j}(E_{j}+T_{j})\) of minimizing the total weighted earliness and tardiness about a common non-restrictive due date; see Sect. 3.3. Hall and Posner (1991) show that the problem is solvable by a dynamic programming algorithm. We may assume that

$$\begin{aligned} n\le \max _{j\in N}\left\{ p_{j},w_{j}\right\} , \end{aligned}$$
(31)

since otherwise the DP algorithm will require polynomial time.

The first FPTAS for this problem is due to Kovalyov and Kubiak (1999), the running time is \(O(n^{2}\log ^{3}\left( \max \left\{ p_{j},w_{j},n,1/\varepsilon \right\} /\varepsilon ^{2}\right) \), or under the assumption (31), is \(O(n^{2}\log ^{3}\left( \max \left\{ p_{j},w_{j},1/\varepsilon \right\} /\varepsilon ^{2}\right) \); their approach does not involve a half-product reformulation. Kubiak (2005) reformulates the problem as an ordered symmetric half-product. He uses the problem as one of the examples for which a representation \(F(\mathbf {x})=H(\mathbf {x})+K\) is possible, but \( \left| H(\mathbf {x}^{*})/F(\mathbf {x}^{*})\right| \) can be arbitrary large, so that there is no direct conversion of an FPTAS for Problem HP to an FPTAS for this scheduling problem based on Theorem 1. Erel and Ghosh (2008) show that for their general FPTAS from Theorem 3 the running time of \(O\left( n^{2}\log \left( K\right) /\varepsilon \right) \) time under the assumption (31) becomes \(O(n^{2}\log \left( \max \left\{ p_{j},w_{j}\right\} /\varepsilon \right) \), since here \(K=\sum _{i=1}^{n}w_{i}\sum _{j=1}^{i}p_{j}\le n^{2}\max \left\{ p_{j},w_{j}\right\} \).

Problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) formulated in Sect. 3.2 also admits a reformulation as Problem HPAdd. Let the set N of jobs be partitioned into two subsets \(N_{1}\) and \(N_{2}\). Consider a schedule in which the jobs of set \(N_{1}\) are assigned to the first group, while the jobs of set \(N_{2}\) are scheduled in the second group, after the MP. For such a schedule, let \(F_{{\varPhi } }(N_{1},N_{2})\) and \(F_{0}(N_{1},N_{2}) \) denote the values of the makespan in problems \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) and \(1\left| Cumu,MP(0)\right| C_{\max },\) respectively. Further, let \(N_{1}^{*}({\varPhi } )\) and \(N_{2}^{*}({\varPhi } )\) denote the sets that form a partition associated with a schedule that is optimal for \(1\left| Cumu,MP({\varPhi } )\right| C_{\max },\, {\varPhi } \ge 0\).

As seen from (23), a partition that defines an optimal schedule for problem \(1\left| Cumu,\right. \) \(MP\left. (0)\right| C_{\max }\) is such that \( p(N_{1})^{2}+p(N_{2})^{2}\) is as small as possible. Finding such a partition \(N_{1}^{*}(0)\) and \(N_{2}^{*}(0)\) reduces to the subset-sum problem which admits a very fast FPTAS by Kellerer et al. (2003) that requires no more than \(O(\min \left\{ n/\varepsilon ,n+1/\varepsilon ^{2}\log \left( 1/\varepsilon \right) \right\} )\) time. The found sets \(N_{1}^{\varepsilon }\) and \(N_{2}^{\varepsilon }\) are such that \(p(N_{1}^{\varepsilon })^{2}+p(N_{1}^{\varepsilon })^{2}\le \left( 1+\varepsilon \right) p(N_{1}^{*}(0))^{2}+p(N_{2}^{*}(0))^{2}\), but because of the additive constant in (23) the value \(F_{0}(N_{1}^{\varepsilon },N_{2}^{\varepsilon })\) may be larger than \(\left( 1+\varepsilon \right) F_{0}(N_{1}^{*}(0),N_{2}^{*}(0))\). Still, Kellerer et al. (2013) show that an FPTAS for the subset-sum problem can be converted into an FPTAS for problem \(1\left| Cumu,MP(0)\right| C_{\max }\).

For \({\varPhi } >0\) and an arbitrary partition \(N=N_{1}\cup N_{2}\), it is proved by Kellerer et al. (2013) that

$$\begin{aligned} F_{{\varPhi } }(N_{1},N_{2})\le \left( 1+\frac{{\varPhi } }{2}\right) F_{0}(N_{1},N_{2}). \end{aligned}$$

This allows expressing the lower and upper bounds on the optimal makespan in terms of an \(\varepsilon -\)approximate solution to problem \(1\left| Cumu,MP(0)\right| C_{\max }\), so that the ratio \(\beta =F^{UB}/F_{LB}\) of the bounds is at most \(\left( 1+\frac{{\varPhi } }{2}\right) \left( 1+\varepsilon \right) \), and the algorithm guaranteed by Theorem 2 behaves as an FPTAS for problem \(1\left| Cumu,MP({\varPhi } )\right| C_{\max }\) that runs in \(O(n^{2}/\varepsilon )\) time.

The half-product formulation of problem \(P2\left| {}\right| C_{\max } \) from Sect. 3.9 does not contain a constant term. Thus, the fastest FPTAS results from a direct application of the scheme by Erel and Ghosh (2008) which requires \(O(n^{2}/\varepsilon )\) time. It should be mentioned that this problem is not the best to handle via quadratic programming. In fact, it is equivalent to the subset-sum problem for which there is a very fast FPTAS by Kellerer et al. (2003) that requires no more than \(O\left( \min \left\{ n/\varepsilon ,n+1/\varepsilon ^{2}\log \left( 1/\varepsilon \right) \right\} \right) \) time.

For problem \(P2\left| {}\right| \sum w_{j}C_{j}\) it is shown by Kubiak (2005) that for the half-product formulation the inequality \(\left| H(\mathbf {x}^{*})/F(\mathbf {x}^{*})\right| \le 2\) holds. Thus, due to Theorem 1 with \(\alpha =2\) it follows that the scheme by Erel and Ghosh (2008) requires \(O(n^{2}/\varepsilon )\) time. Notice that Sahni (1976) gives an FPTAS of the same running time derived from different principles.

5 Positive half-product: approximation and scheduling applications

In this section, we describe an approach to designing an FPTAS for Problem PosHP of minimizing function (3) and its knapsack-constrained variant, Problem PosHPK. This approach is developed by Kellerer and Strusevich (2013) and results into the fastest possible FPTASs for each of these problems, with the running time \(O\left( n^{2}/\varepsilon \right) \). However, this is achieved under the assumption that the objective function is convex. Notice that for all known scheduling applications of this result, the objective function is convex, i.e., the convexity assumption does not affect applicability of this approach. Recall that for function (3) to be convex, it is sufficient that (11) holds; see Sect. 2.2. Below we mainly focus on Problem PosHPK, which is more general than the unrestricted Problem PosHP.

5.1 Approximation scheme: general principles

According to Kellerer and Strusevich (2013), there are two main prerequisites that are required for designing an FPTAS for the problems under consideration.

The first of these prerequisites is a DP algorithm that finds an exact solution in pseudopolynomial time. The DP algorithm presented below is very similar to Algorithm DPHP for Problem HP given in Sect. 4.1, although written in terms of the Boolean programming notation, rather than the set-function notation. Define

$$\begin{aligned} A_{k}=\sum _{j=1}^{k}\alpha _{j},k=1,2,\ldots ,n. \end{aligned}$$

and suppose that the values \(x_{1},x_{2},\ldots ,x_{k}\) have been assigned. The DP algorithm deals with partial solutions associated with states of the form

$$\begin{aligned} \left( k,Z_{k},y_{k}\right) , \end{aligned}$$

where

  • k is the number of the assigned variables;

  • \(Z_{k}\) is the current value of the objective function;

  • \(y_{k}:=\sum _{j=1}^{k}\alpha _{j}x_{j}\); for Problem PosHPK \(y_{k}\) denotes the total weight of the items currently put into the knapsack.

We now give a formal statement of the DP algorithm. Notice that

$$\begin{aligned} \sum _{1\le i<j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}=\sum _{j=2}^{n}\beta _{j}x_{j}\sum _{i=1}^{j-1}\alpha _{i}x_{i}. \end{aligned}$$

Algorithm DP1

Step 1 :

Start with the initial state \((0,Z_{0},y_{0})=(0,K,0).\) Compute the values \(A_{k}=\sum _{j=1}^{k}\alpha _{j},k=1,2,\ldots ,n.\)

Step 2 :

For all k from 1 to n make transitions from each stored state of the form

$$\begin{aligned} \left( k-1,Z_{k-1},y_{k-1}\right) \end{aligned}$$
(32)

into the states of the form

$$\begin{aligned} \left( k,Z_{k},y_{k}\right) \end{aligned}$$
(33)

by assigning the next variable \(x_{k}\).

(a):

Define \(x_{k}=1,\) provided that item k fits into the knapsack, i.e., if the inequality \(y_{k-1}+\alpha _{k}\le A\) holds. If feasible, the assignment \(x_{k}=1\) changes a state (32) to a state of the form (33), where

$$\begin{aligned} Z_{k}=Z_{k-1}+\beta _{k}y_{k-1}+\mu _{k},~y_{k}=y_{k-1}+\alpha _{k}. \end{aligned}$$
(34)
(b):

Define \(x_{k}=0,\) which is always feasible. This assignment changes a state of the form (32) into the state of the form (33) such that

$$\begin{aligned} Z_{k}=Z_{k-1}+\nu _{k};~y_{k}=y_{k-1}. \end{aligned}$$
(35)
Step 3 :

Find \(Z_{n}^{*}\), the smallest value of \(Z_{n}\) among all found states of the form \((n,Z_{n},y_{n})\). Perform backtracking and find vector \(\mathbf {x}^{*}=\left( x_{1}^{*},x_{2}^{*},\ldots ,x_{n}^{*}\right) \) that leads to \(Z_{n}^{*}\). Output \(\mathbf {x} ^{*}\) and \(P\left( \mathbf {x}^{*}\right) =Z_{n}^{*}\).

Algorithm DP1 can be implemented in \(O\left( nA\right) \) time. This algorithm will serve as a template for DP algorithms for several other problems considered in this paper; see Sects. 6.1 and 8.

In order to convert Algorithm DP1 into a fast FPTAS, the second prerequisite is needed, which is a polynomial time algorithm that finds an upper bound \(P^{UB}\), such that for all instances of the Problem PosHPK the inequality \(P^{UB}/P\left( \mathbf {x}^{*}\right) \le R\) holds, where R is a constant.

Below we describe an approximation scheme that delivers the required performance, provided that both mentioned prerequisites (a DP algorithm and a bounded ratio approximation algorithm) are available. The scheme follows the steps of Algorithm DP1, and in order to reduce the number of computed function values, out of all generated states with close objective function values the scheme keeps only one state, that with the smallest current weight of the knapsack. Notice that the inequality \(P\left( \mathbf {x}^{*}\right) \ge \frac{1}{R}P^{UB}\) implies that \(P_{LB}=\frac{1}{R}P^{UB}\) is a lower bound on \(P\left( \mathbf {x}^{*}\right) \).

Algorithm EpsPosHPK

Step 1 :

Given an upper bound \(P^{UB}\) such that \(P^{UB}/P\left( \mathbf {x}^{*}\right) \le R\), define a lower bound \(P_{LB}:=\frac{1}{R} P^{UB}\). For an arbitrary \(\varepsilon >0\), define \(\delta :=\frac{ \varepsilon }{n}P_{LB}.\) Split the interval \(\left[ 0,P^{UB}\right] \) into subintervals \(I_{1}\), \(I_{2},\ldots \) of length \(\delta \) each.

Step 2 :

Store the initial state \((0,Z_{0},y_{0})\) with \(Z_{0}=K\) and \(y_{0}=0\). For each \(k,1\le k\le n\), do the following:

(a):

In line with Algorithm DP1, move from a stored state \((k-1,Z_{k-1},y_{k-1})\) to at most two states of the form \((k,\tilde{Z}_{k}, \tilde{y}_{k})\), where \(\tilde{Z}_{k}\le P^{UB}\), using the relations (34) and (35).

(b):

For each interval \(I_{q}\), find the state \(\left( k,Z_{k},y_{k}\right) \) such that \(Z_{k}\) belongs to \(I_{q}\) and \(y_{k}\le \tilde{y}_{k}\) for all states \((k,\tilde{Z}_{k},\tilde{y}_{k})\) with \(\tilde{ Z}_{k}\) from \(I_{q}\). Keep only state \(\left( k,Z_{k},y_{k}\right) \) and remove all other states \((k,\tilde{Z}_{k},\tilde{y}_{k})\) with \(\tilde{Z} _{k} \) from \(I_{q}\).

Step 3 :

Determine \(Z^{\varepsilon }\) as the smallest value of \(Z_{n}\) among the states \((n,Z_{n},y_{n})\). Perform backtracking and find the vector \(\mathbf {x}^{\varepsilon }=\left( x_{1}^{\varepsilon },x_{2}^{\varepsilon },\ldots ,x_{n}^{\varepsilon }\right) \) that leads to \(Z^{\varepsilon }\). Output \(\mathbf {x}^{\varepsilon }\) and \(P\left( \mathbf {x}^{\varepsilon }\right) \) as an approximate solution of Problem PosHPK.

Define \(v:=\left\lceil P^{UB}/\delta \right\rceil =\left\lceil Rn/\varepsilon \right\rceil \). In Step 2, moving from iteration \(k-1\) to k, Algorithm EpsPosHPK creates at most 2v states from at most v kept states, and moves to the next iteration with at most k stored states. Thus, for each k, Step 2 takes O(v) time, and the overall running time of Algorithm EpsPosHPK is \(O\left( nv\right) =O\left( Rn^{2}/\varepsilon \right) \). The following statement summarizes the behaviour of the algorithm.

Theorem 4

Let \(\mathbf {x}^{\varepsilon }\) be a vector found by Algorithm EpsPosHPK applied to Problem PosHPK to minimize a function \(P\left( \mathbf {x}\right) \) of the form (3), with a lower bound \(P_{LB}\) and an upper bound \(P^{UB}\) on the optimal value. Then \(P\left( \mathbf {x}^{\varepsilon }\right) -P\left( \mathbf {x}^{*}\right) \le \varepsilon P_{LB}\) and the running time of the algorithm is \( O(Rn^{2}/\varepsilon )\) time, where \(R=P^{UB}/P_{LB}.\)

5.2 Continuous relaxation and constant-ratio approximation

In this subsection, we explain how to obtain the second prerequisite needed for the FPTAS. To find the required upper bound \(P^{UB}\) the following approach is used by Kellerer and Strusevich (2013). For Problem PosHPK, let Problem PosHPKr be its continuous relaxation, i.e., the problem obtained from the original Boolean formulation by relaxing the integrality constraints and replacing the condition \(x_{j}\in \left\{ 0,1\right\} \) by \( 0\le x_{j}\le 1\), \(j=1,2,\ldots ,n\). For Problem PosHP, the continuous relaxation is denoted by Problem PosHPr. To derive the corresponding upper bound \(P^{UB}\), Kellerer and Strusevich (2013) first solve the continuous relaxation and then perform an appropriate rounding to obtain a heuristic Boolean solution to the original problem. In order to make sure that the continuous relaxation can be solved in polynomial time, the assumption on the convexity of the objective function is adopted.

Introduce the continuous relaxation of Problem PosHPK under the numbering (11), obtained by replacing the integrality condition \(x_{j}\in \{0,1\}\) by \(0\le \,x_{j}\le 1\) for each \(j=1,2,\ldots ,n\). The resulting Problem PosHPKr, belongs to a general area of Quadratic Programming in which it is required to optimize a quadratic function subject to linear constraints. See Hochbaum (2005, 2008) for detailed reviews of quadratic optimization with integer and continuous variables.

The problem of convex quadratic programming is known to be solvable in polynomial time by a modified ellipsoid algorithm due to Kozlov et al. (1979). The fastest known algorithm for this problem is given by Monteiro and Adler (1989) and requires \(O(n^{3}P)\) time, where n is the number of variables and P is the total length of the input coefficients. However, it is still unknown whether the problem admits a strongly polynomial algorithm, even if the number of linear constraints is fixed or even equal to one, as in the continuous relaxation of the Quadratic Knapsack Problem (Problem QK). Recall that the continuous relaxation of Problem QK to minimize a separable concave quadratic function under a single linear constraint is NP-hard, as proved by Moré and Vavasis (1991).

For problems with n continuous decision variables, if the objective function is convex and separable, i.e., is the sum of (not necessarily quadratic) convex functions, each depending on one decision variable only, then the problem with linear constraints admits a polynomial-time algorithm developed by Hochbaum and Shantikumar (1990). Problem QK to minimize a separable convex quadratic function is solvable in strongly polynomial time. Bretthauer and Shetty (1997) give multiple references to various algorithms for this problem. The best known algorithm is due to Brucker (1984), and it requires only O(n) time. Moreover, an extension of Problem QK to the problem of minimizing a separable differentiable convex (non-necessarily quadratic) function subject to a fixed number of linear constraints also admits an O(n)-time algorithm developed by Berman et al. (1993).

Recently, Romeijn et al. (2007) have given an \(O(n^{3})-\)time algorithm that maximizes a non-separable convex function of a special structure subject to two knapsack constraints. They specifically point out that their problem is different from Problem QK in possible applications and solution techniques.

In order to design an FPTAS that for each Problem PosHP and Problem PosHPK requires \(O(n^{2}/\varepsilon )\) time, Problem PosHPKr and Problem PosHPKr must be solved in most \(O(n^{2})\) time.

Following Kellerer and Strusevich (2013), below we outline a possible approach to solving the continuous relaxations. Assume that function (3) is convex. Using the fact that for a Boolean variable \(x_{j}=x_{j}^{2},\, j\in N \), rewrite as

$$\begin{aligned} P(\mathbf {x})= & {} \sum _{1\le i<j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{j=1}^{n}\mu _{j}x_{j}+\sum _{j=1}^{n}\nu _{j}\left( 1-x_{j}\right) +K \\= & {} \sum _{1\le i\le j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}-\sum _{j=1}^{n}\left( \nu _{j}-\alpha _{j}\beta _{j}-\mu _{j}\right) x_{j}+\sum _{j=1}^{n}\nu _{j}+K. \end{aligned}$$

Introduce new decision variables \(\chi _{j}=\alpha _{j}x_{j}\), \(j=1,2,\ldots ,n\), and rewrite the continuous relaxation of Problem PosHPK as

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} P(\mathbf {x})=\sum \limits _{i=1}^{n}c_{i}\chi _{i}\sum \limits _{j=1}^{i}\chi _{j}-\sum _{j=1}^{n}\gamma _{j}\chi _{j}+K^{\prime } \\ \text {Subject to} &{} \sum _{j=1}^{n}\chi _{j}\le A \\ &{} 0\le \chi _{j}\le \alpha _{j},~j=1,2,\ldots ,n; \end{array} \end{aligned}$$

where \(K^{\prime }=\sum _{j=1}^{n}\nu _{j}+K\), \(c_{j}=\beta _{j}/\alpha _{j}\) and \(\gamma _{j}=\left( \nu _{j}-\alpha _{j}\beta _{j}-\mu _{j}\right) /\alpha _{j}\). We can reformulate the objective function in an almost separable form

$$\begin{aligned} \sum \limits _{i=1}^{n}c_{i}\chi _{i}\sum \limits _{j=1}^{i}\chi _{j}=\frac{1}{2} \sum _{i=1}^{n}c_{i}\chi _{i}^{2}+\frac{1}{2}\sum _{i=1}^{n-1}\left( c_{i}-c_{i+1}\right) \left( \sum _{j=1}^{i}\chi _{j}\right) ^{2}+\frac{1}{2} c_{n}\left( \sum _{i=1}^{n}\chi _{i}\right) ^{2}; \end{aligned}$$

the proof of a similar equality can be found in Kellerer and Strusevich (2010b).

Fig. 1
figure 1

A example of a series-parallel network for \(n=4\): a rooted tree with the leaves connected to the sink \(v_{t}\)

Introduce the network G with the set V of vertices and set E of arcs. Set V consists of a single source \(v_{s}\), a single sink \(v_{t}\), the vertices \(w_{n},w_{n-1},\ldots ,w_{2}\) and the vertices \(t_{n},t_{n-1}, \ldots ,t_{1}\). Set E consists of the following arcs: \(\left( v_{s},w_{n}\right) \) of capacity A, \((w_{j},t_{j})\) of capacity \(\alpha _{j}\) and \((w_{j},w_{j-1})\) of capacity \(\sum _{i=1}^{j-1}\alpha _{i}\) for \(j=n,n-1,\ldots ,3\); \((w_{2},t_{2})\) and \((w_{2},t_{1})\) of capacity \(\alpha _{2}\) and \(\alpha _{1}\), respectively; besides, for each j, \(1\le j\le n\) , vertex \(t_{j}\) is connected to the sink by the arc \(\left( t_{j},v_{t}\right) \) of capacity \(\alpha _{j}\). Let f be a flow on an arc, then the cost of that flow is defined as \(\frac{1}{2}c_{n}f^{2}\) for arc \( \left( v_{s},w_{n}\right) \), as \(\frac{1}{2}\left( c_{j-1}-c_{j}\right) f^{2} \) for each arc \((w_{j},w_{j-1})\) where \(j=n,n-1,\ldots ,3\); as \(\frac{1 }{2}c_{j}f^{2}-\gamma _{j}^{\prime }f\) for the arc that enters vertex \(t_{j} ,\, j=2,3,\ldots ,n\); as \((c_{1}-\frac{1}{2}c_{2})f^{2}-\gamma _{1}^{\prime }f \) for arc \((w_{2},t_{1})\), while the cost of the flow on each arc that enters the sink is zero. It is clear that the minimum cost of the flow in the constructed network corresponds to the minimum value of \(Z-K^{\prime }\), while the flow on the arc that enters vertex \(t_{j}\) is equal to the corresponding value of the decision variable \(\chi _{j}\).

For illustration, consider the example below for \(n=4\). The network is shown in Fig. 1, while its parameters are given in Table 2.

Tamir (1993) presents an algorithm that minimizes a quadratic convex flow cost function on a series-parallel network with a single source and sink. In our case, network G satisfies the required condition, since it is a rooted tree with a single source and sink. Another point that makes our problem a special case of the one solved by Tamir is that his model is parametric, with the sum of all decision variables bounded by a running parameter that in his paper is denoted by q. For this parametric problem, each decision variable is defined as a piecewise-linear function of q. In our case, we only need an output of Tamir’s algorithm for \(q=A\), where A is either \(\sum _{j\in N}\alpha _{j}\) (for Problem PosHPr) or the right-hand side of the knapsack constraint (for Problem PosHPKr).

In general, for a network with the set of vertices V and the set of arcs E, the running time of Tamir’s algorithm is \(O(\left| V\right| \left| E\right| +\left| E\right| \log \left| E\right| )\), and it takes extra \(O(\log \left| E\right| )\) time to output the solution for a particular value of q. Since for our network G, we have that \(\left| V\right| =O(n)\) and \(\left| E\right| =O(n)\), we conclude that the following statement holds.

Table 2 Parameters of the network

Theorem 5

Each Problem PosHPr and Problem PosHPKr with a convex objective function can be solved in \(O(n^{2})\) time.

Denote the vector that solves a Problem PosHPKr (or problem PosHPr) by \( \mathbf {x}^{C}=\left( x_{1}^{C},x_{2}^{C},\ldots ,x_{n}^{C}\right) \). Obviously, for each Problem PosHP and Problem PosHPK, the inequality \( P\left( \mathbf {x}^{C}\right) \le P\left( \mathbf {x}^{*}\right) \) holds. The components of vector \(\mathbf {x}^{C}\) can be appropriately rounded, so that for the resulting Boolean vector \(\mathbf {x}^{H}=\left( x_{1}^{H},x_{2}^{H},\ldots ,x_{n}^{H}\right) \), the inequality \(P\left( \mathbf {x}^{H}\right) \le R~P\left( \mathbf {x}^{*}\right) \) holds, where R is a constant. Notice that the actual value of R does not have be particularly small; what is needed a fast a fast constant-ratio rounding algorithm.

In the corresponding rounding algorithms the number \(\lambda =\frac{1}{2} \sqrt{5}-\frac{1}{2}=0.618\,03\) plays an important role. This number is the positive root of the equation \(x^{2}=1-x\). Notice that

$$\begin{aligned} \frac{1}{\lambda ^{2}}=\frac{1}{1-\lambda }=\frac{3+\sqrt{5}}{2}=2.\,618\cdots >1.\,618 \cdots =\frac{1}{\lambda }. \end{aligned}$$

The algorithm below uses an approximation algorithm for a linear knapsack minimization problem. Consider the minimization linear knapsack problem with the set of items I.

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \sum _{j\in I}c_{j}y_{j} \\ \hbox {Subject to} &{} \sum _{j\in I}q_{j}y_{j}\ge Q \\ &{} y_{j}\in \left\{ 0,1\right\} ,~j\in I. \end{array} \end{aligned}$$

Let \(\mathbf {y}^{*}\) be an optimal solution vector. Csirik et al. (1991) give an \(O(n\log n)\) algorithm, which they call Algorithm GR, that finds a vector \(\mathbf {y}^{H}\) such that

$$\begin{aligned} \sum _{j\in I}c_{j}y_{j}^{H}\le \frac{3}{2}\sum _{j\in I}c_{j}y_{j}^{*}. \end{aligned}$$

There are other algorithms known for the problem that also provide a constant ratio; see, e.g., Güntzer and Jungnickel (2000).

Algorithm PosHPKConstR

Step 1 :

Input vector \(\mathbf {x}^{C}=\left( x_{1}^{C},x_{2}^{C},\ldots ,x_{n}^{C}\right) \) that solves Problem  PosHPKr. Define \(\lambda :=\frac{1}{2}\sqrt{5}-\frac{1}{2}\).

Step 2 :

Define \(N_{1}:=\left\{ j\in N|x_{j}^{C}\le \lambda \right\} \) and \(N_{2}:=N\backslash N_{1}\).

Step 3 :

Introduce the following auxiliary linear knapsack problem

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \sum _{j\in N_{2}}\nu _{j}y_{j} \\ \hbox {Subject to} &{} \sum _{j\in N_{2}}\alpha _{j}y_{j}\ge \sum _{j\in N_{2}}\alpha _{j}-A \\ &{} y_{j}\in \left\{ 0,1\right\} ,\, j\in N_{2}. \end{array} \end{aligned}$$
(36)

Run Algorithm GR by Csirik et al. (1991) to find a vector \(\mathbf {y}^{H}\) with components \(y_{j}^{H},\, j\in N_{2}\), which delivers an approximate solution to problem (36).

Step 4 :

Output vector \(\mathbf {x}^{H}\) with components \(x_{j}^{H}=0\) for \(j\in N_{1}\) and \(x_{j}^{H}=1-y_{j}^{H}\) for \(j\in N_{2}\) and the value \( Z(\mathbf {x}^{H})\). Stop.

The following statement addresses the performance of the rounding algorithm.

Theorem 6

Let \(\mathbf {x}^{*}\) be a vector that delivers an optimal solution to Problem PosHPK with a convex objective function. Algorithm PosHPKConstR requires \(O(n\log n)\) time and finds a vector \( \mathbf {x}^{H}\) such that

$$\begin{aligned} \frac{P(\mathbf {x}^{H})}{P\left( \mathbf {x}^{*}\right) }\le \frac{7+ \sqrt{5}}{2}=4.618\ldots \end{aligned}$$

Algorithm PosHPKConstR can easily be simplified to handle Problem PosHP with no knapsack constraint. It suffices to skip Step 3 all together and set \( x_{j}^{H}=1\) for \(j\in N_{2}\). The modified rounding algorithm requires only O(n) time and finds a vector \(\mathbf {x}^{H}\) such that

$$\begin{aligned} \frac{P(\mathbf {x}^{H})}{P\left( \mathbf {x}^{*}\right) }\le \frac{3+ \sqrt{5}}{2}=2.618\ldots \end{aligned}$$

Thus, we can summarize the results reviewed Sects. 5.1 and 5.2 as the following statement.

Theorem 7

Problem PosHP and Problem PosHPK with a convex objective of the form (3) admits an FPTAS that requires \( O(n^{2}/\varepsilon )\) time.

In the following section, we discuss the implications of Theorem 7 for various scheduling applications.

5.3 Scheduling Applications

In Sect. 3, several scheduling problems are shown to reduce to Problems PosHP and PosHPK. As demonstrated by Kellerer and Strusevich (2013) , each of these problems admits an FPTAS that runs in \(O\left( n^{2}/\varepsilon \right) \) time. Notice that for all these problems, in an optimal schedule the jobs are sequenced in accordance with a certain permutation that is a obtained by a form of the WSPT rule (14), which is similar to (11). This fact implies convexity of the corresponding function, which is an assumption in Theorem 7.

Problem \(1\left| p_{j}=\overline{p}_{j}-y_{j}\right| \sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\) formulated in Sect. 3.6 is an example of a scheduling problem for which a reformulation in the form \(F(\mathbf {x})=H(\mathbf {x})+K\) is possible, but \( \left| H(\mathbf {x}^{*})/F(\mathbf {x}^{*})\right| \) can be arbitrary large; see Janiak et al. (2005) and Sect. 4.1. In fact, exactly this scheduling problem has motivated Janiak et al. to introduce the positive half-product. By reducing problem \(1\left| p_{j}=\overline{p}_{j}-y_{j}\right| \sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\) to Problem PosHP, Janiak et al. (2005) report an FPTAS that requires either \(O\left( n^{2}\log \left( \sum \overline{p}_{j}\right) /\varepsilon \right) \) or \( O\left( n^{2}\log \left( \sum w_{j}\right) /\varepsilon \right) \) time. Theorem 3 guarantees that the general FPTAS by Erel and Ghosh (2008) of the running time \(O\left( n^{2}\log \left( K\varepsilon \right) /\varepsilon \right) \) takes \(O(n^{2}\log \left( \max \left\{ p_{j},w_{j},n\right\} )/\varepsilon \right) \) time, since here \(K=\sum _{j=1}^{n}\overline{p}_{j}v_{j}\le n\max \left\{ \overline{p} _{j}^{2},v_{j}^{2}\right\} \).

Recall that in a job sequence that is optimal for problem \(1\left| p_{j}= \overline{p}_{j}-y_{j}\right| \sum _{j\in N}w_{j}C_{j}+\sum _{j\in N}v_{j}y_{j}\) some jobs will have zero processing times, while the other jobs will be sequenced in non-decreasing order of \(\overline{p}_{j}/w_{j}\). This means that the problem reduces to Problem PosHP with a convex objective function, so that Theorem 7 applies and the problem admits an FPTAS that runs in \(O\left( n^{2}/\varepsilon \right) \) time.

Problem \(1\left| r_{j}\in \left[ \underline{r},\bar{r}\right] \right| C_{\max }+\sum _{j\in N}v_{j}y_{j}\) from Sect. 3.8 reduces to Problem PosHPK; see Shakhlevich and Strusevich (2006) and Sect. 3.8. Interpreting the results of Janiak et al. (2005), this implies that the problem admits an FPTAS that runs either in \(O\left( n^{2}\log \left( p(N)\right) /\varepsilon \right) \) or \(O\left( n^{2}\log \left( \sum v_{j}\right) /\varepsilon \right) \) time. Since here \(K=p(N)+\overline{r}\), Theorem 3 guarantees that the general FPTAS by Erel and Ghosh (2008) will require \(O(n^{2}\log \left( p(N)+\overline{r} )/\varepsilon \right) .\) The convexity of the objective function follows from the fact that in an optimal sequence the early jobs will be sequenced in non-increasing order of \(p_{j}/v_{j}\). Due to Theorem 7, the problem admits an FPTAS that runs in \(O\left( n^{2}/\varepsilon \right) \) time.

For problem \(1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) from Sect. 3.7, Engles et al. (2003) present an FPTAS that requires \(O\left( n^{2}\log \left( \sum p_{j}\right) /\varepsilon \right) \) time. Their reasoning does not use a link between this problem and quadratic Boolean programming. As demonstrated in Kellerer and Strusevich (2013) (see also Sect. 3.7), the objective function problems \(1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) and \(1\left| rej,C_{j}\le d\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) is a positive half-product function of the form (3). In both problems, an optimal sequence of the accepted jobs is formed in accordance with (14), which implies that the objective function is convex. Due to Theorem 7, each problem \(1\left| rej\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) and \(1\left| rej,C_{j}\le d\right| \sum _{j\in N_{A}}w_{j}C_{j}+\sum _{j\in N_{R}}v_{j}\) admits an FPTAS that runs in \(O\left( n^{2}/\varepsilon \right) \) time.

6 Symmetric quadratic knapsack: approximation and scheduling applications

In this section, we discuss an FPTAS that is capable of handling instances of Problem SQK that are related to scheduling applications listed in Sect. 3. Full technical details for the development of such an FPTAS are given in Kellerer and Strusevich (2010a, b). Below we only stress the differences between their approach and the approach to designing an FPTAS for Problem PosHPK outlined in Section 5.

6.1 Approximation scheme

To design an FPTAS for Problem SQK the same two prerequisites are needed as for Problem PosHPK: a DP algorithm and a constant-ratio approximation algorithm.

We start with DP algorithms for solving Problem SQK given in the form (6). These algorithms first appeared in Kellerer and Strusevich (2010a), and under some additional conditions they can be converted into an FPTAS.

Unlike for Problem PosHPK, here we need two versions of the DP algorithm. One of these versions is a minor modification of Algorithm DP1 from Sect. 5.1 and uses the same states of the form \(\left( k,Z_{k},y_{k}\right) \). These states will be called the primal states, and the DP algorithm that manipulates the primal sates will be called the primal algorithm.

For our purposes, we also need another form of the DP algorithm that manipulates the states of the dual form \((k,Z_{k},\widetilde{y}_{k})\), where k and \(Z_{k}\) have the same meaning as above, while \(\widetilde{y} _{k}=A_{k}-y_{k}\). It is clear that \(\widetilde{y}_{k}\) is the total weight of the considered items that have not been put into the knapsack.

The primal DP algorithm, which we call Algorithm PDP can be easily deduced from Algorithm DP1. All what is needed is to modify Step 2 by replacing the recursive formula (34) by the formula

$$\begin{aligned} Z_{k+1}=Z_{k}+\beta _{k+1}y_{k}+\mu _{k+1},~y_{k+1}=y_{k}+\alpha _{k+1}, \end{aligned}$$
(37)

and the recursive formula (35) by

$$\begin{aligned} Z_{k+1}=Z_{k}+\beta _{k+1}\left( A_{k}-y_{k}\right) +\nu _{k+1};~y_{k+1}=y_{k}. \end{aligned}$$
(38)

The corresponding dual DP algorithm, which we will refer to as Algorithm DDP, also starts with the state (0, K, 0), but manipulates the dual states. We skip its formal description, since is it very similar to that of Algorithm PDP. It suffices to say that in iteration k, given a state

$$\begin{aligned} \left( k,Z_{k},\widetilde{y}_{k}\right) , \end{aligned}$$

Algorithm DDP transforms it into a state

$$\begin{aligned} \left( k+1,Z_{k+1},\widetilde{y}_{k+1}\right) , \end{aligned}$$

where for \(x_{k+1}=1\) we define

$$\begin{aligned} Z_{k+1}=Z_{k}+\beta _{k+1}(A_{k}-\widetilde{y}_{k})+\mu _{k+1},\,\widetilde{y}_{k+1}=\widetilde{y}_{k}, \end{aligned}$$
(39)

provided that \(A_{k}-\widetilde{y}_{k}\le A\), while for \(x_{k+1}=0\) we define

$$\begin{aligned} Z_{k+1}=Z_{k}+\beta _{k+1}\widetilde{y}_{k}+\nu _{k+1},~\widetilde{y}_{k+1}= \widetilde{y}_{k}+\alpha _{k+1}. \end{aligned}$$
(40)

Algorithm PDP and Algorithm DDP can be implemented efficiently to run in O(nA) time. Let \(Z^{*}\) denote the optimal value of the objective function (6).

Assume now the second prerequisite has also been obtained, i.e., for Problem SQK, an upper bound \(Z^{UB}\) such that \(Z^{UB}/Z^{*}\le \rho \) can be found in polynomial time, where \(\rho \) is a positive constant. As in Sect. 5, given \(Z^{UB}\), we derive that

$$\begin{aligned} Z_{LB}=\frac{1}{\rho }Z^{UB} \end{aligned}$$

is a lower bound on \(Z^{*}\).

The FPTAS for Problem SQK appears to be more elaborate compared to the FPTAS for Problem PosHPK, where the latter is obtained by a rather straightforward conversion of a DP algorithm.

It is worth mentioning that Woeginger (2000) proves that if a dynamic programming algorithm for some optimization problem possesses a certain structure, then it can be converted into an FPTAS. Notice that the method of Woeginger is not applicable to Problem SQK. The reason is that variable \(y_{k}\) in the recursion for \(Z_{k+1}\) given in (38) has a negative coefficient. In particular, the objective function of Problem SQK is not what is called cc-benevolent in Woeginger (2000).

Below we explain that Condition C.1(i) of the scheme given in Woeginger (2000) is not satisfied. For the DP algorithm for Problem SQK we consider the state vectors \(S=(s_{1},s_{2})=(Z_{k},y_{k})\) and \(S^{\prime }=(s_{1}^{\prime },s_{2}^{\prime })=(Z_{k}^{\prime },y_{k}^{\prime })\). Moreover, we are given a degree-vector \(D=(d_{1},d_{2})\), with \(d_{1},\, d_{2}\) positive integers. For a real number \({\varDelta } >1\), vector S is said to be \([D,{\varDelta }]\) -close to vector \(S^{\prime }\), if

$$\begin{aligned} {\varDelta } ^{-d_{\ell }}\cdot s_{\ell }\le s_{\ell }^{\prime }\le {\varDelta } ^{d_{\ell }}\cdot s_{\ell },\quad \ell =1,2. \end{aligned}$$

Condition C.1(i) implies that if S is \([D,{\varDelta } ]\)-close to \(S^{\prime }\) and \(y_{k}^{\prime }\le y_{k}\), then also the inequalities

$$\begin{aligned} {\varDelta } ^{-d_1}Z_{k+1}\le Z_{k}^{\prime }+\beta _{k+1}\left( A_{k}-y_{k}^{\prime }+\nu _{k+1}\right) \le {\varDelta } ^{d_{1}}Z_{k+1} \end{aligned}$$
(41)

hold for \(Z_{k+1}=Z_{k}+\beta _{k+1}\left( A_{k}-y_{k}\right) +\nu _{k+1}\). Notice that the inequality \(y_{k}^{\prime }\le y_{k}\) is due to the fact that \(y_{k}\) can be considered as critical coordinate.

Choosing \(Z_{k}=Z_{k}^{\prime }=\nu _{k+1}=0\), the inequalities (41) reduce for \(\ell =1\) to \(A_{k}-y_{k}^{\prime }\le {\varDelta } ^{d_{1}}\left( A_{k}-y_{k}\right) \) for \({\varDelta } ^{-d_{1}}\cdot y_{k}\le y_{k}^{\prime }\le y_{k}\). It can be easily seen that this cannot be true if \(A_{k}\) is close enough to \(y_{k}\). Thus, designing an FPTAS for Problem SKQ cannot be done within the standard scheme and requires special actions, as outlined below.

The FPTAS for Problem SKQ has been developed in Kellerer and Strusevich (2010a, b). It is based on both DP algorithms, the primal and the dual. To reduce the number of computed function values, we round the computed values up to a multiple of a chosen small number. To reduce the number of states stored after each iteration we split the range of possible \(y-\)values (and \(\widetilde{y}-\)values) into subintervals of a variable length and for each of the resulting subintervals we keep at most two \(y-\)values (and at most two \(\widetilde{y}-\)values) related to the same value of the function.

Algorithm EpsSQK

Step 1 :

Given an instance of Problem SQK, find an upper bound \(Z^{UB}\) on the optimal value \(Z^{*}\) of the objective function, such that \( Z^{UB}/Z^{*}\le \rho \).

Step 2 :

Given an arbitrary \(\varepsilon >0\), define \(Z_{LB}=\frac{1}{\rho }Z^{UB}\) and

$$\begin{aligned} \delta =\frac{\varepsilon Z_{LB}}{2n}. \end{aligned}$$
Step 3 :

Let there be \(h\le n\) distinct values among \(\beta _{j},\,j=1,2,\ldots ,n\). Sort these values in decreasing order, i.e., determine a permutation \(\pi =\left( \pi (1),\pi (2),\ldots ,\pi (h)\right) \) such that

$$\begin{aligned} \beta _{\pi (1)}>\beta _{\pi (2)}>\cdots >\beta _{\pi (h)}. \end{aligned}$$

Split the interval \(\left[ 0,\frac{Z^{UB}}{\beta _{\pi (h)}}\right] \) into h intervals

$$\begin{aligned} I_{1}=\left[ 0,\frac{Z^{UB}}{\beta _{\pi (1)}}\right] ,I_{2}=\left[ \frac{ Z^{UB}}{\beta _{\pi (1)}},\frac{Z^{UB}}{\beta _{\pi (2)}}\right] ,\ldots ,I_{h}=\left[ \frac{Z^{UB}}{\beta _{\pi (h-1)}},\frac{Z^{UB}}{\beta _{\pi (h)}}\right] . \end{aligned}$$

Additionally, split each interval \(I_{j}\) into subintervals \(I_{j}^{r}\) of length \(\delta /\beta _{\pi (j)}\) (it may turn out that the last of the subintervals of an interval \(I_{j}\) is strictly shorter than \(\delta /\beta _{\pi (j)}\)).

Step 4 :

Store the initial state (0, K, 0). For each \(k,0\le k\le n-1\) , do the following:

(a):

According to Algorithm PDP, move from a stored primal state \((k,Z_{k},y_{k})\) to at most two primal states of the form \( (k+1,Z_{k+1},y_{k+1})\), where \(Z_{k+1}\le Z^{UB}\), using the relations (37) and (38), each time rounding up the updated value of \( Z_{k+1}\) to the next multiple of \(\delta \). For each selection of states with the same value of \(Z_{k+1}\) and a subinterval \(I_{j}^{r},\) determine the value \(y_{k+1}^{\min }\) as the smallest value of \(y_{k+1}\) that belongs to \(I_{j}^{r}\) and the value \(y_{k+1}^{\max }\) as the largest value of \( y_{k+1}\) that belongs to \(I_{j}^{r}\). If these values exist and are distinct, then out of all states \((k+1,Z_{k+1},y_{k+1})\) with the same value of \(Z_{k+1}\) for \(y_{k+1}\in \left[ y_{k+1}^{\min },y_{k+1}^{\max }\right] \) store only two states \((k+1,Z_{k+1},y_{k+1}^{\min })\) and \( (k+1,Z_{k+1},y_{k+1}^{\max })\).

(b):

According to Algorithm DDP, move from a stored dual state \( (k,Z_{k},\widetilde{y}_{k})\) to at most two dual states of the form \((k+1,Z_{k+1},\widetilde{y}_{k+1})\), where \(Z_{k+1}\le Z^{UB}\), using the relations (39) and (40), each time rounding up the updated value of \(Z_{k+1}\) to the next multiple of \(\delta \). For each selection of states with the same value of \(Z_{k+1}\) and a subinterval \( I_{j}^{r}\), determine the value \(\widetilde{y}_{k+1}^{\min }\) as the smallest value of \(\widetilde{y}_{k+1}\) that belongs to \(I_{j}^{r}\) and the value \(\widetilde{y}_{k+1}^{\max }\) as the largest value of \(\widetilde{y} _{k+1}\) that belongs to \(I_{j}^{r}\). If these values exist and are distinct then out of all states \((k+1,Z_{k+1},\widetilde{y}_{k+1})\) with the same value of \(Z_{k+1}\) for \(\widetilde{y}_{k+1}\in \left[ \widetilde{y} _{k+1}^{\min },\widetilde{y}_{k+1}^{\max }\right] \) store only two states \( (k+1,Z_{k+1},\widetilde{y}_{k+1}^{\min })\) and \((k+1,Z_{k+1},\widetilde{y} _{k+1}^{\max })\).

(c):

For each primal state \((k+1,Z_{k+1},y_{k+1})\) stored in Step 4(a) of this iteration additionally store the dual state \((k+1,Z_{k+1},\widetilde{ y}_{k+1})\), where \(\widetilde{y}_{k+1}=A_{k+1}-y_{k+1},\) unless it coincides with one of the states stored in Step 4(b) of this iteration.

(d):

For each dual state \((k+1,Z_{k+1},\widetilde{y}_{k+1})\) stored in Step 4(b) of this iteration additionally store the primal state \( (k+1,Z_{k+1},y_{k+1})\), where \(y_{k+1}=A_{k+1}-\widetilde{y}_{k+1}\), unless it coincides with one of the states stored in Step 4(a) of this iteration.

Step 4 :

Among all values \(Z_{n}\) found in Step 4 identify the smallest one associated with a feasible value \(y_{n}\le A\). With this value of \(Z_{n}\), perform the backtracking to find the corresponding decision variables \(x_{j},\, j=1,\ldots ,n\). Compute the value of the objective function with the found \(x_{j}\)’s, call this value \(Z^{\varepsilon }\) and accept it as an approximate value of the objective function.

To understand better the role of the intervals created in Step 3 of Algorithm EpsSQK, for each \(k,\, 0\le k\le n-1\), define

$$\begin{aligned} B(k):=\max \{\beta _{k+1},\beta _{k+2},\ldots ,\beta _{n}\}. \end{aligned}$$
(42)

The following statement holds.

Lemma 2

[Kellerer and Strusevich (2010a)] Assume that the primal dynamic programming Algorithm PDP is applied to Problem SQK and finds a chain of states

$$\begin{aligned} (0,K,0),(1,Z_{1}^{*},y_{1}^{*}),\ldots ,(n,Z_{n}^{*},y_{n}^{*}) \end{aligned}$$

leading to the optimal value \(Z^{*}=Z_{n}^{*}\). Then for each \(k,\,0\le k\le n-1\), for B(k) defined by (42) either

$$\begin{aligned} B(k)y_{k}^{*}\le Z^{*}, \end{aligned}$$

or

$$\begin{aligned} B(k)\widetilde{y}_{k}^{*}\le Z^{*}, \end{aligned}$$

where \(\widetilde{y}_{k}^{*}=A_{k}-y_{k}^{*}\).

The following statement studies the behavior of Step 4 of Algorithm EpsSQK.

Lemma 3

[Kellerer and Strusevich (2010a)] Assume that the primal dynamic programming Algorithm PDP is applied to Problem SQK and finds a chain of primal states

$$\begin{aligned} (0,K,0),(1,Z_{1}^{*},y_{1}^{*}),\ldots ,(n,Z_{n}^{*},y_{n}^{*}) \end{aligned}$$

leading to the optimal value \(Z^{*}=Z_{n}^{*}\). Let

$$\begin{aligned} (0,K,0),(1,Z_{1}^{*},\widetilde{y}_{1}^{*}),\ldots ,(n,Z_{n}^{*}, \widetilde{y}_{n}^{*}) \end{aligned}$$

be the corresponding chain of dual states. Then for each \(k,1\le k\le n,\) Algorithm EpsSQK finds

  1. (i)

    a pair of primal states \(\left( k,Z_{k}^{\prime },y_{k}^{\prime }\right) \) and \(\left( k,Z_{k}^{\prime \prime },y_{k}^{\prime \prime }\right) \) such that

    $$\begin{aligned} Z_{k}^{\prime }\le Z_{k}^{*}+2k\delta ;~Z_{k}^{\prime \prime }\le Z_{k}^{*}+2k\delta \end{aligned}$$
    (43)

    and

    $$\begin{aligned} y_{k}^{\prime }\le y_{k}^{*}\le y_{k}^{\prime \prime },~y_{k}^{\prime \prime }-y_{k}^{*}\le \frac{\delta }{B(k)},~y_{k}^{*}-y_{k}^{\prime }\le \frac{\delta }{B(k)}; \end{aligned}$$
  2. (ii)

    a pair of dual states \(\left( k,Z_{k}^{\prime },\widetilde{y}_{k}^{\prime }\right) \) and \(\left( k,Z_{k}^{\prime \prime },\widetilde{y} _{k}^{\prime \prime }\right) \) such that (43) holds and

    $$\begin{aligned} \widetilde{y}_{k}^{\prime }\le \widetilde{y}_{k}^{*}\le \widetilde{y} _{k}^{\prime \prime },~\widetilde{y}_{k}^{\prime \prime }-\widetilde{y} _{k}^{*}\le \frac{\delta }{B(k)},~\widetilde{y}_{k}^{*}-\widetilde{y }_{k}^{\prime }\le \frac{\delta }{B(k)}, \end{aligned}$$

where B(k) is defined by (42).

Based on Lemmas 2 and 3, the main theorem can be proved.

Theorem 8

[Kellerer and Strusevich (2010a)] Let \(Z^{*}\) denote an optimal value of the objective function for Problem SQK. Given a positive \(\varepsilon \), Algorithm EpsSQK outputs a value \(Z^{\varepsilon }\) such that

$$\begin{aligned} Z^{\varepsilon }-Z^{*}\le \varepsilon Z^{*} \end{aligned}$$

and requires \(O\left( T(n)+\frac{n^{4}}{\varepsilon ^{2}}\right) \) time, where T(n) denotes the time needed for finding an upper bound \(Z^{UB}\) such that \(Z^{UB}/Z^{*}\le \rho .\)

For scheduling applications a version of Problem SQK in which all \(\beta _{j}=1\) can be of certain importance (this corresponds to the case of equal weights of jobs). In this case Algorithm EpsSQK is less time-consuming. In Step 3 of the algorithm it is sufficient to split the interval \(\left[ 0,Z^{UB}\right] \) into subintervals of equal length \(\delta \). Thus, in each iteration for at most \(Z^{UB}/\delta \) values of the objective function and each of \(Z^{UB}/\delta \) subintervals we store at most two states, i.e., the total number of states created and stored in each iteration is \(O\left( \left( \frac{Z^{UB}}{\delta }\right) ^{2}\right) \), i.e., factor n less than in the general case of arbitrary \(\beta _{j}\). This reduces the overall running time of Algorithm EpsSQK for the case that all \(\beta _{j}=1\) to \( O\left( T(n)+\frac{n^{3}}{\varepsilon ^{2}}\right) \).

The running time estimate in Theorem 8 is valid, provided that the second prerequisite is available, i.e., a polynomial-time algorithm exists that finds a heuristic solution with the objective function value \( Z^{UB}\), which does not exceed \(\rho Z^{*}\) for a constant \(\rho \). Notice that Algorithm EpsSQK remains an FPTAS if the ratio \(\rho \) in \(Z^{UB}/Z^{*}\le \rho \) is not a constant but polynomially depends on n . More precisely, if \(\rho =O(n^{c})\) for a positive c, then the running time of Algorithm EpsSQK is \(O\left( T(n)+\frac{n^{2c+4}}{\varepsilon ^{2}} \right) \).

Below, we present a constant-ratio approximation algorithm for Problem SQK under specific additional conditions. As in Sect. 4, one of these assumptions is the convexity of the objective function, which can be guaranteed by the numbering of items given by (11). The algorithm below is based on rounding a solution to a continuous relaxation of Problem SQK.

Introduce Problem SQKr, a continuous relaxation of Problem SQK, obtained by replacing the integrality condition \(x_{j}\in \{0,1\}\) by \(0\le \, x_{j}\le 1\) for each \(j=1,2,\ldots ,n\). Using transformations similar to those described in Sect. 5.2 for Problem PosHP, we can rewrite (6) as

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} Z=2\sum \limits _{i=1}^{n}c_{i}\chi _{i}\sum \limits _{j=1}^{i}\chi _{j}-\sum _{j=1}^{n}\gamma _{j}^{\prime }\chi _{j}+K^{\prime } \\ \hbox {subject to} &{} \sum _{j=1}^{n}\chi _{j}\le A \\ &{} 0\le \chi _{j}\le \alpha _{j},~j=1,2,\ldots ,n, \end{array} \end{aligned}$$

where \(c_{j}=\beta _{j}/\alpha _{j},\gamma _{j}^{\prime }=\gamma _{j}/\alpha _{j}\) and \(\chi _{j}=\alpha _{j}x_{j},\, j=1,2,\ldots ,n\). In turn,

$$\begin{aligned} 2\sum \limits _{i=1}^{n}c_{i}\chi _{i}\sum \limits _{j=1}^{i}\chi _{j}=\sum _{i=1}^{n}c_{i}\chi _{i}^{2}+\sum _{i=1}^{n-1}\left( c_{i}-c_{i+1}\right) \left( \sum _{j=1}^{i}\chi _{j}\right) ^{2}+c_{n}\left( \sum _{i=1}^{n}\chi _{i}\right) ^{2}, \end{aligned}$$

so that, as in Sect. 5.2, Problem SQKr can be solved by an algorithm by Tamir (1993) in \(O\left( n^{2}\right) \) time.

Kellerer and Strusevich (2010b) present an algorithm that under an additional condition behaves as a constant-ratio approximation algorithm for the original Problem SQK with Boolean decision variables. The algorithm is based on an appropriate rounding of the solution to the continuous relaxation. In the analysis of the algorithm the value of the objective function for the found optimal solution to Problem SQKr serves as a lower bound on the optimal value for the original Problem SQK.

Informally, the algorithm works as follows. Start with a solution to Problem SQKr and round down to zero those components that are less than a specially chosen value. To determine the other variables, a continuous linear knapsack problem has to be solved to obtain a solution with at most one fractional component. Then the value for that component is fixed to 1, thereby reducing the dimension of the problem, and the process is repeated.

Algorithm Round

Step 1 :

Define Problem \(P_{n}\) as the given Problem SQK of the form (6). Set \(H:=N,F:=\varnothing \) and \(h:=n\).

Step 2 :

Solve the continuous relaxation of problem \(P_{h}\) and find the corresponding solution vector with components \(x_{j}^{CR}\), where \(j\in H \).

Step 3 :

Define the sets \(I_{1}:=\{j\in H|x_{j}^{CR}\le \eta \}\) and \(I_{2}:=\{j\in H|x_{j}^{CR}>\eta \}\), where \(\eta \) is chosen to be the smaller root of the equation \(\eta =\left( 1-\eta \right) ^{2}\), i.e., \(\eta =\frac{3-\sqrt{5}}{2}\approx 0.381\,97.\)

Step 4 :

Set \(x_{j}^{(h)}:=1\) for \(j\in F\) and \(x_{j}^{(h)}:=0\) for \(j\in I_{1}\).

Step 5 :

For each \(j\in I_{2}\), define \(\pi _{j}:=\nu _{j}+\beta _{j}\sum _{i<j,i\in I_{1}}\alpha _{i}+\alpha _{j}\sum _{i>j,i\in I_{1}}\beta _{i}\). Introduce the following auxiliary continuous linear knapsack problem

$$\begin{aligned} \begin{array}{ll} \mathrm {Minimize} &{} \sum _{j\in I_{2}}\pi _{j}(1-x_{j}) \\ \hbox {subject to} &{} \sum _{j\in I_{2}}\alpha _{j}x_{j}\le A \\ &{} 0\le x_{j}\le 1,~j\in I_{2} \end{array} \end{aligned}$$

and solve it in the following greedy way.

(a):

Denote \(u=\left| I_{2}\right| \). Find a sequence \(\sigma =\left( \sigma (1),\ldots ,\sigma (u)\right) \) of items of set \(I_{2}\) sorted in non-increasing order of the cost-weight ratios \(\pi _{j}/\alpha _{j}\).

(b):

Find the index \(\ell \) such that

$$\begin{aligned} \sum _{k=1}^{\ell -1}\alpha _{\sigma (k)}\le A;~\sum _{k=1}^{\ell }\alpha _{\sigma (k)}>A. \end{aligned}$$

An optimal solution to the auxiliary problem above is determined by a vector with components \(x_{\sigma (k)}^{{\varDelta } }=1\) for \(1\le k<\ell ,\, x_{\sigma (k)}^{{\varDelta } }=0\) for \(\ell +1\le k\le u,\) while the value \(x_{\sigma (\ell )}^{{\varDelta } }\) is chosen to satisfy

$$\begin{aligned} \sum _{k=1}^{\ell -1}\alpha _{\sigma (k)}+\alpha _{\sigma (\ell )}x_{\sigma (\ell )}^{{\varDelta } }=A. \end{aligned}$$
Step 6 :

Set \(x_{j}^{(h)}:=0\) for \(j\in I_{1}\). Define \( x_{j}^{(h)}:=x_{j}^{{\varDelta } },j\in I_{2},\, j\ne \sigma (\ell )\) and set \(x_{\sigma (\ell )}^{(h)}:=\left\lfloor x_{\sigma (\ell )}^{{\varDelta } }\right\rfloor \). Compute the value of the objective function Z of the original Problem SQK with \(x_{j}=x_{j}^{(h)}\), \(j\in N\); store this value as \(Z^{(h)}\).

Step 7 :

If either \(x_{\sigma (\ell )}^{(h)}=1\) or \(h=1\), go to Step 9; otherwise, go to Step 8.

Step 8 :

Update \(H:=H\backslash \left\{ \sigma (\ell )\right\} ,\, F:=F\cup \left\{ \sigma (\ell )\right\} \). In problem \(P_{h}\), replace variable \(x_{\sigma (\ell )}\) by 1 and call the resulting problem \(P_{h-1}\) . To derive problem \(P_{h-1}\) from problem \(P_{h}\), we set \(A:=A-\alpha _{\sigma (\ell )}\); keeping the variables other than \(x_{\sigma (\ell )}\) in the same order as in problem \(P_{h}\), renumber them by \(1,\ldots ,h-1\); set \( h:=h-1\) and define \(\mu _{i}:=\mu _{i}+\alpha _{i}\sum _{j=i+1}^{h}\beta _{j}\) for \(i=1,\ldots ,h\). Go to Step 2.

Step 9 :

Output the solution that corresponds to the smallest of the found values \(Z^{(h)}\).

The following statement holds.

Theorem 9

[Kellerer and Strusevich (2010b)] For Problem SQK of the form (6) for which (11) holds and additionally

$$\begin{aligned} \nu _{j}\ge \alpha _{j}\beta _{j},\,j\in N \end{aligned}$$
(44)

Algorithm Round requires \(O(n^{3})\) time and is an approximation algorithm with a ratio of at most \(2+\frac{3}{\eta }=\frac{3\sqrt{5}+13}{2} \approx 9.8541\).

To summarize our discussion of this section, we formulate the main statement regarding a possibility of solving Problem SQK by an FPTAS.

Theorem 10

For Problem SQK of the form (6) for which the conditions (11) and (44) hold, Algorithm EpsSQK is an FPTAS that requires \(O\left( \frac{n^{4}}{\varepsilon ^{2}}\right) \) time.

Notice that the additional conditions (11) and (44) hold for all known scheduling applications of Problem SQK.

6.2 Alternative FPTAS

In this subsection, we describe an approach by Xu (2012) who shows that Algorithm EpsSQK can be formulated as a strongly polynomial FPTAS without additional assumptions, such as convexity. Recall that due to Theorem 8 the running time of EpsSQK is in \(O\left( T(n)+\frac{n^{4}}{ \varepsilon ^{2}}\right) \), where T(n) denotes the time needed for finding an upper bound \(Z^{UB}\) such that \(Z^{UB}/Z^{*}\le \rho .\) If \( Z^{UB}/Z^{*}\) is not bounded by a constant \(\rho \), the running time is given by \(O\left( T(n)+\frac{Z^{UB}}{Z^{LB}}\frac{n^{4}}{\varepsilon ^{2}} \right) \). Hence for obtaining a strongly polynomial FPTAS, it is sufficient to develop a strongly polynomial time algorithm for computing a lower bound \( Z^{LB}\) and an upper bound \(Z^{UB}\) on the optimal objective value of problem SQK, such that the ratio of the bounds is bounded by a polynomial in the size of the instance.

Let \(\Lambda \) denote the set which contains zero and all possible coefficients of the objective function of Problem SQK given in the form (6), i.e.,

$$\begin{aligned} \Lambda =\{0\}\cup \{\alpha _{i}\beta _{j}|1\le i<j\le n\}\cup \{\mu _{j}|1\le j\le n\}\cup \{\nu _{j}|1\le j\le n\}. \end{aligned}$$

Define \(\lambda ^{*}\) as the minimum value of \(\lambda \in \Lambda \) such that there is a Boolean vector \(\mathbf {x}=\left( x_{1},x_{2},\ldots ,x_{n}\right) \) for which the following inequalities hold.

$$\begin{aligned} \alpha _{i}\beta _{j}x_{i}x_{j}\le & {} \lambda ,\quad 1\le i<j\le n, \end{aligned}$$
(45)
$$\begin{aligned} \alpha _{i}\beta _{j}(1-x_{i})(1-x_{j})\le & {} \lambda ,\quad 1\le i<j\le n, \end{aligned}$$
(46)
$$\begin{aligned} \mu _{j}x_{j}\le & {} \lambda ,\quad 1\le j\le n, \end{aligned}$$
(47)
$$\begin{aligned} \nu _{j}\left( 1-x_{j}\right)\le & {} \lambda ,\quad 1\le j\le n, \end{aligned}$$
(48)
$$\begin{aligned} \sum _{j=1}^{n}\alpha _{j}x_{j}\le & {} A. \end{aligned}$$
(49)

Set \(\lambda _{\max }= \max \{\lambda |\lambda \in \Lambda \}\). For \(\lambda =\lambda _{\max }\) the zero vector satisfies all inequalities (45)–(49). Hence, \(\Lambda \) is non-empty and \(\lambda ^*\) is well-defined.

Consider the optimal solution vector \(\mathbf {x}^{*}\) to Problem SQK. Let \(\lambda ^{\prime }\) denote the maximum among the values of \(\alpha _{i}\beta _{j}x_{i}^{*}x_{j}^{*}\), \(\alpha _{i}\beta _{j}(1-x_{i}^{*})(1-x_{j}^{*})\) for \(1\le i<j\le n\), and \(\mu _{j}x_{j}^{*}\), \(\nu _{j}\left( 1-x_{j}^{*}\right) \) for \(1\le j\le n\). Obviously, \(\mathbf {x}^{*}\) satisfies (45)–(49) for \(\lambda =\lambda ^{\prime }\). Since \(0\in \Lambda \) we get \( \lambda ^{*}+K\le Z^{*}\).

Consider now any Boolean vector \(\mathbf {x}\) that satisfies (45)–(49) for \(\lambda =\lambda ^{*}\). Due to (49), \(\mathbf {x}\) is a feasible solution to Problem SQK. We have

$$\begin{aligned}&\sum _{1\le i<j\le n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{1\le i<j\le n}\alpha _{i}\beta _{j}(1-x_{i})(1-x_{j}) \\\le & {} \lambda ^{*}\sum _{1\le i<j\le n}\left( x_{i}x_{j}+(1-x_{i})(1-x_{j})\right) \le \frac{n(n-1)}{2}\lambda ^{*}, \end{aligned}$$

and

$$\begin{aligned} \sum _{j=1}^{n}\mu _{j}x_{j}+\sum _{j=1}^{n}\nu _{j}(1-x_{j})\le \lambda ^{*}\sum _{j=1}^{n}\left( x_{j}+(1-x_{j})\right) =n\lambda ^{*}. \end{aligned}$$

These two inequalities imply \(Z^{*}\le \left( \frac{n(n-1)}{2}+n\right) \lambda ^{*}+K\). Hence, the following statement holds.

Lemma 4

For Problem SQK, the values \(Z^{LB}=\lambda ^{*}+K\) and \( Z^{UB}=\left( \frac{n(n-1)}{2}+n\right) \lambda ^{*}+K\) are a lower bound and an upper bound on the optimal value \(Z^{*}\) of the objective function, respectively.

In order to compute the lower and upper bounds on \(Z^{*}\) suggested by Lemma 4, we need to compute \(\lambda ^{*}\). If we can test in reasonable running time for a given \(\lambda \) whether it is feasible, i.e. whether there is an \(\mathbf {x}\) which satisfies (45 )–(49), then the value \(\lambda ^{*}\) can be found by using binary search on the values of \(\Lambda \).

First, we establish a sufficient and necessary condition for a Boolean vector \(\mathbf {x}\) to satisfy (45) and (46). Define a graph \(G=(V,E)\) with vertices \(V=\{1,\ldots ,n\}\). There is an edge between i and j if \(\alpha _i\beta _j>\lambda \). Since (45) and (46) are equivalent to \(x_i+x_j=1\), \(\mathbf {x}\) satisfies (45) and (46 ) if and only if \(\mathbf {x}\) corresponds to a 2-coloring of the vertices of G with colors zero and one. But \(\mathbf {x}\) corresponds to a 2-coloring if and only if there is a bipartition of G with the vertices with \(x_j=0\) in one set and the vertices with \(x_j=1\) in the other set. For each connected component \(G^{\prime }=(V^{\prime },E^{\prime })\) of G the bipartition \((V_1^{\prime },V_2^{\prime })\) of \(V^{\prime }\) is unique. Thus, either (i) \(x_j=1\) for \(j\in V_1^{\prime }\) and \(x_j=0\) for \(j\in V_2^{\prime }\) or (ii) \(x_j=0\) for \(j\in V_1^{\prime }\) and \(x_j=1\) for \(j\in V_2^{\prime }\), must hold.

Hence, the procedure is as follows: Compute the connected components of G. For each connected component \(G^{\prime }\) of G check whether there exists a bipartition of \(G^{\prime }\). Then, examine whether at least one the two possibilities (i) and (ii) satisfy (47) and (48). If both possibilities satisfy (47) and (48), then choose the one with smaller value of \(\sum _{j\in V^{\prime }}\alpha _{j}x_{j}\). This guarantees that \(\sum _{j=1}^{n}\alpha _{j}x_{j}\) is minimized, i.e., we find values \(x_{j}\) which satisfy (49) if they exist.

The running time of this algorithm is dominated by the sorting of the \(O(n^{2})\) elements of \(\Lambda \). This gives \(T(n)=O(n^{2}\log n)\). Since by Lemma 4, \(Z^{UB}/Z^{LB}\le n^{2}\), we get a running time of \(O( \frac{n^{6}}{\varepsilon ^{2}})\) for Algorithm EpsSQK. By applying the Bound Improvement Procedure of Tanaev et al. (1998) to \(Z^{LB}\) and \(Z^{UB}\), it is possible to find new lower and upper bounds \(Z^{LB_{1}}\) and \(Z^{UB_{1}}\) with \(\frac{Z^{UB_{1}}}{Z^{LB_{1}}}\le 3\). The total running time of the Bound Improvement Procedure is \(O(n^{4}\log \log n)\). Thus, the following statement holds.

Theorem 11

[Xu (2012)] There is an FPTAS for Problem SQK which requires \(O\left( n^{4}\log \right. \left. \log n+\frac{n^{4}}{\varepsilon ^{2}}\right) \) time.

6.3 Scheduling applications

In this subsection, we review approximation results for several scheduling problems listed in Section 3. This will include known constant-ratio approximation algorithms, FPTASs derived by adapting an FPTAS designed for Problem SQK, as well as FPTASs that are developed based on alternative principles.

6.3.1 Scheduling with machine availability constraints

Kellerer and Strusevich (2010a) show how the FPTAS outlined in Sect. 6.1 can be adapted to the problems \(1|h(1),N-res|\sum w_{j}C_{j}\) and \( 1|h(1),Res|\sum w_{j}C_{j}\) of minimizing the total weighted completion time on a single machine with a single machine non-availability interval. Both problems can be reformulated in terms of Problem SQK; see Sect. 3.1.

Recall that in order to be able to apply the FPTAS, for each problem we need a polynomial time approximation algorithm with a constant ratio. These problems admit the algorithms with a required performance developed by pure scheduling reasoning.

For example, for problem \(1|h(1),Res|\sum w_{j}C_{j}\) under the resumable scenario Wang et al. (2005) give a \(2-\)approximation algorithm that requires \( O(n^{2})\) time. An improved algorithm for this problem is due to Megow and Verschae (2009). The authors notice that an algorithm that sequences the jobs in the WSPT order is a \(\delta -\)approximation algorithm, where \(\delta =t/s, \) the ratio of the two endpoints of the non-availability interval. On the other hand, they show that if the jobs that are sequenced to complete before the non-availability interval by a known FPTAS, the resulting algorithm behaves as a \(\left( 1+\frac{1}{\delta }+\varepsilon \right) -\) approximation algorithm. Thus, the value of the objective function for the better of the two schedules is at most \({\varPhi } +\varepsilon \) times the optimum, where \({\varPhi } =\left( 1+\sqrt{5}\right) /2\) is the so-called golden ratio, i.e., the larger solution to the equation \(\delta =1+1/\delta \). The running time of the algorithm is \(O(n\log n+n/\varepsilon )\).

For problem \(1|h(1),N-res|\sum w_{j}C_{j}\), Lee (1996) shows that scheduling the jobs in the WSPT order leads to an arbitrarily bad schedule. This is also confirmed by Kacem and Chu (2008) for a modified WSPT rule. Kellerer et al. (2009) show that based on a \(\rho -\)approximation algorithm for problem \(1|h(1),Res|\sum w_{j}C_{j}\) it is possible to design a \(\left( 2\rho \right) -\)approximation algorithm for problem \(1|h(1),N-res|\sum w_{j}C_{j}\). They also use a formulation of problem \(1|h(1),N-res|\sum w_{j}C_{j}\) as Problem SQK and an FPTAS for a linear knapsack problem to obtain a \(\left( 2+\varepsilon \right) -\)approximation algorithm for the problem that runs in \(O(n\log n+n/\varepsilon )\) time. The same performance can be achieved by applying the approach of Megow and Verschae (2009) not to the resumable but to the non-resumable version of the problem. Besides, a \(2-\)approximation algorithm that requires \(O(n^{2})\) time is developed by Kacem (2008).

Recall that the unweighted problem \(1|h(1),N-res|\sum C_{j}\) is NP-hard. Lee and Liman (1992) by refining the analysis by Adiri et al. (1989) demonstrate that for problem \(1|h(1), N-res|\sum C_{j}\) an algorithm that finds schedule \(S_{SPT}\) in which the jobs are sequenced in the SPT order (i.e., in non-decreasing order of their processing times) is a \(\left( 9/7\right) -\)approximation algorithm. An algorithm with a worst-case performance ratio of 20 / 17 is given by Sadfi et al. (2005). A further improvement is done by Breit (2007).

The algorithms with constant performance guarantees are needed to compute an upper bound on the optimal value of the function for the problem under consideration. It is not important which particular approximation algorithm is taken for this purpose, as long as it guarantees a constant ratio. Let us agree that for problem \(1|h(1),N-res|\sum w_{j}C_{j}\) we take \( Z^{UB}=Z(S_{H})\), where \(S_{H}\) is a heuristic schedule found by a \(2-\) approximation algorithm by Kacem (2008); for problem \(1|h(1),N-res|\sum C_{j}\) we take \(Z^{UB}=Z(S_{SPT})\) and for problem \(1|h(1),Res|\sum w_{j}C_{j}\) we take \(Z^{UB}=Z(S_{W})\), where \(S_{W}\) is a heuristic schedule found by a \(2-\)approximation algorithm by Wang et al. (2005).

We are now ready to apply Algorithm EpsSQK to obtain an FPTAS for problem \( 1|h(1),N-res|\sum w_{j}C_{j}\). The DP algorithms are applied to Problem SQK of the form (19). It follows that \(Z_{LB}=\frac{1}{2}Z^{UB}\). Suppose that Algorithm EpsSQK finishes, having found a solution vector \(x^{\varepsilon }=\left( x_{1}^{\varepsilon },\ldots ,x_{n}^{\varepsilon }\right) \) where each \(x_{j}^{\varepsilon }\in \left\{ 0,1\right\} \). As an approximate solution of problem \(1|h(1),N-res|\sum w_{j}C_{j}\) we take schedule \(S^{\varepsilon }\) in which the jobs of set \(N_{1}=\left\{ j\in N|x_{j}^{\varepsilon }=1\right\} \) are sequenced from time zero according to the WSPT rule and complete before time s, while the remaining jobs of set \(N_{2}=\left\{ j\in N|x_{j}^{\varepsilon }=0\right\} \) are sequenced from time t according to the WSPT rule. It follows that \(Z(S^{\varepsilon })/Z(S^{*})\le 1+\varepsilon \) and the running time of the resulting algorithm is \(O(n^{2}+n^{4}/\varepsilon ^{2})=O(n^{4}/\varepsilon ^{2})\).

Notice that for problem \(1|h(1),N-res|\sum C_{j}\) with equal weights of jobs minimizing \(\sum C_{j}\) is equivalent to solving Problem SQK with all \(\beta _{j}=1\). The running time of the resulting FPTAS for problem \( 1|h(1),N-res|\sum C_{j}\) is \(O(n^{3}/\varepsilon ^{2})\).

Kacem and Mahjoub (2009) claim that their scheme for problem \(1|h(1),N-res|\sum w_{j}C_{j}\) is an FPTAS that requires \(O\left( n^{2}/\varepsilon ^{2}\right) \) time. However, Epstein et al. (2010) express some doubt whether the analysis by Kacem and Mahjoub (2009) is complete and give their own FPTAS with the running time \(O\left( n^{3}/\varepsilon ^{2}\right) \). Marchetti-Spaccamela et al. (2008) outline another FPTAS for this problem, but they do not give all implementation details and do not estimate the running time.

In order to design an FPTAS for problem \(1|h(1),Res|\sum w_{j}C_{j},\) an approach presented in Sect. 3.1 is used. We can select a job as crossover, find a schedule \(S_{m}\) for \(m=n-1\) remaining jobs and then insert the chosen job into the derived schedule. Suppose that a job with the processing time p and the weight w is chosen as the crossover job, and the remaining jobs are taken in accordance with the WSPT rule (14) and renumbered by \(1,2,\ldots ,m\). Finding schedule \(S_{m}\) can be done by adapting a DP algorithms from Sect. 6.1. Define

$$\begin{aligned} n= & {} m,\,A=s, \\ \alpha _{j}= & {} p_{j},\, \beta _{j}=w_{j},~\mu _{j}=w_{j}p_{j},\, \nu _{j}=w_{j}\left( t+\sum _{i=1}^{j}p_{i}\right) ,~j=1,2,\ldots ,m. \end{aligned}$$

For the primal algorithm, a typical primal state after the values \(x_{1},x_{2},\ldots ,x_{k}\) have been assigned is represented by a state of the form

$$\begin{aligned} \left( k,Z_{k},y_{k},V_{k}\right) , \end{aligned}$$

where k is the number of the assigned variables; \(Z_{k}\) is the current value of the objective function; \(y_{k}:=\sum _{j=1}^{k}p_{j}x_{j}\), the total processing time of the jobs processed before the non-availability interval \(\left[ s,t\right] \); \(V_{k}:=p\sum _{j=1}^{k}w_{j}(1-x_{j})\), the total weight of the jobs processed after the interval \(\left[ s,t\right] \) times the processing time of the crossover job.

In iteration k of the primal algorithm a move from a state \(\left( k,Z_{k},y_{k},V_{k}\right) \) to a state \(\left( k+1,Z_{k+1},y_{k+1},V_{k+1}\right) \) is done in accordance with

$$\begin{aligned} Z_{k+1}=Z_{k}+w_{k+1}y_{k}+\mu _{k+1},~y_{k+1}=y_{k}+p_{k+1},~V_{k+1}=V_{k}, \end{aligned}$$
(50)

provided that \(y_{k+1}\le s\), and with

$$\begin{aligned} Z_{k+1}=Z_{k}+w_{k+1}\left( A_{k}-y_{k}\right) +\nu _{k+1};~y_{k+1}=y_{k},V_{k+1}=V_{k}+w_{k+1}p, \end{aligned}$$
(51)

where \(A_{k}=\sum _{j=1}^{k}p_{j}\).

For each state generated in the last iteration of the primal algorithm, we find x and compute the value of the function Z by the formula (20). The smallest of the found \(Z-\)values corresponds to an optimal value of the total weighted completion time for problem \(1|h(1),Res|\sum w_{j}C_{j}\) with a chosen crossover job. If the smallest value of Z(p) is achieved for \(x=1\), then the corresponding schedule should be disregarded, since the overall optimal schedule belongs to a class of schedules with another crossover job.

The DP algorithm outlined above is used as a subroutine in the FPTAS. No removal of dominated states is allowed in this DP algorithm, i.e., all feasible combinations should be generated and stored, except those states \( \left( k,Z_{k},y_{k},V_{k}\right) \) for which either \(Z_{k}\) or \(V_{k}\) exceeds \(Z^{UB}\). For a fixed crossover job such a DP algorithm requires \( O\left( nA\,(Z^{UB})^{2}\right) \) time, i.e., an overall optimal solution will be found in \(O\left( n^{2}A\,(Z^{UB})^{2}\right) \) time. The dual version of the DP algorithm can be defined similarly.

Let \(S^{*}\) denote the optimal schedule that delivers the smallest value \(Z(S^{*})\) of the objective function, while S(p) denote a feasible schedule with a fixed crossover job with the processing time p and weight w. Denote the smallest value of the function among all schedules with the chosen crossover job by \(Z^{*}(p)\).

Define \(Z^{UB}=Z(S_{W})\) as an upper bound on \(Z(S^{*})\), where \(S_{W}\) is a schedule delivered by the algorithm by Wang et al. (2005). It follows that \(Z_{LB}=\frac{1}{2}Z^{UB}\) is a lower bound on \(Z(S^{*})\), and therefore on \(Z^{*}(p).\) In Step 2 of Algorithm EpsSQK redefine

$$\begin{aligned} \delta =\frac{\varepsilon Z_{LB}}{3m}. \end{aligned}$$

Change Step 4(a) of the algorithm in the following way. Move from a stored primal state \((k,Z_{k},y_{k},V_{k})\) to at most two primal states of the form \((k+1,Z_{k+1},y_{k+1},V_{k+1})\), where \(Z_{k+1}\le Z^{UB}\) and \(V_{k+1}\le Z^{UB}\), using the relations (50) and (51), each time rounding up each of the updated values of \(Z_{k+1}\) and \(V_{k+1}\) to the next multiple of \(\delta \). For each selection of states related to the same pair \(\left( Z_{k+1},V_{k+1}\right) \) and a subinterval \(I_{j}^{r},\) determine the value \(y_{k+1}^{\min }\) as the smallest value of \(y_{k+1}\) that belongs to \(I_{j}^{r}\) and the value \(y_{k+1}^{\max }\) as the largest value of \(y_{k+1}\) that belongs to \( I_{j}^{r} \). If these values exist and are distinct, then out of all states \((k+1,Z_{k+1},y_{k+1},V_{k+1})\) with the same values of \(Z_{k+1},\, V_{k+1}\) for \(y_{k+1}\in \left[ y_{k+1}^{\min },y_{k+1}^{\max }\right] \) store only two states \((k+1,Z_{k+1},y_{k+1}^{\min },V_{k+1})\) and \((k+1,Z_{k+1},y_{k+1}^{\max },V_{k+1})\).

The description of Step 4(b) of Algorithm EpsSQK is altered similarly; here we manipulate the corresponding dual states. Step 5 is reformulated accordingly. The chosen crossover job is inserted into a schedule found by the modified FPTAS, and the best of all found schedules is accepted as an approximate solution.

For each choice of the crossover job, running a modified FPTAS that finds the values \(Z_{m}\) takes \(O\left( n^{5}/\varepsilon ^{3}\right) \) time. To find an approximate solution to the original problem \(1|h(1),Res|\sum w_{j}C_{j}\), we need to run the FPTAS for each job selected as the crossover job, rejecting the solutions in which the selected job completes before the non-availability interval. Thus, the overall running time of the FPTAS is \( O\left( n^{6}/\varepsilon ^{3}\right) \).

Due to the equivalence between problem \(1|h(1),Res|\sum w_{j}C_{j}\) and the problem with the floating maintenance period from Sect. 3.2, the described FPTAS is applicable to the latter problem, see Kellerer and Strusevich (2010a).

For problem\(1|h(1),Res|\sum w_{j}C_{j}\) an FPTAS by Epstein et al. (2010) is not strongly polynomial, while an FPTAS by Marchetti-Spaccamela et al. (2008) is not accompanied by sufficient details and estimations of its running time.

6.3.2 Minimizing total weighted earliness and tardiness

As mentioned in Sect. 4.2, problem \(1|d_{j}=d,p(N)>d|\sum w_{j}(E_{j}+T_{j})\) with a large common due date admits an FPTAS via its reformulation in terms of Problem HPAdd. Thus, below we concentrate on problem \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) with a small common due date. In our presentation we follow Kellerer and Strusevich (2010b). As discussed in Sect. 3.3, for this problem an optimal schedule may belong to one of the two classes: Class 1 with no straddling job and Class 2 with a straddling job. Recall that it is shown in Sect. 3.3 that for problem \(1|d_{j}=d|\sum w_{j}(E_{j}+T_{j})\) searching for the best schedule in Class 1 is equivalent to solving the quadratic knapsack problem (27). Besides, due to (28), that problem is a special case of Problem SQK.

It is rather straightforward to adapt a general FPTAS for Problem SQK to handle the case with no straddling job. For Problem SQK, let \(\mathbf {x} =\left( x_{1},x_{2},\ldots ,x_{n}\right) \) be a vector of the decision variables that deliver a feasible solution. Denote the corresponding value of the objective function by \(Z(\mathbf {x})\). This solution can be converted into a schedule \(S(\mathbf {x})\) that belongs to Class 1 and is feasible for problem \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) with the value of the objective function \(Z(S(\mathbf {x}))=Z(\mathbf {x})\). In schedule \(S(\mathbf {x})\) the jobs \(j\in N\) with \(x_{j}=1\) are assigned in the order that is opposite to their numbering by the WSPT rule to be processed as a block, without intermediate idle time, with the job with the smallest number completing exactly at time d. The remaining jobs are processed as a block starting at time d.

Notice that the accepted numbering (14) of jobs in problem \(1|d_{j}=d|\sum w_{j}(E_{j}+T_{j})\) implies that (11) holds for the corresponding Problem SQK. Additionally, due to (28) for Problem SQK we have that \(\nu _{j}=\alpha _{j}\beta _{j}\) for each \(j\in N\). Thus, all conditions of Theorem 9 are valid and Algorithm Round can be applied. Let \(x^{H}=\left( x_{1}^{H},x_{2}^{H},\ldots ,x_{n}^{H}\right) \) be the solution vector, which can be found in \(O(n^{3})\) time. As described above, this solution can be converted into a heuristic schedule \(S_{H}^{1}=S(x^{H})\) that belongs to Class 1. If there exists an optimal schedule \(S^{*}\) with no straddling job, then Theorem 9 guarantees that \(Z(S_{H}^{1})\le \frac{3\sqrt{5}+13}{2}Z(S^{*})\).

We can use the found value \(Z(x^{H})\) as an upper bound on \(Z^{*}\), the optimal value of the objective function in Problem SQK. Algorithm EpsSQK is directly applied and the found solution is converted into a feasible schedule \(S_{\varepsilon }^{1}\) as outlined above. Theorem 10 guarantees that \(Z(S_{\varepsilon }^{1})\le \left( 1+\varepsilon \right) Z(S^{*})\), and the required running time does not exceed \(O\left( \frac{ n^{4}}{\varepsilon ^{2}}\right) \).

Assume now that for problem \(1|d_{j}=d,p(N)\le d|\sum w_{j}(E_{j}+T_{j})\) there exists an optimal schedule \(S^{*}\) with a straddling job. First, we show that in the case under consideration Algorithm Round can be adapted to guarantee a smaller worst-case bound than that proved in Theorem 9.

Below we present an algorithm that finds a heuristic schedule \(S_{H}^{2}\) such that \(Z(S_{H}^{2})\le \frac{3+\sqrt{5}}{2}Z(S^{*})\).

Algorithm ETStr

Step 1 :

Run Steps 1–6 of the first iteration of Algorithm Round. Let \(x_{j}^{{\varDelta } },j\in I_{2}\), be the components of the found solution to the continuous linear knapsack problem in Step 6.

Step 2 :

Define the vector \(x^{H}=(x_{1}^{H},\ldots ,x_{n}^{H}),\) where \(x_{j}^{H}=x_{j}^{{\varDelta }}\) for \(j\in I_{2}\) and \(x_{j}^{H}=0\), otherwise.

Step 3 :

Output schedule \(S_{H}^{2}\) in which the jobs with \(x_{j}^{H}=1\) are processed starting at time zero in the order opposite to the WSPT sequence, followed by a job \(\ell \) with \(0<x_{\ell }^{H}<1\) as the straddling job, and finally the late jobs with \(x_{j}^{H}=0\) are scheduled in the WSPT order.

The running time of the algorithm is \(O(n^{2})\), since the continuous relaxation of Problem SQK has to be solved only once. It is proved by Kellerer and Strusevich (2010b) that Algorithm ETStr is in fact a \(\frac{1}{\delta }-\)approximation algorithm, i.e., \(Z(S_{H}^{2})\le \frac{3+\sqrt{5}}{2} Z(S^{*})=2.\,618~Z(S^{*})\).

To find a feasible (but not necessarily the best) schedule that belongs to Class 2, we select each job as a possible straddling job, find a Class 1 schedule \(S_{m}\) of the remaining \(m=n-1\) jobs, and then try to insert the chosen job as straddling in such a way that the first early job starts at time zero.

To develop an FPTAS for the problem of finding the best schedule of Class 2, we need to modify the DP algorithms described for the standard Problem SQK in Sect. 6.1. Similarly to Sect. 6.3.1, let S(p) denote a feasible schedule with a fixed crossover job with the processing time p and weight w.

Let W denote the total weight of all n jobs. For schedule \(S_{m}\), define \(W_{m}\) to be the total weight of the early jobs. The value of the objective function of the resulting schedule S(p) can be written as

$$\begin{aligned} Z(S(p))=Z_{m}+F(W_{m},x), \end{aligned}$$
(52)

where \(F(W_{m},x)\) denotes the total increment of the objective function due to the insertion of the straddling job. It follows that

$$\begin{aligned} F(W_{m},x)=W_{m}px+\left( W-W_{m}\right) p\left( 1-x\right) . \end{aligned}$$

Thus, for each choice of the straddling job we need to find the best way of inserting the job into the schedule for the remaining jobs. The value of \(Z_{m}\) can be found either by a primary dynamic programming algorithm, similar to Algorithm PDP or by its dual counterpart. The only difference is that now for computing the overall value of the objective function Z we need to know the value of \(W_{m}\), or rather \(pW_{m}\) that contributes into Z. This value can be found recursively during the iterations of the DP algorithm. The description of the resulting algorithm is similar to that of Algorithm PDP.

A typical primal state after the values \(x_{1},x_{2},\ldots ,x_{k}\) have been assigned is represented by a state of the form

$$\begin{aligned} \left( k,Z_{k},y_{k},V_{k}\right) , \end{aligned}$$

where \(k,Z_{k}\) and \(y_{k}\) have the same meaning as in Algorithm PDP, while

$$\begin{aligned} V_{k}=p\sum _{j=1}^{k}w_{j}x_{j} \end{aligned}$$

denotes the product of the total weight of the jobs processed before the due date and the processing time of the straddling job.

In iteration k of the primal algorithm a move from a state \(\left( k,Z_{k},y_{k},V_{k}\right) \) to a state \(\left( k+1,Z_{k+1},y_{k+1},V_{k+1}\right) \) is done in accordance with

$$\begin{aligned} Z_{k+1}=Z_{k}+w_{k+1}y_{k},\,y_{k+1}=y_{k}+p_{k+1},~V_{k+1}=V_{k}+w_{k+1}p, \end{aligned}$$

provided that \(y_{k+1}\le d\), and with

$$\begin{aligned} Z_{k+1}=Z_{k}+w_{k+1}\left( A_{k}-y_{k}\right) +w_{k+1}p_{k+1};~y_{k+1}=y_{k},V_{k+1}=V_{k}, \end{aligned}$$

where \(A_{k}=\sum _{j=1}^{k}p_{j}\).

We may assume \(2W_{m}<W\); otherwise a schedule with the chosen straddling jobs cannot be optimal. This implies

$$\begin{aligned} Z(S(p))\ge F(W_{m},x)\ge W_{m}px+W_{m}p\left( 1-x\right) =W_{m}p, \end{aligned}$$

i.e., \(V_{m}=W_{m}p\le Z^{UB}\). As an upper bound \(Z^{UB}\) we may take the value \(Z(S_{H}^{2})\), where \(S_{H}^{2}\) is a heuristic schedule found by Algorithm ETStr.

For each state generated in the last iteration of the primal algorithm, we find x and compute the value of the function Z by formula (52). The smallest of the found \(Z-\)values corresponds to an optimal value of the total weighted completion time for the original problem with a chosen straddling job.

The DP algorithm outlined above is used as a subroutine in the FPTAS, so that all feasible combinations should be generated and stored. For a fixed straddling job, such a DP algorithm requires \(O\left( nd\,(Z^{UB})^{2}\right) \) time, i.e., an overall optimal solution will be found in \(O\left( n^{2}d\,(Z^{UB})^{2}\right) \) time. We skip the details of the dual version of our DP algorithm for finding the values of \(Z_{m}\).

For problem \(1|d_{j}=d|\sum w_{j}\left( E_{j}+T_{j}\right) \) with a chosen straddling job, Algorithm EpsSQK can be modified as follows. Let \(Z^{*}(p,w)\) denote the smallest value of the objective function in the class of schedules with the chosen straddling job with processing time p and weight w.

For \(Z^{UB}=Z(S_{H}^{2})\) it follows that \(Z_{LB}=\frac{3-\sqrt{5}}{2}Z^{UB}\) is a lower bound on \(Z(S^{*})\), and therefore on \(Z^{*}(p,w)\). In Step 1 of Algorithm EpsSQK redefine \(\delta =\frac{\varepsilon Z_{LB}}{4m}\). Change Step 4(a) of the algorithm in the following way. Move from a stored primal state \((k,Z_{k},y_{k},V_{k})\) to at most two primal states of the form \((k+1,Z_{k+1},y_{k+1},V_{k+1})\), each time rounding up each of the updated values of \(Z_{k+1}\) and \(V_{k+1}\) to the next multiple of \(\delta \). For each selection of states related to the same pair \(\left( Z_{k+1},V_{k+1}\right) \) and a subinterval \(I_{j}^{r},\) determine the value \( y_{k+1}^{\min }\) as the smallest value of \(y_{k+1}\) that belongs to \( I_{j}^{r}\) and the value \(y_{k+1}^{\max }\) as the largest value of \(y_{k+1}\) that belongs to \(I_{j}^{r}\). If these values exist and are distinct, then out of all states \((k+1,Z_{k+1},y_{k+1},V_{k+1})\) with the same values of \(Z_{k+1}\) and \(V_{k+1}\) for \(y_{k+1}\in \left[ y_{k+1}^{\min },y_{k+1}^{\max } \right] \) store only two states \((k+1,Z_{k+1},y_{k+1}^{\min },V_{k+1})\) and \((k+1,Z_{k+1},y_{k+1}^{\max },V_{k+1})\). The description of Step 4(b) of Algorithm EpsSQK is altered similarly; here we manipulate the corresponding dual states. Step 5 is reformulated accordingly.

For each choice of the straddling job, the described FPTAS takes \(O\left( n^{5}/\varepsilon ^{3}\right) \) time. To find an approximate solution to the original problem we need to run the FPTAS for each job selected as the straddling job, rejecting the solutions in which the selected job completes before the due date. Thus, the overall running time of the FPTAS is \(O\left( n^{6}/\varepsilon ^{3}\right) \).

For problem \(1|d_{j}=d|\sum \left( E_{j}+T_{j}\right) \) with equal weights, we can take the value of the function delivered by the algorithm by Hoogeveen et al. (1994) as an upper bound \(Z^{UB}\). Recall that \(Z^{UB}/Z^{*}\le 4/3\). For each choice of the straddling job, running a modified FPTAS that finds the values \(Z_{m}\) takes \(O\left( n^{4}/\varepsilon ^{2}\right) \) time. Thus, the overall running time of the FPTAS for problem \(1|d_{j}=d|\sum \left( E_{j}+T_{j}\right) \) is \(O\left( n^{5}/\varepsilon ^{2}\right) \). See also Kacem et al. (2011) for a discussion of the problems from this subsection.

6.3.3 Minimizing total weighted tardiness

For the common due date problem \(1|d_{j}=d\,|\sum w_{j}T_{j}\), Fathi and Nuttle (1990) provide a \(2-\)approximation algorithm that requires \(O(n^{2})\) time. Kolliopoulos and Steiner (2006) give an approximation scheme for the problem with a fixed number of distinct due dates, however, the running time of their algorithm is pseudopolynomial since it is bounded by a polynomial of the largest weight.

As shown in Sect. 3.4, for problem \(1|d_{j}=d\,|\sum w_{j}T_{j}\) we can select a job as straddling, find a schedule \(S_{m}\) for \(m=n-1\) remaining jobs and then insert the chosen job into the derived schedule. Kellerer and Strusevich (2006) explain how to adapt a general FPTAS for Problem SQK for handling problem \(1|d_{j}=d\,|\sum w_{j}T_{j}\) to obtain an approximation scheme that requires the running time of \(O\left( \left( n^{6}\log W\right) /\varepsilon ^{3}\right) \).

The achieved running time, although polynomial is not strongly polynomial and should be seen as impractical. Still, this algorithm has a certain theoretical importance as the first evidence that problem \(1|d_{j}=d|\sum w_{j}T_{j}\) admits an FPTAS. Besides, an adaptation of the general FPTAS for Problem SQK to solving problem \(1|d_{j}=d|\sum w_{j}T_{j}\) involves techniques that might be useful for handling other possible applications. For example, Karakostas et al. (2012) develop an FPTAS for the problem of minimizing the total weighted tardiness with a fixed number of distinct due dates, and their consideration is based on the ideas of Algorithm EpsWT above.

A much faster FPTAS for problem \(1|d_{j}=d|\sum w_{j}T_{j}\) is designed by Kacem (2010). He gives a modified DP algorithm that scans the jobs in the order opposite to the WSPT, assigns the jobs form right to left starting from time p(N). This algorithm is converted into an FPTAS that is based on splitting the solution space into equal subintervals and reducing the number of states stored in each interval. The running time of the FPTAS is \(O(n^{2}/\varepsilon )\). See also Kacem et al. (2011) for a discussion of the problems from this subsection.

7 Differential approximation schemes

In this section, we discussed a less traditional measure of the quality of an approximate solution. Following Sarto Basso and Strusevich (2014), it is demonstrated that the existence of an FPTAS for Problem HP, with or without a knapsack constraint, implies the existence of so-called differential fully polynomial-time approximation schemes for the whole range of problems reviewed in this paper. Below we mainly use the set-function notation.

As stated in Sect. 4, finding an FPTAS for problem \(\min \left\{ F\left( U\right) |U\subseteq N\right\} \) with \(F\left( U\right) =H\left( U\right) +K\) is not straightforward, even though problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \) admits an FPTAS. This reflects a known phenomenon of non-stability of the traditional approximation measure under linear transformations. This phenomenon has brought numerous researchers to considering an alternative approximation measure for problems of combinatorial optimization. Rather than measuring the relative error of a heuristic solution, it could be more insightful to study the position of the heuristic solution within the interval of all its possible values. Such an approximation measure takes the name of differential approximation. Several dozens of papers present differential approximation results for traditional problems of combinatorial optimization; see the review Ausiello and Paschos (2007).

Below we formally give the required definitions, presented in terms of optimizing set-functions. Let \(\mathcal {M}\) denote a set of feasible subsets \(U\subseteq N\). For a given set-function \(\varphi \left( U\right) \), let \( U^{*}\) and \(U_{*}\) be the set-maximizer and the set-minimizer, respectively, i.e., \(\varphi \left( U_{*}\right) \le \varphi \left( U\right) \) and \(\varphi \left( U^{*}\right) \ge \varphi \left( U\right) \) for all sets \(U\in \mathcal {M}\). Consider the problem \(\min \left\{ \varphi \left( U\right) |U\in \mathcal {M}\right\} \) of minimizing \(\varphi \left( U\right) \) over \(\mathcal {M}\). An algorithm A that finds a set \( U_{A}\in \mathcal {M}\) is called a \(\delta -\) differential approximation algorithm if

$$\begin{aligned} \varphi \left( U_{A}\right) \le \delta \varphi (U_{*})+(1-\delta )\varphi \left( U^{*}\right) . \end{aligned}$$
(53)

Here \(0<\delta <1\), and the value of an approximate solution is placed between the best and the worst objective function values. A good differential approximation algorithm finds a solution that is fairly close to the optimum, i.e., there is an interest in designing an algorithm that delivers a \(\delta \) close to 1 in (53). For any small positive \(\delta \), a family of \(\left( 1-\delta \right) -\)differential approximation algorithms is called a Differential Fully Polynomial-Time Approximation Scheme (DFPTAS) if its running time depends polynomially on the length of the problem’s input and additionally is polynomial in \(1/\delta \).

See Ausiello et al. (2003) and Demange and Paschos (1996) for a detailed formal discussion on differential approximation and on comparisons with traditional approximability. It should be stressed that a problem that admits a good differential approximation algorithm does not necessarily admits an algorithm with a good traditional approximation ratio, and vice versa. The examples include the travelling salesman problem and the minimum graph vertex problem; see, e.g., Demange and Paschos (1996) and Kacem and Paschos (2013).

In particular, in general for problem \(\min \left\{ \varphi \left( U\right) |U\in \mathcal {M}\right\} \) the existence of an FPTAS does not imply the existence of a DFPTAS. However, for the problems of our interest such a conversion can easily be done.

Let \(\varphi (U)\) be a set-function such that

$$\begin{aligned} \varphi (U_{*})<0=\varphi \left( \varnothing \right) \le \varphi \left( U^{*}\right) . \end{aligned}$$
(54)

The following statement holds.

Lemma 5

Let \(\varphi \left( U\right) \) be a set-function that satisfies (54), and \(\psi \left( U\right) =\varphi \left( U\right) +K\) for a constant K. If problem \(\min \left\{ \varphi \left( U\right) |U\in \mathcal {M}\right\} \) admits an algorithm that finds a set \(U_{A}\) such that \(\varphi \left( U_{A}\right) -\varphi (U_{*})\le \delta \left| \varphi (U_{*})\right| ,\) then \(\varphi \left( U_{A}\right) \le \left( 1-\delta \right) \varphi (U_{*})+\delta \varphi (U^{*})\) and \(\psi \left( U_{A}\right) \le \left( 1-\delta \right) \psi (U_{*})+\delta \psi (U^{*})\) hold.

Proof

This lemma is proved in Sarto Basso and Strusevich (2014). If follows from \(\varphi \left( U_{A}\right) -\varphi (U_{*})\le \delta \left| \varphi (U_{*})\right| \) that \(\varphi \left( U_{A}\right) -\varphi (U_{*})\le -\delta \varphi (U_{*})\) and, therefore, \(\varphi \left( U_{A}\right) \le \left( 1-\delta \right) \varphi (U_{*})\). Since \(\varphi (U^{*})\ge 0\) we have that for any \(\delta >0\) the inequality \(\delta \varphi (U^{*})\ge 0\) holds. Thus, we deduce \(\varphi \left( U_{A}\right) \le \left( 1-\delta \right) \varphi (U_{*})+\delta \varphi (U^{*})\) . Adding a constant K to both sides yields \( \psi \left( U_{A}\right) \le \left( 1-\delta \right) \psi (U_{*})+\delta \psi (U^{*})\). \(\square \)

Lemma 5 illustrates an advantage of using a differential approximation measure: adding a constant can be handled easily. It forms a basis of converting an FPTAS to a DFPTAS for the problems with the objectives related to the half-product.

Notice that for the half-product function (1) or (12) the assumption (54) holds. Apply Lemma  5 to problem \( \min \left\{ H\left( U\right) |U\in \mathcal {M}\right\} \), where either \( \mathcal {M}=2^{N}\) or \(\mathcal {M}=\left\{ U|\alpha \left( U\right) \le A,~U\subseteq N\right\} \). Each problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \) and \(\min \left\{ H\left( U\right) |\alpha \left( U\right) \le A,\right. \left. U\subseteq N\right\} \) admits an FPTAS that requires \(O\left( n^{2}/\varepsilon \right) \) time; see Sect. 4.1. Thus, for \(\varphi \left( U\right) =H\left( U\right) \) the inequality \(\varphi \left( U_{A}\right) -\varphi (U_{*})\le \delta \left| \varphi (U_{*})\right| \) holds for \(\delta =\varepsilon \), and an FPTAS for problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \) and \(\min \left\{ H\left( U\right) |\alpha \left( U\right) \le A,~U\subseteq N\right\} \) behaves as an DFPTAS for the corresponding problem, even if the objective function changes to \(H\left( U\right) +K\).

Theorem 12

For set-functions \(H\left( U\right) \) of the form (12) and \(F\left( U\right) =H\left( U\right) +K\) each problem \(\min \left\{ H\left( U\right) |U\subseteq N\right\} ,\, \min \left\{ H\left( U\right) |\alpha \left( U\right) \le A,\, U\subseteq N\right\} ,\, \min \left\{ F\left( U\right) |U\subseteq N\right\} \) and \(\min \left\{ F\left( U\right) |\alpha \left( U\right) \le A,\,U\subseteq N\right\} \) admits a DFPTAS that requires \(O\left( n^{2}/\varepsilon \right) \) time.

Problem \(1|h(1),N-res|\sum w_{j}C_{j}\) formulated in Sect. 3.1 is among the first scheduling problems that have been studied from the differential approximability point of view. It is proved in Kacem and Paschos (2013) that the problem admits an \(O\left( n\log n\right) -\)time differential \(\delta -\)approximation algorithm for \(\delta =\frac{3-\sqrt{5} }{2}=0.381\,97\). Theorem 12 implies that not only this problem, but all scheduling problems formulated in Sect. 3 admit a DFPTAS. The running time of such a DFPTAS is always \( O\left( n^{2}/\varepsilon \right) \), even for those scheduling problems for which the best known FPTAS requires more time than \(O\left( n^{2}/\varepsilon \right) \).

8 Maximizing half-product related functions

In this section, we turn to the problem of maximizing functions, related to the half-product, with and without a knapsack constraint. These problems are of interest in their own right, as well as due to their possible applications. The results of this section are mainly contained in Kellerer et al. (2015).

We start with problem \(\max \left\{ Q\left( U\right) |U\subseteq N\right\} \) of maximizing a quadratic function (13) in which the coefficients of the quadratic terms are all non-negative. As stated in Sect. 2.3, function \(Q\left( U\right) \) is supermodular. Solving problem \(\max \left\{ Q\left( U\right) |U\subseteq N\right\} \) is equivalent to solving problem \(\min \left\{ -Q\left( U\right) |U\subseteq N\right\} \), where function \(-Q\left( U\right) \) obtained from \(Q\left( U\right) \) by changing the signs of all coefficients is submodular.

It is well-known that minimizing a submodular function (or, equivalently, maximizing a supermodular function) can be done in polynomial time. See Iwata et al. (2001) and Schrijver (2000) for algorithms for minimizing an arbitrary submodular function. Due a special structure, the problem of maximizing a quadratic supermodular function \(Q\left( U\right) \) can be solved much faster than in the general case, since it reduces to the problem of finding the maximum flow in a digraph with \(O(n^{2})\) nodes. This approach is originally due to Rhys (1970), and is outlined in Wolsey and Nemhauser (1988). It is demonstrated in Kellerer et al. (2015) that such an algorithm can be implemented in \(O\left( n^{3}\right) \) time. The problem of maximizing the half-product function (12) is a special case of problem \(\max \left\{ Q\left( U\right) |U\subseteq N\right\} \) with non-negative coefficients of the quadratic terms. Thus, the following statement holds.

Theorem 13

Each problem \(\max \left\{ H\left( U\right) |U\subseteq N\right\} \) and \(\max \left\{ F\left( U\right) =H\left( U\right) +K|U\subseteq N\right\} \) can be solved in \(O\left( n^{3}\right) \) time.

This result is in contrast with the fact that the minimization counterparts of these problems, i.e., problems \(\min \left\{ H\left( U\right) |U\subseteq N\right\} \) and \(\min \left\{ F\left( U\right) |U\subseteq N\right\} \), are NP-hard.

We now turn to problem \(\max \left\{ H\left( U\right) |\alpha \left( U\right) \le A,~U\subseteq N\right\} \) of maximizing a half-product function subject to a knapsack constraint. The latter problem belongs to the class of maximization integer programming problems known as supermodular knapsack problems; see, e.g., Gallo and Simeone (1988) and Rader and Woeginger (2002).

Kellerer et al. (2015) show that if there are negative coefficients \(\gamma _{j}\) in the linear part of the function that this NP-hard problem is non-approximable. In fact, they show that for problem \(\max \left\{ H\left( U\right) |\alpha \left( U\right) \le A,~U\subseteq N\right\} \) it is NP-hard to decide whether \(H\left( U^{*}\right) \ge 1\), where \(U^{*} \) is a set-maximizer. This leads in the following non-approximability result.

Theorem 14

Unless \(P=NP\), for any \(\rho ,\, 0<\rho \,<1\) problem \( \max \left\{ H\left( U\right) |\alpha \left( U\right) \le A,\right. \left. U\subseteq N\right\} \) does not admit a polynomial-time algorithm which finds a feasible set \(S^{H}\) such that \(h\left( S^{H}\right) >\rho h\left( S^{*}\right) \).

In the remainder of this section, we focus on problem \(\max \left\{ G\left( U\right) |\alpha \left( U\right) \le A,\,U\subseteq N\right\} \), where

$$\begin{aligned} G\left( U\right) =\sum _{i,j\in U;~i<j;}\alpha _{i}\beta _{j}+\gamma \left( U\right) +K \end{aligned}$$

with all coefficients being non-negative; an equivalent expression for this function in terms of Boolean variables is

$$\begin{aligned} G\left( \mathbf {x}\right) =\sum _{1\le i<j\le n}^{n}\alpha _{i}\beta _{j}x_{i}x_{j}+\sum _{j=1}^{n}\gamma _{j}x_{j}+K. \end{aligned}$$
(55)

As stated in Kellerer et al. (2015), problem \(\max \left\{ G\left( U\right) |\alpha \left( U\right) \le A,~U\subseteq N\right\} \) can serve as a mathematical model of a prize collecting routing problem. Suppose that a vehicle, initially with no passengers, visits all or some of n destinations and picks up \(p_{j}\) people from destination \(j,\, 1\le j\le n\). The vehicle is of a limited capacity, so that at any time no more than A people can be on board.

When the vehicle leaves destination j, every person on board that has been brought to this destination is paid a reward of \(w_{j}\) points, while each of \(p_{j}\) people picked up from the destination receives a different award of \(v_{j}\) points. It is required to maximize the total collected prize, provided that the vehicle never carries more than A passengers.

Without loss of generality, assume that the destinations are numbered in accordance with the WSPT rule (14). Adapting the results by Smith (1956) on a single machine scheduling problem to minimize the weighted sum of the completion times, it can be verified that the vehicle should visit destinations in the order that is opposite to their numbering.

Introduce the Boolean decision variables

$$\begin{aligned} x_{j}=\left\{ \begin{array}{ll} 1, &{} \hbox {if destination }j \hbox { is visited} \\ 0, &{} \mathrm {otherwise} \end{array} .\right. \end{aligned}$$

The vehicle capacity constraint can be written as

$$\begin{aligned} \sum _{j=1}^{n}p_{j}x_{j}\le A. \end{aligned}$$

The total profit can be written as

$$\begin{aligned} G\left( \mathbf {x}\right) =\sum _{1\le j\le n}^{n}w_{j}x_{j}\sum _{i=1}^{j-1}p_{i}x_{i}+\sum _{j=1}^{n}v_{j}p_{j}x_{j}= \sum _{1\le i<j\le n}^{n}p_{i}w_{j}x_{i}x_{j}+\sum _{j=1}^{n}v_{j}p_{j}x_{j}, \end{aligned}$$

which corresponds to (55) with \(\alpha _{j}=p_{j},\, \beta _{j}=w_{j},\, \gamma _{j}=v_{j}p_{j},\, 1\le j\le n\), and \(K=0\). Thus, this version of the prize collecting problem reduces to \(\max \left\{ G\left( U\right) |\alpha \left( U\right) \!\le \! A,~U\!\subseteq \! N\right\} \).

Recall that for a problem of maximizing a set-function \(\varphi \left( U\right) \), a set \(U^{\varepsilon }\) is called an \(\varepsilon \)- approximate solution if for a given positive \(\varepsilon \) the inequality \(\varphi \left( U^{*}\right) -\varphi \left( U^{\varepsilon }\right) \le \varepsilon \varphi \left( U^{*}\right) \) holds. A family of algorithms that for any given positive \(\varepsilon \) find an \(\varepsilon -\) approximate solution is called a Fully Polynomial-Time Approximation Scheme (FPTAS), provided that the running time depends polynomially on both the length of the input and \(1/\varepsilon \).

Kellerer et al. (2015) show that problem \(\max \left\{ G\left( U\right) |\alpha \left( U\right) \le A,\,U\subseteq N\right\} \) admits an FPTAS which can be obtained by converting a DP algorithm that finds an optimal solution of the problem in pseudopolynomial time. Such an algorithm can be easily developed by an appropriate modification of Algorithm DP1. We only need to modify Step 2 by replacing the recursive formula (34) by the formula

$$\begin{aligned} Z_{k}=Z_{k-1}+\beta _{k}y_{k-1}+\gamma _{k},~y_{k}=y_{k-1}+\alpha _{k}. \end{aligned}$$
(56)

and the recursive formula (35) by

$$\begin{aligned} Z_{k}=Z_{k-1};\,y_{k}=y_{k-1}. \end{aligned}$$
(57)

Besides, in Step 3, we need to find \(Z_{n}^{*}\), the largest value of \(Z_{n}\) among all found states of the form \((n,Z_{n},y_{n})\).

The running time of the resulting DP algorithm, which we call Algorithm DPMax, does not exceed \(O(nAZ^{UB}),\) where \(Z^{UB}\) is an upper bound on the value \(G\left( \mathbf {x}^{*}\right) \). Here and below an obvious upper bound

$$\begin{aligned} Z^{UB}=\sum _{1\le i<j\le n}^{n}\alpha _{i}\beta _{j}+\sum _{j=1}^{n}\gamma _{j}+K \end{aligned}$$
(58)

is used. To convert Algorithm DPMax into an FPTAS, Kellerer et al. (2015) employ the geometric rounding technique to reduce the number of stored states.

Algorithm EpsGmax

Step 1 :

Compute \(Z^{UB}\) by (58). Introduce the intervals, whose endpoints form geometric sequences. For the \(y-\)values, introduce the intervals

$$\begin{aligned}{}[0,0],\left[ 1,1+\varepsilon \right] ,\left[ 1+\varepsilon ,\left( 1+\varepsilon \right) ^{2}\right] ,\left[ \left( 1+\varepsilon \right) ^{2},\left( 1+\varepsilon \right) ^{3}\right] ,\ldots ,\left[ \left( 1+\varepsilon \right) ^{u-1},\left( 1+\varepsilon \right) ^{u}\right] , \end{aligned}$$

where \(\left\lceil \left( 1+\varepsilon \right) ^{u}\right\rceil =A\). Call these intervals \(I_{\ell },\, \ell =0,1,\ldots ,u\). For the \(Z-\)values, introduce the intervals

$$\begin{aligned}{}[0,0],\left[ 1,\left( 1+\varepsilon \right) ^{\frac{1}{n}}\right] , \left[ \left( 1+\varepsilon \right) ^{\frac{1}{n}},\left( 1+\varepsilon \right) ^{\frac{2}{n}}\right] ,\ldots ,\left[ \left( 1+\varepsilon \right) ^{ \frac{v-1}{n}},\left( 1+\varepsilon \right) ^{\frac{v}{n}}\right] , \end{aligned}$$

where \(\left\lceil \left( 1+\varepsilon \right) ^{\frac{v}{n}}\right\rceil =Z^{UB}\). Call these intervals \(J_{r},\, r=0,1,\ldots ,v\).

Step 2 :

Store the initial state \((0,Z_{0},y_{0})\) with \(Z_{0}=K\) and \(y_{0}=0\). For each \(k,1\le k\le n\), do the following:

(a):

In line with Algorithm DPMax, move from a stored state \((k-1,Z_{k-1},y_{k-1})\) to at most two states of the form \((k,Z_{k},y_{k})\), where \(Z_{k}\le Z^{UB}\), using the relations (56) and (57).

(b):

If the number of generated states \(\left( k,Z_{k},y_{k}\right) \) with the Z-values in the same interval \(J_{r}\) and with the y-values in the same interval \(I_{\ell }\) exceeds 2, then keep only states two states, with the largest and the smallest y-value.

Step 3 :

Determine \(Z^{\varepsilon }\) as the largest value of \(Z_{n}\) among the states \((n,Z_{n},y_{n})\). Perform backtracking and find the vector \(\mathbf {x}^{\varepsilon }=\left( x_{1}^{\varepsilon },x_{2}^{\varepsilon },\ldots ,x_{n}^{\varepsilon }\right) \) that leads to \(Z^{\varepsilon }\). Output \(\mathbf {x}^{\varepsilon }\) and \(G\left( \mathbf {x}^{\varepsilon }\right) \) as an approximate solution of the problem.

The required performance of Algorithm EpsGmax is guaranteed by the following statement.

Lemma 6

Let

$$\begin{aligned} \left( 0,K,0\right) ,(1,Z_{1}^{*},y_{1}^{*}),\ldots ,(n,Z_{n}^{*},y_{n}^{*}) \end{aligned}$$

be the sequence of states that lead to the optimal solution with the function value \(Z_{n}^{*}\). For each k, \(0\le k\le n\), for a state \((k,Z_{k}^{*},y_{k}^{*})\) there exists a state \((k,Z_{k},y_{k})\) stored by Algorithm FPTAS such that

  1. (i)

    \(y_{k}\le y_{k}^{*}\);

  2. (ii)

    \(\left( 1+\varepsilon \right) y_{k}\ge y_{k}^{*}\);

  3. (iii)

    \(\left( 1+\varepsilon \right) ^{\frac{k}{n}}Z_{k}\ge Z_{k}^{*}\).

Algorithm EpsGmax delivers an approximate solution of a required quality and run in time that is polynomial (but not strongly polynomial).

Theorem 15

Algorithm EpsGmax is an FPTAS for problem \(\max \left\{ G\left( U\right) |\alpha \left( U\right) \!\le \! A,\,U\!\subseteq \! N\right\} \) that requires \(O\left( \frac{n^{2}}{\varepsilon ^{2}}\log A\log Z^{UB}\right) \) time.

9 Conclusion

The survey presents the known results on exact and approximation algorithms and schemes for solving Boolean optimization problems with quadratic objective functions related to the half-product. Further research in this direction may include extending conditions under which the problems of the outlined range admit an FPTAS or a constant-ratio approximation algorithm.

  1. 1.

    An FPTAS resented in Sect. 5.1 for Problems PosHP requires \(O\left( n^{2}/\varepsilon \right) \) time, provided that the objective function is convex. Is it possible to develop an FPTAS for problem Problem HPAdd that runs in \(O\left( n^{2}/\varepsilon \right) \) time, without any extra assumptions on the shape of the objective function such as convexity or a representation with positive coefficients?

  2. 2.

    Are there algorithmic techniques that would allow further reducing the running time of an FPTAS for Problem SQK and its scheduling applications?

  3. 3.

    The continuous relaxation of Problems PosHP and SQK can be solved in \(O(n^{2})\) time, provided that the objective function is non-separable convex; see Sects. 5.2 and 6.1. On the other hand, as proved in Moré and Vavasis (1991), the continuous quadratic knapsack problem is NP-hard if the objective function is separable concave. Does there exist a strongly polynomial-time algorithm that solves the continuous relaxation of the general quadratic knapsack problem with a convex function?

  4. 4.

    The search for possible applications of the corresponding Boolean programming problems is of interest. In particular, the existence of an FPTAS for the problem of minimizing the total weighted earliness and tardiness with asymmetric weights would resolve the status of the problem with respect to the unary encoding; so far the problem is not known to be solvable in pseudopolynomial time or to admit a polynomial-time approximation scheme. Are there applications of Problem HPAdd or Problem SQK to a problem area different from scheduling?