This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Scheduling with two non-unit job lengths is NP-complete

Jan Elffers, KTH Royal Institute of Technology, Stockholm, Sweden
elffers@kth.se
   Mathijs de Weerdt, Delft University of Technology, Delft, the Netherlands
m.m.deweerdt@tudelft.nl
Abstract

The non-preemptive job scheduling problem with release times and deadlines on a single machine is fundamental to many scheduling problems. We parameterize this problem by the set of job lengths the jobs can have. The case where all job lengths are identical is known to be solvable in polynomial time. We prove that the problem with two job lengths is NP-complete, except for the case in which the short jobs have unit job length, which was already known to be efficiently solvable. The proof uses a reduction from satisfiability to an auxiliary scheduling problem that includes a set of paired jobs that each have both an early and a late deadline, and of which at least one should be scheduled before the early deadline. This reduction is enabled by not only these pairwise dependencies between jobs, but also by dependencies introduced by specifically constructed sets of jobs which have deadlines close to each other. The auxiliary scheduling problem in its turn can be reduced to the scheduling problem with two job lengths by representing each pair of jobs with two deadlines by four different jobs.

1 Introduction

The problem considered in this paper is the non-preemptive job scheduling problem with release times and deadlines. In the three-field notation, this problem is denoted as 1|ri|Lmax1|r_{i}|L_{\max}. In this offline scheduling problem, there is a set of jobs, each having a release time, a deadline and a processing time, that need to be scheduled on a single machine. The goal is to schedule the jobs without preemption such that no job starts before its release time and no job completes much later than its deadline. The formal definition of the decision variant is as follows.

Definition 1 (Non-preemptive single machine scheduling with release times and deadlines).

Given a single machine and a set of jobs J={([ri,di],pi)i=1,,n}J=\{([r_{i},d_{i}],p_{i})\mid i=1,\ldots,n\}, where ri,dir_{i},d_{i}\in\mathbb{Z} are the job’s release time and deadline, together forming the job’s availability interval [ri,di][r_{i},d_{i}], and pip_{i}\in\mathbb{N} is the job’s processing time.

Question: does there exist a schedule, that is, an assignment of start times t:{1,,n}t:\{1,\ldots,n\}\to\mathbb{R} to the jobs, such that rit(i)dipir_{i}\leq t(i)\leq d_{i}-p_{i} for all i=1,,ni=1,\ldots,n, and the set of execution intervals {[t(i),t(i)+pi)i=1,,n}\{[t(i),t(i)+p_{i})\mid i=1,\ldots,n\} are pairwise disjoint?

The LmaxL_{\max} optimization criterion asks to minimize the maximum lateness, that is, the maximum difference in time between a job’s completion time and its deadline.

The problem is NP-complete by an easy reduction from 3-Partition (Pinedo, 2008), but branch and bound algorithms work well in practice, at least on certain distributions of randomly generated instances of up to 1000 jobs (Carlier, 1982).

We study a parameterized version of the problem, which has the set of job lengths P(S)={pi([ri,di],pi)S}P(S)=\{p_{i}\mid([r_{i},d_{i}],p_{i})\in S\} as a parameter. The case of unit job lengths (pi=1p_{i}=1) is solved by the greedy Earliest Due Date (EDD) algorithm and the general case of identical job lengths (pi=pp_{i}=p) is also solvable in polynomial time (Garey et al., 1981). The generalization to pi{1,p}p_{i}\in\{1,p\} can be solved using a linear programming formulation (Sgall, 2012). This approach computes a sequence of starting times such that the length-pp can be assigned to these starting times, with additional constraints that guarantee sufficient idle time for the unit length jobs. These additional constraints simply provide a lower bound on the amount of idle time left by the schedule of the long jobs over a number of intervals, as if the unit length jobs were preemptive. This is sufficient because release times, deadlines and processing times are integers so by discretization starting times can always be integers. If the smaller job length is non-unit, this does not work anymore. For the case {2q,q}\{2q,q\}, a branch-and-bound algorithm specifically for two job lengths is claimed to run in pseudo-polynomial time (Vakhania, 2004).

The complexity of the multi-machine version was studied by Simons and Warmuth (1989): they give a polynomial time algorithm for the identical job lengths case and prove the {1,p}\{1,p\}-case for multiple machines to be NP-complete. Their proof assumes that both the long job length pp and the number of machines are part of the input. If we add precedence constraints to the problem, in the identical job lengths case this does not make the problem harder (Garey et al., 1981), but even the {1,p}\{1,p\}-problem on one machine with precedences is NP-complete (Hall and Shmoys, 1989), also assuming that the long job length pp is part of the input.

The complexity status of the general two-job-lengths problem has been noted as an open problem (Simons and Warmuth, 1989; Sgall, 2012). In this paper we prove NP-completeness of the problem for any fixed pair of non-unit job lengths.111In Jan Elffers’ master thesis, another proof is given that the scheduling problem with two non-unit job lengths is NP-complete, but the reduction given there is more complicated than the one in this paper, because it contains more types of gadgets. The thesis is available at http://resolver.tudelft.nl/uuid:5def2dbb-67d1-4672-a0b1-561d7dc1a74f.

Formally, we have the following result, using pp to denote the length of the long jobs and qq for the short jobs.

Theorem 1 (NP-completeness result).

Let p>q>1p>q>1 be two integer job lengths. The scheduling problem with release times and deadlines on the set of job lengths P(S)={p,q}P(S)=\{p,q\} is NP-complete.

This implies that the problem is strongly NP-complete, because we reduce all instances of an NP-complete problem in polynomial time and with polynomial size output to an instance with fixed pp and qq.

2 Overview of the reduction

Our proof is via an intermediate problem, denoted by AUX(p,q)\operatorname{AUX}(p,q). Informally, this is a scheduling problem where jobs can have both an early and a late deadline and where pairs of jobs can be defined of which at least one needs to meet the early deadline. We prove that this problem is both polynomial-time reducible to the original scheduling problem and NP-complete by a reduction from Boolean Satisfiability. Together, this implies Theorem 1.

Formally, our lemma’s are the following:

Lemma 1.

For any two integer job lengths p>q1p>q\geq 1, the problem AUX(p,q)\operatorname{AUX}(p,q) is polynomial-time reducible to the original scheduling problem on job lengths {p,q}\{p,q\}.

Lemma 2.

For any two integer job lengths p>q>1p>q>1, the problem AUX(p,q)\operatorname{AUX}(p,q) is NP-complete.

