DeepAI
Log In Sign Up

Linear Time Algorithms for Multiple Cluster Scheduling and Multiple Strip Packing

We study the Multiple Cluster Scheduling problem and the Multiple Strip Packing problem. For both problems, there is no algorithm with approximation ratio better than 2 unless P = NP. In this paper, we present an algorithm with approximation ratio 2 and running time O(n) for both problems. While a 2 approximation was known before, the running time of the algorithm is at least Ω(n^256) in the worst case. Therefore, an O(n) algorithm is surprising and the best possible. We archive this result by calling an AEPTAS with approximation guarantee (1+ε)OPT +p_ and running time of the form O(n(1/ε)+ f(1/ε)) with a constant ε to schedule the jobs on a single cluster. This schedule is then distributed on the N clusters in O(n). Moreover, this distribution technique can be applied to any variant of of Multi Cluster Scheduling for which there exists an AEPTAS with additive term p_. While the above result is strong from a theoretical point of view, it might not be very practical due to a large hidden constant caused by calling an AEPTAS with a constant ε≥ 1/8 as subroutine. Nevertheless, we point out that the general approach of finding first a schedule on one cluster and then distributing it onto the other clusters might come in handy in practical approaches. We demonstrate this by presenting a practical algorithm with running time O(n(n)), with out hidden constants, that is a 9/4-approximation for one third of all possible instances, i.e, all instances where the number of clusters is dividable by 3, and has an approximation ratio of at most 2.3 for all instances with at least 9 clusters.

READ FULL TEXT VIEW PDF
10/02/2018

Near-Linear Approximation Algorithms for Scheduling Problems with Batch Setup Times

We investigate the scheduling of n jobs divided into c classes/batches o...
04/02/2020

Towards PTAS for Precedence Constrained Scheduling via Combinatorial Algorithms

We study the classic problem of scheduling n precedence constrained unit...
09/26/2019

Approximation Algorithms for Scheduling with Class Constraints

Assigning jobs onto identical machines with the objective to minimize th...
04/25/2016

Do the Hard Stuff First: Scheduling Dependent Computations in Data-Analytics Clusters

We present a scheduler that improves cluster utilization and job complet...
08/26/2022

Affinity-Aware Resource Provisioning for Long-Running Applications in Shared Clusters

Resource provisioning plays a pivotal role in determining the right amou...
03/27/2020

An enhanced pinwheel algorithm for the bamboo garden trimming problem

In the Bamboo Garden Trimming Problem (BGT), there is a garden populated...

1 Introduction

In this paper, we study two problems Multiple Cluster Scheduling and Multiple Strip Packing. In the optimization problem Multiple Cluster Scheduling (MCS), we are given parallel jobs and clusters. Each cluster consists of identical machines and each job has a processing time as well as a machine requirement . We define the work of a job as and define the work of a set of jobs as . A schedule of the jobs consists of two functions which assigns jobs to starting points and , which assigns jobs to the clusters. The objective is to find a feasible schedule of all the jobs, which minimizes the makespan, i.e., which minimizes . A schedule is feasible if at every time and any Cluster the number of used machines is bounded by , i.e., if for all and . If the number of clusters is bounded by one, the problem is called Parallel Task Scheduling (PTS). Note that we can assume that since otherwise an optimal schedule would place each job alone on a personal cluster and thus the problem is not hard.

The other problem that we consider is a closely related variant of MCS, called Multiple Strip Packing (MSP). The main difference is that the jobs have to be allocated on contiguous machines. In the Problem MSP, we are given rectangular items and strips. Each strip has an infinite height and the same width . Each item has a width and a height . The objective is to find a feasible packing of the items into the strips such that the packing height is minimized. A packing is feasible if all the items are placed overlapping free into the strips. If the number of clusters is bounded by one, the problem is called Strip Packing (SP).

