Skip to main content
Log in

Scheduling parallel batching machines in a sequence

  • Published:
Journal of Scheduling Aims and scope Submit manuscript

Abstract

Motivated by the application of scheduling a sequence of locks along a waterway, we consider a scheduling problem where multiple parallel batching machines are arranged in a sequence and process jobs that travel along this sequence. We investigate the computational complexity of this problem. More specifically, we show that minimizing the sum of completion times is strongly NP-hard, even for two identical machines and when all jobs travel in the same direction. A second NP-hardness result is obtained for a different special case where jobs all travel at an identical speed. Additionally, we introduce a class of so-called synchronized schedules and investigate special cases where the existence of an optimum solution which is synchronized can be guaranteed. Finally, we reinforce the claim that bidirectional travel contributes fundamentally to the computational complexity of this problem by describing a polynomial time procedure for a setting with identical machines and where all jobs travel in the same direction at equal speed.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others

References

  • Adler, M., Sitaraman, R. K., Rosenberg, A. L., & Unger, W. (1998). Scheduling time-constrained communication in linear networks. In Proceedings of the tenth annual ACM symposium on parallel algorithms and architectures, SPAA ’98 (pp. 269–278). New York, NY: ACM.

  • Antoniadis, A., Barcelo, N., Cole, D., Fox, K., Moseley, B., Nugent, M., & Pruhs, K. (2014). Packet forwarding algorithms in a line network. In A. Pardo, & A. Viola (Eds.), LATIN 2014: Theoretical informatics: 11th Latin American symposium, Montevideo, Uruguay, March 31–April 4, 2014. Proceedings (pp. 610–621). Berlin: Springer.

  • Brucker, P., Knust, S., Cheng, T. E., & Shakhlevich, N. V. (2004). Complexity results for flow-shop and open-shop scheduling problems with transportation delays. Annals of Operations Research, 129(1), 81–106.

    Article  Google Scholar 

  • Disser, Y., Klimm, M., & Lübbecke, E. (2015). Scheduling bidirectional traffic on a path. Computing Research Repository abs/1504.07129.

  • Frank, O. (1966). Two-way traffic on a single line of railway. Operations Research, 14(5), 801–811.

    Article  Google Scholar 

  • Gafarov, E. R., Dolgui, A., & Lazarev, A. A. (2015). Two-station single-track railway scheduling problem with trains of equal speed. Computers and Industrial Engineering, 85, 260–267.

    Article  Google Scholar 

  • Garey, M. R., Johnson, D. S., & Stockmeyer, L. (1976). Some simplified NP-complete graph problems. Theoretical Computer Science, 1(3), 237–267.

    Article  Google Scholar 

  • Passchyn, W. (2016). Scheduling locks on inland waterways. Ph.D. thesis, KU Leuven.

  • Passchyn, W., Briskorn, D., & Spieksma, F. C. R. (2016a). Mathematical programming models for lock scheduling with an emission objective. European Journal of Operational Research, 248(3), 802–814.

  • Passchyn, W., Coene, S., Briskorn, D., Hurink, J. L., Spieksma, F. C. R., & Vanden Berghe, G. (2016b). The lockmaster’s problem. European Journal of Operational Research, 251(2), 432–441.

    Article  Google Scholar 

  • Petersen, E. R., & Taylor, A. J. (1988). An optimal scheduling system for the Welland Canal. Transportation Science, 22, 173–185.

  • Prandtstetter, M., Ritzinger, U., Schmidt, P., & Ruthmair, M. (2015). A variable neighborhood search approach for the interdependent lock scheduling problem. In G. Ochoa, & F. Chicano (Eds.), Evolutionary Computation in Combinatorial Optimization , volume 9026 of Lecture Notes in Computer Science (pp. 36–47). Berlin: Springer.

  • Righini, G. (2016). A network flow model of the northern Italy waterway system. EURO Journal on Transportation and Logistics, 5(2), 99–122.

    Article  Google Scholar 

  • Smith, L. D., Nauss, R. M., Mattfeld, D. C., Li, J., Ehmke, J. F., & Reindl, M. (2011). Scheduling operations at system choke points with sequence-dependent delays and processing times. Transportation Research Part E, 47, 669–680.

    Article  Google Scholar 

  • Smith, L. D., Sweeney, D. C., & Campbell, J. F. (2009). Simulation of alternative approaches to relieving congestion at locks in a river transportation system. Journal of the Operational Research Society, 60, 519–533.

    Article  Google Scholar 

  • Verstichel, J. (2013). The lock scheduling problem. Ph.D. thesis, KU Leuven.

  • Verstichel, J., & Vanden Berghe, G. (2016). Scheduling serial locks: A green wave for waterbound logistics. In M. Lu & J. De Bock (Eds.), Sustainable logistics and supply chains: Innovations and integral approaches (pp. 91–109). Berlin: Springer.

    Chapter  Google Scholar 

  • Zhao, Z. J., Lau, H. C., & Ge, S. S. (2009). Integrated resource allocation and scheduling in a bidirectional flowshop with multimachine and COS constraints. IEEE Transactions on Systems, Man, and Cybernetics, Part C: Applications and Reviews, 39(2), 190–200.

    Article  Google Scholar 

Download references

Acknowledgements

This research has been partially funded by the Interuniversity Attraction Poles Programme initiated by the Belgian Science Policy Office. This work was carried out when both authors were affiliated with KU Leuven. We thank the associate editor and the referees for their careful reading of the manuscript.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ward Passchyn.

Additional information

A preliminary version of this work has been published as part of the first author’s Ph.D. dissertation (Passchyn 2016).

Appendices

Uni-directional traffic: proof of Theorem 1

Here, we provide a proof of Theorem 1, i.e. we show that problem SPBM is strongly NP-hard, even in the uni-directional setting with two identical machines and where each job must be processed by both machines. The proof is inspired by a hardness proof by Disser et al. (2015) for a problem featuring bidirectional traffic along a path where a limited number of spots are available to allow overtaking and crossing of traffic.

Fig. 14
figure 14