t1t_{1}

t2t_{2}

0

t:t:

dp,1d^{\prime}_{p,1}

dp,1d_{p,1}

dq,1d^{\prime}_{q,1}

dq,1d_{q,1}

dp,2d^{\prime}_{p,2}

dp,2d_{p,2}

dq,2d^{\prime}_{q,2}

dq,2d_{q,2}

bin 2

bin 1

Figure 1: An instance of the stacked scheduling problem with N=4N=4 pairs of jobs per stack and without ordinary jobs. The horizontal lines indicate availability intervals, and the horizontal bars indicate the earliest possible position at which the jobs can be scheduled. The long (length-pp) jobs are colored red and the short (length-qq) jobs are colored blue. The vertical bars denote separator jobs occupying fixed time intervals. Note that the availability intervals within each stack form a nested sequence, and the long jobs have earlier deadlines than the short jobs for the same stack index.

The auxiliary problem AUX(p,q)\operatorname{AUX}(p,q) is the following extension of the original problem. Next to a set of jobs J={([ri,di],pi)i=1,,|J|}J=\{([r_{i},d_{i}],p_{i})\mid i=1,\ldots,|J|\} with non-negative release times rir_{i}, we add two sequences of “pending” jobs Jp,JqJ_{p},J_{q} of equal size N=|Jp|=|Jq|N=|J_{p}|=|J_{q}|, one per job length, both ordered by deadline. Pending jobs have a common release time of 0, and two deadlines per job, an early deadline and a late deadline. For both JpJ_{p} and JqJ_{q}, the intervals formed by early and late deadline of all pending jobs in the same sequence should not intersect. Furthermore, there exists an ordering such that the ii’th most urgent (i.e., with the earliest deadline) long job is more urgent than the ii’th most urgent short job, for all 1iN1\leq i\leq N. The problem is to find a feasible schedule for JJpJqJ\cup J_{p}\cup J_{q} in which at least one of the ii’th most urgent long job or the ii’th most urgent short job completes by its early deadline, for all 1iN1\leq i\leq N. The key property of this model is that it is possible to specify dependencies between jobs with deadlines far away from each other.

We choose t=0t=0 as the common release time of all pending jobs and assume the ordinary jobs to have non-negative release times. The formal definition is as follows.

Definition 2 (Problem AUX(p,q)\operatorname{AUX}(p,q)).

Given are a set of ordinary jobs JJ with long job lengths pp or short lengths qq, and non-negative release times and deadlines, and two sequences of NN pending jobs, JpJ_{p} and JqJ_{q}. These pending jobs have release time 0, and are ordered by deadline in the sequence, so for each 1iN1\leq i\leq N, the pending jobs with index ii from JpJ_{p} and JqJ_{q} are Jp,i=([0,dp,i],p)J_{p,i}=([0,d_{p,i}],p) and Jq,i=([0,dq,i],q)J_{q,i}=([0,d_{q,i}],q), respectively. Additionally, each pending job has an early deadline, denoted by dp,id^{\prime}_{p,i} and dq,id^{\prime}_{q,i}, respectively, such that these deadlines meet the following conditions:

dp,1dp,1dp,2dp,2dp,Ndp,N\displaystyle d^{\prime}_{p,1}\leq d_{p,1}\leq d^{\prime}_{p,2}\leq d_{p,2}\leq\ldots\leq d^{\prime}_{p,N}\leq d_{p,N}
dq,1dq,1dq,2dq,2dq,Ndq,N\displaystyle d^{\prime}_{q,1}\leq d_{q,1}\leq d^{\prime}_{q,2}\leq d_{q,2}\leq\ldots\leq d^{\prime}_{q,N}\leq d_{q,N}
dp,idq,ifor all i=1,,N\displaystyle d_{p,i}\leq d^{\prime}_{q,i}\quad\text{for all~$i=1,\ldots,N$}

The urgency order on these job pairs is defined as (Jp,1,Jq,1),(Jp,2,Jq,2),,(Jp,n,Jq,n)(J_{p,1},J_{q,1}),(J_{p,2},J_{q,2}),\ldots,(J_{p,n},J_{q,n}).

Question: does there exist a feasible schedule for JJpJqJ\cup J_{p}\cup J_{q} such that for all 1iN1\leq i\leq N, at least one of the jobs Jp,iJ_{p,i} or Jq,iJ_{q,i} completes by the early deadline, i.e., Jp,iJ_{p,i} completes by time dp,i\leq d^{\prime}_{p,i} or Jq,iJ_{q,i} completes by time dq,i\leq d^{\prime}_{q,i}?

We say that a pair of a long and a short pending job with the same position ii in the sequence (i.e., the same urgency) are connected. In a feasible schedule, only one of each such connected pairs can be scheduled after the early deadline (but before the later deadline). We say that that job is then late, otherwise we say that the job is early.

3 Reduction from AUX(p,q)\operatorname{AUX}(p,q) to the original scheduling problem

In this section we prove Lemma 1, that is, we prove that AUX(p,q)\operatorname{AUX}(p,q) is efficiently reducible to the original problem. We call the problem defined by the reduction the stacked scheduling problem. This is a class of instances of two job lengths. First we define this reduction, and then we show that each feasible schedule for an instance of AUX(p,q)\operatorname{AUX}(p,q) can be translated to a feasible schedule for an instance II of this stacked scheduling problem, and vice versa.

First we sketch the idea of the transformation informally. For each pending job (which has an early and late deadline), we create two jobs with ordinary availability intervals, which we call the inner and the outer job, together forming a stack pair. The inner job has the early deadline dd^{\prime} and the outer job has the late deadline dd. The availability intervals of these jobs are extended to before t=0t=0 such that the intervals form a nested sequence per job length. We add separator jobs (jobs occupying fixed positions) before t=0t=0, partitioning the time line before t=0t=0 into bins of length p+qp+q. We number the bins 1,,N1,\ldots,N starting from t=0t=0 backward in time. The four jobs representing the ii’th most urgent long job and the ii’th most urgent short job are called a quad. The release times of these jobs are aligned with the bins: the jobs in the ii’th quad have release times in the ii’th bin; the outer jobs have release times at the start of the bin, and the inner jobs have release times such that they can only be scheduled at the end of their bin (or later).

An example of a reduced instance of four pairs of pending jobs is displayed in Figure 1. Here the four respective quads are placed above each other, the one with the smallest availability intervals first.