Strip Packing and Parallel Task Scheduling are classical optimization problems and the extension of these problems to multiple strips or clusters comes natural. Furthermore, these problems can be motivated by real world problems. One example, as stated in [24], is the following: In operating systems, MSP arises in the computer grid and server consolidation [18]. In the system supporting server consolidation on many-core chip multi processors, multiple server applications are deployed onto virtual machines. Every virtual machine is allocated several processors and each application might require a number of processors simultaneously. Hence, a virtual machine can be regarded as a cluster and server applications can be represented as parallel tasks. Similarly, in the distributed virtual machines environment, each physical machine can be regarded as a strip while virtual machines are represented as rectangles. It is quite natural to investigate the packing algorithm by minimizing the maximum height of the strips. This is related to the problem of maximizing the throughput, which is commonly used in the area of operating systems.

In this paper, we consider approximation algorithms for MCS and Multiple Strip Packing (MSP). We say an approximation algorithm has an (absolute) approximation ratio , if for each instance of the problem it holds that . If an algorithm has an approximation ratio of , we say its result is an -approximation. A family of algorithms consisting of algorithms with approximation ratio is called polynomial time approximation scheme (PTAS), and a PTAS whose running time is bounded by a polynomial in both the input length and is called fully polynomial (FPTAS). If the running time of a PTAS is bounded by a function of the form , where is an arbitrary function, we say the running time is efficient and call it an efficient PTAS or EPTAS. An algorithm has an asymptotic approximation ratio if there is a constant such that and we denote a polynomial time approximation scheme with respect to the asymptotic approximation ratio as an A(E)PTAS.

Zhuk [26] proved that MCS and MSP cannot be approximated better than unless . There is an algorithm by Ye, Han and Zhang [24] which finds a -approximation to the optimal solution for each instance of MCS or MSP. This algorithm needs to solve an EPTAS for Scheduling On Identical Machines as a subroutine. The algorithm with the best running time for this problem is currently given by [15] and it is bounded by . As a result the running time of the algorithm from Ye, Han and Zhang [24] is bounded by , using [15] and corresponding 2-approximation algorithms for Parallel Task Scheduling , e.g., the List-Scheduling algorithm by Garay and Graham [9], and Strip Packing, e.g., Steinbergs-algorithm [20]. For MCS, the approximation ratio of was improved by Jansen and Trystram [17] to an algorithm with approximation ratio of 2 and it has a worst case running time of since it uses an algorithm with running time with constant as a subroutine. Furthermore, for MSP there is an algorithm by [2] that has a ratio of as well. The worst case running time of this algorithm is of the form as well, for the same reasons.

However, since the worst-case running time for these algorithms with an approximation ratio close to or exactly is so large, work has been done to improve the runtime at the expense of the approximation ratio. There is a faster algorithm by Bougeret et al. [3] which guarantees an approximation ratio of and has a running time of . Note that the Multifit algorithm for Schedulin On Identical Machines has an approximation ratio of and a running time of at most , see [25]. Hence using this algorithm as a subroutine in [24], we find a approximation. In [5] they present an algorithm with approximation ratio with running time . Furthermore, they present a fast algorithm with approximation ratio and the same running time for the case that the job with the largest machine requirement needs less than machines. For MCS and MSP, we present -approximations, where we managed to improve the running time drastically with regard to the -notation.

Theorem 1:

There is an algorithm for MCS with approximation ratio and running time if , and running time if .

Theorem 2:

There is an algorithm for MSP with approximation ratio and running time if , and running time if .

Note that the running time of these algorithms is the best possible from a theoretical point of view with respect to the -notation for . Since we need to assign a start point to each job, we cannot assume that there is an algorithm for MCS with running time strictly faster than .

To achieve these results, we use as a subroutine an AEPTAS for the optimization problem Parallel Task Scheduling (PTS) and Strip Packing (SP) respectively. PTS is similar to the problem MCS for the special case that only one cluster is given, while Strip Packing (SP) corresponds to MSP where . Regarding PTS, we improved the running time of an algorithm by Jansen [11] and developed an AEPTAS. For Strip Packing (SP), we find an AEPTAS as well. However, the running time depending on is worse than in the AEPTAS for PTS. Note that this algorithm is the first AEPTAS for SP that has an additive term of .

Theorem 3:

There is an algorithm for PTS with ratio and running time .