Overview of a constructed instance of dec-SPBM. The blocks represent periods corresponding to the vertices in G. Dashed lines represent vertex jobs, while waved lines represent edge jobs

We start our reduction from MAX CUT, which consists of answering the following question: given a graph \(G=(V,E)\), does there exist a cut consisting of at least K edges? This problem is shown to be NP-hard, see Garey et al. (1976). Notice that we consider the unweighted case, sometimes referred to as SIMPLE MAX CUT.

For a given instance of MAX CUT, we describe a corresponding instance of the decision version of SPBM. We will then argue that solving dec-SPBM for this instance corresponds to deciding the question of MAX CUT. We first turn G into a directed graph by choosing some ordering of the vertices in V, and next orienting every edge from the vertex with smaller index to the vertex with larger index.

The instance \(\mathscr {I}\) of dec-SPBM is as follows. There are two identical machines, called machine 1 and machine 2 from left to right. Both machines have unit processing times (i.e. \(T_1=T_2=1\)), the capacity of each machine is infinite (i.e. \(B_1=B_2 = \infty \)), and the distance between the two machines is equal to 1 (i.e. \(x_1=0\) and \(x_2=1\)). The set of jobs J consists of a total of \(n = 2|V||E|+2|V|+2|E|\) jobs. All jobs are right-travelling and must be processed by both machines, i.e. \(s_j=1\) and \(e_j=2\) for all \(j \in J\). For ease of exposition, we distinguish two types of jobs: vertex jobs and edge jobs. Note that the speed of the jobs need not be identical, as will be described in what follows.

We now specify the release times \(r_j\) for each job \(j \in J\). Recall that we have imposed an arbitrary order on V: let \(V = \{1,\ldots ,|V|\}\). For each vertex \(v \in V\), we have \(|E|+1\) vertex jobs arriving at time \(5(v-1)\) and \(|E|+1\) vertex jobs arriving at time \(5(v-1)+1\). We thus have a total of \(2|V|(|E|+1)\) vertex jobs. For each vertex \(v \in V\), we say that the time interval \([5(v-1),5v)\) on the first machine is the period corresponding to vertex v on the first machine, and the time interval \([5|V|+5(v-1), 5|V|+5|V|)\) is the period corresponding to vertex v on the second machine. The speed of each vertex job equals \(\nicefrac {1}{(5|V|-1)}\), i.e. each vertex job needs \(5|V|-1\) time units to travel the distance between the two machines.

In addition, there are two edge jobs for each \((v_i,v_j) \in E\): one job arriving at time \(5(v_i-1)\), and one job arriving at time \(5(v_i-1)+1\). We will refer to these arrivals as the first job and second job corresponding to edge \((v_i,v_j)\), respectively. Clearly, we have 2|E| edge jobs in total. The speed of the first job corresponding to edge \((v_i,v_j)\) equals \(\nicefrac {1}{(5(|V|+v_j-v_i))}\), while the speed of the second job equals \(\nicefrac {1}{(5(|V|+v_j-v_i)-2)}\).

The question is: does there exist a solution with total waiting time of at most \(W \equiv |V||E|+|V|+3|E|-2K\)? This completes the description of the instance of dec-SPBM. An overview of the constructed instance of dec-SLS is shown in Fig. 14. A detailed illustration of the vertex jobs and edge jobs follows in the remainder of this section.

Before we argue the equivalence between a yes-instance of MAX CUT and a yes-instance of dec-SPBM, let us first explicitly describe two particular ways of serving the jobs arriving in a given period. Figure 15 illustrates two possible ways of serving the jobs arriving in a period corresponding to some vertex v on the first machine.

In the first option, all jobs arriving at time \(5(v-1)\) constitute a batch, and start being processed immediately. At time \(5(v-1)+1\), machine 1 has finished processing these jobs, which then travel to machine 2. Due to the separation property, machine 1 can start processing a new right-travelling batch not before \(5(v-1)+2\). This batch contains all jobs that arrived at time \(5(v-1)+1\). Notice that the latter jobs incur 1 unit of waiting time. We refer to this way of serving the jobs in this period as option 1. A second way to serve the jobs corresponding to vertex v on the first machine is for all of these jobs to constitute a single batch, and start processing at time \(5(v-1)+1\). In this case, notice that the jobs arriving at time \(5(v-1)\) incur 1 unit of waiting time. We refer to this way of serving the jobs that arrive in this period as option 2.

Fig. 15
figure 15

Illustration of option 1 (solid lines) and option 2 (dashed lines) to serve the jobs arriving in a period on the first machine

Given these two options for serving the arrivals at machine 1, we can define two similar options for each period on machine 2. Let option 1 on the second machine consist of right-travelling batches starting at times \(5|V|+5(v-1)\) and \(5|V|+5(v-1)+2\); let option 2 on the second machine consist of right-travelling batches starting at times \(5|V|+5(v-1)+1\) and \(5|V|+5(v-1)+3\).

Notice that, on either machine, options in different periods are independent of each other since there is enough time to ensure that the separation property is satisfied across periods, regardless of which option is chosen for the different periods. For example, selecting option 1 in the period [5, 10) does not prevent us from selecting either option 1 or option 2 in the periods [0, 5) or [10, 15).

We now argue the equivalence between a yes-instance of MAX CUT, and a yes-instance of dec-SPBM. Suppose that there exists a cut in the graph G with at least K edges; let the corresponding partition of the node-set V be indicated by \(V_1\) and \(V_2\). We build the following solution for the instance of dec-SPBM. If vertex \(v \in V_1\), we use option 1 for the two periods corresponding to vertex v; if vertex \(v \in V_2\), we use option 2 for the two periods corresponding to vertex v. We claim that a solution with total waiting time bounded by W then arises by (i) scheduling each job arriving at the first machine in the first possible batch; next, (ii) having each job immediately travel to the second machine after leaving the first machine; and finally (iii) scheduling in the first possible batch of the second machine.

