1 Introduction

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 [16] and [22].

Normally, for a scheduling model with controllable processing times two types of decisions are required: (1) each job has to be assigned its actual processing time, and (2) 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. The quality of the resulting schedule is measured with respect to the cost of assigning the actual processing times that guarantee a certain scheduling performance.

As established in [23, 24], there is a close link between scheduling with controllable processing times and linear programming problems with submodular constraints. This allows us to use the achievements of submodular optimization [4, 21] for design and justification of scheduling algorithms. On the other hand, formulation of scheduling problems in terms of submodular optimization leads to the necessity of studying novel models with submodular constraints. Our papers [25, 27] can be viewed as convincing examples of such a positive mutual influence of scheduling and submodular optimization.

This paper, which builds up on [26], makes another contribution towards the development of solution procedures for problems of submodular optimization and their applications to scheduling models. We present a decomposition algorithm for maximizing a linear function over a submodular polyhedron intersected with a box. Apart from this contribution to submodular optimization, our results extend the toolkit available in deterministic machine scheduling. We demonstrate how this method can be applied to several scheduling problems, in which it is required to minimize the total penalty for choosing actual processing times, also known as total compression cost. The jobs have to be processed with preemption on several parallel machines, so that no job is processed after a common deadline. The jobs may have different release dates.

The paper is organized as follows. Section 2 gives a survey of the relevant results on scheduling with controllable processing times. In Sect. 3 we reformulate three scheduling problems in terms of linear programming problems over a submodular polyhedron intersected with a box. Section 4 outlines a recursive decomposition algorithm for solving maximization linear programming problems with submodular constraints. The applications of the developed decomposition algorithm to scheduling with controllable processing times are presented in Sect. 5. The concluding remarks are contained in Sect. 6.

2 Scheduling with controllable processing times: a review

In this section, we give a brief overview of the known results on the preemptive scheduling problems with controllable processing times to minimize the total compression cost for schedules that are feasible with respect to given release dates and a common deadline.

Formally, in the model under consideration the jobs of set \(N=\{1,2,\ldots ,n\}\) have to be processed on parallel machines \(M_{1},M_{2},\ldots ,M_{m}\), where \(m\ge 2\). 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)\), or decompressing the shortest processing time \(\underline{p}(j)\) up to \( p(j)\). In the former case, the value \(x(j)=\overline{p}(j)-p(j)\) is called the compression amount of job \(j\), while in the latter case \( z(j)=p(j)-\underline{p}(j)\) is called the decompression amount of job \(j\). Compression may decrease the completion time of each job \(j\) but incurs additional cost \(w(j)x(j)\), where \(w(j)\) is a given non-negative unit compression cost. The total cost associated with a choice of the actual processing times is represented by the linear function \(W=\sum _{j\in N}w(j)x(j)\).

Each job \(j\in N\) is given a release date \(r(j)\), before which it is not available, and a common deadline \(d\), by which its processing must be completed. In the processing of any job, preemption is allowed, so that the processing can be interrupted on any machine at any time and resumed later, possibly on another machine. It is not allowed to process a job on more than one machine at a time, and a machine processes at most one job at a time.

Given a schedule, let \(C(j)\) denote the completion time of job \(j\), i.e., the time at which the last portion of job \(j\) is finished on the corresponding machine. A schedule is called feasible if the processing of a job \(j\in N\) takes place in the time interval \(\left[ r(j),d \right] \).

We distinguish between the identical parallel machines and the uniform parallel machines. In the former case, the machines have the same speed, so that for a job \(j\) with an actual processing time \(p(j)\) the total length of the time intervals in which this job is processed in a feasible schedule is equal to \(p(j)\). If the machines are uniform, then it is assumed that machine \(M_{h}\) has speed \(s_{h},\,1\le h\le m\). Without loss of generality, throughout this paper we assume that the machines are numbered in non-increasing order of their speeds, i.e.,

$$\begin{aligned} s_{1}\ge s_{2}\ge \cdots \ge s_{m}. \end{aligned}$$
(1)

For some schedule, denote the total time during which a job \(j\in N\) is processed on machine \(M_{h},\,1\le h\le m\), by \(q^{h}(j)\). Taking into account the speed of the machine, we call the quantity \(s_{h}q^{h}(j)\) the processing amount of job \(j\) on machine \(M_{h}\). It follows that

$$\begin{aligned} p(j)=\sum _{h=1}^{m}s_{h}q^{h}(j). \end{aligned}$$

In all scheduling problems studied in this paper, we need to determine the values of actual processing times and find the corresponding feasible preemptive schedule so that all jobs complete before the deadline and total compression cost is minimized. Adapting standard notation for scheduling problems by Lawler et al. [11], we denote problems of this type by \(\alpha |r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\). Here, in the first field \(\alpha \) we write “\(P\)” in the case of \(m\ge 2\) identical machines and “\(Q\) ” in the case of \(m\ge 2\) uniform machines. In the middle field, the item “\(r(j)\)” implies that the jobs have individual release dates; this parameter is omitted if the release dates are equal. We write “\(p(j)=\overline{p}(j)-x(j)\)” to indicate that the processing times are controllable and \(x(j)\) is the compression amount to be found. The condition “\(C(j)\le d\)” reflects the fact that in a feasible schedule the common deadline should be respected. The abbreviation “\(pmtn\)” is used to point out that preemption is allowed. Finally, in the third field we write the objective function to be minimized, which is the total compression cost \( W=\sum _{j \in N} w(j)x(j)\). Scheduling problems with controllable processing times have received considerable attention since the 1980s, see, e.g., surveys by Nowicki and Zdrzałka [16] and by Shabtay and Steiner [22].

If the processing times \(p(j),\,j\in N\), are fixed then the corresponding counterpart of problem \(\alpha |r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) is denoted by \(\alpha |r(j),pmtn|C_{\max }\). In the latter problem it is required to find a preemptive schedule that for the corresponding settings minimizes the makespan \(C_{\max }=\max \left\{ C(j)|j\in N\right\} \).

In the scheduling literature, there are several interpretations and formulations of scheduling models that are related to those with controllable processing times. Below we give a short overview of them, indicating the points of distinction and similarity with our definition of the model.

Janiak and Kovalyov [8] argue that the processing times are resource-dependent, so that the more units of a single additional resource is given to a job, the more it can be compressed. In their model, a job \( j\in N\) has a ‘normal’ processing time \(b(j)\) (no resource given), and its actual processing time becomes \(p(j)=b(j)-a(j)u(j)\), provided that \(u(j)\) units of the resource are allocated to the job, where \(a(j)\) is interpreted as a compression rate. The amount of the resource to be allocated to a job is limited by \(0\le u(j)\le \tau (j)\), where \(\tau (j)\) is a known job-dependent upper bound. The cost of using one unit of the resource for compressing job \(j\) is denoted by \(v(j)\), and it is required to minimize the total cost of resource consumption. This interpretation of the controllable processing times is essentially equivalent to that adopted in this paper, which can be seen by setting

$$\begin{aligned}&\overline{p}(j)=b(j),\quad \underline{p}(j)=b(j)-a(j)\tau (j),\quad x(j)=a(j)u(j),\\&\quad w(j)=v(j)/a(j),\quad j\in N. \end{aligned}$$

A very similar model for scheduling with controllable processing times is due to Chen [2], later studied by McCormick [13]. For example, McCormick [13] gives algorithms for finding a preemptive schedule for parallel machines that is feasible with respect to arbitrary release dates and deadlines. The actual processing time of a job is determined by \(p(j)=\max \left\{ b(j)-a(j)\lambda (j),0\right\} \) and the objective is to minimize the function \(\sum _{j\in N}\lambda (j)\). This is also similar to our interpretation due to

$$\begin{aligned} \overline{p}(j)=b(j),\quad \underline{p}(j)=0,\quad x(j)=a(j)\lambda (j),\quad w(j)=1/a(j),\quad j\in N. \end{aligned}$$

Another range of scheduling models relevant to our study belongs to the area of imprecise computation; see [12] for a recent review. In computing systems that support imprecise computation, some computations (image processing programs, implementations of heuristic algorithms) can be run partially, producing less precise results. In our notation, a task with processing requirement \(\overline{p}(j)\) can be split into a mandatory part which takes \(\underline{p}\left( j\right) \) time, and an optional part that may take up to \(\overline{p}(j)-\underline{p}(j)\) additional time units. To produce a result of reasonable quality, the mandatory part must be completed in full, while an optional part improves the accuracy of the solution. If instead of an ideal computation time \(\overline{p}(j)\) a task is executed for \(p(j)=\overline{p}(j)-x(j)\) time units, then computation is imprecise and \(x(j)\) corresponds to the error of computation. Typically, the problems of imprecise computation are those of finding a deadline feasible preemptive schedule either on a single machine or on parallel machines. A popular objective function is \(\sum w(j)x(j)\), which is interpreted here as the total weighted error. It is surprising that until very recently, the similarity between the models with controllable processing times and those of imprecise computation have not been noticed. Even the most recent survey by Shabtay and Steiner [22] makes no mention of the imprecise computation research.

Scheduling problems with controllable processing times can serve as mathematical models in make-or-buy decision-making; see, e.g., Shakhlevich et al. [25]. In manufacturing, it is often the case that either the existing production capabilities are insufficient to fulfill all orders internally in time or the cost of work-in-process of an order exceeds a desirable amount. Such an order can be partly subcontracted. Subcontracting incurs additional cost but that can be either compensated by quoting realistic deadlines for all jobs or balanced by a reduction in internal production expenses. The make-or-buy decisions should be taken to determine which part of each order is manufactured internally and which is subcontracted. Under this interpretation, the orders are the jobs and for each order \(j\in N\), the value of \(\overline{p}(j)\) is interpreted as the processing requirement, provided that the order is manufactured internally in full, while \(\underline{p}(j)\) is a given mandatory limit on the internal production. Further, \(p(j)=\overline{p}(j)-x(j)\) is the chosen actual time for internal manufacturing, where \(x(j)\) shows how much of the order is subcontracted and \(w(j)x(j)\) is the cost of this subcontracting. Thus, the problem is to minimize the total subcontracting cost and find a deadline-feasible schedule for internally manufactured orders.

It is obvious that for scheduling problems with controllable processing times, minimizing the total compression cost \(W\) is equivalent to maximizing either the total decompression cost \(\sum w(j)z(j)\) or total weighted processing time \(\sum w(j)p(j)\). Most of the problems relevant to this study have been solved using a greedy approach. One way of implementing this approach is to start with a (possibly, infeasible) schedule in which all jobs are fully decompressed to their longest processing times \(\overline{p} (j)\), scan the jobs in non-decreasing order of their weights \(w(j)\) and compress each job by the smallest possible amount that guarantees a feasible processing of a job. Another approach, which is in some sense dual to the one described above, is to start with a feasible schedule in which all jobs are fully compressed to their smallest processing times \(\underline{p}(j),\) scan the jobs in non-increasing order of their weights \(w(j)\) and decompress each job by the largest possible amount.

Despite the similarity of these approaches, in early papers on this topic each problem is considered separately and a justification of the greedy approach is often lengthy and developed from the first principles. However, as established by later studies, the greedy nature of the solution approaches is due to the fact that many scheduling problems with controllable processing times can be reformulated in terms of linear programming problems over special regions such as submodular polyhedra, (generalized) polymatroids, base polyhedra, etc. See Sect. 3 for definitions and main concepts of submodular optimization.

Nemhauser and Wolsey [15] were among the first who noticed that scheduling with controllable processing times could be handled by methods of submodular optimization; see, e.g., Example 6 (Sect. 6 of Chapter III.3) of the book [15]. A systematic development of a general framework for solving scheduling problems with controllable processing times via submodular methods has been initiated by Shakhlevich and Strusevich [23, 24] and further advanced by Shakhlevich et al. [25]. This paper makes another contribution in this direction.

Below we review the known results on the problems to be considered in this paper. Two aspects of the resulting algorithms are important: (1) finding the actual processing times and therefore the optimal value of the function, and (2) finding the corresponding optimal schedule. The second aspect is related to traditional scheduling to minimize the makespan with fixed processing times.

Zero release dates, common deadline The results for the models under these conditions are summarized in the second and third columns of Table 1. If the machines are identical, then solving problem \( P|pmtn|C_{\max }\) with fixed processing times can be done by a linear-time algorithm that is due to McNaughton [14]. As shown by Jansen and Mastrolilli [9], problem \(P|p(j)=\overline{p} (j)-x(j),pmtn,C(j)\le d|W\) reduces to a continuous generalized knapsack problem and can be solved in \(O(n)\) time. Shakhlevich and Strusevich [23] consider the bicriteria problem \(P|p(j)=\overline{p} (j)-x(j),pmtn|\left( C_{\max },W\right) ,\) in which makespan \(C_{\max }\) and the total compression cost \(W=\sum w(j)x(j)\) have to be minimized simultaneously, in the Pareto sense; the running time of their algorithm is \( O(n\log n)\).

Table 1 Summary of the results

In the case of uniform machines, the best known algorithm for solving problem \(Q|pmtn|C_{\max }\) with fixed processing times is due to Gonzalez and Sahni [5]. For problem \(Q|p(j)=\overline{p}(j)-x(j),pmtn,C(j) \le d|W\) Nowicki and Zdrzałka [17] show how to find the actual processing times in \(O(nm+n\log n)\) time. Shakhlevich and Strusevich [24] reduce the problem to maximizing a linear function over a generalized polymatroid; they give an algorithm that requires the same running time as that by Nowicki and Zdrzałka [17], but can be extended to solving a bicriteria problem \(Q|p(j)=\overline{p}(j)-x(j),pmtn|\left( C_{\max },W\right) \). The best running time for the bicriteria problem is \(O(nm\log m)\), which is achieved in [27] by submodular optimization techniques.

Arbitrary release dates, common deadline The results for the models under these conditions are summarized in the fourth and fifth columns of Table 1. These models are symmetric to those with a common zero release date and arbitrary deadlines. Problem \(P|r(j),pmtn|C_{\max }\) with fixed processing times on \(m\) identical parallel machines can be solved in \(O(n\log n)\) time (or in \(O(n\log m)\) time if the jobs are pre-sorted) as proved by Sahni [18]. For the uniform machines, Sahni and Cho [19] give an algorithm for problem \(Q|r(j),pmtn|C_{\max }\) that requires \( O(mn+n\log n)\) time (or \(O(mn)\) time if the jobs are pre-sorted).

