Short Communication
Johnson’s rule, composite jobs and the relocation problem
T.C.E. Cheng
a,*, B.M.T. Lin
baDepartment of Logistics, The Hong Kong Polytechnic University, Kowloon, Hong Kong
bDepartment of Information and Finance Management, Institute of Information Management, National Chiao Tung University, Hsinchu 300, Taiwan
Received 26 April 2007; accepted 5 November 2007 Available online 22 November 2007
Abstract
Two-machine flowshop scheduling to minimize makespan is one of the most well-known classical scheduling problems. Johnson’s rule for solving this problem has been widely cited in the literature. We introduce in this paper the concept of composite job, which is an artificially constructed job with processing times such that it will incur the same amount of idle time on the second machine as that incurred by a chain of jobs in a given processing sequence. This concept due to Kurisu first appeared in 1976 to deal with the two-machine flowshop scheduling problem involving precedence constraints among the jobs. We show that this concept can be applied to reduce the computational time to solve some related scheduling problems. We also establish a link between solving the two-machine flow-shop makespan minimization problem using Johnson’s rule and the relocation problem introduced by Kaplan. We present an intuitive interpretation of Johnson’s rule in the context of the relocation problem.
Ó 2007 Elsevier B.V. All rights reserved.
Keywords: Flowshop; Makespan; Johnson’s rule; Composite job; Relocation problem
1. Introduction
Johnson’s seminal work on makespan minimization in a two-machine flowshop (Johnson, 1954) is one of the pio-neering papers in the scheduling literature. In the past half a century, the flowshop model and its solution algorithms have been included in most text books on operations man-agement, especially in books on scheduling theory (Brucker, 2007; Pinedo, 2001). Numerous research papers have been published on extensions of the flowshop model, and on exploration of the computational complexity issues and development of solution algorithms for variants of the flow-shop model. The focus of this paper is not to develop new models or algorithms, but to discuss the concept of ‘‘com-posite job”, which was proposed by Kurisu (1976). While the concept of composite job is very useful and has peda-gogical value, it has not been widely applied in flowshop scheduling. The second goal of this paper is to introduce
the relocation problem, which was first studied byKaplan (1986), and present an intuitive interpretation of Johnson’s rule for solving the two-machine flowshop makespan mini-mization problem in the context of the relocation problem. The two-machine flowshop to minimize makespan can be formally defined as follows. Let N ¼ fJ1; J2; . . . ; Jng
be a set of n jobs to be processed in a two-machine flow-shop. Each job consists of two operations, which must be processed on the first and second machine in that order, respectively. The processing times of job Ji on the
two-machines are denoted by piand qi, respectively. The prob-lem, denoted by the three-field notation F 2jjCmax(Graham et al., 1979), is to find a schedule that completes all the jobs in the shortest time, i.e., minimizing the makespan. It can be shown that any schedule can be transformed into a sche-dule in which the processing sequences on the two-machines are identical without increasing the makespan. Consequently, solution schedules are permutation sequences, i.e., the two-machines have the same job sequence. As a result, we use sequence, instead of schedule, throughout this paper for simplicity of presentation.
0377-2217/$ - see front matterÓ 2007 Elsevier B.V. All rights reserved. doi:10.1016/j.ejor.2007.11.035
*
Corresponding author. Tel.: +852 27665216; fax: +852 23645245. E-mail address:lgtcheng@inet.polyu.edu.hk(T.C.E. Cheng).
www.elsevier.com/locate/ejor European Journal of Operational Research 192 (2009) 1008–1013
To solve the F 2jjCmax problem, Johnson (1954) gave a
decision rule, now popularly called Johnson’s rule: For any two jobs Ji; Jj2 N , if minfpi; qjg 6 minfqi; pjg, then
schedule job Jiearlier than job Jj. Based on this rule, a
solu-tion algorithm, known as Johnson’s algorithm, can be designed, which has a time complexity of Oðn log nÞ. Differ-ent forms of Johnson’s algorithm have been presDiffer-ented in the literature. The following two forms are probably the most commonly adopted:
Form 1: Select the shortest processing time amongst all the unscheduled operations. If the operation belongs to machine one, then schedule the job of that operation in the earliest open position; else schedule the job of that operation in the last open position. Remove the job from the job set. Repeat the process until all the jobs are scheduled.
Form 2: Partition the job set N into Nþ ¼ fJ ijpi6
qi; Ji2 N g and N ¼ fJijpi> qi; Ji2 N g. Schedule
the jobs in Nþ in non-decreasing order of p
i, and
sche-dule the jobs in N in non-increasing order of q i.
Con-catenate the two sequences.
Most operations management textbooks adopt Form 1 of the algorithm. It is clear that the time complexity of Johnson’s algorithm is dominated by the sorting procedure because we need to find an ordered list of the jobs or oper-ations. Throughout this paper we call any algorithm John-son’s algorithm that is based on JohnJohn-son’s rule, regardless of the way in which it is presented, and denote by JiJ Jjif job Ji precedes Jjby Johnson’s rule.
The rest of this paper is organized into four sections. In Section2 we introduce the concept of composite job, fol-lowed by an illustrative example. We also give examples of applications of the concept of composite job. In Section
3we discuss the relocation problem, which has been shown to be equivalent to the two-machine flowshop scheduling problem to minimize makespan. We present an intuitive
interpretation of Johnson’s rule in the context of the relo-cation problem. We conclude the paper and suggest some directions for future research in Section 4.
2. Composite jobs
The makespan of a given job sequence for F 2jjCmax is
the sum of all machine-two processing times plus the sum of all idle times incurred on the second machine. Therefore, minimizing the makespan is equivalent to finding a job sequence that minimizes the sum of idle times on the sec-ond machine. In studying the two-machine flowshop sched-uling problem with precedence constraints in chains among the jobs,Kurisu (1976)introduced the concept of a chain of jobs. That is, given a chain of jobs that will be processed consecutively without interruption, Kurisu defined a com-posite job as a job that will cause the same amount of idle time as the sum of idle times incurred by the jobs following the processing sequence defined by the chain. The reader is referred toKurisu (1976)for details of the proof. Kambu-rowski (2000) established the definition of composite job via considering flowshop scheduling with time lags.
For notational simplicity, consider the natural sequence S ¼ ðJ1; J2; . . . ; JnÞ of the jobs. We can replace a chain or a
subsequence of jobs by a composite job. Construct com-posite job J½1:2from jobs J1 and J2 by letting
p½1:2¼ p1þ maxf0; p2 q1g; and
q½1:2¼ maxf0; q1 p2g þ q2:
It is easy to see that schedule S and schedule S0¼ ðJ½1:2; J3; . . . ; JnÞ have the same total idle time. With
J½1:2 and J3, we can similarly construct composite job
J½1:3 by letting p½1:3¼ p½1:2þ maxf0; p3 q½1:2g and
q½1:3¼ maxf0; q½1:2 p3g þ q3. Following this line of
rea-soning, for any 1 < k 6 n, composite job J½1:kis recursively
defined by p½1:k¼ p½1:k1þ maxf0; pk q½1:k1g and q½1:k¼
maxf0; q½1:ðk1Þ pkg þ qk. Indeed, p½1:kcan be interpreted
M M1 M2 M11 M M2 M1 M22 M1 Eliminate overlapping M1 M M2
a
b
c
d
Collect idle time on M2
Identify overlapping operations on machines
operations
as the sum of machine-two idle times in the subsequence ðJ1; J2; . . . ; JkÞ (seeFig. 1). As shown inFig. 1, a sequence
of jobs has overlapping machine-one and machine-two operations. The overlapping intervals can be removed without changing the total idle time on machine-two. A composite job is defined by trimming the overlapping inter-vals. In the backward direction, composite job J½k:ncan be
similarly defined for any k; 1 6 k < n. The computational time of the above procedure for constructing composite jobs is OðnÞ.
Consider the example shown inFig. 2. The sum of idle times of the optimal schedule is 6. The idle time of compos-ite job J½1:5 is 6, too. If we combine two composite jobs
‘‘J½1:3and J½4:5” or ‘‘J½1:2and J½3:5”, then we have the same
result.
The above procedure constructs composite jobs J½1:kand
J½k:nfor 1 6 k 6 n in OðnÞ time. We can extend the
proce-dure to construct J½i:j for 1 6 i < j 6 n in the
follow-ing. Composite jobs J½1:2; J½1:3; . . . ; J½1:n are successively
determined in OðnÞ time. Similarly, J½2:3; J½2:4; . . . ; J½2:n;
J½3:4; . . . ; J½3:n; . . . ; J½n1:n are successively determined. The
total running time is Oðn2Þ.
In the following we present some examples to demon-strate applications of the concept of composite job.Birman and Mosheiov (2004) studied a two-machine flowshop scheduling problem, which is to determine the due date and schedule the jobs so as to minimize the following objective function: Zðq; dÞ ¼ maxfWEmax
16j6NEj; WT
max16j6NTj; Wddg, where Ej and Tj are, respectively the
earliness and tardiness of job Jj; WE, WT and Wd are
respectively the unit penalty of earliness and tardiness, and for setting the due date to be d. They proposed an Oðn2log nÞ algorithm that can optimally solve the problem.
The time complexity results from OðnÞ repetitions of putt-ing a job in the first position and applyputt-ing Johnson’s algo-rithm for the remaining jobs. For each job Jk and
Johnson’s sequence for the remaining n 1 jobs, we can compute the makespan of the sequence ðJk; J1; J2; . . . ;
Jk1; Jkþ1; . . . ; JnÞ by considering job Jk and two composite
jobs J½1:k1and J½kþ1:n. This takes Oð1Þ time. Therefore, the
overall time complexity is reduced to Oðn log nÞ time. The second example concerns the problems F 2jf jCmax
and F 2jljCmax, which were investigated by Saadani et al. (2005). In the F 2jf jCmaxproblem, there is a proper subset
A N of the jobs that cannot be scheduled in the first posi-tion in a job sequence. The counterpart problem F 2jljCmax
has a subset B N of the jobs that cannot be scheduled in the last position in a job sequence. Both problems have been shown to be solvable in Oðn2Þ time by first finding
Johnson’s sequence for the jobs in N, and then testing each job in Nn A (respectively, N n B) in the first (respectively, last) position. Because the makespan of each sequence can be calculated in OðnÞ time, the overall time complexity is Oðn2Þ. To search for a simple rule, like Johnson’s rule, Saadani et al. (2005) proposed four intuitive rules, and gave counter examples of these rules. They also developed several interesting but complicated properties for these two problems. Here we do not provide a simple rule, but show that the two problems can be solved in Oðn log nÞ time. As in the due date assignment problem in the first example, we select a job in Nn A out of sequence S and schedule it first. The total testing time is thus OðnÞ, which is dominated by the Oðn log nÞ time required for constructing the initial sequence S. An extended problem is F 2jf ; ljCmax, in which
the forbidden constraints are simultaneously applied to the first and last positions. This problem is solvable in polyno-mial time too, but requires Oðn3Þ time (Saadani et al., 2005). To apply the concept of composite job, we construct J½i:j for 1 6 i < j 6 n by a two-level nested loop. Assume
jobs Ji2 N n A and Jj2 N n B, i 6¼ j, are selected to be
positioned in the first and last positions. The makespan of the test sequence can be calculated in constant time using two regular jobs and three composite jobs: Ji; J½1:i1; J½iþ1:j1; J½jþ1:n; Jj. To construct all the
com-posite jobs J½i:j requires Oðn2Þ time and the above testing
procedure takes Oðn2Þ time, too. Therefore, the overall
time complexity reduces from Oðn3Þ to Oðn2Þ.
3. Applications in proofs
To prove the correctness of Johnson’s rule, we usually assume that in some optimal schedule there exist two con-secutive jobs Jiand Jjsuch that JiJ Jjand Jjprecedes Ji.
Subject to this assumption, we then show that the make-span of the schedule S0obtained by swapping J
i and Jjis
no larger than that of the original schedule S. In some flow-shop scheduling problems, we however need to establish the validity of the job-interchange argument for two jobs that are not necessarily scheduled in consecutive positions. Consider as an example the following problem (Sekiguchi, 1983; Cheng et al., 2000). The jobs are categorized into groups. When the processing of a job follows some job from another group, a setup time depending on the group to which the job belongs is required. In this problem
setting, Sekiguchi (1983) showed that jobs from the same group need to be sequenced by Johnson’s rule. To prove this property, the job-interchange argument may not be applied for two consecutive jobs in the assumed optimal schedule because the two jobs may belong to different groups. To make the jobs of a group follow the sequence determined by Johnson’s rule, we may encounter the situa-tion where two jobs from the same group are not scheduled consecutively and they violate Johnson’s rule.
In the following we demonstrate the use of the concept of composite job to show the correctness of Johnson’s rule by considering two jobs that are not necessarily consecu-tive. Assume JiJ Jj and Jj precedes Ji in some optimal
schedule. Let ðJj1; Jj2; . . . ; JjkÞ be the sequence of jobs
scheduled between Jjand Ji. We show that either moving
job Jj forward to the position immediately following Ji
or moving job Ji backward to the position immediately
preceding Jj will not increase the makespan. For
conve-nience in discussion, we partition the jobs in N into Nþ ¼ fJijpi6qi; Ji2 N g and N¼ fJijpi> qi; Ji2 N g.
Jobs in N (respectively, Nþ) are called negative
(respec-tively, non-negative). The meanings of the terms ‘‘negative” and ‘‘non-negative” will be elaborated in the next section on the relocation problem. Moreover, the following prop-erty of the composite job will be used.
Property 1. Given job sequenceðJj; Jjþ1; . . . ; JiÞ, there are
the following inequalities: pj6p½j:i and qi6q½j:i.
To complete the proof of swapping two jobs that are not necessarily consecutive, we consider the following three cases:
Case 1: Jj; Ji2 Nþ: Consider the composite job J~jformed
by the sequenceðJj; Jj1; . . . ; JjkÞ. If J~j is negative,
then we swap J~j and Ji and come up with the
sequenceðJi; Jj; Jj1; . . . ; JjkÞ, in which Ji precedes
Jj. On the other hand, if J~jis non-negative, then
by Property 1, p~jP pjP pi. Therefore, we can also swap J~jand Ji, and have the same sequence.
Case 2: Jj; Ji2 N: If the composite job J~i defined by
sequenceðJj1; . . . ; Jjk; JiÞ is non-negative, then we
can swap J~jand Jjand come up with the sequence
ðJj1; . . . ; Jjk; Ji; JjÞ, in which Ji precedes Jj. If J~iis
negative, thenProperty 1implies qj6qi6q~i, and
we can swap Jjand J~i.
Case 3: Jj2 N; Ji2 Nþ: If the composite job defined by
ðJj1; . . . ; JjkÞ is negative, then we swap Ji and the
composite job, followed by swapping Ji and Jj.
The derived sequence isðJi; Jj; Jj1; . . . ; JjkÞ. If the
composite job is non-negative, then we swap Jj
and the composite job, followed by swapping Jj
and Ji. The derived sequence isðJj1; . . . ; Jjk; Ji; JjÞ.
Now, job Jiprecedes Jj.
The reasoning used above can be slightly modified (or simplified) to construct a proof of Form 2 of Johnson’s algorithm.
4. Proof of Form 2 of Johnson’s algorithm
Let S be an optimal schedule different from the schedule produced by Form 2 of Johnson’s algorithm. Let Ji; Jjbe
the first pair of jobs in schedule S such that the relation JiJ Jj holds but Jj precedes Ji. Recall that
ðJj1; Jj2; . . . ; JjkÞ is the sequence of jobs scheduled between
Jjand Ji. We show that eliminating the out-of-order jobs
between Ji and Jj will not increase the makespan.
More-over, we need to guarantee that no two jobs that are orig-inally in order will become out of order. Similarly, we consider the same three cases:
Case 1: Jj; Ji2 Nþ: The analysis of the makespan is the
same as above. Because Jj Jj0 for j16j06jk,
by transitivity, JiJ JjJ Jj0 for j16j06jk.
More pairs of out-of-order jobs can possibly be eliminated and no extra pair of jobs become out of order.
Case 2: Jj; Ji2 N: The analysis of the makespan is the
same as above. Transforming the original sequence ðJj; Jj1; . . . ; Jjk; JiÞ into ðJj1; . . . ; Jjk; Ji; JjÞ makes
jobs Jiand Jjin order without causing a new pair
of out-of-order jobs.
Case 3: Jj2 N; Ji2 Nþ: The reasoning for the new
subse-quence ðJi; Jj; Jj1; . . . ; JjkÞ (respectively,
subse-quence ðJj1; . . . ; Jjk; Ji; JjÞ) is the same as that
used for proving Case 1 (respectively, Case 2). Continuing the above swapping procedure, if necessary, we will finally come up with a schedule as specified by Johnson’s algorithm. The proof is completed.
5. The relocation problem
Alternative proofs of Johnson’s rule have been proposed in the literature in order to simplify presentation, e.g., Kam-burowski (1997). In this section we give a proof of John-son’s rule in the context of the relocation problem, which is a resource-constrained single-machine scheduling prob-lem formulated and studied in connection with a redevelop-ment project in Boston (Kaplan, 1986; Kaplan and Berman, 1988; PHRG, 1986). A pool of v0units of a single-type of
resource is provided for processing the jobs. Job Jiacquires
and consumes aiunits of the resource from the pool for its
processing and returns bi units of the resource to the pool
upon its completion. A schedule or sequence is said to be feasible if each job following the sequence can be success-fully processed. The objective is to determine the minimum initial resource level v0 that guarantees the existence of a
feasible schedule. Kaplan and Amir (1988) showed that the relocation problem is equivalent to F 2jjCmax. The
equiv-alence is based upon the fact that given a job sequence the sum of idle times on the second machine in F 2jjCmaxis equal
to the required initial resource level guaranteeing the feasi-bility of the processing sequence for the relocation problem. For recent research developments on the relocation
problem, the reader is referred toKononov and Lin (2006, submitted for publication).
If we consider the relocation problem from the perspec-tive of investment planning, then we have the setting in which n projects are required to be finished and each pro-ject Ji requires an investment of ai units of resources and
will provide a return of biunits of resources. To determine a sequence to execute the projects so as to minimize the ini-tial capital, we need to work out the whole plan as follows: we execute the projects having non-negative profits bi ai
first and arrange them in non-decreasing order of invest-ments ai. The projects having negative profits follow and
are arranged in non-increasing order of returns bi. This
set-ting provides an intuitive interpretation of Form 2 of John-son’s algorithm given in Section1.
We apply the concept of composite job to the relocation
problem. Consider the subsequence of jobs
ðJi; Jiþ1; . . . ; JjÞ; 1 6 i < j 6 n. We make the following
def-inition for composite job J½i:j:
a½i:j¼ a½i:j1þ maxf0; aj b½i:j1g;
b½i:j¼ maxf0; b½i:j1 ajg þ bj:
In the relocation problem, a job (project) Jiin N is called
negative because its contribution is bi ai<0. On the other
hand, non-negative jobs have non-negative contributions, i.e., bi aiP0. Therefore, the processing of a negative
job reduces the resource level in the pool while the process-ing of a positive job produces extra units of the resource.
Assume S is some optimal sequence and its resource requirement is v0. Let Ji and Jj be two consecutive jobs
in S such that JiJ Jj, but Jj precedes Ji. We consider
the following three cases to show that another schedule that is feasible with respect to v0can be obtained by
swap-ping Jj and Ji.
Case 1: Jj; Ji2 Nþ: Because ai6ajand bi aiP0,
swap-ping the two jobs preserves the feasibility of the sequence.
Case 2: Jj2 N; Ji2 Nþ: Because Jj is negative and Ji is
non-negative with respect to the resource level at the start of their processing, swapping the two jobs preserves the feasibility of the sequence.
Case 3: Jj; Ji2 N: Let vt be the resource level before the
start of job Jjin sequence S. Because Jjis negative
and consumes the resource, the resource level becomes vt ajþ bj, which is no less than ai to
ensure the feasibility of job Ji. After the swap, vtis
sufficient for Ji. The remaining issue we need to
address is to ensure the feasibility of job Jj
after the swap. Consider the following chain of derivations:
ðvt aiþ biÞ ajPðvt aiþ bjÞ aj
ðbecause biP bjÞ ¼ ðvt ajþ bjÞ aiP0:
Therefore, job Jjcan be processed after the swap.
6. Conclusion
In this paper, we introduced the concept of composite job and the relocation problem, which were first proposed in 1976 and 1986, respectively, but have not been widely deployed or studied in the scheduling literature. We dem-onstrated their potential application in reducing the com-putational time required to solve related scheduling problems or simplifying the presentation of solution algo-rithms and their proofs. There is a considerable scope in applying the concept of composite job in scheduling. Studying the relocation problem with temporal constraints, such as processing times, release dates and due dates, is a worthwhile future research direction. From our experience, theoretical challenges arise whenever temporal parameters are involved in the relocation problem.
Acknowledgements
This research was supported in part by The Hong Kong Polytechnic University under a grant from the Area of Strategic Development in Chinese Business Services. The authors are grateful to the anonymous reviewers for their constructive comments.
References
Birman, M., Mosheiov, G., 2004. A note on a due-date assignment on a two-machine flow-shop. Computers and Operations Research 31, 473– 480.
Brucker, P., 2007. Scheduling Algorithms. Springer, New York. Cheng, T.C.E., Gupta, J.N.D., Wang, G., 2000. A review on flowshop
scheduling research with setup times. Production and Operations Management 9, 262–282.
Graham, R.L., Lawler, E.L., Lenstra, J.K., Rinnooy Kan, A.H.G., 1979. Optimization and approximation in deterministic sequencing and scheduling: a survey. Annals of Discrete Mathematics 5, 87–326. Johnson, S.M., 1954. Optimal two and three-stage production schedules
with setup times included. Naval Research Logistics Quarterly 1, 61– 68.
Kamburowski, J., 1997. The nature of simplicity of Johnson’s Algorithm. Omega 25, 581–584.
Kamburowski, J., 2000. Non-bottleneck machines in three-machine flow shops. Journal of Scheduling 3, 209–223.
Kaplan, E.H., 1986. Relocation models for public housing redevelopment programs. Planning and Design 13, 5–19.
Kaplan, E.H., Amir, A., 1988. A fast feasibility test for relocation problems. European Journal of Operational Research 35, 201–205. Kaplan, E.H., Berman, O., 1988. Orient heights housing projects.
Interfaces 18, 14–22.
Kononov, A.V., Lin, B.M.T., 2006. On the relocation problems with multiple identical working crews. Discrete Optimization 21, 368– 381.
Kononov, A.V., Lin, B.M.T., Resource-constrained scheduling to mini-mize weighted completion time on a single machine, submitted for publication.
Kurisu, T., 1976. Two-machine scheduling under required precedence among jobs. Journal of the Operations Research Society of Japan 19, 1–13.
PHRG, 1986. New lives for old buildings: revitalizing public housing project. In: Public Housing Group, Department of Urban Studies and Planning. MIT, Cambridge, Massachusetts.
Pinedo, M., 2001. Scheduling: Theory, Algorithms, and Systems. Prentice-Hall, New Jersey.
Saadani, H., Baptiste, P., Moalla, M., 2005. The simple F 2jjCmax with
forbidden tasks in first or last position: a problem more complex than it seems. European Journal of Operational Research 161, 21–31.
Sekiguchi, Y., 1983. Optimal schedule in a GT-type flow-shop under series–parallel precedence constraints. Journal of the Operations Research Society of Japan 26, 226–251.