Theorem 4:

There is an algorithm for SP with ratio and running time .

This algorithms can be used to find an AEPTAS for MCS and MSP as well by cutting the solution for one cluster or strip into segments of height . The jobs overlapping the cluster borders add further to the approximation ratio resulting in a additional algorithm for MCS with approximation guarantee .

Theorem 5:

There are algorithms for MCS and MSP with ratio and running time .

The algorithm from Theorem 1 uses the algorithm from Theorem 3 as a subroutine with a constant value if , if , and otherwise. As a result, the running time of the algorithm can be rather large, while the -notation suggests otherwise since it hides all the constants. Due to this fact, we have developed a truly fast algorithm where the most expensive part is sorting the jobs. However, this improved running time yields a slight loss in the approximation factor.

Theorem 6:

There is a fast algorithm for MCS with approximation ratio if , if , and if for some .

Note that the approximation ratio of the algorithm from Theorem 6 is worse than for the cases that and exactly for the case that . However if , the approximation ratio is bounded by , and as well as converge to for .

1.1 Related Work

We repeat and summarize the results for the variant of MCS and MSP studied in this paper in Table 1.

Problem Ratio Remarks Source
MCS, MSP Needs solving of Scheduling on Identical Machines with ratio [24]
MCS Worst case running time at least ; can handle clusters with different sizes [17]
MSP Worst case running time at least [2]
MCS, MSP AFPTAS Additive constant in , and for large values for [2]
MCS Fast algorithm that can handle clusters with different sizes [19]
MCS Fast algorithm [3]
MCS Fast algorithm [5]
MCS Fast algorithm; requires [5]
MCS, MSP Running time for and for MCS and , for MSP and This paper
MCS, MSP AEPTAS Additive term ; linear in This paper
MCS Approximation ratio if and if is large This paper
PTS, SP AEPTAS Additive term ; linear in This paper
Table 1: Overview of the results for MCS and MSP.

MCS has also been studied for the case that clusters do not need to have the same number of machines. It is still -hard to approximate this problem better than [26]. Furthermore, it was proven in [19] and [21] that the List Schedule even cannot guarantee a constant approximation ratio for this problem.

The first algorithm was presented by Tchernykh et al. [21] and has an approximation ratio of . This ratio was improved to a -approximation by Schwiegelshohn et al. [19], which is given by an online non-clairvoyant algorithm where the processing times are not known beforehand. Later, the algorithm was extended by Tchernykh et al. [22] to the case where jobs have release dates changing the approximation ratio to . Bougeret et al. [4] developed an algorithm with approximation ratio for this case. This algorithm needs the constraint that the largest machine requirement of a job is smaller than the smallest number of machines available in any given cluster. This ratio was improved by Dutot et al. [8] by presenting an algorithm with approximation ratio . The currently best algorithm for this problem matches the lower bound of [17], but has a large running time of .

Organization of this Paper

The algorithm consists of two steps. First, we use an AEPTAS for MCS or MSP to find a schedule on two clusters, one with makespan at most and the other with mackespan at most . This schedule on the two clusters is then distributed onto the clusters using a partitioning technique, as we call it. This partitioning technique is the main accomplishment of this paper and presented in Section 2. The AEPTAS for MCS can be found in Section 3 while the AEPTAS for Multiple Strip Packing can be found in Section 5. In Section 4, we present the algorithm from Theorem 6 that finds an approximation without the need to call the AEPTAS as a subroutine but uses te partitioning technique as well.

2 Partitioning Technique

In this section, we describe the central idea which leads to a linear running time algorithm. Indeed this technique can be used for any problem setting where there is an AEPTAS with approximation ratio for the single cluster version. In this context is the largest occurring size in the minimization dimension, e.g. the maximal processing time or maximal height of the packing.

Instead of scheduling the jobs on clusters, we first schedule them on two clusters and . In a second step, we distribute the scheduled jobs to clusters. In the following, let be the height of an optimal schedule on clusters for a given instance . Since there is a schedule with makespan on clusters, there exists a schedule on one cluster with makespan at most . Assume there is an algorithm Alg which schedules the jobs on two clusters and such that the makespan of is at most and has a makespan of at most . The algorithm mentioned in Theorem 3 is an example of such an algorithm and we will present it in Section 3.