We denote by ww the job length of the separator jobs before t=0t=0. The purpose of this is to improve the readability. For the resulting instance to have job lengths in {p,q}\{p,q\}, we can choose w=pw=p or w=qw=q. Formally, the reduction is defined as follows.

Definition 3 (Reduction).

Given an instance of AUX(p,q)\operatorname{AUX}(p,q), the instance II of a 1|ri|Lmax1|r_{i}|L_{\max} scheduling problem comprises of all the ordinary jobs JJ, and the following sequences of NN jobs to replace the pending jobs: separator jobs J𝑠𝑒𝑝J_{\mathit{sep}}, representatives JpIJ^{I}_{p} and JpOJ^{O}_{p} for JpJ_{p}, and representatives JqIJ^{I}_{q} and JqOJ^{O}_{q} for JqJ_{q}. For i=1,,Ni=1,\ldots,N, let ti=(p+q+w)it_{i}=-(p+q+w)\cdot i and then let:

J𝑠𝑒𝑝,i\displaystyle J_{\mathit{sep},i} =([ti+p+q,ti+p+q+w],w)\displaystyle=([t_{i}+p+q,t_{i}+p+q+w],w)
Jp,iI\displaystyle J^{I}_{p,i} =([ti+q,dp,i],p)\displaystyle=([t_{i}+q,d^{\prime}_{p,i}],p)
Jp,iO\displaystyle J^{O}_{p,i} =([ti,dp,i],p)\displaystyle=([t_{i},d_{p,i}],p)
Jq,iI\displaystyle J^{I}_{q,i} =([ti+p,dq,i],q)\displaystyle=([t_{i}+p,d^{\prime}_{q,i}],q)
Jq,iO\displaystyle J^{O}_{q,i} =([ti,dq,i],q)\displaystyle=([t_{i},d_{q,i}],q)

To extend a feasible schedule for AUX(p,q)\operatorname{AUX}(p,q) to a feasible schedule for II, we replace the pending jobs by inner/outer jobs and schedule the remaining inner/outer jobs before t=0t=0. More precisely, for each ii’th quad, we replace one ii’th pending job completing by its early deadline by the inner job of its stack pair, and the other ii’th pending job by the corresponding outer job. Consequently, the remaining jobs from each ii’th quad can be scheduled in bin ii.

For the other direction, we prove that any schedule for II can be transformed into the form described above, so that the part after t=0t=0 is a schedule for the AUX(p,q)\operatorname{AUX}(p,q) instance.

Formally, the intended way to split each quad is defined as follows.

Definition 4 (Proper pairing).

For each quad with index ii, the proper pairing consists of the following two pairs: (Jp,iI,Jq,iO)(J^{I}_{p,i},J^{O}_{q,i}) and (Jp,iO,Jq,iI)(J^{O}_{p,i},J^{I}_{q,i}).

The proof idea is that for any other partial schedule until t=0t=0, the load induced on the part after t=0t=0 is both coarser (a long job allows less flexibility than multiple short jobs with the same deadline) and the load profile induced by the deadlines leans more towards earlier deadlines.

Proof of Lemma 1.

A solution to AUX(p,q)\operatorname{AUX}(p,q) can be translated to a feasible schedule for the instance of Definition 3 by doing the following for each quad ii: if Jp,iJ_{p,i} completes early, schedule Jp,iOJ_{p,i}^{O} and Jq,iIJ_{q,i}^{I} in bin ii (Jp,iOJ_{p,i}^{O} to the left), Jp,iIJ_{p,i}^{I} at the place of Jp,iJ_{p,i} and Jq,iOJ_{q,i}^{O} at the place of Jq,iJ_{q,i}; if Jq,iJ_{q,i} completes early, schedule Jq,iOJ_{q,i}^{O} and Jp,iIJ_{p,i}^{I} in bin ii (Jq,iOJ_{q,i}^{O} to the left), Jq,iIJ_{q,i}^{I} at the place of Jq,iJ_{q,i} and Jp,iOJ_{p,i}^{O} at the place of Jp,iJ_{p,i}.

For the other direction, let a feasible schedule for II be given. We transform this schedule such that each bin ii contains a pair of jobs from the proper pairing of quad ii. The part of the schedule after t=0t=0, replacing Jp,iI/Jp,iOJ_{p,i}^{I}/J_{p,i}^{O} by Jp,iJ_{p,i} and Jq,iI/Jq,iOJ_{q,i}^{I}/J_{q,i}^{O} by Jq,iJ_{q,i}, is then a feasible schedule for AUX(p,q)\operatorname{AUX}(p,q).

First, because all ordinary jobs have release times after t=0t=0, they are not scheduled in the bins. We do an exchange argument that fills the bins in the required way. We prove by induction that for i=1,,Ni=1,\ldots,N, bins 1,,i1,\ldots,i can be filled in this way. In step ii, note that stack pair with index ii is scheduled in bin ii or after t=0t=0, because by induction bins j=1,,i1j=1,\ldots,i-1 are filled with stack pairs with lower index. We say that we swap in a job into bin ii if we add it to the left in the bin and push the other jobs in the bin to the right. This pushing to the right is possible because all stack job deadlines are after t=0t=0.

If bin ii contains no long job, swap in the ii’th outer long job which is scheduled after t=0t=0. Because the bin has length p+qp+q, one short job can remain and the other(s), with total length at most pp, fit in the original position of the long job. These jobs complete by their deadlines because dq,idp,id^{\prime}_{q,i}\geq d_{p,i} and the other short jobs have later deadlines. If bin ii contains no short job, we can clearly swap in the ii’th outer short job.

Now that bin ii contains a long and a short job, we can swap the leftmost in the bin to an ii’th outer job, and the other job to an ii’th inner job, because the availability intervals per stack are nested and those jobs are the ones with the smallest availability interval in their stacks that can be scheduled at these positions. Therefore the content of bin ii is a pair from the proper pairing. Concluding, we have thus obtained a feasible schedule for AUX(p,q)\operatorname{AUX}(p,q), completing the proof in the other direction. ∎

We conclude that the 1|ri|Lmax1|r_{i}|L_{\max} scheduling problem on job lengths {p,q}\{p,q\} is as hard as AUX(p,q)\operatorname{AUX}(p,q).

4 NP-completeness of AUX(p,q)\operatorname{AUX}(p,q) for q>1q>1

In this section we prove Lemma 2, that is, we prove the auxiliary scheduling problem to be NP-complete if p>q>1p>q>1.