Prior to our work on the links between submodular optimization and scheduling with controllable processing times [27], no purpose-built algorithms have been known for problems \(\alpha |r(j),p(j)= \overline{p}(j)-x(j),pmtn,C(j)\le d|W\) with \(\alpha \in \left\{ P,Q\right\} \). It is shown in [27] that the bicriteria problems \(\alpha m|r(j),p(j)=\overline{p}(j)-x(j),pmtn|\left( C_{\max },W\right) \) can be solved in \(O\left( n^{2}\log m\right) \) time and in \(O(n^{2}m)\) time for \( \alpha =P\) and \(\alpha =Q\), respectively. Since a solution to a single criterion problem \(\alpha m|r(j),p(j)=\overline{p}(j)-x(j),pmtn,C(j)\le d|W\) is contained among the Pareto optimal solutions for the corresponding bicriteria problem \(\alpha m|r(j),p(j)=\overline{p}(j)-x(j),pmtn|\left( C_{\max },W\right) \), the algorithms from [27] are quoted in Table 1 as the best previously known for the single criterion problems with controllable processing times.

The main purpose of this paper is to demonstrate that the single criterion scheduling problems with controllable processing times to minimize the total compression cost can be solved by faster algorithms that are based on reformulation of these problems in terms of a linear programming problem over a submodular polyhedron intersected with a box. For the latter generic problem, we develop a recursive decomposition algorithm and show that for the scheduling applications it can be implemented in a very efficient way.

3 Scheduling with controllable processing times: submodular reformulations

For completeness, we start this section with definitions related to submodular optimization. Unless stated otherwise, we follow a comprehensive monograph on this topic by Fujishige [4], see also [10, 21]. In Sect. 3.1, we introduce a linear programming problem for which the set of constraints is a submodular polyhedron intersected with a box. Being quite general, the problem represents a range of scheduling models with controllable processing times. In Sect. 3.2 we give the details of the corresponding reformulations.

3.1 Preliminaries on submodular polyhedra

For a positive integer \(n\), let \(N=\{1,2,\ldots ,n\}\) be a ground set, and let \(2^{N}\) denote the family of all subsets of \(N\). For a subset \( X\subseteq N\), let \(\mathbb {R}^{X}\) denote the set of all vectors \({\mathbf {p}}\) with real components \(p(j)\), where \(j\in X\). For two vectors \({\mathbf {p}}=(p(1),p(2),\ldots ,p(n))\in \mathbb {R}^{N}\) and \({\mathbf {q}} =(q(1),q(2),\ldots ,q(n))\in \mathbb {R}^{N}\), we write \({\mathbf {p}}\le {\mathbf {q}}\) if \(p(j)\le q(j)\) for each \(j\in N\). Given a set \(X\subseteq \mathbb {R}^{N}\), a vector \({\mathbf {p}}\in X\) is called maximal in \( X\) if there exists no vector \({\mathbf {q}}\in X\) such that \({\mathbf {p}}\le {\mathbf {q}}\) and \({\mathbf {p}}\ne {\mathbf {q}}\). For a vector \({\mathbf {p}} \in \mathbb {R}^{N}\), define \(p(X)=\sum _{j\in X}p(j)\) for every set \(X\in 2^{N}\).

A set function \(\varphi :2^N \rightarrow \mathbb {R}\) is called submodular if the inequality

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

holds for all sets \(X,Y \in 2^N\). For a submodular function \(\varphi \) defined on \(2^{N}\) such that \(\varphi (\emptyset )=0\), the pair \((2^N, \varphi )\) is called a submodular system on \(N\), while \(\varphi \) is referred to as the rank function of that system.

For a submodular system \((2^{N},\varphi )\), define two polyhedra

$$\begin{aligned} P(\varphi )&= \left\{ {\mathbf {p}}\in \mathbb {R}^{N}\mid p(X)\le \varphi (X),\quad X\in 2^{N}\right\} \!, \end{aligned}$$
(2)
$$\begin{aligned} B(\varphi )&= \left\{ {\mathbf {p}}\in \mathbb {R}^{N}\mid {\mathbf {p}}\in P(\varphi ),\quad p(N)=\varphi (N)\right\} \!, \end{aligned}$$
(3)

called the submodular polyhedron and the base polyhedron, respectively, associated with the submodular system. Notice that \(B(\varphi ) \) represents the set of all maximal vectors in \(P(\varphi )\).

The main problem that we consider in this section is as follows:

$$\begin{aligned} \begin{aligned} \hbox {(LP):}&\hbox {Maximize}&\displaystyle \sum \limits _{j\in N}w(j)p(j)&\\&\hbox {subject to}&&\displaystyle p(X)\le \varphi (X),&X\in 2^{N}, \\&&\displaystyle \underline{p}(j)\le p(j)\le \overline{p}(j),&j\in N, \end{aligned} \end{aligned}$$
(4)

where \(\varphi :2^{N}\rightarrow \mathbb {R}\) is a submodular function with \( \varphi (\emptyset )=0,\,\mathbf {w}\in \mathbb {R}_{+}^{N}\) is a nonnegative weight vector, and \(\overline{\mathbf {p}},\underline{\mathbf {p}}\in \mathbb {R }^{N}\) are upper and lower bound vectors, respectively. This problem serves as a mathematical model for many scheduling problems with controllable processing times. Problem (LP) can be classified as a problem of maximizing a linear function over a submodular polyhedron intersected with a box.

In our previous work [25], we have demonstrated that Problem (LP) can be reduced to optimization over a simpler structure, namely, over a base polyhedron. In fact, we have shown that a problem of maximizing a linear function over the intersection of a submodular polyhedron and a box is equivalent to maximizing the same objective function over a base polyhedron associated with another rank function.

Theorem 1

(cf. [25])

  1. (i)

    Problem (LP) has a feasible solution if and only if \(\underline{\mathbf {p}}\in P(\varphi )\) and \(\underline{\mathbf {p}}\le \overline{\mathbf {p}}\).

  2. (ii)

    If Problem (LP) has a feasible solution, then the set of maximal feasible solutions of Problem (LP) is a base polyhedron \( B(\tilde{\varphi })\) associated with the submodular system \((2^{N},\tilde{ \varphi })\), where the rank function \(\tilde{\varphi }:2^{N}\rightarrow \mathbb {R}\) is given by

    $$\begin{aligned} \tilde{\varphi }(X)= \min _{Y\in 2^{N}}\left\{ \varphi (Y)+\overline{p}(X{\setminus } Y)-\underline{p}(Y{\setminus } X)\right\} . \end{aligned}$$
    (5)

Notice that the computation of the value \(\tilde{\varphi }(X)\) for a given \( X\in 2^{N}\) reduces to minimization of a submodular function, which can be computed in polynomial time by using any of the available algorithms for minimizing a submodular function [7, 20]. However, the running time of known algorithms is fairly large. In many special cases of Problem (LP), including its applications to scheduling problems with controllable processing times, the value \(\tilde{\varphi }(X)\) can be computed more efficiently without using the submodular function minimization, as shown later.

Throughout this paper, we assume that Problem (LP) has a feasible solution, which, due to claim (i) of Theorem 1, is equivalent to the conditions \(\underline{\mathbf {p}}\in P(\varphi )\) and \(\underline{\mathbf {p}}\le \overline{\mathbf {p}}\). Claim (ii) of Theorem 1 implies that Problem (LP) reduces to the following problem:

$$\begin{aligned} \begin{aligned}&\hbox {Maximize}\quad \sum \limits _{j\in N}w(j)p(j)\\&\hbox {subject to} \quad {\mathbf {p}}\in B(\tilde{\varphi }), \end{aligned} \end{aligned}$$
(6)

where the rank function \(\tilde{\varphi }:2^{N}\rightarrow \mathbb {R}\) is given by (5).

An advantage of the reduction of Problem (LP) to a problem of the form (6) is that the solution vector can be obtained essentially in a closed form, as stated in the theorem below.

Theorem 2

(cf. [4]) Let \(j_{1},j_{2},\ldots ,j_{n}\) be an ordering of elements in \(N\) that satisfies

$$\begin{aligned} w(j_{1})\ge w(j_{2})\ge \cdots \ge w(j_{n}). \end{aligned}$$
(7)

Then, vector \(\mathbf {p^{*}}\in \mathbb {R}^{N}\) given by

$$\begin{aligned} p^{*}(j_{h})=\tilde{\varphi }(\{j_{1},\ldots ,j_{h-1},j_{h}\})-\tilde{ \varphi }(\{j_{1},\ldots ,j_{h-1}\}),\quad h=1,2,\ldots ,n, \end{aligned}$$
(8)

is an optimal solution to the problem (6) [and also to the problem (4)].

This theorem immediately implies a simple algorithm for Problem (LP), which computes an optimal solution \(\mathbf {p^{*}}\) by determining the value \( \tilde{\varphi }(\{j_{1},j_{2},\ldots , j_{h}\})\) for each \(h = 1, 2, \ldots , n \). In this paper, instead, we use a different algorithm based on decomposition approach to achieve better running times for special cases of Problem (LP), as explained in Sect. 4.

3.2 Rank functions for scheduling applications

In this subsection, we follow [27] and present reformulations of three scheduling problems on parallel machines with controllable processing times in terms of LP problems defined over a submodular polyhedron intersected with a box of the form (4). We assume that if the jobs have different release dates, they are numbered to satisfy

$$\begin{aligned} r(1)\le r(2)\le \cdots \le r(n). \end{aligned}$$
(9)

If the machines are uniform they are numbered in accordance with (1). We denote

$$\begin{aligned} S_{0}=0,\qquad S_{k}=s_{1}+s_{2}+\cdots +s_{k},\quad 1\le k\le m. \end{aligned}$$
(10)

\(S_{k}\) represents the total speed of \(k\) fastest machines; if the machines are identical, \(S_{k}=k\) holds.

For each problem \(Q|p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W,\, P|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) and \(Q|r(j),p(j)= \overline{p}(j)-x(j),C(j)\le d,pmtn|W\), we need to find the actual processing times \(p(j)=\overline{p}(j)-x(j),\,j\in N\), such that all jobs can be completed by a common due date \(d\) and the total compression cost \( W=\sum _{j\in N}w(j)x(j)\) is minimized. In what follows, we present LP formulations of these problems with \(p(j),\,j\in N\), being decision variables, and the objective function to be maximized being \(\sum _{j\in N}w(j)p(j)=\sum _{j\in N}w(j)\left( \overline{p}(j)-x(j)\right) \). Since each decision variable \(p(j)\) has a lower bound \(\underline{p}(j)\) and an upper bound \(\overline{p}(j),\) an LP formulation includes the box constraints of the form \(\underline{p}(j)\le p(j)\le \overline{p}(j),\,j\in N\).

The derivations of the rank functions for the models under consideration can be justified by the conditions for the existence of a feasible schedule for a given common deadline \(d\) formulated, e.g., in [1]. Informally, these conditions state that for a given deadline \(d\) a feasible schedule exists if and only if

  1. (i)

    for each \(k,1\le k\le m-1,\,k\) longest jobs can be processed on \(k\) fastest machines by time \(d\), and

  2. (ii)

    all \(n\) jobs can be completed on all \(m\) machines by time \(d\).

We refer to [27] where the rank functions for the relevant problems are presented and discussed in more details. Below we present their definitions. In all scheduling applications a meaningful interpretation of \( \varphi (X)\) is the largest capacity available for processing the jobs of set \(X\).

For example, problem \(Q|p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) reduces to Problem (LP) of the form (4) with the rank function