Lemma 1:

Let an algorithm Alg be given that schedules the jobs on two clusters and such that the makespan of is at most and has a makespan of at most and which has a running time of . Furthermore, let Alg2 be an algorithm that finds for the single cluster variant a schedule or packing with height at most in time for any given set of jobs .

We can find a schedule on clusters with makespan in operations if and operations if . (Note that , and hence can be handled as a constant)

The case

In the following, we will describe how to distribute a schedule given by Alg to new clusters, and which value we have to choose for in Alg to get the desired approximation ratio of . The partitioning algorithm distinguishes three cases: and for some and chooses the value for dependent on this , such that . In the following, when speaking of a schedule the processing time is on the vertical axis while the machines are displayed on the horizontal axis, see Figure 1.

In the following distributing algorithm, we draw horizontal lines at each multiple of , where is a value which depends on the makespan of the schedule defined by Alg and will be specified dependent on in the later paragraphs. Let and consider the jobs which start at or after and end at or before . We remove these jobs from and schedule them on a new cluster such that they keep their relative position. We say these new clusters have type .

Next, consider the set of jobs cut by the horizontal line at . All these jobs have a processing time of at most and they can be scheduled at the same time without violating the machine constraint. In a new cluster, we can schedule two of these sets of jobs with makespan , by letting the first set of jobs start at and the second set start at . We say, these clusters have type B.

If , we choose : As a result, the schedule on given by Alg has a makespan of and we define . We partition the given schedule as described above. Since it has a height of , we get clusters of type A, see Figure 1. There are lines at multiples of . Hence, we get clusters of type B. The jobs intersecting the last line can be scheduled on one new cluster with makespan . On this last cluster after the point in time , we schedule the jobs from the Cluster . Remember, the schedule on has a makespan of at most and, hence, the makespan of this last cluster is bounded by as well. In total, we have partitioned the schedule into clusters each with makespan at most .

Procesingtime

Type A

Type A

Type A

Type A

Type B

Figure 1: The case for .

If for some , we choose . As a result, the makespan of generated by the algorithm Alg is given by and we define . There are multiples of smaller than , see Figure 2. Above the last multiple of smaller than namely , the schedule has a height of at most left. Hence using the above-described partitioning, we generate clusters of type A. The jobs intersecting the multiples of can be placed into clusters of type B. We have left the jobs above , which can be scheduled in a new cluster with makespan . Last, we place the jobs from cluster on top of the schedule in the new cluster, such that it has a makespan of at most in total. Altogether, we have distributed the given schedule on clusters, such that each of them has a makespan bounded by .

Figure 2: The case for .

If , we choose : As a result, the makespan on generated by Alg is bounded by and we define . Thus, there are vertical lines at the multiples of , which are strictly larger than and strictly smaller than , see Figure 3. As a consequence, we construct clusters of type A and clusters of type B. The cluster defines one additional cluster of this new schedule. In total, we have a schedule on clusters with makespan bounded by .

Figure 3: The case for .

This distribution can be made in steps since we have to relocate each job at most once. Therefore the algorithm has a running time of at most since is a constant of size at least .

The case

To find a distribution for this case, we need to make a stronger assumption to the solution of the algorithm Alg. Namely, we assume that the second cluster has just machines. As a consequence, the total work of the jobs contained on is bounded by .

Let us consider the schedule on cluster with makespan . In the following, we will assume that since otherwise we have and we do not need to reorder the schedule any further. We draw horizontal lines at and at . Next, we define two sets of jobs and . contains all jobs starting before and contains all jobs ending after . Note that since , we have that . Furthermore, and are disjoint if since and therefore . Note that the total work of the jobs is bounded by and, hence, . We distinguish two cases:

Figure 4: The case

Let w.l.o.g . We remove all jobs in from the cluster . As a result this cluster has a makespan of . The total work of the jobs contained in combined with the jobs in is at most . Therefore, we can use the algorithm Alg2 (for example the List-Scheduling algorithm by Garay and Graham [9]) to find a schedule with makespan at most . Hence, we can find a schedule on two clusters in at most for this case.