We reduce from the Boolean Satisfiability (SAT) problem, assuming an instance is given in conjunctive normal form.

Definition 5 (Boolean Satisfiability).

Given is a Boolean formula which contains nn variables x1,x2,,xnx_{1},x_{2},\ldots,x_{n} and mm clauses, where each clause CjC_{j} is a disjunction of literals (where a literal is a variable xix_{i} or a negation of a variable, ¬xi\neg x_{i}).

Question: does there exist a satisfying assignment of true or false to each of the variables such that in each clause at least one of the literals evaluates to true?

We first explain the idea of the reduction by a simple example. Then we give the general reduction and proof.

4.1 Informal description

Let us first consider an example of a reduction of a Boolean formula with two variables, x1x_{1} and x2x_{2}, and two clauses, C1=(x1x2)C_{1}=(x_{1}\vee x_{2}) and C2=(¬x1x2)C_{2}=(\neg x_{1}\vee x_{2}). As an example of the general reduction, we first show how to reduce this instance of the satisfiability problem to AUX(4,2)\operatorname{AUX}(4,2). This scheduling problem is explained in the following step by step. On the most abstract level we define sections, within each section we define a number of blocks, and each block consists of two or three jobs.

Reduction

The reduction consists of four sections of equal length, each corresponding to a literal, in the order x1x_{1}, ¬x1\neg{x}_{1}, x2x_{2}, ¬x2\neg{x}_{2}. Each section corresponds to a time interval which ends with a separator job. In each section, we have a sequence of blocks positioned after each other. A block is a set of pending jobs and ordinary jobs with deadlines close to each other. In this example, each section for literal ll has three blocks: one for the literal, 𝐿𝑖𝑡[l]\mathit{Lit}[l], and one for each clause, i.e., 𝐶𝑙[l,1]\mathit{Cl}[l,1] and 𝐶𝑙[l,2]\mathit{Cl}[l,2]. In general each section has m+1m+1 blocks, where mm is the number of clauses. All clauses are represented at each literal section. Each section has exactly one unit of idle time.

The four types of blocks we use are given in Figure 2. The 𝐿𝑖𝑡[l]\mathit{Lit}[l] block has type V+V^{+} for positive literals (x1x_{1}, x2x_{2}) and type VV^{-} for negative literals (¬x1\neg{x}_{1}, ¬x2\neg{x}_{2}). The 𝐶𝑙[l,j]\mathit{Cl}[l,j] block has type C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} if lCjl\in C_{j} and type C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} otherwise. A C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} block has a long and a short pending job with deadlines 6 and 7 relative to the earliest start time, and a C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} block also has a long and a short pending job with deadlines 5 and 7 relative to the earliest start time. These blocks are formally defined in Definition 6. The deadlines of jobs in the 𝐶𝑙[l,j]\mathit{Cl}[l,j] blocks are shifted in time by the sum of job lengths in the blocks preceding it within the same section.

Pending jobs form pairs as follows: each long pending job in a literal block is paired with the short pending job in the next literal block, and each long pending job in a clause block is paired with the short pending job in the next block for the same clause. This leaves the first mm short pending jobs and the last mm long pending jobs unpaired, and these are required to finish before their early deadline, effectively turning them into ordinary jobs.

The resulting AUX(4,2)\operatorname{AUX}(4,2) scheduling instance is visualized in Figure 3. In this figure, each job is positioned at its earliest possible start time among all feasible schedules. For pending jobs, this is later than the release time of 0, because other jobs occupy the earlier time interval (Proposition 2). Separator jobs are represented here by the black vertical bars.

t:t:0224466881010
(a) The V+V^{+} block.
t:t:022446688
(b) The C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} block.
t:t:0224466881010
(c) The VV^{-} block.
t:t:022446688
(d) The C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} block.
Figure 2: This visualizes the four types of blocks we use. The rectangles represent jobs and the bars represent their availability intervals: long jobs are colored red, and short jobs are colored blue. The jobs with two deadlines denote pending jobs. The V+V^{+} and C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} blocks are displayed on a light blue background, and the VV^{-} and C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} blocks have a light grey background to be able to identify them more easily in subsequent figures.

x1x_{1}¬x1\neg x_{1}x2x_{2}¬x2\neg x_{2}t:t:𝐶𝑙[l,2]\mathit{Cl}[l,2]𝐶𝑙[l,1]\mathit{Cl}[l,1]𝐿𝑖𝑡[l]\mathit{Lit}[l]02222444466668888

Figure 3: This visualizes the auxiliary scheduling problem that is the reduced instance of the example satisfiability problem with two variables and two clauses. Multiple jobs with release time 0 are positioned in the same row. The thin red or blue line represents the initial availability interval of the last job in the row; for all other jobs, the initial availability is from their release time at 0 until to their (last) deadline. The thick red or blue lines represent the part of the availability interval that remains for each job in any feasible schedule, and all jobs are shown at their earliest possible start time. The pairs of long and short pending jobs that form connected pairs are connected by a dashed line. The first four lines show from left to right the literal blocks 𝐿𝑖𝑡[x1]\mathit{Lit}[x_{1}], 𝐿𝑖𝑡[¬x1]\mathit{Lit}[\neg x_{1}], 𝐿𝑖𝑡[x2]\mathit{Lit}[x_{2}], and 𝐿𝑖𝑡[¬x2]\mathit{Lit}[\neg x_{2}], representing the literals themselves. The next two lines show the clause blocks 𝐶𝑙[l,1]\mathit{Cl}[l,1] representing C1C_{1}; the last two lines show the clause blocks 𝐶𝑙[l,2]\mathit{Cl}[l,2] representing C2C_{2}. In 𝐶𝑙[x1,1]\mathit{Cl}[x_{1},1] and 𝐶𝑙[x1,2]\mathit{Cl}[x_{1},2] the short pending job is not paired, and in 𝐶𝑙[¬x2,1]\mathit{Cl}[\neg x_{2},1] and 𝐶𝑙[¬x2,2]\mathit{Cl}[\neg x_{2},2] the long pending job is not paired.

x1x_{1}¬x1\neg x_{1}x2x_{2}¬x2\neg x_{2}t:t:𝐶𝑙[l,2]\mathit{Cl}[l,2]𝐶𝑙[l,1]\mathit{Cl}[l,1]𝐿𝑖𝑡[l]\mathit{Lit}[l]02222444466668888