$$\begin{aligned} \varphi (X)=dS_{\min \{|X|,m\}}=\left\{ \begin{array}{l@{\quad }l} dS_{\left| X \right| }, &{}\hbox {if }\,|X|\le m-1, \\ dS_{m}, &{}\hbox {if }\,|X|\ge m. \end{array}\right. \end{aligned}$$
(11)

It is clear that the conditions \(p(X)\le \varphi (X),\,X\in 2^{N}\), for the function \(\varphi (X)\) defined by (11) correspond to the conditions (i) and (ii) above, provided that \(\left| X\right| \le m-1\) and \(\left| X\right| \ge m\), respectively. As proved in [24], function \(\varphi \) is submodular.

We then consider problem \(Q|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\). For a set of jobs \(X\subseteq N\), we define \(r_{i}(X)\) to be the \(i\)-th smallest release date in set \(X\in 2^{N},\,1\le i\le \left| X\right| \). Then, for a non-empty set \(X\) of jobs, the largest processing capacity available on the fastest machine \(M_{1}\) is \(s_{1}\left( d-r_{1}(X)\right) \), the total largest processing capacity on two fastest machines \(M_{1}\) and \(M_{2}\) is \(s_{1}\left( d-r_{1}(X)\right) +s_{2}\left( d-r_{2}(X)\right) \), etc. We deduce that

$$\begin{aligned} \varphi (X)=\left\{ \begin{array}{l@{\quad }l} dS_{\left| X\right| }-\sum \nolimits _{i=1}^{\left| X\right| }s_{i}r_{i}(X), &{}\hbox {if }\,\left| X\right| \le m-1, \\ dS_{m}-\sum \nolimits _{i=1}^{m}s_{i}r_{i}(X), &{}\hbox {if }\,\left| X\right| \ge m. \end{array}\right. \end{aligned}$$
(12)

It can be verified that this function is submodular.

Problem \(P|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) is a special case of problem \(Q|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\), where \( s_{1}=s_{2}=\cdots =s_{m}=1\). Hence, the corresponding rank function \( \varphi \) can be simplified as

$$\begin{aligned} \varphi (X)=\left\{ \begin{array}{l@{\quad }l} d{|X|}-\sum \nolimits _{i=1}^{|X|}r_{i}(X), &{} \hbox {if }\,\left| X\right| \le m-1, \\ dm-\sum \nolimits _{i=1}^{m}r_{i}(X), &{}\hbox {if }\,\left| X\right| \ge m. \end{array}\right. \end{aligned}$$
(13)

4 Decomposition of LP problems with submodular constraints

In this section, we describe a decomposition algorithm for solving LP problems defined over a submodular polyhedron intersected with a box. In Sect. 4.1, we demonstrate that the linear programming problem under study can be recursively decomposed into subproblems of a smaller dimension, with some components of a solution vector fixed to one of their bounds. We provide an outline of an efficient recursive decomposition procedure in Sect. 4.2 and analyze its time complexity in Sect. 4.3. In Sect. 5 we present implementation details of the recursive decomposition procedure for the relevant scheduling models with controllable processing times.

4.1 Fundamental idea for decomposition

In this section, we show an important property, which makes the foundation of our decomposition algorithm for Problem (LP) of the form (4).

The lemma below demonstrates that some components of an optimal solution can be fixed either at their upper or lower bounds, while for some components their sum is fixed. Given a subset \(\hat{N}\) of \(N\), we say that \(\hat{N}\) is a heavy-element subset of \(N\) with respect to the weight vector \(\mathbf {w}\) if it satisfies the condition

$$\begin{aligned} \min _{j\in \hat{N}}w(j)\ge \max _{j\in N{\setminus } \hat{N}}w(j). \end{aligned}$$

For completeness, we also regard the empty set as a heavy-element subset of \( N\).

Given Problem (LP), in accordance with (5) define a set \( Y_{*}\subseteq N\) such that the equality

$$\begin{aligned} \tilde{\varphi }(X)=\varphi (Y_{*})+\overline{p}(X{\setminus } Y_{*})- \underline{p}(Y_{*}{\setminus } X) \end{aligned}$$
(14)

holds for a set \(X\subseteq N\). Because of its special role, in the remainder of this paper we call \(Y_{*}\) an instrumental set for set \(X\).

Lemma 1

Let \(\hat{N}\subseteq N\) be a heavy-element subset of \( N\) with respect to \(\mathbf {w}\), and \(Y_{*}\subseteq N\) be an instrumental set for set \(\hat{N}\). Then, there exists an optimal solution \({\mathbf {p}}^{*}\) of Problem (LP) such that

$$\begin{aligned} \text{(a) } p^{*}(Y_{*})={\varphi }(Y_{*}), \text{(b) } p^{*}(j)=\overline{p}(j),\ j\in \hat{N}{\setminus } Y_{*}, \text{(c) } p^{*}(j)=\underline{p}(j),\ j\in Y_{*}{\setminus } \hat{N }. \end{aligned}$$

Proof

Since \(\hat{N}\) is a heavy-element subset, there exists an ordering \(j_{1},j_{2},\ldots ,j_{n}\) of elements in \(N\) that satisfies (7) and \(\hat{N}=\{j_{1},j_{2},\ldots ,j_{k}\}\), where \(k=|\hat{N}|\). Theorems 1 and 2 guarantee that the solution \({\mathbf {p}}^{*}\) given by (8) is optimal. In particular, this implies

$$\begin{aligned} p^{*}(\hat{N})&= \tilde{\varphi }(j_{1})+\sum _{i=2}^{k}\left( \tilde{\varphi }(\left\{ j_{1},j_{2},\ldots ,j_{i}\right\} )-\tilde{\varphi }(\left\{ j_{1},j_{2},\ldots ,j_{i-1}\right\} \right) )\\&= \tilde{\varphi }(\left\{ j_{1},j_{2},\ldots ,j_{k}\right\} )=\tilde{\varphi }(\hat{N}). \end{aligned}$$

Since \({\mathbf {p}}^{*}\) is a feasible solution of Problem (LP), the following conditions simultaneously hold:

$$\begin{aligned} p^{*}(Y_{*})\le \varphi (Y_{*}), \quad p^{*}(j)\le \overline{p}(j),\ j\in \hat{N}{\setminus } Y_{*}, \quad -p^{*}(j)\le - \underline{p}(j), j\in Y_{*}{\setminus } \hat{N}. \end{aligned}$$
(15)

On the other hand, due to the choice of set \(Y_{*}\) we have

$$\begin{aligned} p^{*}(\hat{N})=\tilde{\varphi }(\hat{N})=\varphi (Y_{*})+\overline{p}( \hat{N}{\setminus } Y_{*})-\underline{p}\left( Y_{*}{\setminus } \hat{N}\right) , \end{aligned}$$

which implies that each inequality of (15) must hold as equality, and that is equivalent to the properties (a), (b), and (c) in the lemma. \(\square \)

In what follows, we use two fundamental operations on a submodular system \( \left( 2^{N},\varphi \right) \), as defined in [4, Section 3.1]. For a set \(A\in 2^{N}\), define a set function \(\varphi ^{A}:2^{A}\rightarrow \mathbb {R}\) by

$$\begin{aligned} \varphi ^{A}(X)=\varphi (X),\quad X\in 2^{A}. \end{aligned}$$

Then, \((2^{A},\varphi ^{A})\) is a submodular system on \(A\) and it is called a restriction of \((2^{N},\varphi )\) to \(A\). On the other hand, for a set \(A\in 2^{N}\) define a set function \(\varphi _{A}:2^{N{\setminus } A}\rightarrow \mathbb {R}\) by

$$\begin{aligned} \varphi _{A}(X)=\varphi (X\cup A)-\varphi (A),\quad X\in 2^{N{\setminus } A}. \end{aligned}$$

Then, \((2^{N{\setminus } A},\varphi _{A})\) is a submodular system on \( N{\setminus } A\) and it is called a contraction of \((2^{N},\varphi )\) by \(A\).

For an arbitrary set \(A\in 2^{N}\), Problem (LP) can be decomposed into two subproblems of a similar structure by performing restriction of \(\left( 2^{N},\varphi \right) \) to \(A\) and contraction of \(\left( 2^{N},\varphi \right) \) by \(A\), respectively. These problems can be written as follows: for restriction as

and for contraction as

We show that an optimal solution of the original Problem (LP) can be easily restored from the optimal solutions of these two subproblems. For every subset \(A\subseteq N\) and vectors \(\mathbf {p}_{\mathbf{1}}\in \mathbb {R}^{A}\) and \( \mathbf {p}_\mathbf{2}\in \mathbb {R}^{N{\setminus } A}\), the direct sum \({\mathbf {p}_\mathbf{1}}\oplus {\mathbf {p}}_{{\mathbf {2}}}\in \mathbb {R}^{N}\) of \( \mathbf {p_{1}}\) and \({\mathbf {p}}_{{\mathbf {2}}}\) is defined by

$$\begin{aligned} (p_{1}\oplus p_{2})(j)=\left\{ \begin{array}{l@{\quad }l} p_{1}(j), &{}\hbox {if }\,j\in {A}, \\ p_{2}(j), &{}\hbox {if }\,j\in N{\setminus } {A}. \end{array}\right. \end{aligned}$$

Lemma 2

Let \(A\in 2^{N}\), and suppose that \(q(A)=\varphi (A)\) holds for some optimal solution \(\mathbf {q}\in \mathbb {R}^{N}\) of Problem (LP). Then,

  1. (i)

    Each of problems (LP1) and (LP2) has a feasible solution.

  2. (ii)

    If a vector \(\mathbf {p}_\mathbf{1}\in \mathbb {R}^{A}\) is an optimal solution of Problem (LP1) and a vector \(\mathbf {p}_\mathbf{2}\in \mathbb {R} ^{N{\setminus } A}\) is an optimal solution of Problem (LP2), then the direct sum \({\mathbf {p}}^{*}=\mathbf {p}_\mathbf{1}\oplus \mathbf {p}_\mathbf{2}\in \mathbb {R} ^{N}\) of \(\mathbf {p}_\mathbf{1}\) and \(\mathbf {p}_\mathbf{2}\) is an optimal solution of Problem (LP).

Proof

The proof below is similar to that for Lemma 3.1 in [4]. We define vectors \(\mathbf {q}_\mathbf{1}\in \mathbb {R}^{A}\) and \( \mathbf {q}_\mathbf{2}\in \mathbb {R}^{N{\setminus } A}\) by

$$\begin{aligned} q_{1}(j)=q(j),j\in A,\qquad q_{2}(j)=q(j),j\in N{\setminus } A. \end{aligned}$$

To prove (i), it suffices to show that \(\mathbf {q}_\mathbf{1}\) and \(\mathbf {q}_\mathbf{2}\) are feasible solutions of Problems (LP1) and (LP2), respectively. Since \( \mathbf {q}\) is a feasible solution of Problem (LP), we have

$$\begin{aligned}&q(X)\le \varphi (X),\mathrm{}X\in 2^{N}, \end{aligned}$$
(16)
$$\begin{aligned}&\underline{p}(j)\le q(j)\le \overline{p}(j),\mathrm{}j\in N. \end{aligned}$$
(17)

Then, (16) and (17) imply that \( \mathbf {q}_\mathbf{1}\in \mathbb {R}^{A}\) is a feasible solution of Problem (LP1). It follows from (16) and the equality \(q(A)=\varphi (A)\) that

$$\begin{aligned} q(X)=q(X\cup A)-q(A)\le \varphi (X\cup A)-\varphi (A),\mathrm{\quad }X\in 2^{N{\setminus } A}, \end{aligned}$$

which, together with (17), implies that \(\mathbf {q}_\mathbf{2} \in \mathbb {R}^{N{\setminus } A}\) is a feasible solution of Problem (LP2). This concludes the proof of (i).

To prove (ii), we first show that \(\mathbf {p}^{*}\) is a feasible solution of Problem (LP). Since \(\mathbf {p}_\mathbf{1}\) and \(\mathbf {p}_\mathbf{2}\) are feasible solutions of Problem (LP1) and Problem (LP2), respectively, we have

$$\begin{aligned}&p^{*}(X)\le \varphi (X),\qquad X\in 2^{A}, \end{aligned}$$
(18)
$$\begin{aligned}&p^{*}(X)\le \varphi (X\cup A)-\varphi (A),\qquad X\in 2^{N{\setminus } A}, \end{aligned}$$
(19)
$$\begin{aligned}&\underline{p}(j)\le p^{*}(j)\le \overline{p}(j),\qquad j\in N. \end{aligned}$$
(20)

For any \(X\in 2^{N}\), we derive

$$\begin{aligned} p^{*}(X)&= p^{*}(X\cap A)+p^{*}(X{\setminus } A) \\&\le \varphi (X\cap A)+\varphi ((X{\setminus } A)\cup A)-\varphi (A) \\&= \varphi (X\cap A)+\varphi (X\cup A)-\varphi (A) \\&\le \varphi (X), \end{aligned}$$

where the first inequality is by (18) and (19), and the second by the submodularity of \(\varphi \). This inequality and (20) show that the vector \(\mathbf {p}^{*}\) is a feasible solution of (LP).

To show optimality of \(\mathbf {p}^{*}\), notice that by optimality of \( \mathbf {p}_\mathbf{1}\) and \(\mathbf {p}_\mathbf{2}\) we have

$$\begin{aligned} \sum _{j\in A}w(j)p_{1}(j)\ge \sum _{j\in A}w(j)q_{1}(j),\quad \sum _{j\in N{\setminus } A}w(j)p_{2}(j)\ge \sum _{j\in N{\setminus } A}w(j)q_{2}(j), \end{aligned}$$

and due to the definition of \(\mathbf {p}^{*}\) we obtain

$$\begin{aligned} \sum _{j\in N}w(j)p^{*}(j)&= \sum _{j\in A}w(j)p_{1}(j)+\sum _{j\in N{\setminus } A}w(j)p_{2}(j) \\&\ge \sum _{j\in A}w(j)q_{1}(j)+\sum _{j\in N{\setminus } A}w(j)q_{2}(j)\ =\sum _{j\in N}w(j)q(j), \end{aligned}$$

so that, \(\mathbf {p}^{*}\) is an optimal solution of (LP). \(\square \)

From Lemmas 1 and 2, we obtain the following property, which is used recursively in our decomposition algorithm.

Theorem 3

Let \(\hat{N}\subseteq N\) be a heavy-element subset of \(N\) with respect to \(\mathbf {w}\), and \(Y_{*}\) be an instrumental set for set \(\hat{N}\). Let \(\mathbf {p}_\mathbf{1}\in \mathbb {R} ^{Y^{*}}\) and \(\mathbf {p}_\mathbf{2}\in \mathbb {R}^{N{\setminus } Y^{*}}\) be optimal solutions of the linear programs (LPR) and (LPC), respectively, where (LPR) and (LPC) are given as

$$\begin{aligned}&\begin{aligned}&\mathrm{(LPR):}&\mathrm{Maximize}&\displaystyle \sum _{j\in Y_{*}}w(j)p(j)&\\&\text{ subject } \text{ to }&\displaystyle p(X)\le \varphi (X),&X\in 2^{Y_{*}}, \\&&\displaystyle \underline{p}(j)\le p(j)\le \overline{p}(j),&j\in Y_{*}\cap \hat{N}, \\&&\displaystyle p(j)=\underline{p}(j),&j\in Y_{*}{\setminus } \hat{N} \end{aligned}\\&\begin{aligned}&\mathrm{(LPC):}&\mathrm{Maximize}&\displaystyle \sum _{j\in N{\setminus } Y_{*}}w(j)p(j)&\\&\text{ subject } \text{ to }&\displaystyle p(X)\le \varphi (X\cup Y_{*})-\varphi (Y_{*}),&X\in 2^{N{\setminus } Y_{*}}, \\&&\displaystyle \underline{p}(j)\le p(j)\le \overline{p}(j),&j\in \left( N{\setminus } Y_{*}\right) {\setminus } \left( \hat{N}{\setminus } Y_{*}\right) , \\&&\displaystyle p(j)=\overline{p}(j),&j\in \hat{N}{\setminus } Y_{*}. \end{aligned} \end{aligned}$$

Then, the vector \(\mathbf {p}^{*}\in \mathbb {R}^{N}\) given by the direct sum \(\mathbf {p}^{*}=\mathbf {p}_\mathbf{1}\oplus \mathbf {p}_\mathbf{2}\) is an optimal solution of (LP).

Notice that Problem (LPR) is obtained from Problem (LP) as a result of restriction to \(Y_{*}\) and the values of components \(p(j), j\in Y_{*}{\setminus } \hat{N}\), are fixed to their lower bounds in accordance with Property (c) of Lemma 1. Similarly, Problem (LPC) is obtained from Problem (LP) as a result of contraction by \(Y_{*}\) and the values of components \(p(j), j\in \hat{N}{\setminus } Y_{*}\), are fixed to their upper bounds in accordance with Property (b) of Lemma 1.

4.2 Recursive decomposition procedure

In this subsection, we describe how the original Problem (LP) can be decomposed recursively based on Theorem 3, until we obtain a collection of trivially solvable problems with no non-fixed variables. In each stage of this process, the current LP problem is decomposed into two subproblems, each with a reduced set of variables, while some of the original variables receive fixed values and stay fixed until the end.

Remark 1

The definition of a heavy-element set can be revised to take into account the fact that some variables may become fixed during the solution process. The fixed variables make a fixed contribution into the objective function, so that the values of their weights become irrelevant for further consideration and can therefore be made, e.g., zero. This means that a heavy-element set can be selected not among all variables of set \(N\) but only among the non-fixed variables. Formally, if the set \(N\) of jobs is known to be partitioned as \(N=Q\cup F\), where the variables of set \(Q\) are non-fixed and those of set \(F\) are fixed, then \(\hat{Q}\subseteq Q\) is a heavy-element subset with respect to the weight vector \(\mathbf {w}\) if it satisfies the condition

$$\begin{aligned} \min _{j\in \hat{Q}}w(j)\ge \max _{j\in Q{\setminus } \hat{Q}}w(j). \end{aligned}$$

Notice that for this refined definition of a heavy-element subset, Lemma 1 and Theorem 3 can be appropriately adjusted.

In each stage of the recursive procedure, we need to solve a subproblem that can be written in the following generic form:

$$\begin{aligned} \begin{aligned}&\text{ LP }(H,F,K,\mathbf {l},\mathbf {u}\mathrm{)}&\mathrm{Maximize}&\displaystyle \sum _{j\in H}w(j)p(j)&\\&\text{ subject } \text{ to }&\displaystyle p(X)\le \varphi _{K}^H (X)=\varphi (X\cup K)-\varphi (K),&X\in 2^{H}, \\&&\displaystyle l(j)\le p(j)\le u(j),&j\in H{\setminus } F, \\&&\displaystyle p(j)=u(j)=l(j),&j\in F, \end{aligned} \end{aligned}$$
(21)

where

  • \(H\subseteq N\) is the index set of components of vector \({\mathbf {p}}\);

  • \(F\subseteq H\) is the index set of fixed components, i.e., \(l(j)=u(j)\) holds for each \(j\in F\);

  • \(K\subseteq N{\setminus } H\) is the set that defines the rank function \( \varphi _{K}^H :2^{H}\rightarrow \mathbb {R}\) such that

    $$\begin{aligned} \varphi _{K}^H (X)=\varphi (X\cup K)-\varphi (K), \qquad X\in 2^{H}; \end{aligned}$$
  • \(\mathbf {l}=(l(j)\mid j\in H)\) and \(\mathbf {u}=(u(j)\mid j\in H)\) are respectively the vectors of the lower and upper bounds on variables \(p(j), j\in H\). For \(j\in N\), each of \(l(j)\) and \(u(j)\) either takes the value of \( \underline{p}(j)\) or that of \(\overline{p}(j)\) from the original Problem (LP). Notice that \(l(j)=u\left( j\right) \) for each \(j\in F\).

Throughout this paper, we assume that each Problem LP\((H,F,K,\mathbf {l}, \mathbf {u})\) is feasible. This is guaranteed by Lemma 2 if the initial Problem (LP) is feasible.

The original Problem (LP) is represented as Problem LP\((N,\emptyset ,\emptyset ,\underline{{\mathbf {p}}},\overline{{\mathbf {p}}})\). For \(j\in H\), we say that the variable \(p(j)\) is a non-fixed variable if \( l(j)<u(j)\) holds, and a fixed variable if \(l(j)=u(j)\) holds. If all the variables in Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\) are fixed, i.e., \( l(j)=u(j)\) holds for all \(j\in H\), then an optimal solution is uniquely determined by the vector \(\mathbf {u}\in \mathbb {R}^{H}\).

Consider a general case that Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\) of the form (21) contains at least one non-fixed variable, i.e., \( |H{\setminus } F|>0\). We define a function \(\widetilde{\varphi } _{K}^{H}:2^{H}\rightarrow \mathbb {R}\) by

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)=\min _{Y\in 2^{H}}\{\varphi _{K}^{H}(Y)+u(X{\setminus } Y)-l(Y{\setminus } X)\}. \end{aligned}$$
(22)

By Theorem 1 (ii), the set of maximal feasible solutions of Problem LP\((H,F,K,\,\mathbf {l},\mathbf {u})\) is given as a base polyhedron \(B( \widetilde{\varphi }_{K}^{H})\) associated with the function \(\widetilde{ \varphi }_{K}^{H}\). Therefore, if \(|H{\setminus } F|=1\) and \(H{\setminus } F=\{j^{\prime }\}\), then an optimal solution \(\mathbf {p^{*}}\in \mathbb {R }^{H}\) is given by

$$\begin{aligned} p^{*}(j)=\left\{ \begin{array}{l@{\quad }l} \tilde{\varphi }_{K}^{H}(\{j^{\prime }\}), &{} j=j^{\prime }, \\ u(j), &{} j\in F, \end{array}\right. \end{aligned}$$
(23)

Suppose that \(|H{\setminus } F|\ge 2\). Then, we call a procedure Procedure Decomp \((H,F,K,\mathbf {l},\mathbf {u})\) explained below. Let \(\hat{H} \subseteq H {\setminus } F\) be a heavy-element subset of \(H\) with respect to the vector \( (w(j)\mid j\in H)\), and \(Y_{*}\subseteq H\) be an instrumental set for set \(\hat{H}\), i.e.,

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(\hat{H})=\varphi _{K}^{H}(Y_{*})+u\left( \hat{H} {\setminus } Y_{*}\right) -l(Y_{*}{\setminus } \hat{H}). \end{aligned}$$
(24)

Theorem 3, when applied to Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\), implies that the problem is decomposed into the two subproblems

$$\begin{aligned} \begin{aligned}&\mathrm{Maximize}&\displaystyle \sum _{j\in Y_{*}}w(j)p(j)&\\&\text{ subject } \text{ to }&\displaystyle p(X)\le \varphi _{K}^{Y_*}(X)=\varphi (X\cup K)-\varphi (K),&X\in 2^{Y_{*}}, \\&l(j)\le p(j)\le l(j),&j\in Y_{*}{\setminus } \hat{H}, \\&l(j)\le p(j)\le u(j),&j\in Y_{*}\cap \hat{H}, \end{aligned} \end{aligned}$$

and

$$\begin{aligned} \begin{aligned}&\mathrm{Maximize}&\displaystyle \sum _{j\in H{\setminus } Y_{*}}w(j)p(j)&\\&\text{ subject } \text{ to }&\displaystyle p(X)\le \varphi _{K\cup Y_*}^{H {\setminus } Y_*}(X) =\varphi (X\cup K \cup Y_{*})-\varphi (K \cup Y_{*}),&X\in 2^{H{\setminus } Y_{*}}, \\&u(j)\le p(j)\le u(j),&j\in \hat{H}{\setminus } Y_{*}, \\&l(j)\le p(j)\le u(j),&j\in \left( H{\setminus } Y_{*}\right) {\setminus } (\hat{H}{\setminus } Y_{*}). \end{aligned} \end{aligned}$$

The first of these subproblems corresponds to Problem (LPR), and in that problem the values of components \(p(j), j\in Y_{*}{\setminus } \hat{H}\), are fixed to their lower bounds. The second subproblem corresponds to Problem (LPC), and in that problem the values of components \(p(j), j\in \hat{ H}{\setminus } Y_{*}\), are fixed to their upper bounds.

We denote these subproblems by Problem LP\((Y_{*},F_{1},K,\mathbf {l}_\mathbf{1}, \mathbf {u}_\mathbf{1})\) and Problem LP\((H{\setminus } Y_{*},F_{2},\) \(K\cup Y_{*},\mathbf {l}_\mathbf{2},\mathbf {u}_\mathbf{2})\), respectively, where the vectors \(\mathbf {l}_\mathbf{1},\mathbf {u}_\mathbf{1}\in \mathbb {R}^{Y_{*}}\) and \(\mathbf {l}_\mathbf{2},\mathbf {u}_\mathbf{2}\in \mathbb {R}^{H{\setminus } Y_{*}}\), and the updated sets of fixed variables \(F_{1}\) and \(F_{2}\) are given by

$$\begin{aligned}&\begin{aligned} l_{1}(j)&= l(j),j\in Y_{*},\\ u_{1}(j)&= \left\{ \begin{array}{l@{\quad }l} l(j), &{} j\in Y_{*}{\setminus } \hat{H}, \\ u(j), &{} j\in Y_{*}\cap \hat{H}, \end{array}\right. \\ F_{1}&= Y_{*}{\setminus } \hat{H}, \end{aligned}\end{aligned}$$
(25)
$$\begin{aligned}&\begin{aligned} l_{2}(j)&= \left\{ \begin{array}{l@{\quad }l} u(j), &{} j\in \hat{H}{\setminus } Y_{*}, \\ l(j), &{} j\in H{\setminus } (Y_{*}\cup \hat{H}), \end{array}\right. \\ u_{2}(j)&= u(j),j\in H{\setminus } Y_{*},\\ F_{2}&= (\hat{H}\cup (H\cap F)){\setminus } Y_{*}. \end{aligned} \end{aligned}$$
(26)

Notice that Problem LP\((Y_{*},F_{1},K,\mathbf {l}_\mathbf{1},\mathbf {u}_\mathbf{1})\) inherits the set of fixed variables \(Y_{*}\cap F\) from the problem of a higher level, and additionally the variables of set \(Y_{*}{\setminus } \hat{ H}\) become fixed. However, since \(\hat{H}\) contains only non-fixed variables, we deduce that \(Y_{*}{\setminus } \hat{H}\supseteq Y_{*}\cap F\), so that the complete description of the set \(F_{1}\) of fixed variables in Problem LP\((Y_{*},F_{1},K,\mathbf {l}_\mathbf{1},\mathbf {u}_\mathbf{1})\) is given by \(Y_{*}{\setminus } \hat{H}\).

Problem LP\((H{\setminus } Y_{*},F_{2},K\cup Y_{*},\mathbf {l}_\mathbf{2}, \mathbf {u}_\mathbf{2})\) inherits the set of fixed variables \(\left( H{\setminus } Y_{*}\right) \cap F\) from the problem of a higher level, and additionally the variables of set \(\hat{H}{\setminus } Y_{*}\) become fixed. These two sets are disjoint. Thus, the complete description of the set \( F_{2} \) of fixed variables in Problem LP\((H{\setminus } Y_{*},F_{2},K, \mathbf {l}_\mathbf{2},\mathbf {u}_\mathbf{2})\) is given by \((\hat{H}\cup (H\cap F)){\setminus } Y_{*}\).

Without going into implementation details, we now give a formal description of the recursive procedure, that takes Remark 1 into account. For the current Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\), we compute optimal solutions \(\mathbf {p}_\mathbf{1}\in \mathbb {R}^{Y_{*}}\) and \(\mathbf {p}_\mathbf{2}\in \mathbb {R}^{H{\setminus } Y_{*}}\) of the two subproblems by calling procedures Decomp \((Y_{*},F_{1},K,\mathbf {l}_\mathbf{1},\mathbf {u}_\mathbf{1})\) and Decomp \((H{\setminus } Y_{*},F_{2},K\cup Y_{*}, \mathbf {l}_\mathbf{2},\mathbf {u}_\mathbf{2})\). By Theorem 3, the direct sum \({\mathbf {p}}^{*}={\mathbf {p}}_{1}\oplus {\mathbf {p}}_{{\mathbf {2}}}\) is an optimal solution of Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\), which is the output of the procedure Decomp \((H,F,K,\mathbf {l},\mathbf {u})\).

figure a

Recall that the original Problem (LP) is solved by calling Procedure Decomp \((N,\emptyset ,\emptyset ,\underline{{\mathbf {p}}},\overline{{\mathbf {p}}})\). Its actual running time depends on the choice of a heavy-element subset \(\hat{H}\) in Step 2 and on the time complexity of finding an instrumental set \(Y_{*}\).

4.3 Analysis of time complexity

We analyze the time complexity of Procedure Decomp. To reduce the depth of recursion of the procedure, it makes sense to perform decomposition in such a way that the number of non-fixed variables in each of the two emerging subproblems is roughly a half of the number of non-fixed variables in the current Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\).