We first revisit the vertex jobs. Observe that in each period on machine 1, no matter whether option 1 or option 2 is used, one half of the arriving vertex jobs in that period has no waiting time and the other half incurs a waiting time of 1 time unit. This accounts for a total waiting time of \(|V|(|E|+1)\) for the vertex jobs at the first machine. Recall that these jobs require a travel time of \(5|V|-1\) in between the two machines. Suppose that option 1 is selected for the period corresponding to v on machine 1. This means that at time \(5(v-1)+1\) and at time \(5(v-1)+3\), there are \(|E|+1\) vertex jobs leaving machine 1 and travelling towards machine 2. It follows that these jobs are available for processing on machine 2 at times \(5|V|+5(v-1)\) and \(5|V|+5(v-1)+2\), respectively. Observe that this period on machine 2 also corresponds to vertex v and hence uses option 1. Thus, these jobs do not incur any waiting time at machine 2. In the case that \(v \in V_1\), we thus have a waiting time of \(|E|+1\) for the vertex jobs corresponding to v. In the case that \(v \in V_2\), a similar argument can be made. Indeed, the \(|E|+1\) jobs arriving at time \(5(v-1)\) then each incur a waiting time of 1 time unit at the first machine; all vertex jobs arriving in the period corresponding to v leave the first machine at time \(5(v-1)+2\) and are available for processing on the second machine at time \(5|V|+5(v-1)+1\). Since option 2 was selected for this period, these jobs do not incur any additional waiting time at machine 2. It follows that the total waiting time due to vertex jobs equals \(|V|(|E|+1)\). An illustration of this construction is provided in Fig. 16.

Fig. 16
figure 16

Illustration of the vertex jobs in a period corresponding to a vertex v. Each ‘X’ marks the arrival of \(|E|+1\) vertex jobs

Fig. 17
figure 17

Illustration of the edge jobs in a period corresponding to an edge \((v_i,v_j)\). Each circle marks the arrival of a single edge job

We now look at the edge jobs. Consider an edge \((v_i,v_j) \in E\) (with \(v_i < v_j\)). Recall that the first job corresponding to this edge requires a travel time of \(5(|V|+v_j-v_i)\), and the second job requires a travel time of \(5(|V|+v_j-v_i)-2\). For convenience, let \(t_i = 5(v_i-1)\) and \(t_j = 5|V|+5(v_j-1)\), so that \(t_i\) and \(t_j\) are the starting time of the period corresponding to \(v_i\) on machine 1 and the starting time of the period corresponding to \(v_j\) on machine 2, respectively. We now have the following four cases to consider, illustrated graphically in Fig. 17.

  • Case 1: option 1 is used for the period corresponding to \(v_i\) on machine 1 and option 1 is used for the period corresponding to \(v_j\) on machine 2. Then, the first job is processed by machine 1 at its release time \(t_i\), leaves machine 1 at \(t_i+1\), and due to its speed, arrives at machine 2 at time \(t_j+1\), where it has to wait 1 time unit in order to be processed. The second job waits 1 time unit in front of machine 1, leaves machine 1 at \(t_i+3\), and arrives at machine 2 at time \(t_j+1\). Hence, the second job also has to wait 1 time unit in front of machine 2. The total waiting time for these two jobs in this case equals 3 time units.

  • Case 2: option 1 is used for period \(v_i\) on machine 1 and option 2 is used for period \(v_j\) on machine 2. Then, the first job leaves machine 1 at \(t_i+1\) and arrives at machine 2 at time \(t_j+1\). The second job incurs one unit of waiting time at machine 1, leaves machine 1 at time \(t_i+3\), and arrives at machine 2 also at time \(t_j+1\). Hence, neither job incurs any additional waiting time at machine 2; the total waiting time for these two jobs in this case equals 1 time unit.

  • Case 3: option 2 is used for period \(v_i\) on machine 1, and option 1 is used for period \(v_j\) on machine 2. Then, both the first and second job are processed by machine 1 at time \(t_i+1\) and leave machine 1 at \(t_i+2\). Due to their speeds, the first job arrives at machine 2 at time \(t_j+2\), while the second job arrives at machine 2 at time \(t_j\). It follows that neither job incurs any additional waiting time at machine 2; the total waiting time for these two jobs in this case equals 1 time unit.

  • Case 4: option 2 is used for period \(v_i\) on machine 1, and option 2 is used for period \(v_j\) on machine 2. Then, both the first and second job are processed by machine 1 at time \(t_i+1\) and leave machine 1 at \(t_i+2\). Due to their speeds, the first job arrives at machine 2 at time \(t_j+2\), while the second job arrives at machine 2 at time \(t_j\). Both jobs incur an additional waiting time of 1 time unit. The total waiting time for these two jobs in this case equals 3 time units.

We conclude this case analysis by observing that if the same option is selected for a period \(v_i\) on machine 1 and a period \(v_j\) on machine 2 that correspond to an edge \((v_i,v_j) \in E\), there is a waiting time of 3 time units corresponding to this edge. If the two selected options for the periods corresponding to this edge differ, there is a waiting time of 1 time unit.

Since the cut in G contains K edges, we infer that the edge jobs have a total waiting time of \(K + 3(|E|-K) = 3|E|-2K\). Indeed, observe that if edge \((v_i,v_j)\) is in the cut, i.e. if \(v_i \in V_1\) and \(v_j \in V_2\), the two options used for periods \(v_i\) and \(v_j\) differ, resulting in a waiting time of 1 corresponding to this edge; otherwise, there is a waiting time of 3. Hence, the total waiting time for all jobs equals \(|V|(|E|+1)+3|E|-2K = W\). A yes-instance of MAX CUT thus gives rise to a yes-instance of dec-SPBM.

Consider now a solution to the instance of SPBM with a total waiting time of at most W. First, we argue that we can assume that such a solution is so-called sensible. We say that a solution to dec-SPBM is sensible if

  • Condition 1: each job enters the first right-travelling batch that occurs at or after its arrival at a machine,

  • Condition 2: in each period on machine 1 and on machine 2, either option 1 or option 2 is used.

We argue that we can restrict ourselves to sensible solutions only.

Lemma 2

For any feasible solution to SLS with total waiting time \(W'\), there exists a sensible solution to SLS with total waiting time at most \(W'\).