Figure 4: For the same auxiliary scheduling problem instance as in Figure 3, this partial schedule shows why setting x1=falsex_{1}=\textsc{false} and x2=falsex_{2}=\textsc{false} cannot lead to a feasible schedule. In this partial schedule, we have fixed the jobs in each 𝐿𝑖𝑡[l]\mathit{Lit}[l] accordingly (note that the section where the literal is set to true has no idle time), and have marked in gray the space that is consumed by the jobs from these 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks. The earliest starting times of the remaining jobs have been adjusted to this partial schedule. This partial schedule cannot be extended to a feasible schedule because the jobs in the clause blocks 𝐶𝑙[l,1]\mathit{Cl}[l,1] of clause C1=(x1x2)C_{1}=(x_{1}\vee x_{2}) cannot be scheduled without overlap.

x1x_{1}¬x1\neg x_{1}x2x_{2}¬x2\neg x_{2}t:t:𝐶𝑙[l,2]\mathit{Cl}[l,2]𝐶𝑙[l,1]\mathit{Cl}[l,1]𝐿𝑖𝑡[l]\mathit{Lit}[l]02222444466668888

Figure 5: For the same auxiliary scheduling problem instance as in Figure 3, this shows a feasible schedule corresponding to setting x1=falsex_{1}=\textsc{false} and x2=truex_{2}=\textsc{true}. We have marked in gray the space that is consumed by the jobs from the 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks.

Consistency of literals

We now study the example in more detail. The first observation, which is formalized in Proposition 1, is that the 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks have two possible feasible schedules, of which one when its pending job must meet the early deadline, but this comes at the cost of introducing one unit of idle time which cannot be filled by other jobs. Because 𝐿𝑖𝑡[xi]\mathit{Lit}[x_{i}] and 𝐿𝑖𝑡[¬xi]\mathit{Lit}[\neg x_{i}] are connected via the pending job pair viv_{i}, one of the sections of xix_{i} and ¬xi\neg x_{i} contains a unit of idle time at the start (in any feasible schedule). This corresponds to setting xix_{i} to true or false (the section without idle time is the literal which is set to true). In the example in Figure 3 this can be verified by considering the four first lines and the two left-most sections, containing V+V^{+} and VV^{-} for x1x_{1} and ¬x1\neg x_{1}, respectively, and similarly for x2x_{2} in the third and fourth section.

Definition of clause blocks

For C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} blocks, the early deadline of 6 allows both pending jobs of length 2 and 4 to finish early if there is no idle time in the 𝐿𝑖𝑡[l]\mathit{Lit}[l] block; if there is idle time, one job can complete early, and the other late. For C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} blocks, the early deadline of 5 allows one job to finish early even with one unit of idle time, and the other will be late. As noted before, the 𝐶𝑙[l,j]\mathit{Cl}[l,j] are defined such that they are sensitive to the unit of delay at the start only if lCjl\in C_{j}. In other words, the 𝐶𝑙[l,j]\mathit{Cl}[l,j] are sensitive to whether ll is set to true only if lCjl\in C_{j}, and thus 𝐶𝑙[l,j]\mathit{Cl}[l,j] is of type C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}}.

Verifying the encoding of clauses by the clause blocks

We now look at how the pending jobs for clause C1=(x1x2)C_{1}=(x_{1}\vee x_{2}) encode that C1C_{1} must be satisfied. We are going to schedule the 𝐶𝑙[l,1]\mathit{Cl}[l,1] blocks. We say that we schedule in the order long–short (respectively short–long) if we put the long job (respectively the short job) first in 𝐶𝑙[l,1]\mathit{Cl}[l,1].

To show that an unsatisfying assignment cannot result in a feasible schedule, consider the assignment x1=x2=falsex_{1}=x_{2}=\textsc{false}, corresponding to scheduling the pending jobs in 𝐿𝑖𝑡[x1]\mathit{Lit}[x_{1}] and 𝐿𝑖𝑡[x2]\mathit{Lit}[x_{2}] early. The scheduling instance corresponding to this assignment is shown in Figure 4. Here we have already fixed a schedule to the 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks. We schedule the sections from left to right. For x1x_{1}, 𝐶𝑙[x1,1]=C𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[x_{1},1]=C_{\mathit{active}} and the relative deadlines are 6 and 7. Because 𝐿𝑖𝑡[x1]\mathit{Lit}[x_{1}] completes one unit of time late, one job can complete early, and this must be the job with only an early deadline. Therefore we put the jobs in the order short–long and we have to schedule the short job in 𝐶𝑙[¬x1,1]\mathit{Cl}[\neg x_{1},1] early. For ¬x1\neg x_{1}, 𝐶𝑙[¬x1,1]=C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[\neg x_{1},1]=C_{\mathit{inactive}} and the relative early deadline is 5, therefore we must put the jobs in the order short–long and we have to schedule the short job in 𝐶𝑙[x2,1]\mathit{Cl}[x_{2},1] early. For x2x_{2}, 𝐶𝑙[x2,1]=C𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[x_{2},1]=C_{\mathit{active}} and the relative early deadline is 6, but we must take into account the unit of delay from the 𝐿𝑖𝑡[x2]\mathit{Lit}[x_{2}] block’s schedule, so again we must put the jobs in the order short–long and the long job will be scheduled late, so the short job in 𝐶𝑙[¬x2,1]\mathit{Cl}[\neg x_{2},1] must be scheduled early. However in the section of ¬x2\neg x_{2}, 𝐶𝑙[¬x2,1]=C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[\neg x_{2},1]=C_{\mathit{inactive}} and both the short pending job and the unpaired long job must be scheduled early, which is impossible.

This argument shows that if all C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} blocks of a clause are in sections where the pending job in 𝐿𝑖𝑡[l]\mathit{Lit}[l] completes early, then in all sections we must schedule the 𝐶𝑙[l,j]\mathit{Cl}[l,j] block in the order short–long, but this doesn’t work for the last section, so that this condition means that a schedule does not exist at all.

If instead we consider x1=false,x2=truex_{1}=\textsc{false},x_{2}=\textsc{true}, that is, having the idle time in the first and fourth section, then it can be verified that scheduling the 𝐶𝑙[l,1]\mathit{Cl}[l,1] blocks from left to right in the order (short–long, short–long, long–short, long–short) or (short–long, short–long, short–long, long–short) leads to a feasible schedule (see Figure 5 for the former).

In general, the pending jobs of a clause CjC_{j} can be feasibly scheduled if an C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} block in a section for literal lCjl\in C_{j} has the related pending job in 𝐿𝑖𝑡[l]\mathit{Lit}[l] finished after the early deadline. This is formalized by Proposition 3 in the next section. A formula then is satisfiable if each clause can be feasibly scheduled in this manner.