Consider the set of jobs scheduled on but not contained in or . Since the total work of the jobs is at most it holds that . Let be the set of jobs scheduled on and be the set of jobs scheduled on . We define and . Clearly, both sets have a total work of at most and therefore . If , these jobs have a total work of at most and are scheduled with the algorithm Alg2 to find a schedule on one cluster with makespan at most .

To this point, we have scheduled all jobs except the ones cut by the line and the jobs cut by the line . We schedule them in the second cluster by starting all the jobs cut by the first line at start point and the second set of jobs at the start point . Note that the partition into the sets can be done in and hence the partitioning step is dominated by the running time of the algorithm Alg2.

In both cases for , we choose and, hence, can bound the running time of the algorithm by .

This concludes the proof of Lemma 1. However, to prove Theorem 1, we need to prove the existence of the algorithm Alg, which finds the schedule on the clusters and . In the next section, we will see one example of such an algorithm.

As Alg2, we can choose Steinbergs-Algorithm [20] in the case of SP. It has a running time that is bounded by . On the other hand for PTS, we can use the algorithm by Garay and Graham [9], which was optimized by Turek et al. [23] to have a running time of .

A direct conclusion of the lemma is the following corollary.

Corollary 1:

For all , given a schedule on two clusters and such that the makespan of is at most and has a makespan of at most , we can find a schedule on clusters with makespan at most in at most additional steps.

Instead of using the algorithm in the next section, first, we can try to use any heuristic or other (fast) approximation algorithm. More precisely, we can do the following: Given a schedule by any heuristic, we remove all the jobs that end after the point in time at which the last job is started and place them on the cluster

, by starting them all at the same time. The schedule on obviously has a makespan bounded by . Next, we check weather the residual schedule on has a makespan of at most . For example, this can be done by comparing the makespan on to the lower bound on the optimal makespan , where is the set of all jobs with machine requirement larger than . If the makespan is small enough, i.e., if , we will find a -approximation by using the partitioning technique from above. Otherwise, we need to use the algorithm from the next section.

3 An AEPTAS for Parallel Task Scheduling

In this section, we will present an for Parallel Task Scheduling (PTS) with an approximation ratio and running time . We can use this algorithm to find a schedule on the two clusters and needed for the algorithm in Section 2. It is inspired by the algorithm in [11] but contains some improvements. Furthermore, note the fact that in the following algorithm the processing times of the jobs do not have to be integral. Instead, we will discretize them by rounding.

The algorithm works roughly in the following way. The set of jobs is partitioned into large, medium, and small jobs, depending on their processing times. The medium jobs have a small total work and therefore can be scheduled at the end of the schedule using a 3-approximation algorithm without doing too much harm. The large jobs are partitioned into two sets: wide jobs and narrow jobs depending on their machine requirement. There are few large wide jobs which makes it possible to guess their starting times. The narrow jobs are placed with a linear program for which we guess the number of required machines for each occurring processing time at each possible start point of the schedule. After solving this linear program, a few jobs are scheduled fractionally. These jobs have a total number of required machines of at most

for any chosen value . Notice that the choice of will affect the running time. We place these jobs on top of the schedule to gain a approximation, or into an extra cluster to find a solution needed for the algorithm in Section 2. The small jobs are scheduled with a linear program. An overview of the algorithm can be found in Section 3.5.

We will now present a more detailed approach. We use an improved rounding strategy for large jobs compared to [11], which enables us to improve the running time. Further, we present a different linear programming approach to schedule the narrow tall jobs.

3.1 Simplify

Let an instance be given. Note that the value is a lower bound on the makespan of the schedule. On the other hand, we know by Turek et al. [23] that is an upper bound on the optimal makespan. We can find in .

Let and be values dependent on . We partition the set of jobs into small , medium , and large ones . Consider the sequence , . By the pigeonhole principle there exists an such that , when defining and . We can find these values for and in . Note that .