Proof

It is easily argued that Condition 1 can be enforced without increasing the total waiting time. Indeed, given any solution that does not satisfy Condition 1, it is obvious that each job for which an earlier batch assignment is available can be immediately reassigned to that earlier batch; this does not increase the total waiting time. We note that an equivalent statement also holds when the capacity of each machine is bounded: each job then enters the first non-full batch starting at or after its arrival at a machine.

To see that Condition 2 can be guaranteed, observe that there exists an optimal solution where each batch of a machine either (i) starts at a moment in time where some job that is served by the batch arrives at this machine, or (ii) starts immediately upon the completion time of a preceding batch of this machine. If neither is the case, it is easily seen that such a batch can start earlier in time, which cannot increase the total waiting time. Consider now a period on the first machine, corresponding to some vertex v. It follows that we can restrict ourselves to solutions where the first right-travelling batch starts at time \(5(v-1)\) or at time \(5(v-1)+1\). This corresponds to either option 1 or option 2.

As a result, on the second machine, jobs arrive only at times t, \(t+1\), or \(t+2\), where t denotes the starting time of a period corresponding to some vertex \(v \in V\). Thus, the same argument can be repeated to see that selecting either option 1 or option 2 yields minimum waiting time for any given period on the second machine. Since this holds independently for each period on each machine, the claim follows. \(\square \)

We may now assume that the given solution for dec-SPBM is a sensible solution with a total waiting time bounded by W. Let us argue that the instance of MAX CUT is then a yes-instance. Since our solution for dec-SPBM is a sensible solution, it follows that in each period either option 1 or option 2 is used. We again consider the waiting time of the two types of jobs. For each vertex \(v \in V\), observe that there are \(2(|E|+1)\) vertex jobs arriving in the period corresponding to v on the first machine. These jobs incur a total waiting time of \(|E|+1\) if both periods corresponding to v use the same option, and a total waiting time of \(3(|E|+1)\) if the two periods use different options. For the edge jobs, recall that the two jobs corresponding to an edge \((v_i, v_j)\) incur a total waiting time of 1 if different options are used for the period corresponding to \(v_i\) on the first machine and the period corresponding to \(v_j\) on the second machine; if the same option is used for these periods, the total waiting time equals 3 time units. Observe that, since there are |E| edges and |V| periods where vertex jobs arrive, a total waiting time of \(|V|(|E|+1)+|E|\) cannot be avoided.

We claim that the two periods corresponding to any given vertex \(v \in V\) must use the same option. We argue by contradiction. Recall that the total waiting time must equal at least \(|V|(|E|+1)+|E|\) and that an additional waiting time of \(2(|E|+1)\) is incurred for every vertex v for which the two corresponding periods are scheduled with different options. Assume that there is a single vertex for which this is the case. It follows that the total waiting time is then at least \(|V|(|E|+1) + |E| + (2|E|+1) > |V||E| + |V| + 3|E| - 2K = W\). This contradicts that our solution for dec-SPBM has a waiting time of at most W. It follows that for each vertex \(v \in V\), the two corresponding periods are scheduled using the same option. We can conclude that in any sensible schedule with a total waiting time no greater than W, the total waiting time equals \(|V|(|E|+1) + |E|\) plus an additional waiting time of 2 time units for every edge \((v_i,v_j) \in E\) (with \(v_i < v_j\)) where the periods corresponding to \(v_i\) are scheduled in the same state as the periods corresponding to \(v_j\).

Finally, we construct a solution to MAX CUT by assigning a vertex v to \(V_1\) (\(V_2\)) if option 1 (option 2) is used for the two periods corresponding to vertex v. Then, since the solution to dec-SPBM has a total waiting time no greater than \(W = |V||E| + |V| + |E| + 2(|E|-K)\), it follows that there are at least K pairs of vertices \((v_i,v_j)\) such that the period corresponding to \(v_i\) on machine 1 is scheduled with a different option than the period corresponding to \(v_j\) on machine 2. Indeed, if only \(K-1\) pairs use different options, the total waiting time equals at least \(|V||E| + |V| + (K-1) + 3(|E|-(K-1)) = |V||E| + |V| + 3|E| - 2K + 2\). By construction, there are thus at least K pairs of vertices \(v_i\) and \(v_j\) with \((v_i,v_j) \in E\) such that exactly one of these vertices is in \(V_1\) and the other is in \(V_2\). Thus, there are at least K edges in the resulting cut in G. A yes-instance of dec-SPBM thus gives rise to a yes-instance of MAX CUT, which completes our reduction.

As a remark, we note that the construction of this reduction can be modified so that each machine has unit capacity and all arrivals occur at distinct times. This can be achieved by extending the length of each period corresponding to a vertex and spreading all simultaneous arrivals out over time. Notice that Lemma 2 also holds in this more general setting. We omit a formal description of this proof. As a corollary, it then follows that SPBM is strongly NP-hard for each fixed \(B_i\).

Jobs with equal speed: proof of Theorem 2

We provide a proof for Theorem 2, i.e. we show that SPBM is strongly NP-hard even in the setting with identical machines and where the speed of all jobs is the same. Note that in the reduction outlined below, jobs travel in both directions. A crucial difference with the reduction provided in ‘Appendix A’ is that, here, the number of machines is not bounded by a constant. Furthermore, jobs need not be served by each of the machines: we specify a starting machine \(s_j\) and an ending machine \(e_j\) for all jobs \(j \in J\).

The general outline of the reduction is inspired by a reduction for a problem involving bidirectional traffic on a path, described by Disser et al. (2015). This setting, however, does not correspond exactly to the machine scheduling setting, as mentioned in Sect. 1.1. The wording and presentation of the proof in this section also resemble the proof of Theorem 1.

Fig. 18
figure 18

Illustration of the construction for an edge \((v_1,v_4)\). Only the odd-numbered machines are shown. Each box represents a period corresponding to a vertex. Dashed lines connect periods corresponding to the same vertex on the same time interval; waved lines connect adjacent periods for which the corresponding vertex is interchanged; dotted line models the existence of an edge between diagonally adjacent periods