4.2 General reduction to AUX(p,q)\operatorname{AUX}(p,q)

In this section we describe the reduction more formally, but follow the same steps. Let a propositional formula be given in conjunctive normal form with nn variables and mm clauses.

At a high level, the instance of the AUX(p,q)\operatorname{AUX}(p,q) scheduling problem consists of 2n2n sections, one per literal. Each section has the same length SS. In each section we define a set of jobs with deadlines in [0,S][0,S]. Then, we concatenate the sections by shifting the release times and deadlines. The total sum of job lengths in each section is S1S-1, and the last time units [Sq,S)[S-q,S) are occupied by a separator job. Before the separator, sections contain m+1m+1 blocks of jobs. The first block represents the literal and the others the mm clauses: each clause is represented in each literal’s section, regardless of whether the clause contains the literal. For literal ll, we denote these blocks by 𝐿𝑖𝑡[l]\mathit{Lit}[l] and 𝐶𝑙[l,j]\mathit{Cl}[l,j]. The four types of blocks we use are defined as follows.

Definition 6 (Blocks).

We use four types of blocks, V+V^{+}, VV^{-}, C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} and C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}}:

  1. 1.

    The V+V^{+} block, used as 𝐿𝑖𝑡[l]\mathit{Lit}[l] for positive literals xix_{i}, defines a long pending job with deadlines (dp,dp)=(p+q+1,p+2q)(d^{\prime}_{p},d_{p})=(p+q+1,p+2q) and two ordinary jobs, ([1,2q],q)([1,2q],q) and ([0,p+2q+1],q)([0,p+2q+1],q).

  2. 2.

    The VV^{-} block, used as 𝐿𝑖𝑡[l]\mathit{Lit}[l] for negative literals ¬xi\neg{x}_{i}, defines a short pending job with two deadlines (dq,dq)=(q,p+2q)(d^{\prime}_{q},d_{q})=(q,p+2q) and two ordinary jobs, ([q+1,p+q],q)([q+1,p+q],q) and ([0,p+2q+1],p)([0,p+2q+1],p).

  3. 3.

    The C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} block, used to represent clauses containing a literal, defines two pending jobs with deadlines (dp,dp)=(dq,dq)=(p+q,p+q+1)(d^{\prime}_{p},d_{p})=(d^{\prime}_{q},d_{q})=(p+q,p+q+1).

  4. 4.

    The C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{inactive}} block, used to represent clauses not containing a literal, defines two pending jobs with deadlines (dp,dp)=(dq,dq)=(p+q1,p+q+1)(d^{\prime}_{p},d_{p})=(d^{\prime}_{q},d_{q})=(p+q-1,p+q+1).

These blocks are illustrated by Figure 2.

When we say that we shift a set of jobs JJ by a time offset Δt\Delta t, we mean that we add Δt\Delta t to the release times and deadlines of ordinary jobs in JJ, and to the deadlines of pending jobs in JJ. The reduction is defined as follows.

Definition 7 (Reduction).

Given an instance of the Satisfiability problem with nn variables x1,x2,,xnx_{1},x_{2},\ldots,x_{n} and mm clauses C1,C2,,CmC_{1},C_{2},\ldots,C_{m}, we construct an instance of AUX(p,q)\operatorname{AUX}(p,q) with n+2nmn+2nm jobs for each of the two different job lengths using the blocks as follows. For each literal ll, we define a section, consisting of 𝐿𝑖𝑡[l]=V+\mathit{Lit}[l]=V^{+} for positive literals l=xil=x_{i} and 𝐿𝑖𝑡[l]=V\mathit{Lit}[l]=V^{-} for negative literals l=¬xil=\neg{x}_{i}, and 𝐶𝑙[l,j]=C𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[l,j]=C_{\mathit{active}} if lCjl\in C_{j} and 𝐶𝑙[l,j]=C𝑖𝑛𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[l,j]=C_{\mathit{inactive}} otherwise. Let S=p+2q+m(p+q)+1+qS=p+2q+m(p+q)+1+q. The section for literal ll consists of the following jobs:

  • 𝐿𝑖𝑡[l]\mathit{Lit}[l].

  • For j=1,,mj=1,\ldots,m, 𝐶𝑙[l,j]\mathit{Cl}[l,j] shifted by p+2q+(j1)(p+q)p+2q+(j-1)(p+q) time units.

  • A separator job occupying [Sq,S)[S-q,S).

The complete instance is the concatenation of these sections for all literals in the order x1,¬x1,,xn,¬xnx_{1},\neg{x}_{1},\ldots,x_{n},\neg{x}_{n}, where each section is shifted SS time units further than its predecessor.

For each variable xix_{i}, the long pending job in 𝐿𝑖𝑡[xi]=V+\mathit{Lit}[x_{i}]=V^{+} is paired with the short pending job in 𝐿𝑖𝑡[¬xi]=V\mathit{Lit}[\neg{x_{i}}]=V^{-}. For each i=1,,ni=1,\ldots,n, for each clause j=1,,mj=1,\ldots,m, the long pending job in 𝐶𝑙[xi,j]\mathit{Cl}[x_{i},j] is paired with the short pending job in 𝐶𝑙[¬xi,j]\mathit{Cl}[\neg{x_{i}},j], and the long pending job in 𝐶𝑙[¬xi,j]\mathit{Cl}[\neg{x_{i}},j] is paired with the short pending job in 𝐶𝑙[xi+1,j]\mathit{Cl}[x_{i+1},j], except for i=ni=n. These last mm long pending jobs as well as the first mm short pending jobs remain unpaired, and, additionally, are required to complete by their early deadline, effectively being ordinary jobs, and thus leaving N=n+(2n1)mN=n+(2n-1)m pairs of connected pending jobs.

The above definition follows the earlier discussion on the literal and clause blocks. An instance of AUX(p,q)\operatorname{AUX}(p,q) as per Definition 2 can be obtained by separating the long pending jobs, the short pending jobs, and the ordinary jobs into the sets JpJ_{p}, JqJ_{q} and JJ. The resulting instance has O(nm)O(nm) jobs in total, which is polynomial in the size of the SAT formula, and which does not depend on pp or qq.