Resulting in a loss of at most in the approximation ratio, we can assume that the smallest processing time is at least since adding to each processing time adds at most to the total makespan. Therefore, the largest such that is bounded by and we know . We round the sizes of the jobs by using the following lemma.

Lemma 2 (See [14]):

At a loss of a factor of at most in the approximation ratio, we can ensure that each job with for some has processing time for and a starting time, which is a multiple of as well.

This rounding can be done in . Afterward, there are at most different processing times between and for each . Therefore, the number of different processing times of large jobs is bounded by since . Further, the number of different processing times for medium jobs is bounded by since the medium jobs have processing times in . Note that the number of different processing times of small jobs is bounded by since the smallest job has processing time . Additionally, there are at most possible starting points for the large jobs. We denote the set of starting points for large jobs as and the set of their processing times as . After this step, we will only consider the rounded processing times and will denote them as for each job .

3.2 Large Jobs

Let be the width of the second cluster and let be a constant dependent on and , which we will specify later on. We say a job is wide if it uses at least machines, and we denote the set of large wide jobs by . Note that large wide jobs have a processing time larger than and need at least machines while the total work of all jobs in is bounded by . Hence, the total number of them is bounded by . Therefore, there are at most possibilities to schedule the jobs in . In the algorithm, we will try each of these options.

In the next step, we deal with the large narrow jobs . Consider an optimal schedule , where we have rounded the processing times of the jobs as described in Lemma 2. For the schedule and each starting time , let be the number of machines used by jobs in that are processed (not only started) at that time, i.e., we define where is the set of jobs , which have both a start point and an endpoint . Note that jobs ending at , i.e., jobs with , are not part of the set .

For each processing time let be the total number of machines used by jobs with this processing time, i.e . Consider the following linear program :

(1)
(2)
(3)

The variable defines for each start point and each processing time how many machines are used by jobs with processing time starting at . The first inequality ensures that the number of machines required by jobs scheduled at a start point , i.e., jobs from the set , equals the number of used machines in the considered optimal schedule. The second inequality ensures that for each processing time all the jobs are scheduled. Given the considered optimal solution, we generate a solution to this linear program by counting for each starting time and each processing time how many machines are used by jobs with processing time starting at . This linear program has conditions and variables. Since we have conditions, there are at most non zero components in a basic solution and for each there has to be at least one non zero component.

In the algorithm, we guess, (i.e., we try out all the possibilities) which variables are non zero variables in the basic solution. There are at most options. We cannot guess the exact values of the variables in polynomial time. Instead, we guess for each non zero variable the smallest multiple of that is larger than the value of in the basic solution. This can be done in . So to find a schedule for the large jobs , we use at most guesses in total.

Note that this optimistic guessing, i.e., using the rounded up values for , on the one hand ensures that all the narrow large jobs can be scheduled but on the other hand can cause violations to the machine constraints. To prevent this machine violation, the algorithm test for each guess whether the job condition (2) is fulfilled for each processing time. If this is the case, each value of a non-zero component is reduced by . For these down-sized values, the algorithm test the machine constraint (1) for each starting point . Note that the validation whether the constraints are fulfilled is possible in since for each of the constraints, we have to add at most values for each constraint. If both conditions are fulfilled, the algorithm tries to schedule the small jobs, see Subsection 3.3. If the small jobs can be scheduled the guess was feasible.

The actual narrow large jobs from the set are scheduled only once in the final phase of the algorithm. When scheduling the jobs in , we use the reduced guessed values. We greedily fill the jobs into the guessed starting positions , while slicing jobs vertical if they do not fit totally at that starting position (i.e., if the total number of machines required by jobs with processing time starting at is larger than when adding the machine requirement of the currently considered job) and placing the rest of the job at the next starting position for the processing time . We schedule the jobs which cannot be placed at the starting points defined by the values of (because we reduced these values) either on top of the schedule or on the second cluster depending on what is wanted: the algorithm described in Theorem 3 or the algorithm needed for Lemma 1. The total width of these jobs shifted to the end of the schedule or to Cluster is bounded by since there are at most non zero components and before the reduction by all the jobs could be scheduled because the job constraint (2) was fulfilled.