We again start our reduction from MAX CUT; recall that an instance of MAX CUT consists of a graph \(G = (V,E)\) and a non-negative integer K. To aid the exposition of the reduction, we first provide a general overview of the reduction before describing all details. The total number of machines in the instance of SPBM is not bounded by a constant, although we argue below that this number is bounded by O(|E|). On the machines, we describe periods that correspond to the vertices in the instance of MAX CUT. A crucial part of the construction is that, on each machine that contains these periods, the order of the vertices corresponding to the periods is permuted. Similar to the argument in ‘Appendix A’, we first show that there are only two sensible scheduling options for each period; the option that is chosen in a given period reflects the assigned partition in the corresponding instance of MAX CUT.

Fig. 19
figure 19

Illustration of a period on some machine, corresponding to a vertex. Each ‘X’ marks the arrival of \(|E|+1\) type 1 jobs. Solid lines correspond to option 1; dashed lines correspond to option 2

Figure 18 illustrates a simplified overview of the fundamental part of the construction: a set of periods on a sequence of machines that represents the existence of an edge. In the figure, this is shown for an edge \((v_1, v_4)\). Each square in the figure represents a period on one of the machines; each period corresponds to a vertex. We say that two periods are adjacent if they occupy consecutive time intervals on the same machine. We say that two periods are diagonally adjacent if they occupy consecutive time intervals on two consecutive odd-numbered machines. Note that in Fig. 18, only the odd-numbered machines are shown. The role of the even-numbered machines will be specified in the detailed description of the construction. The main components of the construction are (1) sets of jobs, represented in the figure by dashed lines, which ensure that two periods occupying the same time interval on different machines correspond to the same vertex, (2) sets of jobs, represented in the figure by waved lines, which ensure that the vertices to which two adjacent periods correspond are interchanged from one machine to the next, and (3) sets of jobs, represented in the figure by dotted lines, which correspond to the existence of an edge between the vertices corresponding to two diagonally adjacent periods. In what follows we argue that the constructed instance of SPBM corresponds to a given instance of MAX CUT and provide a detailed description of these three components.

To define the set of jobs in the SPBM instance, we distinguish jobs of different types. All jobs travel at unit speed, i.e. each job traverses one unit of distance per unit of time. The two types of jobs are:

  1. 1.

    jobs of type 1, arriving on the left side of a specified machine i and travelling towards the right side of this machine i. Each type 1 job thus only requires processing on a single machine. We have \(s_j=e_j=i\) and \(j \in R\) for all jobs j of type 1.

  2. 2.

    jobs of type 2, arriving at a specified machine i; each job of this type may be right-travelling or left-travelling, and requires processing by three machines. For a job \(j \in J\) of type 2, we thus have either \(s_j=i\), \(e_j = i+2\) and \(j \in R\), or \(s_j=i\), \(e_j = i-2\) and \(j \in L\). In what follows, the travel direction and characteristics will be distinguished as needed.

To construct an instance of dec-SPBM, we use an algorithmic description. This algorithm runs a procedure for each edge \((v_i,v_j) \in E\) where \(v_i < v_j\). We initialize by specifying the first machine and next we use the procedure described below. Each odd-numbered machine in the instance has n periods, each corresponding to a vertex in V. A period consists of a time interval on a machine i; the p’th period spans a time interval \([24(p-1),24p)\). For convenience, we define \(t_p = 24(p-1)\), which equals the starting time of the p’th period on each of the machines. Note that, as illustrated in Fig. 18, the p’th period on a machine i does not necessarily correspond to the vertex \(v_p\), and the order in which periods correspond to vertices need not be the same on different machines. The processing time equals \(T_i=2\) and the distances between machines satisfy \(x_{i+1} - x_i = 6\) for all machines i in the instance. The machines in M remain ordered from left to right, i.e. as new machines are added to M throughout the procedure, they are added to the right of the existing machines.

1.1 Initialization

We start with a single machine: \(M = \{1\}\). At this machine 1 we have, for each vertex \(v \in V\), \(|E|+1\) arrivals of type 1 at each of the times \(24(v-1)\), \(24(v-1)+2\), ..., \(24(v-1)+18\). We define the p’th period on machine 1, i.e. the period on the interval \([24(p-1),24p)\), to be the period corresponding to vertex p, for all \(p \in \{1,\ldots ,|V|\}\). For convenience, we also define the value \(m^* = 1\), representing the last machine in M at each step in the construction procedure where new machines are added to M. Figure 19 illustrates the arrivals of type 1 in such a period.

As in ‘Appendix A’, we first highlight two possible ways to schedule a machine to serve the arrivals that arrive within a period on some machine. Let t be the starting time of the period. Option 1 consists of scheduling a series of consecutive batch operations starting with a right-travelling batch at time t and ending with a right-travelling batch that starts at time \(t+20\); option 2 consists of scheduling a series of consecutive batch operations starting with a right-travelling batch at time \(t+2\) and ending with a right-travelling batch that starts at time \(t+18\). Observe that if either of these options is used, the jobs of type 1 incur a total waiting time of \(10(|E|+1)\). Also notice that options in different periods are independent of each other since there is enough time to ensure that the separation property is satisfied across periods, regardless of which option is chosen for the different periods. For example, selecting option 1 in the period [24, 48) does not prevent us from selecting either option 1 or option 2 in the periods [0, 24) or [48, 72).

For each edge \((v_i,v_j) \in E\), we now describe a procedure that specifies a set of machines, and arrivals at these machines, to be added to the partial instance. This procedure is run for each edge once, and after the final edge the instance is complete.

1.2 Procedure repeated for each edge