Lemma 3

If at each level of recursion of Procedure Decomp for Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\) with \(|H{\setminus } F|>1\) a heavy-element subset \(\hat{H}\subseteq H{\setminus } F\) in Step 2 is chosen to contain \(\lceil |H{\setminus } F|/2\rceil \) non-fixed variables, then the number of non-fixed variables in each of the two subproblems that emerge as a result of decomposition is either \(\left\lceil |H{\setminus } F|/2\right\rceil \) or \(\lfloor |H{\setminus } F|/2\rfloor \).

Proof

For Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\), let \(g=|H{\setminus } F|\) denote the number of the non-fixed variables. In Step 2 Procedure Decomp \((H,F,K,\mathbf {l},\mathbf {u})\) selects a heavy-element subset \(\hat{H}\subset H{\setminus } F\) that contains \(\lceil g/2\rceil \) non-fixed variables, i.e., \(|\hat{H}|=\left\lceil {g}/{2} \right\rceil \). Then, the number of the non-fixed variables in Problem LP\( (Y_{*},F_{1},K,\mathbf {l}_\mathbf{1},\mathbf {u}_\mathbf{1})\) considered in Step 3 satisfies \(|Y_{*}\cap \hat{H}|\le \left\lceil {g}/{2}\right\rceil \).

Due to (26), the number of non-fixed variables in Problem LP\( (H{\setminus } Y_{*},F_{2},K\cup Y_{*},\mathbf {l}_\mathbf{2},\mathbf {u}_\mathbf{2})\) considered in Step 4 satisfies

$$\begin{aligned} |H{\setminus } (\hat{H}\cup F\cup Y_{*})|\le |H{\setminus } \hat{H} |=\left\lfloor \frac{g}{2}\right\rfloor . \end{aligned}$$

\(\square \)

This lemma implies that the overall depth of recursion of Procedure Decomp applied to Problem LP\((N,\emptyset ,\emptyset ,\underline{{\mathbf {p}}} ,\overline{{\mathbf {p}}})\) is \(O(\log n)\).

Let us analyze the running time of Procedure Decomp applied to Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\). We denote by \(T_{\mathrm{LP} }(h,g) \) the time complexity of Procedure Decomp \((H,F,K,{\mathbf {l}},\mathbf {u})\), where \(h=|H|\) and \(g=|H{\setminus } F|\). Let \(T_{Y_{*}}(h)\) denote the running time for computing the value \(\widetilde{\varphi } _{K}^{H}(\hat{H})\) for a given set \(\hat{H}\subseteq H\) and finding an instrumental set \(Y_{*}\) that minimizes the right-hand side of the Eq. (22). In Steps 3 and 4, Procedure Decomp splits Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\) into two subproblems: one with \( h_{1}\) variables among which there exist \(g_{1}\le \min \{h_{1},\lceil g/2\rceil \}\) non-fixed variables, and the other one with \(h_{2}=h-h_{1}\) variables, among which there exist \(g_{2}\le \min \{h_{2},\lfloor g/2\rfloor \}\) non-fixed variables. Let \(T_{\mathrm{Split}}\left( h\right) \) denote the time complexity of such a decomposition, i.e., for setting up the instances of the two subproblems. A required heavy-element set can be found in \(O(h)\) time by using a linear-time median-finding algorithm. Then, we obtain a recursive equation:

$$\begin{aligned} T_{\mathrm{LP}}(h,g)=\left\{ \begin{array}{l@{\quad }l} O(1), &{} \text{ if } g=0, \\ T_{Y_{*}}(h), &{} \text{ if } g=1, \\ T_{Y_{*}}(h)+T_{\mathrm{Split}}(h)+T_{\mathrm{LP}}(h_{1},g_{1})+T_{ \mathrm{LP}}(h_{2},g_{2}), &{} \text{ if } g>1. \end{array}\right. \end{aligned}$$

By solving the recursive equation under an assumption that both functions \( T_{Y_{*}}(h)\) and \(T_{\mathrm{Split}}\left( h\right) \) are non-decreasing and convex, we obtain

$$\begin{aligned} T_{\mathrm{LP}}(n,n)=O(\left( T_{Y_{*}}(n)+T_{\mathrm{Split}}\left( n\right) \right) \log n). \end{aligned}$$

Thus, the findings of this section can be summarized as the following statement.

Theorem 4

Problem (LP) can be solved by Procedure Decomp in \( O((T_{Y_{*}}(n)+T_{\mathrm{Split}}(n))\log n)\) time.

In the forthcoming discussion of three scheduling applications of the results of this section, we pay special attention to designing fast algorithms that could find the required set \(Y_{*}\) in all levels of the recursive Procedure Decomp. We develop fast algorithms that compute the value \(\widetilde{\varphi }(\hat{H})\) and find a set \(Y_{*}\) in accordance with its definition; see Sect. 5.

4.4 Comparison with decomposition algorithm for maximizing a concave separable function

In this subsection, we refer to our decomposition algorithm for Problem (LP) defined over a submodular polyhedron intersected with a box as Algorithm SSS-Decomp. Below, we compare that algorithm with a known decomposition algorithm that is applicable for maximizing a separable concave function over a submodular polyhedron; see [3], [4, Sect. 8.2] and [6].

Consider the problem of maximizing a separable concave function over a submodular polyhedron:

$$\begin{aligned} \begin{aligned}&\mathrm{(SCFM)}&\mathrm{Maximize}&\displaystyle \sum _{j\in N}f_{j}(p(j))&\\&\mathrm{subject~to}&\displaystyle p(X)\le \varphi (X),&X\in 2^{N}, \end{aligned} \end{aligned}$$

where \(f_{j}:\mathbb {R}\rightarrow \mathbb {R}\) is a univariate concave function for \(j\in N\) and \(\varphi :2^{N}\rightarrow \mathbb {R}\) is a submodular function with \(\varphi (\emptyset )=0\).

The decomposition algorithm for Problem (SCFM) was first proposed by Fujishige [3] for the special case where each \(f_{j}\) is quadratic and \(\varphi \) is a polymatroid rank function. Groenevelt [6] then generalized the decomposition algorithm for the case where each \(f_{j}\) is a general concave function and \(\varphi \) is a polymatroid rank function. Later, it was pointed out by Fujishige [4, Sect. 8.2] that the decomposition algorithm in [6] can be further generalized to the case where \(\varphi \) is a general submodular function. We refer to that algorithm as Algorithm FG-Decomp.

For simplicity of presentation, in the description of Algorithm FG-Decomp we assume that each \(f_{j}\) is monotone increasing; the general case with non-monotone \(f_{j}\) can be dealt with by an appropriate modification of the algorithm; see [6].

figure b

Notice that for the set \(Y_{*}\) chosen in Step 3, there exists some optimal solution \(\mathbf {p}^{*}\) of Problem (SCFM) such that \(\varphi (Y_{*})=p^{*}(Y_{*})\); see [4, Sect. 8.2], [6].

It is easy to see that Problem (LP) can be reduced to Problem (SCFM) by setting the functions \(f_{j}\) as

$$\begin{aligned} f_{j}(\alpha )=\left\{ \begin{array}{l@{\quad }l} w(j)\underline{p}(j)+M(\alpha -\underline{p}(j)), &{}\text{ if } \,\alpha < \underline{p}(j); \\ w(j)\alpha , &{}\text{ if } \,\underline{p}(j)\le \alpha \le \overline{p}(j); \\ w(j)\overline{p}(j)-M(\alpha -\overline{p}(j)), &{}\text{ if } \,\alpha > \overline{p}(j) \end{array}\right. \end{aligned}$$
(27)

with a sufficiently large positive number \(M\). Thus, Algorithm FG-Decomp (appropriately adjusted to deal with non-monotone functions \(f_{j}\)) can be applied to solving Problem (LP).

For Problem (LP), Algorithm FG-Decomp is quite similar to Algorithm SSS-Decomp. Indeed, both algorithms recursively find a set \( Y_{*}\) and decompose a problem into two subproblems by using restriction to \(Y_{*}\) and contraction by \(Y_{*}\).

The difference of the two decomposition algorithms is in the selection rule of a set \(Y_{*}\). In fact, a numerical example can be provided that demonstrates that for the same instance of Problem (LP) the two decomposition algorithms may find different sets \(Y_{*}\) in the same iteration.

In addition, Algorithm SSS-Decomp fixes some variables in the subproblems so that the number of non-fixed variables in each subproblem is at most the half of the non-fixed variables in the original problem; this is an important feature of our algorithm which is not enjoyed by Algorithm FG-Decomp. This difference affects the efficiency of the two decomposition algorithms; indeed, for Problem (LP) the height of the decomposition tree can be \(\varTheta (n)\) if Algorithm FG-Decomp is used, while it is \(O(\log n)\) in our Algorithm SSS-Decomp.

Thus, despite certain similarity between the two decomposition algorithms, our algorithm cannot be seen as a straightforward adaptation of Algorithm FG-Decomp designed for solving problems of non-linear optimization with submodular constraints to a less general problem of linear programming.

On the other hand, assume that the feasible region for Problem (SCFM) is additionally restricted by imposing the box constraints, similar to those used in Problem (LP). Theorem 1 can be used to reduce the resulting problem to Problem (SCFM) with a feasible region being the base polyhedron with a modified rank function. Although the obtained problem can be solved by Algorithm FG-Decomp, this approach is computationally inefficient, since it requires multiple calls to a procedure for minimizing a submodular function. It is more efficient not to rely on Theorem 1, but to handle the additional box constraints by adapting the objective function, similarly to (27), and then to use Algorithm FG-Decomp.

5 Application to parallel machine scheduling problems

In this section, we show how the decomposition algorithm based on Procedure Decomp can be adapted for solving problems with parallel machines efficiently. Before considering implementation details that are individual for each scheduling problem under consideration, we start this section with a discussion that addresses the matters that are common to all three problems.

Recall that each scheduling problem we study in this paper can be formulated as Problem (LP) of the form (4) with an appropriate rank function. Thus, each of these problems can be solved by the decomposition algorithm described in Sect. 4.2 applied to Problem LP\((N,\emptyset ,\emptyset ,\mathbf {l},\mathbf {u)}\), where \(\mathbf {l}=\underline{{\mathbf {p}}}\) and \(\mathbf {u}=\overline{{\mathbf {p}}}\).

For an initial Problem LP\((N,\emptyset ,\emptyset ,\mathbf {l},\mathbf {u)}\), we assume that the following preprocessing is done before calling Procedure Decomp \((N,\emptyset ,\emptyset ,\mathbf {l},\mathbf {u})\):

  1. 1.

    If required, the jobs are numbered in non-decreasing order of their release dates in accordance with (9).

  2. 2.

    If required, the machines are numbered in non-increasing order of their speeds in accordance with (1), and the partial sums \( S_{v}\) are computed for all \(v,\,0\le v\le m\), by (10).

  3. 3.

    The lists \(\left( l(j)\mid j\in N\right) \) and \(\left( u(j)\mid j\in N\right) \) are formed and their elements are sorted in non-decreasing order.

The required preprocessing takes \(O(n\log n)\) time.

To adapt the generic Procedure Decomp to solving a particular scheduling problem, we only need to provide the implementation details for Procedure Decomp \((H,F,K,{\mathbf {l}},\mathbf {u})\) that emerges at a certain level of recursion. To be precise, we need to explain how to compute for each particular problem the function \(\widetilde{\varphi }_{K}^{H}(X)\) for a chosen set \(X\in 2^{H}\) and how to find for a current heavy-element set an instrumental set \(Y_{*}\) defined by (22), which determines the pair of problems into which the current problem is decomposed.

Given Problem LP\((H,F,K,\mathbf {l},\mathbf {u})\) of the form (21) define \(h=|H|\) and \(k=|K|\). Recall that \(K,H\subseteq N\) are sets with \( K\cap H=\emptyset \). For \(v=0,1,\ldots ,h\), define

$$\begin{aligned} \mathcal {H}_{v}=\left\{ Y\subseteq H\mid |H|=v\right\} \end{aligned}$$
(28)

Introduce

$$\begin{aligned} \hat{h}=\min \left\{ h,m-k-1\right\} . \end{aligned}$$
(29)

Since \(\varphi _{K}^{H}(Y)=\varphi (Y\cup K)-\varphi (K)\) for \(Y\in 2^{H}\), it follows that for a given set \(X\subseteq H\) the function \(\widetilde{ \varphi }_{K}^{H}:2^{H}\rightarrow \mathbb {R}\) can be computed as follows:

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)&= \min _{Y\in 2^{H}}\left\{ \varphi _{K}^{H}(Y)+u(X{\setminus } Y)-l(Y{\setminus } X)\right\} \nonumber \\&= u(X)-\varphi (K)+\min _{Y\in 2^{H}}\left\{ \varphi (Y\cup K)-u(Y\cap X)-l(Y{\setminus } X)\right\} \nonumber \\&= u(X)-\varphi (K)+\min _{Y\in 2^{H}}\left\{ \varphi (Y\cup K)-\lambda (Y)\right\} \!, \end{aligned}$$
(30)

where \(\varphi \) is the initial rank function associated with the scheduling problem under consideration, and

$$\begin{aligned} \lambda (j)=\left\{ \begin{array}{l@{\quad }l} u(j), &{}\mathrm{if} \ \,j\in X, \\ l(j), &{}\mathrm{if}\ \,j\in H{\setminus } X. \end{array}\right. \end{aligned}$$
(31)

Notice that if the minimum in the left-hand side of (30) is achieved for \(Y=Y_{*}\), then \(Y_{*}\) is an instrumental set for set \(X\).

5.1 Uniform machines, equal release dates

In this subsection, we show that problem \(Q|p(j)=\overline{p} (j)-x(j),C(j)\le d,pmtn|W\) can be solved in \(O(n\log n)\) time by the decomposition algorithm. To achieve this, we consider Problem LP\((H,F,K, \mathbf {l},\mathbf {u})\) that arises at some level of recursion of Procedure Decomp and present a procedure for computing the function \( \widetilde{\varphi }_{K}^{H}:2^{H}\rightarrow \mathbb {R}\) given by (22). We show that for an arbitrary set \(X\subseteq H\) the value \( \widetilde{\varphi }_{K}^{H}(X)\) can be computed in \(O(h)\) time. For a heavy-element set \(\hat{H}\subseteq H{\setminus } F\), finding a set \(Y_{*}\) that is instrumental for set \(\hat{H}\) also requires \(O(h)\) time.

Recall that for problem \(Q|p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) the rank function \(\varphi :2^{N}\rightarrow \mathbb {R}\) is defined by (11), i.e.,

$$\begin{aligned} \varphi (X)=dS_{\min \{m,|X|\}},\qquad X\in 2^{N}. \end{aligned}$$

This, together with (30), implies

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)=u(X)-dS_{\min \{m,k\}}+\min _{Y\in 2^{H}}\left\{ dS_{\min \left\{ m,|Y|+k\right\} }-\lambda (Y)\right\} . \end{aligned}$$
(32)

The computation of the minimum in the last term in (32) is done differently for the sets \(Y\subseteq H\) with \(\left| Y\right| \le \hat{h}\) and with \(\left| Y\right| >\hat{h}\), where \(\hat{h}\) is defined by (29), provided that the corresponding sets exist. With \(\mathcal {H}_{v},\,0\le v\le h,\) defined by (28), introduce

$$\begin{aligned} \varPhi ^{\prime }=\left\{ \begin{array}{l@{\quad }l} \displaystyle \min \limits _{0\le v\le \hat{h}}\big \{dS_{v+k}-\max _{Y\in \mathcal {H} _{v}}\lambda (Y)\big \}, &{}\mathrm{if}\ \,m>k, \\ +\infty , &{}\mathrm{if}\ \,m\le k, \end{array}\right. \end{aligned}$$
(33)

and

$$\begin{aligned} \varPhi ^{\prime \prime }=\left\{ \begin{array}{l@{\quad }l} dS_{m}-\max \{\lambda (Y)\mid Y\in 2^{H},\ |Y|>\hat{h}\}, &{}\mathrm{if}\ \,h>m-k-1, \\ +\infty , &{}\mathrm{if}\ \,h\le m-k-1. \end{array}\right. \end{aligned}$$
(34)

Then, we can rewrite the last term in (32) as

$$\begin{aligned} \min _{Y\in 2^{H}}\{dS_{\min \{m,|Y|+k\}}-\lambda (Y)\}=\min \left\{ \varPhi ^{\prime },\varPhi ^{\prime \prime }\right\} . \end{aligned}$$

Notice that \(\varPhi ^{\prime }=+\infty \) corresponds to the case that the set \( Y\in \mathcal {H}_{v}\) does not exist for \(0\le v\le \hat{h}\) (this happens if \(m\le k\) or equivalently \(\hat{h}<0\)); \(\varPhi ^{\prime \prime }=+\infty \) corresponds to the case that the set \(Y\in \mathcal {H}_{v}\) does not exist for \(v>\hat{h}\) (this happens if \(h\le m-k-1\) or equivalently \(\hat{h}=h\)).

Assume \(m>k\), and let \(\lambda _{v}\) be the \(v\)-th largest value in the list \(\left( \lambda (j)\mid j\in H\right) \) for \(v=1,2,\ldots ,\hat{h}\). It follows that

$$\begin{aligned} \varPhi ^{\prime }=\min _{0\le v\le \hat{h}}\left\{ dS_{v+k}-\sum _{i=1}^{v}\lambda _{i}\right\} \!. \end{aligned}$$
(35)

We then assume \(h>m-k-1\). Since \(\lambda (j)\ge 0\) for \(j\in H\), the maximum in the right-hand side of the top line of (34) is achieved for \(Y=H\), i.e.,

$$\begin{aligned} \varPhi ^{\prime \prime }=dS_{m}-\lambda (H). \end{aligned}$$
(36)

Below we describe the procedure that uses Eqs. (35) and (36) for computing the values \(\varPhi ^{\prime }\) and \( \varPhi ^{\prime \prime }\). Since the procedure will be used as a subroutine within the recursive Procedure Decomp, here we present it for computing \(\widetilde{\varphi }_{K}^{H}(X)\) with \(X\) being a heavy-element set \(\hat{H}\). Besides, its output contains set \(Y_{*},\) an instrumental set for set \(\hat{H}\).

figure c

Let us analyze the time complexity of Procedure CompQr0. In Step 2, the values \(\lambda _{1},\lambda _{2},\ldots ,\lambda _{\hat{h}}\) can be found in \(O(h)\) time by using the list \((\lambda (j)\mid j\in H)\), so that the value \(\varPhi ^{\prime }\) and set \(Y^{\prime }\) can be computed in \(O(h)\) time. It is easy to see that \(\varPhi ^{\prime \prime }\) and \(Y^{\prime \prime } \) can be obtained in \(O(h)\) time as well. Hence, the value \(\widetilde{ \varphi }_{K}^{H}(X)\) and set \(Y_{*}\) can be found in \(O(h)\) time.

Theorem 5

Problem \(Q|p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) can be solved either in \(O(n\log n)\) time or in \(O(n+m\log m\log n)\) time.

Proof

Here, we only present the proof of the running time \(O(n\log n)\), that is derived if in each level of recursion of Procedure Decomp we use Procedure CompQr0; the proof of the running time \(O(n+m\log m\log n)\) is given in “Appendix”.

As proved above, Procedure CompQr0 applied to Problem LP\((H,F,K,\mathbf {l}, \mathbf {u)}\) takes \(O(h)\) time. In terms of Theorem 4 on the running time of Procedure Decomp, this implies that \(T_{Y_{*}}(h)=O(h)\).

In the analysis of the time complexity of Procedure CompQr0, we assume that certain information is given as part of the input. This assumption can be satisfied by an appropriate preprocessing. In particular, when we decompose a problem with a set of job \(H\) at a certain level of recursion into two subproblems, we may create the sorted lists \((u(j)\mid j\in H)\) and \( (l(j)\mid j\in H)\). This can be done in \(O(h)\) time, since the sorted lists \( (u(j)\mid j\in N)\) and \((l(j)\mid j\in N)\) are available as a result of the initial preprocessing. Thus, we have that \(T_{\mathrm{Split}}(h)=O(h)\). Hence, the theorem follows from Theorem 4. \(\square \)

5.2 Identical machines, different release dates

In this subsection, we show that problem \(P|r(j),p(j)=\overline{p} (j)-x(j),C(j)\le d,pmtn|W\) can be solved in \(O(n\log m\log n)\) time by the decomposition algorithm. To achieve this, we consider Problem LP\((H,F,K, \mathbf {l},\mathbf {u})\) that arises at some level of recursion of Procedure  Decomp and present a procedure for computing the function \( \widetilde{\varphi }_{K}^{H}:2^{H}\rightarrow \mathbb {R}\) given by (22). We show that for an arbitrary set \(X\subseteq H\) the value \( \widetilde{\varphi }_{K}^{H}(X)\) can be computed in \(O(h\log m)\) time. For a heavy-element set \(\hat{H}\subseteq H{\setminus } F\), finding a set \(Y_{*}\) that is instrumental for set \(\hat{H}\) also requires \(O(h\log m)\) time.

Recall that for problem \(P|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) the rank function \(\varphi :2^{N}\rightarrow \mathbb {R}\) is defined by (13), i.e.,

$$\begin{aligned} \varphi (X)=d\cdot \min \{m,|X|\}-\sum _{i=1}^{\min \{m,|X|\}}r_{i}(X),\qquad X\in 2^{N}, \end{aligned}$$

where \(r_i(X)\) denotes the i-th smallest release dates among the jobs of set X.

This, together with (30), implies that

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)&= u(X)-\left( d\cdot \min \{m,k\}-\sum _{i=1}^{\min \{m,k\}}r_{i}(K)\right) \nonumber \\&\quad +\,\min _{Y\in 2^{H}}\bigg \{d\cdot {\min \{m,|Y|+k\}} \nonumber \\&\quad -\,\sum _{i=1}^{\min \{m,|Y|+k\}}r_{i}(Y\cup K)-\lambda (Y)\bigg \}, \end{aligned}$$
(37)

where \(\lambda (j),\,j\in H,\) are given by (31).

Let \(\hat{h}\) be defined by (29). Computation of the minimum in the last term in (37) is done differently for sets \( Y\subseteq H\) with \(\left| Y\right| \le \hat{h}\) and \(\left| Y\right| >\hat{h}\). With \(\mathcal {H}_{v},\,0\le v\le h,\) defined by (28), introduce

$$\begin{aligned} \varPhi ^{\prime }=\left\{ \begin{array}{l@{\quad }l} \displaystyle \min _{0\le v\le \hat{h}}\left\{ d\cdot (v+k)-\max _{Y\in \mathcal {H}_{v}}\left\{ \sum _{i=1}^{v+k}r_{i}(Y\cup K)+\lambda (Y)\right\} \right\} , &{}\mathrm{if}\ \,m>k, \\ +\infty , &{}\mathrm{if}\ \,m\le k, \end{array}\right. \end{aligned}$$
(38)

and

$$\begin{aligned} \varPhi ^{\prime \prime } =\left\{ \begin{array}{l} \displaystyle dm-\max \left\{ \sum _{i=1}^{m}r_{i}(Y\cup K)+\lambda (Y)\ \Big |\ Y\in 2^{H},\ |Y|>\hat{h}\right\} , \\ \qquad \qquad \qquad \qquad \quad \mathrm{if~}h>m-k-1, \\ +\infty , \qquad \qquad \qquad \mathrm{if~}h\le m-k-1. \\ \end{array}\right. \end{aligned}$$
(39)

Similarly to Sect. 5.1, the values \(\varPhi ^{\prime }\) and \(\varPhi ^{\prime \prime }\) are responsible for computing the minimum in the last term in (37) over the sets \(Y\subseteq H\) with \( \left| Y\right| \le \hat{h}\) and with \(\left| Y\right| > \hat{h}\), respectively, provided that the corresponding sets exist. Thus, (37) can be rewritten as

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)=u(X)-\left( d\cdot \min \{m,k\}-\sum _{i=1}^{\min \{m,k\}}r_{i}(K)\right) +\min \left\{ \varPhi ^{\prime },\varPhi ^{\prime \prime }\right\} . \end{aligned}$$
(40)

We now explain how to compute the values \(\varPhi ^{\prime }\) and \(\varPhi ^{\prime \prime }\). From the list \((\widetilde{\lambda }(j)\mid \) \( j\in H)\), where

$$\begin{aligned} \widetilde{\lambda }(j)=r(j)+\lambda (j),\qquad j\in H. \end{aligned}$$
(41)

Suppose that \(m>k\). Computing of \(\varPhi ^{\prime }\) can be done in a similar manner as in Sect. 5.1. The top line of the formula (38) can be rewritten as

$$\begin{aligned} \varPhi ^{\prime }&= \min _{0\le v\le \hat{h}}\bigg \{d\cdot (v+k)-\max _{Y\in \mathcal {H}_{v}}\big \{r(Y)+r(K)+\lambda (Y)\big \}\bigg \} \\&= -r(K)+\min _{0\le v\le \hat{h}}\bigg \{d\cdot (v+k)-\max _{Y\in \mathcal {H} _{v}}\widetilde{\lambda }(Y)\bigg \}. \end{aligned}$$

For \(v,~1\le v\le \hat{h}\), let \(\widetilde{\lambda }_{v}\) be the \(v\)-th largest value among the numbers \(\widetilde{\lambda }(j),\,j\in H\). Then, we have

$$\begin{aligned} \varPhi ^{\prime }=-r(K)+\min _{0\le v\le \hat{h}}\bigg \{d\cdot (v+k)-\sum _{i=1}^{v}\widetilde{\lambda }_{i}\bigg \}. \end{aligned}$$
(42)

We now turn to computing the value \(\varPhi ^{\prime \prime }\). We may assume \( \hat{h}<h\), i.e., \(h>m-k-1\), since otherwise \(\varPhi ^{\prime \prime }=+\infty \). For simplicity of the description, we assume, without loss of generality, that the jobs of set \(H\cup K\) are renumbered in such a way that

$$\begin{aligned} H\cup K=\left\{ 1,2,\ldots ,h+k\right\} ,\qquad r(1)\le r(2)\le \cdots \le r(h+k). \end{aligned}$$
(43)

For \(t=m,m+1,\ldots ,h+k\), introduce

$$\begin{aligned} K[t]&= \{j\in K\mid j\le t\}, \nonumber \\ \mathcal {H}^{z}[t]&= \left\{ Y\in 2^{H}\mid Y\subseteq \{1,2,\ldots ,t\},\ |Y|+|K[t]|=z\right\} \!,\quad \left| K[t]\right| \le z\le m. \end{aligned}$$
(44)

We define \(\bar{t}\) to be the minimum \(t\) with \(|K[t]|=m\) if \(k\ge m\); otherwise, let \(\bar{t}=h+k\). Note that \(\bar{t}\ge m,\) and \(\mathcal {H} ^{m}[t]\ne \emptyset \) if \(m\le t\le \bar{t}\).

The following lemma is useful for computing the value \(\varPhi ^{\prime \prime }\) efficiently.

Lemma 4

Let \(Y^{\prime \prime }\in 2^{H}\) be a set satisfying \( |Y^{\prime \prime }|>\hat{h}\) and

$$\begin{aligned} \sum _{i=1}^{m}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })=\max \left\{ \sum _{i=1}^{m}r_{i}(Y\cup K)+\lambda (Y)\ \bigg |\ Y\in 2^{H},\ |Y|>\hat{h}\right\} . \end{aligned}$$
(45)

Let \(t_{*}\in H\cup K\) be a job such that \(m\le t_{*}\le \bar{t}\) and the set \(\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}\) contains exactly \(m\) elements. Define the sets \(Y_{1}^{\prime \prime }=\{j\in Y^{\prime \prime }\mid j\le t_{*}\}\) and \(Y_{2}^{\prime \prime }=\{j\in Y^{\prime \prime }\mid j>t_{*}\}\). Then the following properties hold:

$$\begin{aligned} \begin{aligned} \mathrm{(i)}&\quad \sum \limits _{i=1}^{m}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })=\widetilde{\lambda }(Y_{1}^{\prime \prime })+r(K[t_{*}])+\lambda (Y_{2}^{\prime \prime }), \\ \mathrm{(ii)}&\quad Y_{1}^{\prime \prime }\in \mathcal {H}^{m}[t_{*}]\, \text{ and } \,\widetilde{\lambda }(Y_{1}^{\prime \prime })=\max \{\widetilde{\lambda } (Y)\mid Y\in \mathcal {H}^{m}[t_{*}]\}, \\ \mathrm{(iii)}&\quad Y_{2}^{\prime \prime }=\left\{ j\in H\mid j>t_{*}\right\} . \end{aligned}\qquad \end{aligned}$$

Proof

First, notice that set \(Y^{\prime \prime }\cup K\) contains at least \(\hat{h}+1+k\ge m\) jobs, so that job \(t_{*}\) exists and \(m\le t_{*}\le h+k\). Notice that job \(t_{*}\) might belong to set \(H{\setminus } Y^{\prime \prime }\), and that job \(t_{*}\) is not necessarily unique. Indeed, if, e.g., job \(t_{*}+1\in H{\setminus } Y^{\prime \prime }\), then \(\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}=\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}+1\}\).

We need to show that there exists a \(t_{*}\) that satisfies \(t_{*}\le \bar{t}\). To prove this, we only need to consider the case that \(k\ge m\), since otherwise by definition \(\bar{t}=h+k\). For \(k\ge m\), let \(t_{*}\) be the smallest value of \(t\) such that the equality \(|\{j\in Y^{\prime \prime }\cup K\mid j\le t\}|=m\) holds. Since \(|\{j\in K\mid j\le t_{*}\}|\le m\), we have \(t_{*}\le \bar{t}\) by the definition of \(\bar{t}\).

Take a \(t_{*}\) that satisfies the lemma conditions. For an arbitrarily chosen set \(Z_{1}\in \mathcal {H}^{m}[t_{*}]\), define set \(Z\in 2^{H}\) as \(Z=Z_{1}\cup Y_{2}^{\prime \prime }\). Notice that \(\{j\in Z\cup K\mid j\le t_{*}\}=Z_{1}\cup K[t_{*}]\). This implies

$$\begin{aligned} \sum _{i=1}^{m}r_{i}(Z\cup K)+\lambda (Z)&= r(Z_{1})+r(K[t_{*}])+\lambda (Z_{1})+\lambda (Y_{2}^{\prime \prime })\nonumber \\&= \widetilde{\lambda } (Z_{1})+r(K[t_{*}])+\lambda (Y_{2}^{\prime \prime }). \end{aligned}$$
(46)

Since \(\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}=Y_{1}^{\prime \prime }\cup K[t_{*}]\) and \(|\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}|=m\), we have \(Y_{1}^{\prime \prime }\in \mathcal {H}^{m}[t_{*}]\). Applying (46) with \(Z_{1}=Y_{1}^{\prime \prime }\), we obtain

$$\begin{aligned} \sum _{i=1}^{m}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })= \widetilde{\lambda }(Y_{1}^{\prime \prime })+r(K[t_{*}])+\lambda (Y_{2}^{\prime \prime }), \end{aligned}$$

i.e., property (i) holds.

Since the maximum in (45) is achieved for \(Y=Y^{\prime \prime }\), the inequality

$$\begin{aligned} \sum _{i=1}^{m}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })\ge \sum _{i=1}^{m}r_{i}(Z\cup K)+\lambda (Z ) \end{aligned}$$

holds for any set \(Z=Z_{1}\cup Y_{2}^{\prime \prime }\) with \(Z_{1}\in \mathcal {H}^{m}[t_{*}]\). Then (46) and property (i) imply that \(\widetilde{\lambda }(Y_{1}^{\prime \prime })\ge \widetilde{\lambda } (Z_{1})\). Hence, property (ii) holds.

Since \(\lambda (j)\ge 0\) for \(j\in H\), we should include all jobs \(j\in H\) with \(j>t_{*}\) into set \(Y_{2}^{\prime \prime }\) to achieve the maximum in (45), i.e., property (iii) holds. \(\square \)

For each \(t,\,m\le t\le \bar{t}\), define

$$\begin{aligned} \eta _{1}[t]=\max _{Y\in \mathcal {H}^{m}[t]}\widetilde{\lambda }(Y),\qquad \rho [t]=r(K[t]),\qquad \eta _{2}[t]=\sum _{j\in H,\,j>t}\lambda (j). \end{aligned}$$

We see from Lemma 4 that

$$\begin{aligned} \varPhi ^{\prime \prime }=dm-\max _{m\le t\le \bar{t}}\{\eta _{1}[t]+\rho [t]+\eta _{2}[t]\} \end{aligned}$$
(47)

holds. We now show how to compute the values \(\eta _{1}[t],\rho [t]\), and \(\eta _{2}[t]\) efficiently.

For \(t=m\), define

$$\begin{aligned} Q_{m}=\left\{ j\in H\mid j\le m\right\} . \end{aligned}$$
(48)