In the described placement of the narrow large jobs, we have introduced at most one fractional job for each non zero variable and it has a width of at most . We remove all these fractional jobs and place them next to the jobs which did not fit. The machine requirement of the removed fractional jobs can be bounded by . Hence, if , we have , and we can schedule all the removed jobs (non-fitting ones and fractional ones) at the same time at the end of the schedule without violating the machine constraint, adding at most to the makespan. On the other hand, if , it follows that , and we can schedule all the removed jobs inside the extra cluster with makespan at most and machine requirement at most . In the algorithm, we choose as needed for the corresponding application. We need at most operations to place the narrow large jobs.

3.3 Small Jobs

We define a layer as the horizontal strip between two consecutive starting points in and say layer is the layer between and . Note that during the processing time of a layer the machine requirement of large jobs will not change since large jobs start and end at multiples of . Let be the number of machines left for small jobs in layer . Note that this number is fixed by the guesses for the large jobs.

Figure 5: Linear grouping for small wide jobs

We will partition the small jobs into wide and narrow jobs. A small job is wide if it requires at least machines and narrow otherwise. Let be the set of small wide jobs and be the set of small narrow jobs. We will round the machine requirements of the wide jobs using linear grouping, which was first introduced by Fernandez de la Vega [7]. The idea of this technique is to sort all the wide jobs by size and stack them on top of each other, such that the widest job is at the bottom and the narrowest job is at the top, see Figure 5. Let be the total processing time of all the small wide jobs. We will round the machine requirements of the wide jobs to sizes. For this purpose consider the multiples of . We draw a horizontal line at each of these multiples of and define for each job intersected by one of these lines two new jobs, by cutting this job at that line in two parts (for the analysis and description of the rounding; in the algorithm no job will be cut). The jobs between two consecutive lines at and are called jobs of group . For each group , we generate one new job that has processing time and the machine requirement of the widest job in this group. We call this job a size defining job for the group. Let be the set of rounded small wide jobs.

When we round the wide jobs as described, we need operations, since we sort the jobs. However, we do not need to sort the jobs since we are just interested in the size defining job of each group.

Lemma 3:

We can generate the rounded jobs in operations.

Proof.

Define for a given job the set and analogously . For each group, we find the size defining job, by using a modified median algorithm with running time . Instead of searching for the th largest job, we search for a job with and for each in . Simply using this modified median algorithm for each group leads to operations.

However, we improve this approach. First, we search for the job with the median machine requirement in . Afterward, we search for the group size of the group containing this job in and the group size above this group (if existing) in as well. The set of jobs, where we do not know the rounded sizes, is now partitioned into two sets containing at most jobs each. We iterate the process on both sets separately until each group size is found.

Since there are at most groups, this search can be done in operations. To see this, we consider the following recurrence equation

where denotes the number of jobs and denotes the number of values we search for and . To find the job with the median machine requirement and the group sizes of the group containing this item and the group above we need operations and hence there is a with these properties. After the set of jobs is partitioned into two sets such that each set contains at most jobs. The total number of sizes we search for is reduced by at least one since in this step we find one or two of them. However, the values we search for do not have to be distributed evenly to the sets. Therefore, this recurrence equation represents the running time of the described algorithm adequately.

We claim that . We have and hence the claim is true for . For it follows that

Since in our case we have , this concludes the proof. ∎

Remark 1.

If we schedule the rounded jobs fractionally instead of the original jobs , we need to add at most to the makespan of the schedule.

Proof.

Consider an optimal schedule of the original small jobs. We can schedule the new jobs fractionally, by replacing all jobs contained in group by the new job generated for the jobs in the group . The widest rounded job cannot be scheduled instead of the original jobs, because the machine requirement might be too large. We schedule this job at the end of the schedule. This job has a processing time of . We know that since and each wide job needs at least machines to be scheduled. Hence, it holds that . ∎

We say a configuration of wide jobs is a multiset of wide jobs . We say a configuration requires at most machines, if and define . Let be the set of configurations with machine requirement at most , i.e.,