Consider some edge \((v_i,v_j) \in E\) with \(v_i<v_j\). Let i and j be the periods corresponding to \(v_i\) and \(v_j\) on machine \(m^*\), respectively. We assume that \(t_i < t_j\); if this does not hold, we simply swap i and j below. The procedure is as follows.

  1. 1.

    While the periods corresponding to vertices \(v_i\) and \(v_j\) on machine \(m^*\) are not adjacent, repeat

    1. (a)

      We add two new machines: let \(M \leftarrow M \cup \{m^*+1, m^*+2\}\).

    2. (b)

      On machine \(m^*+2\), we have periods corresponding to vertices: for each \(p \in \{1,\ldots ,n\}\), we add \(|E|+1\) arrivals of type 1 at each of the times \(t_p\), \(t_p+2\), ..., \(t_p+18\).

    3. (c)

      Let \(v_k\) be the vertex to which the period \([t_i+24, t_i+48)\) on machine \(m^*\) corresponds; note that this is the period following the period corresponding to vertex \(v_i\) on machine \(m^*\). Clearly, \(v_k \ne v_i\) and \(v_k \ne v_j\). We say that, on machine \(m^*+2\), vertex \(v_k\) corresponds to period \([t_i,t_i+24)\), and vertex \(v_i\) corresponds to period \([t_i+24,t_i+48)\). Notice that, compared to machine \(m^*\), the vertices corresponding to these two periods are interchanged on machine \(m^*+2\). All other vertex-period correspondences remain equal to those on machine \(m^*\).

    4. (d)

      On machine \(m^*\), we add \(|E|+1\) arrivals of type 2 at each of the times \(t_i+16\) and \(t_i+18\). These jobs are right-travelling and are thus served by machines \(m^*\), \(m^*+1\), and \(m^*+2\). Additionally, on machine \(m^*+2\), we add \(|E|+1\) arrivals of type 2 at each of the times \(t_i+10\) and \(t_i+12\). These jobs are left-travelling and are thus served by machines \(m^*+2\), \(m^*+1\), and \(m^*\). For convenience, we will refer to the jobs added in this step as jobs of type 2a. Notice that these jobs are added in the periods for which the vertex-period correspondence changes from machine \(m^*\) to machine \(m^*+2\).

    5. (e)

      On all remaining periods on machine \(m^*\), i.e. all periods \([t_k,t_k+24)\) for which \(t_k \ne t_i\) and \(t_k \ne t_i+24\), we add \(|E|+1\) arrivals of type 2 at both time \(t_k\) and time \(t_k+2\). For convenience, we will refer to the jobs added in this step as jobs of type 2b. Notice that these jobs are added in the periods for which the vertex-period correspondence remains the same from machine \(m^*\) to machine \(m^*+2\).

    6. (f)

      We update \(m^*\) so that it again refers to the latest added machine in the instance. That is, we set \(m^* \leftarrow m^*+2\). Further, we redefine i and j to be the periods corresponding to \(v_i\) and \(v_j\) on the new last machine \(m^*\); we adjust \(t_i\) and \(t_j\) accordingly.

  2. 2.

    Observe that the periods corresponding to \(v_i\) and \(v_j\) are now adjacent on machine \(m^*\). We add two additional machines: let \(M = M \cup \{m^*+1, m^*+2\}\). On machine \(m^*+2\), we again have periods corresponding to vertices: for each \(p \in \{1,\ldots ,n\}\), we add \(|E|+1\) arrivals of type 1 at each of the times \(t_p\), \(t_p+2\), ..., \(t_p+18\). The vertex-period correspondence on machine \(m^*+2\) is the same as the vertex-period correspondence on machine \(m^*\).

  3. 3.

    For each \(p \in \{1, \ldots , n\}\), we add \(|E|+1\) right-travelling jobs of type 2 at each of the times \(t_p\) and \(t_p+2\) on machine \(m^*\). We refer to the jobs added in this steps as jobs of type 2b.

  4. 4.

    Finally, we add arrivals corresponding to the edge \((v_i,v_j)\). We add a single right-travelling job of type 2 on machine \(m^*\) at each of the times \(t_i+12\) and \(t_i+14\). We refer to these arrivals as jobs of type 2c. Additionally, we add \(|E|+1\) arrivals of type 1 on machine \(m^*+1\) at each of the times \(t_i+21\) and time \(t_i+23\).

This concludes the formal description of an instance of SPBM corresponding to a given instance of MAX CUT. Figure 18 shows the structure of an example where the procedure is applied for an edge \((v_1,v_4)\). In the figure, release times of jobs and the even-numbered machines are not shown. Upon completing the construction of this instance, let \(N_1\), \(N_{2a}\), and \(N_{2b}\) equal the total number of jobs of type 1, type 2a, and type 2b, respectively. Note that both the total number of jobs and the number of machines are polynomial in the size of the original instance G. Indeed, for each edge in E, at most |V| interchange operations are performed: we extend the construction with O(|V|) machines for each edge. On each machine, at most O(|V||E|) jobs are added. The total number of machines is thus bounded by O(|V||E|); the total number of jobs is bounded by \(O(|V|^2|E|^2)\). The decision question to be answered in the corresponding instance of dec-SPBM is the following. ‘Does there exist a solution with a total waiting time of at most \(W \equiv N_1 + N_{2a} + N_{2b} + 10|E|-4K\)?’

Fig. 20
figure 20

Construction corresponding to the interchange of two adjacent periods. Each ‘X’ marks the arrival of \(|E|+1\) jobs of type 1. Each circle marks the arrival of \(|E|+1\) jobs of type 2a

Fig. 21
figure 21

Construction corresponding to two periods that occupy the same time interval and correspond to the same vertex. Each ‘X’ marks the arrival of \(|E|+1\) type 1 jobs. Each circle marks the arrival of \(|E|+1\) type 2b jobs

1.3 Correspondence of MAX CUT to dec-SPBM

We first state the foundations of the argument which shows the correspondence between the given instance of MAX CUT and the constructed instance of dec-SPBM. Notice that, on each odd-numbered machine, we have a period corresponding to each vertex. We will argue that we can restrict ourselves to solutions of SPBM where all periods are scheduled using either option 1 or option 2 and, moreover, all periods corresponding to the same vertex are scheduled using the same option. The selected option then indicates one of two possible partitions of V to which a vertex is assigned, thus defining a cut in the given graph G. We now proceed by providing a detailed overview of the different arrivals added throughout the construction, and the waiting time incurred by these arrivals depending on the chosen option for the different periods.