The connected pairs of pending jobs between blocks are as follows. The pending jobs in 𝐿𝑖𝑡[xi]\mathit{Lit}[x_{i}] and 𝐿𝑖𝑡[¬xi]\mathit{Lit}[\neg x_{i}] are connected for all 1in1\leq i\leq n. Further, for each 1jm1\leq j\leq m and 1k2n11\leq k\leq 2n-1, the long pending job in 𝐶𝑙[l(k),j]\mathit{Cl}[\operatorname{l}(k),j] and the short pending job in 𝐶𝑙[l(k+1),j]\mathit{Cl}[\operatorname{l}(k+1),j] are connected.

4.3 Reduction proof

To prove that any solution to satisfiability can be translated to a solution for the auxiliary scheduling problem, and vice versa, we first derive a few properties of the defined schedule.

Proposition 1.

For 𝐿𝑖𝑡[l]\mathit{Lit}[l], two schedules are possible: one without idle time and completion time p+2qp+2q, and one with one unit of idle time and completion time p+2q+1p+2q+1; only in the latter schedule the pending job can complete early.

Proof.

We consider both cases 𝐿𝑖𝑡[l]=V+\mathit{Lit}[l]=V^{+} and 𝐿𝑖𝑡[l]=V\mathit{Lit}[l]=V^{-}. The blocks are also visualized in Figure 2.

For V+V^{+}: because of the short job with interval [1,2q][1,2q], we must start with a short job. If we start with the [1,2q][1,2q] job, it must start at time 1 because the last deadline is p+2q+1p+2q+1 and we already have one idle unit. So the long pending job is scheduled at [q+1,p+q+1)[q+1,p+q+1) and the other short job at [p+q+1,p+2q+1)[p+q+1,p+2q+1). Otherwise, two short jobs must occupy [0,2q)[0,2q) and the pending job occupies [2q,p+2q)[2q,p+2q). Only the first schedule meets the pending job’s early deadline.

For VV^{-}: if we schedule the short pending job first on [0,q)[0,q) or [1,q+1)[1,q+1), the other two occupy [q+1,p+2q+1)[q+1,p+2q+1). Otherwise, we must start with the long job, and because of the other short job, the two ordinary jobs occupy [0,p+q)[0,p+q), and the pending job occupies [p+q,p+2q)[p+q,p+2q). Again, only in the first schedule the pending job can meet its early deadline. ∎

Lemma 3 (SAT model \Rightarrow feasible schedule).

Let v(x1),v(x2),,v(xn)v(x_{1}),v(x_{2}),\ldots,v(x_{n}) be a model for the SAT formula. Then the constructed scheduling instance has a feasible schedule.

Proof.

We specify the schedules for the sections and then concatenate these. The idea is to schedule all jobs in the order of their blocks 𝐿𝑖𝑡[l],𝐶𝑙[l,1],,𝐶𝑙[l,m]\mathit{Lit}[l],\mathit{Cl}[l,1],\ldots,\mathit{Cl}[l,m]. For all 1in1\leq i\leq n, if v(xi)=truev(x_{i})=\textsc{true}, require the pending job in 𝐿𝑖𝑡[¬xi]\mathit{Lit}[\neg x_{i}] to finish early; if v(xi)=falsev(x_{i})=\textsc{false}, require the pending job in 𝐿𝑖𝑡[xi]\mathit{Lit}[x_{i}] to finish early. By Proposition 1, this allows us to schedule 𝐿𝑖𝑡[l]\mathit{Lit}[l] for literals set to true without idle time. For clauses containing such literals, 𝐶𝑙[l,j]=C𝑎𝑐𝑡𝑖𝑣𝑒\mathit{Cl}[l,j]=C_{\mathit{active}} and we can schedule both pending jobs in 𝐶𝑙[l,j]\mathit{Cl}[l,j] early. For all other 𝐶𝑙[l,j]\mathit{Cl}[l,j], we can schedule exactly one pending job early. For each clause CjC_{j}, let l=l(k)Cjl=\operatorname{l}(k)\in C_{j} be a literal set to true by vv and kk be its index. For k<kk^{\prime}<k, schedule the short job before the long one; for k=kk^{\prime}=k the order does not matter, and for k>kk^{\prime}>k schedule the long job before the short one. Observe that because ll is set to true, it is possible to schedule both jobs in 𝐶𝑙[l,j]\mathit{Cl}[l,j] early. So we schedule the short jobs in 𝐶𝑙[x1,j],,𝐶𝑙[l,j]\mathit{Cl}[x_{1},j],\ldots,\mathit{Cl}[l,j] and the long jobs in 𝐶𝑙[l,j],,𝐶𝑙[¬xn,j]\mathit{Cl}[l,j],\ldots,\mathit{Cl}[\neg x_{n},j] early. This satisfies the conditions for the pending jobs. ∎

Now we derive a few properties of the constructed scheduling instance to prove the other direction.

Proposition 2.

In any feasible schedule, all jobs (except the separator jobs) must have a start time after the time offset to which their block was shifted.

Proof.

Because the jobs in each section have length S1S-1, each block ends with a separator job, and all job lengths are greater than one, it follows that all jobs must be scheduled within their own section. For a given section of literal ll, the claim clearly holds for the initial block 𝐿𝑖𝑡[l]\mathit{Lit}[l]. For the 𝐶𝑙[l,j]\mathit{Cl}[l,j] blocks, note that 𝐶𝑙[l,j]\mathit{Cl}[l,j] is shifted by p+2q+(j1)(p+q)p+2q+(j-1)(p+q), which equals the total job length of 𝐿𝑖𝑡[l]\mathit{Lit}[l] and all 𝐶𝑙[l,j]\mathit{Cl}[l,j^{\prime}] with j<jj^{\prime}<j. Because jobs in both 𝐿𝑖𝑡[l]\mathit{Lit}[l] and 𝐶𝑙[l,j]\mathit{Cl}[l,j] have deadlines exceeding the block’s total job length by at most one, and p,q>1p,q>1, the jobs in 𝐶𝑙[l,j]\mathit{Cl}[l,j] must be scheduled after those in 𝐿𝑖𝑡[l]\mathit{Lit}[l] and 𝐶𝑙[l,j]\mathit{Cl}[l,j^{\prime}] for j<jj^{\prime}<j, so they can start at time equal to their offset or later. ∎

To proof that not satisfying a clause implies an infeasible schedule, we use the following fact on the relation between the pending job defined in a literal and the corresponding clause jobs.

Proposition 3.