Notice that

$$\begin{aligned} \max \{\widetilde{\lambda }(Y)\mid Y\in \mathcal {H}^{m}[m]\}=\max \left\{ \widetilde{\lambda }(Y)\mid Y\subseteq Q_{m},\ |Y|+\left| K[m]\right| =m\right\} =\widetilde{\lambda }(Q_{m}). \end{aligned}$$

Thus, we have

$$\begin{aligned} \eta _{1}[m]=\widetilde{\lambda }(Q_{m}),\qquad \rho [m]=r(K[m]),\qquad \eta _{2}[m]=\sum _{j\in H,\,j>m}\lambda (j). \end{aligned}$$
(49)

Lemma 5

Let \(t\) be an integer with \(m<t\le \bar{t}\).

  1. (i)

    Given the values \(\rho [t-1]\) and \(\eta _{2}[t-1],\, \rho [t]\) and \(\eta _{2}[t]\) can be obtained as

    $$\begin{aligned} \rho [t]=\left\{ \begin{array}{l@{\quad }l} \rho [t-1], &{}\mathrm{if}\ \,t\in H, \\ \rho [t-1]+r(t), &{}\mathrm{if}\ \,t\in K, \end{array}\right. \quad \eta _{2}[t]=\left\{ \begin{array}{l@{\quad }l} \eta _{2}[t-1]-\lambda (t), &{}\mathrm{if}\ \,t\in H, \\ \eta _{2}[t-1], &{}\mathrm{if}\ \,t\in K. \end{array}\right. \end{aligned}$$
    (50)
  2. (ii)

    Given a set \(Q\in \mathcal {H}^{m}[t-1]\) with \(\eta _{1}[t-1]= \widetilde{\lambda }(Q)\), the value \(\eta _{1}[t-1]\) and job \(z\in Q\) such that \(\widetilde{\lambda }(z)=\min _{j\in Q}\widetilde{\lambda }(j)\), the value \(\eta _{1}[t]\) can be obtained as

    $$\begin{aligned} \eta _{1}[t]=\left\{ \begin{array}{l@{\quad }l} \eta _{1}[t-1], &{}\displaystyle \mathrm{if}\ \,t\in H,\ \widetilde{\lambda } (z)\ge \widetilde{\lambda }(t), \\ \displaystyle \eta _{1}[t-1]-\widetilde{\lambda }(z)+\widetilde{\lambda }(t), &{}\displaystyle \mathrm{if}\ \,t\in H,\ \widetilde{\lambda }(z)<\widetilde{ \lambda }(t), \\ \displaystyle \eta _{1}[t-1]-\widetilde{\lambda }(z), &{}\mathrm{if}\ \,t\in K. \end{array}\right. \end{aligned}$$
    (51)

Proof

We have \(K[t]=K[t-1]\) if \(t\in H\) and \( K[t]=K[t-1]\cup \{t\}\) if \(t\in K\). Hence, the first equation in (50) follows. The second equation in (50) is immediate from the definition of \(\eta _{2}\). The Eq. (51) follows from the observation that \(\eta _{1}[t]\) is equal to the sum of \(m-|K[t]|\) largest numbers in the list \( \left( \widetilde{\lambda }(j)\mid j\in H,\ j\le t\right) \). \(\square \)

Below we describe the procedure that uses Eqs. (42) and (47) for computing the values \(\varPhi ^{\prime }\) and \(\varPhi ^{\prime \prime }\). As in Sect. 5.1, the procedure outputs \( \widetilde{\varphi }_{K}^{H}(X)\) for \(X=\hat{H}\) and an instrumental set \( Y_{*}\) for set \(\hat{H}\).

figure d

Now we analyze the running time of this procedure. In Steps 1 and 2 we compute the value \(\varPhi ^{\prime }\) and find set \(Y^{\prime }\). Step 1 can be done in constant time. Step 2-1 can be done by selecting \(\hat{h}\) largest numbers in the list \((\widetilde{\lambda }(j)\mid j\in H)\) in \(O(h)\) time and then sorting them in \(O(\hat{h}\log \hat{h})\) time. Since Step 2-2 can be done in \(O(k+\hat{h})\) time, Step 2 requires \(O(k+h+\hat{h}\log \hat{h })=O(k+h\log \hat{h})=O(k+h\log m)\) time in total.

In Steps 3 and 4 we compute the value \(\varPhi ^{\prime \prime }\) and find set \( Y^{\prime \prime }\). Step 3 can be also done in constant time. We assume that both \(\left( r(j)\mid j\in H\right) \) and \(\left( r(j)\mid j\in K\right) \) are given as sorted lists; this can be easily satisfied by appropriate preprocessing. Then, Step 4-1 can be done in \(O(h+k)\) time by using merge sort. Step 4-2 can be done in \(O(h+k)\) time. In Step 4-3, we implement \(Q\) as a heap for computational efficiency. Initially \(Q=Q_{m}\) consists of at most \(m\) elements, and to initialize the heap \(Q\) takes \( O(h+m\log m)\) time. The number of elements in the heap does not increase, so that each iteration in Step 4-3 can be done in \(O(\log m)\) time, which implies that Step 4-3 requires \(O((h+k)\log m)\) time. Step 4-4 can be done in \(O(h+k)\) time. Step 4-5 is needed for finding the set \(Y^{\prime \prime }\) and is implemented as a partial rerun of Step 4-3 in \(O((h+k)\log m)\) time.

Finally, we compute the value \(\widetilde{\varphi }_{K}^{H}(X)\) in Step 5. We may assume that the value \(u(X)\) in Step 5 is given in advance. The value \(\sum _{i=1}^{\min \{m,k\}}r_{i}(K)\) can be computed in \(O(k)\) time, since a sorted list \(\left( r(j)\mid j\in K\right) \) is available. Hence, Step 5 can be done in \(O(k)\) time. In total, Procedure CompPrj requires \(O((h+k)\log m)\) time. In particular, the procedure runs in \(O(h\log m)\) time if \(h\ge k\).

In the rest of this subsection, we show that a slightly modified version of Procedure CompPrj can also be run in \(O(h\log m)\) time for \(h<k\).

First, consider the case that \(h\ge m\). Then, we have \(k>h\ge m\). Let \( K_{m}\) be a set of \(m\) jobs in \(K\) with \(m\) smallest release dates. It is easy to see that the jobs in \(K{\setminus } K_{m}\) do not affect the values \(r_{i}(K)\) and \(r_{i}(Y\cup K)\), i.e., it holds that

$$\begin{aligned} r_{i}(K)=r_{i}(K_{m}),\quad r_{i}(Y\cup K)=r_{i}(Y\cup K_{m}),\qquad i=1,2,\ldots ,m,\quad Y\in 2^{H}. \end{aligned}$$

It follows that in the formula (37) for \(\widetilde{ \varphi }_{K}^{H}(X)\), the value in the right-hand side remains the same even if we replace \(K\) and \(k\) with \(K_{m}\) and \(m\), respectively. Making the same replacement in Procedure CompPrj, we deduce that it will run in \( O((h+m)\log m)=O(h\log m)\) time, provided that set \(K_{m}\) is given in advance.

We finally consider the case that \(h<m\). From the discussion above, we may assume that \(k\le m\). For any \(Y\in 2^{H}\), the contribution of the release dates into the right-hand side of (37) is equal to \( \sum _{i=1}^{k}r_{i}(K)-\sum _{i=1}^{\min \{m,|Y|+k\}}r_{i}(Y\cup K)\). Let \( k^{\prime }=m-h\) and \(K^{\prime }\) be the set of jobs in \(K\) with \(k^{\prime }\) smallest release dates among \(r(j),\,j\in K\). Since \(|Y|\le h<m\), each of the values \(r(j),\,j\in K^{\prime }\), contributes to the sum \( \sum _{i=1}^{\min \{m,|Y|+k\}}r_{i}(Y\cup K)\). Hence, it follows that

$$\begin{aligned} \sum _{i=1}^{k}r_{i}(K)-\sum _{i=1}^{\min \{m,|Y|+k\}}r_{i}(Y\cup K)&= \sum _{i=1}^{k-k^{\prime }}r_{i}\left( K{\setminus } K^{\prime }\right) \\&\quad -\,\sum _{i=1}^{\min \{m,|Y|+(k-k^{\prime })\}}r_{i}\left( Y\cup (K{\setminus } K^{\prime })\right) . \end{aligned}$$

Thus, in formula (37), the value in the right-hand side remains the same if we replace \(K\) and \(k\) with \(K{\setminus } K^{\prime }\) and \(k-k^{\prime }\), respectively. Making the same replacement in Procedure CompPrj, we deduce that it will run in \(O((h+k-k^{\prime })\log m)\) time, provided that the set \(K{\setminus } K^{\prime }\) is given in advance. Since \(k-k^{\prime }=k-(m-h)\le h\) holds for \(k\le m\), the running time of Procedure CompPrj is \(O(h\log m)\).

We are now ready to prove the main statement regarding problem \(P|r(j),\,p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\).

Theorem 6

Problem \(P|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) can be solved in \(O(n\log m\log n)\) time.

Proof

As proved above, Procedure CompPrj applied to Problem LP\((H,F,K,\) \(\mathbf {l},\mathbf {u)}\) takes \(O(h\log m)\) time. In terms of Theorem 4 on the running time of Procedure Decomp, we have proved that \(T_{Y_{*}}(h)=O(h\log m)\).

In the analysis of the time complexity of Procedure CompPrj, we assume that certain information is given as part of the input. This assumption can be satisfied by an appropriate preprocessing, when we decompose a problem at a certain level of recursion into two subproblems, based on the found set \( Y_{*}\). It is not hard to see that this can be done in \(O(h\log m)\) time, i.e., we have \(T_{\mathrm{Split}}(h)=O(h\log m)\). Hence, the theorem follows from Theorem 4. \(\square \)

5.3 Uniform machines, different release dates

In this subsection, we show that problem \(Q|r(j),p(j)=\overline{p} (j)-x(j),C(j)\le d,pmtn|W\) can be solved in \(O(nm\log n)\) time by the decomposition algorithm. To achieve this, we consider Problem LP\((H,F,K, \mathbf {l},\mathbf {u})\) that arises at some level of recursion of Procedure Decomp and present a procedure for computing the function \( \widetilde{\varphi }_{K}^{H}:2^{H}\rightarrow \mathbb {R}\) given by (22). We show that for an arbitrary set \(X\subseteq H\) the value \( \widetilde{\varphi }_{K}^{H}(X)\) can be computed in \(O(hm)\) time. For a heavy-element set \(\hat{H}\subseteq H{\setminus } F\), finding a set \(Y_{*}\) that is instrumental for set \(\hat{H}\) also requires \(O(hm)\) time.

Recall that for problem \(Q|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) the rank function \(\varphi :2^{N}\rightarrow \mathbb {R}\) is defined by (12), i.e.,

$$\begin{aligned} \varphi (X)=dS_{\min \left\{ m,\left| X\right| \right\} }-\sum _{i=1}^{\min \left\{ m,\left| X\right| \right\} }s_{i}r_{i}(X), \end{aligned}$$

where \(r_{i}\left( X\right) \) denotes the \(i\)-th smallest release dates among the jobs of set \(X\). This, together with (30), implies that

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)&= u(X)-\bigg (dS_{\min \{m,k\}}-\sum _{i=1}^{\min \{m,k\}}s_{i}r_{i}(K)\bigg ) \nonumber \\&\quad +\,\min _{Y\in 2^{H}}\Bigg \{ \bigg (dS_{\min \{m,|Y|+k\}}-\sum _{i=1}^{\min \{m,|Y|+k\}}s_{i}r_{i}(Y\cup K)\bigg )-\,\lambda (Y)\Bigg \},\qquad \end{aligned}$$
(52)

where \(\lambda (j),\,j\in H,\) are given by (31).

Let \(\hat{h}\) be defined by (29). Computation of the minimum in the last term in (52) is done differently for sets \(Y\subseteq H\) with \(\left| Y\right| \le \hat{h}\) and \( \left| Y\right| >\hat{h}\). With \(\mathcal {H}_{v},\,0\le v\le h,\) defined by (28), introduce

$$\begin{aligned} \varPhi ^{\prime }=\left\{ \begin{array}{l@{\quad }l} \displaystyle \min \limits _{0\le v\le \hat{h}}\left\{ dS_{v+k}-\max \limits _{Y\in \mathcal {H}_{v}}\left\{ \sum _{i=1}^{v+k}s_{i}r_{i}(Y\cup K)+\lambda (Y)\right\} \right\} , &{} \mathrm{if}\ \,m>k, \\ +\infty , &{}\mathrm{if}\ \,m\le k, \end{array}\right. \end{aligned}$$
(53)

and

$$\begin{aligned} \varPhi ^{\prime \prime }=\left\{ \begin{array}{l} \displaystyle dS_{m}-\max \bigg \{\sum _{i=1}^{m}s_{i}r_{i}(Y\cup K)+\lambda (Y)\ \bigg |\ Y\in 2^{H},\ |Y|>\hat{h}\bigg \}, \\ \qquad \qquad \mathrm{if}\ \,h>m-k-1, \\ \\ +\infty , \qquad \mathrm{if}\ \,h\le m-k-1. \\ \end{array}\right. \end{aligned}$$
(54)

Thus, (52) can be rewritten as

$$\begin{aligned} \widetilde{\varphi }_{K}^{H}(X)=u(X)-\left( dS_{\min \{m,k\}}-\sum _{i=1}^{\min \{m,k\}}s_{i}r_{i}(K)\right) +\min \left\{ \varPhi ^{\prime },\varPhi ^{\prime \prime }\right\} \!. \end{aligned}$$
(55)

We explain how to compute the values \(\varPhi ^{\prime }\) and \(\varPhi ^{\prime \prime }\). As in Sect. 5.2, for simplicity of the description, we assume, without loss of generality, that the jobs are renumbered so that (43) holds.

In order to compute \(\varPhi ^{\prime }\), for \(v\) and \(t\) such that \(0\le v\le \hat{h}\) and \(1\le t\le h+k\), define

$$\begin{aligned} \begin{aligned} \mathcal {H}_{v}[t]&=\left\{ Y\in \mathcal {H}_{v}\mid Y\subseteq \left\{ 1,2,\ldots ,t\right\} \right\} , \\ \xi _{v}[t]&=\max _{Y\in \mathcal {H}_{v}[t]}\left\{ \sum _{i=1}^{v+k}s_{i}r_{i}(Y\cup K)+\lambda (Y)\right\} , \end{aligned} \end{aligned}$$
(56)

where \(\xi _{v}[t]\) is set to \(-\infty \) if \(\mathcal {H}_{v}[t]=\emptyset \). Then, we have

$$\begin{aligned} \varPhi ^{\prime }=\max _{0\le v\le \hat{h}}\left\{ dS_{v+k}-\xi _{v}[h+k]\right\} . \end{aligned}$$
(57)

Notice that all \(k\) jobs of set \(K\) and \(v\) jobs of set \(Y\in \mathcal {H}_{v}[t]\) contribute into \(\sum _{i=1}^{v+k}s_{i}r_{i}(Y\cup K)\). The required values \(\xi _{v}[t]\) can be computed by a dynamic programming algorithm. Assume that for the current numbering of the jobs in \(H\cup K\), the jobs in set \(K\) get the numbers \(j_{1},j_{2},\ldots ,j_{k}\), so that \(r\left( j_{1}\right) \le \cdots \le r\left( j_{k}\right) \).

For \(v=0\), notice that \(\mathcal {H}_{0}[t]=\left\{ \emptyset \right\} \), so that in accordance with (56) we compute

$$\begin{aligned} \xi _{0}\left[ t\right] =\sum _{i=1}^{k}s_{i}r(j_{i}),\qquad t=1,\ldots ,h+k. \end{aligned}$$
(58)

If job \(1\) belongs to set \(H\), then \(\mathcal {H}_{1}[1]=\left\{ \left\{ 1\right\} \right\} ;\) otherwise \(\mathcal {H}_{1}[1]=\emptyset \). Besides, \( \mathcal {H}_{v}[1]=\emptyset \) for each \(v\ge 2\). Suppose that for some value of \(t,\,1\le t\le h+k\), the sets \(\mathcal {H}_{v}[\tau ]\) have been identified for all \(v\) and \(\tau ,~0\le v\le \hat{h},\,1\le \tau \le t-1 \). Then

$$\begin{aligned} \mathcal {H}_{v}[t]=\left\{ \begin{array}{l@{\quad }l} \mathcal {H}_{v}[t-1]\cup \left\{ Y\cup \left\{ t\right\} \mid Y\in \mathcal {H }_{v-1}[t-1]\right\} , &{}\mathrm{if}~t\in H, \\ \mathcal {H}_{v}[t-1] &{} \mathrm{if}~t\in K. \end{array}\right. \end{aligned}$$
(59)

Given a job \(t\in H\), let us determine the position of job \(t\) relative to the jobs of set \(K\). If \(r(t)>r\left( j_{k}\right) \), then define \(\ell _{t}=k+1;\) otherwise, set \(\ell _{t}\) to be equal to \(\ell \) such that for job \(j_{\ell }\in K\) we have that \(j_{\ell -1}<t<j_{\ell }\). The values of \( \ell _{t}\) can be found for all \(t\in H\) in \(O(h+k)\) time by scanning the sorted sequence of jobs of set \(H\cup K\).

For some \(t\in H\) and \(v,\,1\le v\le \hat{h}\), assume that we have found the value

$$\begin{aligned} \xi _{v-1}[t-1]=\sum _{i=1}^{v+k-1}s_{i}r_{i}\left( \bar{Y}\cup K\right) +\lambda (\bar{Y}), \end{aligned}$$

where \(\bar{Y}\in \mathcal {H}_{v-1}[t-1]\). Take \(\ell =\ell _{t}\).

If \(\ell =k+1\), then job \(t\) has the largest release date among the jobs of set \(\bar{Y}\cup K\cup \left\{ t\right\} \), so that

$$\begin{aligned} \xi _{v}[t]&= \max \left\{ \xi _{v}[t-1],\xi _{v-1}[t-1]+s_{k+v}r(t)+\lambda (t)\right\} \\&= \max \left\{ \xi _{v}[t-1],\xi _{v-1}[t-1]+s_{\ell +v-1}r(t)+\lambda (t)\right\} . \end{aligned}$$

If \(\ell \le k\), then among jobs \(j\in \bar{Y}\cup K\) such that \(j\le j_{\ell }\), there are \(v-1\) jobs of set \(H\) and \(\ell \) jobs of set \(K\), i.e., job \(j_{\ell }\) has the \(\left( \ell +v-1\right) -\)th smallest release date in \(\bar{Y}\cup K\). We deduce that the total contribution of the jobs \( j_{\ell },j_{\ell +1},\ldots ,j_{k}\) into \(\sum _{i=1}^{v+k-1}s_{i}r_{i} \left( \bar{Y}\cup K\right) \) is equal to

$$\begin{aligned} \beta \left( \ell ,v-1\right) =\sum _{i=\ell }^{k}s_{v+i-1}r(j_{i}). \end{aligned}$$

For computing \(\xi _{v}[t]\), we need to find a set \(\bar{Y}_{+}\in \mathcal {H }_{v}[t]\) such that

$$\begin{aligned} \xi _{v}[t]=\sum _{i=1}^{v+k}s_{i}r_{i}\left( \bar{Y}_{+}\cup K\right) +\lambda (\bar{Y}_{+}). \end{aligned}$$

According to (59), if \(\bar{Y}_{+}\) is sought in set \(\mathcal {H} _{v}[t-1]\), then \(\xi _{v}[t]=\xi _{v}[t-1]\). Otherwise, it is sought in the sets obtained from sets of \(\mathcal {H}_{v-1}[t-1]\) by including job \(t\). In the latter case, set \(\bar{Y}_{+}\) can be found based on set \(\bar{Y}\) and on those changes that are caused by the insertion of job \(t\). As a result of this insertion, job \(t\) has the \(\left( \ell +v-1\right) -\)th smallest release date in \(\bar{Y}\cup K\cup \left\{ t\right\} \), so that it will contribute \(s_{\ell +v-1}r(t)+\lambda (t)\) into \(\xi _{v}[t]\). Notice that all jobs of set \(K\) continue making contributions, since \(v<m-k\). The new joint contribution of jobs \(j_{\ell },j_{\ell +1},\ldots ,j_{k}\) becomes

$$\begin{aligned} \beta \left( \ell ,v\right) =\sum _{i=\ell }^{k}s_{v+i}r(j_{i}). \end{aligned}$$

Therefore, we deduce:

$$\begin{aligned} \xi _{v}[t]=\max \left\{ \xi _{v}[t-1],\xi _{v-1}[t-1]+\beta \left( \ell ,v\right) -\beta \left( \ell ,v-1\right) +s_{\ell +v-1}r(t)+\lambda (t)\right\} . \end{aligned}$$
(60)

All required partial sums \(\beta \left( \ell ,v\right) \) can be found at the preprocessing stage by computing

$$\begin{aligned} \beta \left( k+1,v\right) =0,\qquad v=0,\ldots ,\hat{h}, \end{aligned}$$
(61)

followed by computing all \(\beta \left( \ell ,v\right) \) for \(v,\,0\le v\le \hat{h}\) and \(\ell ,~\ell =k-1,k-2,\ldots ,1\) by

$$\begin{aligned} \beta \left( \ell ,v\right) =\beta \left( \ell +1,v\right) +s_{v+\ell }r(j_{\ell }). \end{aligned}$$
(62)

Notice that for \(\ell =k+1\) both \(\beta \left( \ell ,v\right) =\beta \left( \ell ,v-1\right) =0\), so that the recursive formula (60) is valid for \(\ell =k+1\) as well.

Applying (60) for \(t,\,1\le t\le h+k\), and \(v,\,1\le v\le m-k\) with the initial condition (58), we may find all values \(\xi _{v}[t]\) needed for computing \(\varPhi ^{\prime }\) by (57).

We now consider the value \(\varPhi ^{\prime \prime }\). It is assumed that \(\hat{ h}<h\), i.e., \(h+k\ge m\). Suppose that we know the set \(Y^{\prime \prime }\in 2^{H}\) such that \(|Y^{\prime \prime }|>\hat{h}\) and

$$\begin{aligned} \sum _{i=1}^{m}s_{i}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })=\max \left\{ \sum _{i=1}^{m}s_{i}r_{i}(Y\cup K)+\lambda (Y)\ \bigg |\ Y\in 2^{H},\ |Y|>\hat{h}\right\} . \end{aligned}$$
(63)

Similarly to Sect. 5.2, for \(t,\,1\le t\le h+k\), introduce sets \(K\left[ t\right] \) and \(\mathcal {H}^{z}[t]\) of the form (44). Let \(t_{*}\in H\cup K\) be the job such that the set \( \{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}\) contains exactly \(m\) elements. Since the jobs are numbered in non-decreasing order of the release dates, the set \(\{j\in Y^{\prime \prime }\cup K\mid j\le t_{*}\}\) contains the jobs in \(Y^{\prime \prime }\cup K\) with \(m\) smallest release dates.

Putting \(Y_{1}^{\prime \prime }=\{j\in Y^{\prime \prime }\mid j\le t_{*}\}\in \mathcal {H}^{m}[t_{*}]\), we have

$$\begin{aligned} \sum _{i=1}^{m}s_{i}r_{i}\left( Y^{\prime \prime }\cup K\right) =\sum _{i=1}^{m}s_{i}r_{i}\left( Y_{1}^{\prime \prime }\cup K\left[ t_{*}\right] \right) . \end{aligned}$$

Putting \(Y_{2}^{\prime \prime }=Y^{\prime \prime }{\setminus } Y_{1}^{\prime \prime }=\{j\in Y^{\prime \prime }\mid j>t_{*}\}\), we have

$$\begin{aligned} \sum _{i=1}^{m}s_{i}r_{i}(Y^{\prime \prime }\cup K)+\lambda (Y^{\prime \prime })=\sum _{i=1}^{m}s_{i}r_{i}(Y_{1}^{\prime \prime }\cup K[t_{*}])+\lambda (Y_{1}^{\prime \prime })+\lambda \left( Y_{2}^{\prime \prime }\right) . \end{aligned}$$

Thus, we should include all jobs \(j\in H\) with \(j>t_{*}\) into set \( Y_{2}^{\prime \prime }\) to achieve the maximum in (63), i.e., we may assume \(Y_{2}^{\prime \prime }=\{j\in H\mid j>t_{*}\}\). We also have

$$\begin{aligned} \sum _{i=1}^{m}s_{i}r_{i}(Y_{1}^{\prime \prime }\cup K)+\lambda (Y_{1}^{\prime \prime })=\max _{Y\in \mathcal {H}^{m}[t_{*}]}\left\{ \sum _{i=1}^{m}s_{i}r_{i}(Y\cup K[t_{*}])+\lambda (Y)\right\} . \end{aligned}$$

For \(z\) and \(t,\,1\le z\le m,\,1\le t\le h+k\), define

$$\begin{aligned} \zeta _{z}[t]=\left\{ \begin{array}{l@{\quad }l} \max \limits _{Y\in \mathcal {H}^{z}[t]}\left\{ \displaystyle \sum \limits _{i=1}^{z}s_{i}r_{i}(Y\cup K\left[ t\right] )+\lambda (Y)\right\} , &{} \mathrm{if~}z\ge \left| K\left[ t\right] \right| , \\ -\infty , &{} \mathrm{otherwise.} \end{array}\right. \end{aligned}$$
(64)

Provided that these values are known, we can compute \(\varPhi ^{\prime \prime }\) by

$$\begin{aligned} \varPhi ^{\prime \prime }=dS_{m}-\max _{m\le t\le h+k}\left\{ \zeta _{m}[t]+\sum _{j\in H,~j>t}\lambda (j)\right\} . \end{aligned}$$
(65)

Notice that for a given \(t,\,t\ge m\), the term \(\sum _{j\in H,~j>t}\lambda (j)\) is identical to \(\eta _{2}[t]\) used in Sect. 5.2 and for its computation we can use the formulae (50) with the initial condition (49).

For convenience, define \(\lambda (j)=0\) for \(j\in K\). The required values of \(\zeta _{z}[t]\) can be found recursively by

$$\begin{aligned} \zeta _{z}[t]=\max \left\{ \zeta _{z}[t-1],~\zeta _{z-1}[t-1]+s_{z}r(t)+\lambda (t)\right\} ,~1\le z\le m,~1\le t\le h+k\nonumber \\ \end{aligned}$$
(66)

with the initial conditions

$$\begin{aligned} \zeta _{0}[t]=0,\,0\le t\le h+k;\quad \zeta _{z}[0]=-\infty ,\,1\le z\le m. \end{aligned}$$
(67)

To see why the recursion (66) works, notice that if in the expression for \(\zeta _{z}[t]\) job \(t\in H\) does not belong to set \(Y\) that delivers the maximum in (64), then \(\zeta _{z}[t]=\zeta _{z}[t-1]\). Otherwise, job \(t\in H\), as the job with the largest release date, will be matched with the smallest multiplier \(s_{z}\) and will make an additional contribution of \(\lambda (t)\), so that \(\zeta _{z}[t]=\zeta _{z-1}[t-1]+s_{z}r(t)+\lambda (t)\). The latter situation also occurs if \( t\in K\), since in this case \(t\in K[t]\).

Now we are ready to present the procedure that outputs \(\widetilde{\varphi } _{K}^{H}(X)\) for \(X=\hat{H}\) and an instrumental set \(Y_{*}\) for set \( \hat{H}\).

figure e

The most time consuming parts of the procedure are the double loops is Steps 6 and 10, which require \(O\left( \hat{h}\left( h+k\right) \right) \) time and \(O(m(h+k))\) time, respectively. Thus, the overall time complexity of Procedure CompQrj is \(O(m(h+k))\).

For \(h\ge k\), the time complexity becomes \(O(mh)\). We can show that the bound \(O(mh)\) also applies to the case that \(h<k\); this can be done by an approach similar to that used in Sect. 5.2. Hence, the next theorem follows from Theorem 4.

Theorem 7

Problem \(Q|r(j),p(j)=\overline{p}(j)-x(j),C(j)\le d,pmtn|W\) can be solved in \(O(nm\log n)\) time.

6 Conclusions

In this paper, we develop a decomposition recursive algorithm for maximizing a linear function over a submodular polyhedron intersected with a box. We illustrate the power of our approach by adapting the algorithm to solving three scheduling problems with controllable processing times. In these problems, it is required to find a preemptive schedule that is feasible with respect to a given deadline and minimizes total compression cost. The resulting algorithms run faster than previously known.

We intend to extend this approach to other scheduling models with controllable processing times, e.g., to a single machine with distinct release dates and deadlines. It will be interesting to identify problems, including those outside the area of scheduling, for which an adaptation of our approach is beneficial.

Although throughout the paper we assume that the processing times are real numbers from intervals \(\left[ \underline{p}(j),\overline{p}(j)\right] \), the formulated approach is applicable to the case where the processing times may only take integer values in the interval. Indeed, if all the input numbers, except for costs \(w(j)\), are given by integers, then the submodular rank function takes integer values, and the optimal solution \(p(j),\,j\in N\), found by Procedure Decomp is integral.