Figure 19 gives a detailed representation of a period \([24(v-1),24v)\) on some machine, corresponding to some vertex. Recall that, in each such period, we have \(10(|E|+1)\) arrivals of type 1 and that, if either option 1 or option 2 is used in this period, the total waiting time incurred by these jobs equals \(10(|E|+1)\).

Step 1(d) adds jobs of type 2a, corresponding to the waved lines in Fig. 18; these arrivals are added where the vertex-period correspondence of two adjacent periods is interchanged from some machine \(m^*\) to machine \(m^*+2\). A detailed representation depicting all arrivals in the corresponding periods is shown in Fig. 20. Observe that if either option 1 or option 2 is chosen for each period, although jobs travelling in opposite direction cross in between machines \(m^*\) and \(m^*+1\), no batches overlap regardless of the chosen option for the periods. Further observe that, if the same option is chosen for the two periods corresponding to \(v_i\), a total waiting time of \(2(|E|+1)\) is incurred by the \(2(|E|+1)\) jobs of type 2a arriving on machine \(m^*\); similarly, if the same option is chosen for the two periods corresponding to \(v_k\), a total waiting time of \(2(|E|+1)\) is incurred by the \(2(|E|+1)\) jobs of type 2a arriving on machine \(m^*+2\). If different options are used for either the two periods corresponding to \(v_i\) (respectively, \(v_k\)), the total waiting time for the jobs of type 2a arriving on machine \(m^*\) (respectively, \(m^*+2\)) equals at least \(6(|E|+1)\).

Fig. 22
figure 22

Construction corresponding to an edge \((v_i,v_j)\). Each ‘X’ marks the arrival of \(|E|+1\) type 1 jobs. Each circle marks the arrival of a single type 2c job

Step 1(e) and step 3 add jobs of type 2b, corresponding to the dashed lines in Fig. 18; these jobs travel between a period on a machine \(m^*\) and a period on machine \(m^*+2\) that occupy the same time interval and correspond to the same vertex. Figure 21 shows a detailed representation depicting all arrivals in the corresponding periods. Observe that if the same option is chosen for the two periods corresponding to \(v_k\), a total waiting time of \(2(|E|+1)\) is incurred by the jobs of type 2b; if different options are used for the two periods, the waiting time equals at least \(6(|E|+1)\).

Step 4 adds jobs of type 2c, corresponding to the dotted lines in Fig. 18. A detailed representation of this construction is shown in Fig. 22. Observe that if two different options are used for the periods corresponding to \(v_i\) and \(v_j\) on machine \(m^*\) and \(m^*+2\), the jobs of type 2c incur a total waiting time of at least 6 time units. In contrast, if the same option is used for both periods, the total waiting time for the jobs of type 2c equals at least 10 time units. Also notice that on the even-numbered machine \(m^*+1\), in order to achieve this waiting time, a right-travelling batch must be scheduled at times \(t_i+21\) and \(t_i+25\) if option 1 is selected for the period corresponding to \(v_i\), and a right-travelling batch must be scheduled at time \(t_i+23\) if option 2 is selected for the period corresponding to \(v_i\). The arrivals of type 1 on the intermediate machine then incur a total waiting time of \(2(|E|+1)\). Note that whenever these arrivals of type 2c are added to a period, this period also has arrivals of type 2b as described by step 5 of the construction. There is, however, no overlap in the trajectory of the jobs of types 2b and 2c, nor is there an overlap between the batches serving these jobs in Figs. 21 and 22.

We are now ready to argue that a cut in graph G containing at least K edges exists if and only if a solution exists for the instance of dec-SPBM with a waiting time of at most W.

\(\Rightarrow \) Assume that there exists a cut in G that contains at least K edges; the corresponding partition of the vertices is indicated by \(V_1\) and \(V_2\). We build the following solution for the instance of dec-SPBM. If vertex \(v \in V_1\), then we use option 1 for all periods corresponding to vertex v; if vertex \(v \in V_2\), then we use option 2 for all periods corresponding to vertex v; each job enters the first available batch corresponding to its direction of travel, and the batches for all even-numbered machines are scheduled such that jobs of type 2c incur a waiting time of 1 time unit at these machines, as illustrated in Fig. 22. We claim that the resulting waiting time of all jobs is bounded by W.

We first identify the total waiting time for the jobs of types 1, 2a, and 2b. Recall that either option 1 or option 2 is chosen for each period in the instance.

  • The total waiting time for jobs of type 1 equals the total number of type 1 arrivals. Indeed, arrivals of type 1 arrive either (i) in a period corresponding to a vertex (Fig. 19), or (ii) on an even-numbered machine where two adjacent periods are connected to model an edge in E (Fig. 22). In both of these cases, the total waiting time incurred by type 1 jobs equals the number of type 1 arrivals.

  • The total waiting time for jobs of type 2a equals the total number of type 2a arrivals. Indeed, arrivals of type 2a are added only where two periods occupy the same time interval and correspond to the same vertex (Fig. 21). As a result, the same option is chosen for these two periods, and the total waiting time incurred by type 2a jobs equals the number of type 2a arrivals.

  • The total waiting time for jobs of type 2b equals the total number of type 2b arrivals. Indeed, arrivals of type 2b are added only where the vertices to which two periods correspond on a machine \(m^*\) are interchanged on machine \(m^*+2\) (Fig. 20). As a result, the same option is chosen for each pair of periods corresponding to the same vertex, and the total waiting time incurred by type 2b jobs equals the number of type 2b arrivals.

For these jobs, this yields a total waiting time of \(N_1+ N_{2a} + N_{2b}\).

Now consider the jobs of type 2c. Observe that for each edge \((v_i, v_j) \in E\), there are exactly two jobs of type 2c. If edge \((v_i,v_j)\) is in the cut, i.e. if \(v_i \in V_1\) and \(v_j \in V_2\) or vice versa, the options used for periods \(v_i\) and \(v_j\) differ on the machines traversed by these jobs. This results in a waiting time of 6 corresponding to this edge; otherwise, there is a waiting time of 10. Since there exists a cut of K edges, we thus obtain a total waiting time of \(6K + 10(|E|-K) = 10|E|-4K\) for the jobs of type 2c. The total waiting time for the corresponding solution of SLS equals \(N_1+ N_{2a} + N_{2b} + 10|E|-4K = W\). A yes-instance of MAX CUT thus gives rise to a yes-instance of dec-SPBM.