Consider any clause CjC_{j}. In any feasible schedule, there must exist a literal lCjl\in C_{j} such that the pending job in 𝐿𝑖𝑡[l]\mathit{Lit}[l] completes after its early deadline.

Proof.

We argue by contradiction. Suppose that for all literals lCjl\in C_{j}, the pending job in 𝐿𝑖𝑡[l]\mathit{Lit}[l] completes early. By Proposition 2, the jobs of each block are scheduled no earlier than the offset of their block. So we can apply Proposition 1 to the 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks. For literals lCjl\in C_{j}, the 𝐿𝑖𝑡[l]\mathit{Lit}[l] blocks are scheduled with one unit of idle time. This unit of delay propagates through the 𝐶𝑙[l,j]\mathit{Cl}[l,j] blocks. So for lCjl\in C_{j}, we can schedule the jobs in 𝐶𝑙[l,j]\mathit{Cl}[l,j] starting 1 time unit later than the block’s offset. Because the early deadlines in C𝑎𝑐𝑡𝑖𝑣𝑒C_{\mathit{active}} are p+qp+q, we have that for lCjl\in C_{j}, one pending job in 𝐶𝑙[l,j]\mathit{Cl}[l,j] completes late. For literals lCjl\notin C_{j}, we can schedule the jobs in 𝐶𝑙[l,j]\mathit{Cl}[l,j] starting at the block’s offset (or later), and the early deadlines are p+q1p+q-1, so also for these literals, one pending job in 𝐶𝑙[l,j]\mathit{Cl}[l,j] completes late. Therefore, 2n2n jobs complete late among the jobs in 𝐶𝑙[x1,j],,𝐶𝑙[¬xn,j]\mathit{Cl}[x_{1},j],\ldots,\mathit{Cl}[\neg x_{n},j]. The unpaired pending jobs must be early, and there are 2n12n-1 pending job pairs contained in these blocks, so the number of pending jobs that will be late (2n2n) exceeds the number of pending jobs that can be late (2n12n-1), which is a contradiction. ∎

Lemma 4 (Feasible schedule \Rightarrow SAT model).

Suppose we have a feasible schedule for the constructed scheduling instance. Then there exists a model for the SAT formula.

Proof.

For all 1in1\leq i\leq n, if the pending job in 𝐿𝑖𝑡[xi]\mathit{Lit}[x_{i}] completes late, set v(xi)=truev(x_{i})=\textsc{true}; if the pending job in 𝐿𝑖𝑡[¬xi]\mathit{Lit}[\neg x_{i}] completes late, set v(xi)=falsev(x_{i})=\textsc{false} (because the pending jobs are paired, not both can complete late). If neither completes late, set v(xi)v(x_{i}) arbitrarily.

We show that this assignment satisfies all clauses. Consider a clause CjC_{j}. By Proposition 3, there exists a literal lCjl\in C_{j} such that the pending job in 𝐿𝑖𝑡[l]\mathit{Lit}[l] completes after its early deadline. But then, this literal was set to true by the assignment we have defined, so the clause is satisfied. ∎

Since the reduction is polynomial, Lemmas 3 and 4 together prove the main Lemma 2, that is, that AUX(p,q)\operatorname{AUX}(p,q) is strongly NP-complete for p>q>1p>q>1. Together with the reducibility of AUX(p,q)\operatorname{AUX}(p,q) to our original problem (Lemma 1), we establish the main result of this paper (Theorem 1), which is that the original scheduling problem with job lengths p>q>1p>q>1 is strongly NP-complete.

5 Discussion

Proving NP-completeness of the two job lengths problem turned out to be much more complex than for the unrestricted problem where we can simply reduce from 3-Partition. Since the reduction proof in this paper is valid and polynomial for constant length p>q>1p>q>1, it shows that the non-preemptive job scheduling problem with release times and deadlines and such job lengths pp and qq is strongly NP-complete. A direct consequence of our result is that the case {1,p}\{1,p\} is the maximally theoretically solvable case.

Our result contradicts the existence of a pseudo-polynomial algorithm for the case {q,2q}\{q,2q\} as described by Vakhania (2004). One might think that when the long job length is a multiple of the short one, the problem can be translated to the {1,p}\{1,p\} problem, but this is not possible. Intuitively, with two non-unit job lengths we are able to force the schedule to contain idle time between the execution intervals of two consecutive jobs, while for {1,p}\{1,p\} unit length jobs can always be inserted into idle intervals of unit length.

Another way to think about the {1,p}\{1,p\} problem is that the unit length jobs are actually preemptive jobs: the linear programming formulation of Sgall (2012) only works because the long jobs never need to preempt the unit length jobs. Therefore, we can consider a generalized problem with both preemptive and non-preemptive jobs and arbitrary fractional release times and deadlines. In terms of this problem, our result can be stated as follows: with respect to the set of job lengths, the only solvable case is the one in which the non-preemptive jobs all have the same length.

6 Acknowledgements

The authors thank Sicco Verwer for useful discussions, Jiři Sgall for valuable comments, Nodari Vakhania for valuable e-mail correspondence, and anonymous reviewers for valuable comments that improved the presentation.

References

  • Carlier (1982) Jacques Carlier. The one-machine sequencing problem. European Journal of Operational Research, 11(1):42 – 47, 1982. ISSN 0377-2217.
  • Garey et al. (1981) M. R. Garey, David S. Johnson, Barbara B. Simons, and Robert Endre Tarjan. Scheduling unit-time tasks with arbitrary release times and deadlines. SIAM Journal on Computing, 10(2):256–269, 1981.
  • Hall and Shmoys (1989) Leslie A. Hall and David B. Shmoys. Jackson’s rule for one-machine scheduling : making a good heuristic better. Technical Report OR 199-89, Massachusetts Institute of Technology, Operations Research Center, 1989.
  • Pinedo (2008) Michael L. Pinedo. Scheduling: Theory, Algorithms, and Systems. Springer Publishing Company, Incorporated, 3rd edition, 2008. ISBN 0387789340, 9780387789347.
  • Sgall (2012) Jiri Sgall. Open problems in throughput scheduling. In European Symposium on Algorithms (ESA), pages 2–11, 2012.
  • Simons and Warmuth (1989) Barbara B. Simons and Manfred K. Warmuth. A fast algorithm for multiprocessor scheduling of unit-length jobs. SIAM Journal on Computing, 18(4):690–710, 1989.
  • Vakhania (2004) Nodari Vakhania. Single-machine scheduling with release times and tails. Annals of Operations Research, 129(1-4):253–271, 2004.