\(\Leftarrow \) Consider now a solution to an instance of SLS with a total waiting time of at most W. First, we argue that we can assume that such a solution is so-called sensible. We say that a solution is sensible if:

  • Condition 1: after arriving at a machine, each job enters the first available batch corresponding to its direction of travel,

  • Condition 2: in each period corresponding to a vertex, either option 1 or option 2 is used,

  • Condition 3: each even-numbered machine is scheduled such that jobs of type 2c traversing that machine incur a waiting time of 1.

We argue that we can restrict ourselves to considering sensible solutions only.

Lemma 3

For any feasible solution to SPBM with waiting time \(W'\), there exists a sensible solution to SPBM with waiting time at most \(W'\).

Proof

Notice that Conditions 1 and 2 are identical to the definition a sensible solution used in Lemma 2 in the context of jobs with arbitrary speed. The argument that these conditions can be guaranteed, without increasing the total waiting time of a solution, can be repeated from the proof of Lemma 2.

To see that Condition 3 can be enforced without increasing the total waiting time, we again make use of the fact that there is an optimum solution where, for each machine \(m^*\), each batch operation starts at a point in time where a job arrives at \(m^*\) or follows immediately upon the completion of an earlier batch operation of that machine \(m^*\). It is then clear that for the corresponding time \(t_i\) in the step in the construction where jobs of type 2c are added, visualized in Fig. 22, the type 1 jobs that arrive at the even-numbered machine \(m^*+1\) can be served either by (i) a right-travelling batch starting at time \(t_i+20\) and a right-travelling batch starting at time \(t_i+24\), (ii) a right-travelling batch starting at time \(t_i+21\) and a right-travelling batch starting at time \(t_i+25\), (iii) a single right-travelling batch starting at time \(t_i+22\), or (iv) a single right-travelling batch starting at time \(t_i+23\). Observe that the schedule of the even-numbered machine only determines the total waiting time of jobs of type 1 arriving on the machine and the total waiting time of jobs of type 2c. It can be seen that if option 1 is selected for the period corresponding to \(v_i\), case (i) or (ii) must hold in any optimum solution; if option 2 is selected, case (iii) or (iv) must hold in any optimum solution. If case (i) or (iii) holds, it is not difficult to see that, by selecting option (ii) or (iv), respectively, the total waiting time for jobs of type 1 reduces by \(2(|E|+1)\) time units, whereas it increases for the jobs of type 2c by at most 6 time units. Clearly we may assume \(|E| \ge 2\) since instances with \(|E|=1\) are trivial to solve. Case (ii) or case (iv) above must then hold in any optimum schedule; it follows that all jobs of type 2c then incur a single unit of waiting time at an even-numbered machine. \(\square \)

We may thus assume that the given solution for SPBM is a sensible solution with a total waiting time bounded by W. We argue that the instance of MAX CUT is then a yes-instance. We first claim that all periods corresponding to any given vertex \(v \in V\) must use the same option. We argue by contradiction. Recall that the total waiting time in any sensible schedule equals at least \(N_1 + N_{2a} + N_{2b} + 6|E|\) and that an additional waiting time of \(4(|E|+1)\) is incurred for every vertex v for which two corresponding periods are scheduled with different options. Assume that there is a single vertex for which this is the case. It follows that the total waiting time must be equal to at least \(N_1 + N_{2a} + N_{2b} + 10|E| + 4 > N_1 + N_{2a} + N_{2b} + 10|E| - 4K = W\). This contradicts the fact that our solution for dec-SPBM has a waiting time of at most W. Thus, all periods corresponding to some vertex \(v \in V\) are scheduled using the same option. For any sensible schedule with a total waiting time no greater than W, it then follows that we have a solution where the total waiting time consists of:

  1. 1.

    \(N_1 + N_{2a} + N_{2b}\), incurred by jobs of type 1, type 2a, and type 2b,

  2. 2.

    a waiting time of 6 time units for every edge \((v_i,v_j) \in E\) where different options are chosen for the periods corresponding to \(v_i\) and \(v_j\), incurred by jobs of type 2c,

  3. 3.

    a waiting time of 10 time units for every edge \((v_i,v_j) \in E\) where the same option is chosen for the periods corresponding to \(v_i\) and \(v_j\), incurred by the remaining jobs of type 2c.

Given a solution to SPBM with a total waiting time of at most \(W = N_1 + N_{2a} + N_{2b} + 10|E|-4K\), we construct a solution to MAX CUT by assigning a vertex v to \(V_1\) (respectively, \(V_2\)) if option 1 (option 2) is used for the periods corresponding to vertex v. It follows that there are at least K pairs of vertices \((v_i,v_j)\) such that the periods corresponding to \(v_i\) are scheduled with a different option than the periods corresponding to \(v_j\). Indeed, if at most \(K-1\) pairs use different options, the total waiting time must equal at least \(N_1 + N_{2a} + N_{2b} + 6(K-1) + 10 (|E|-(K-1)) > W\). By construction, there are thus at least K pairs of vertices \(v_i\) and \(v_j\) with \(v_i < v_j\) and \((v_i,v_j) \in E\) such that exactly one of these vertices is in \(V_1\) and the other is in \(V_2\). Thus, there are at least K edges in the resulting cut in G. A yes-instance of dec-SPBM thus gives rise to a yes-instance of MAX CUT, which completes our reduction.

We again remark that this construction, like the proof described in ‘Appendix A’, can be modified so that each machine has unit capacity and arrivals occur at distinct times. We omit a formal description for this modified setting.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Passchyn, W., Spieksma, F.C.R. Scheduling parallel batching machines in a sequence. J Sched 22, 335–357 (2019). https://doi.org/10.1007/s10951-018-0560-6

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10951-018-0560-6

Keywords

Navigation