Approximation

,


Introduction
We study in this paper the following three-machine proportionate mixed shop, denoted as M 3 | prpt | C max in the three-field notation [4].Given three machines M 1 , M 2 , M 3 and a set J = F ∪ O of jobs, where F = {J 1 , J 2 , . . ., J } and O = {J +1 , J +2 , . . ., J n }, each job J i ∈ F needs to be processed non-preemptively through M 1 , M 2 , M 3 sequentially with a processing time p i on each machine and each job J i ∈ O needs to be processed non-preemptively on M 1 , M 2 , M 3 in any machine order with a processing time q i on each machine.The scheduling constraint is usual in that at every time point a job can be processed by at most one machine and a machine can process at most one job.The objective is to minimize the maximum job completion time, i.e., the makespan.
The jobs of F are referred to as flow-shop jobs and the jobs of O are called open-shop jobs.The mixed shop is to process such a mixture of a set of flowshop jobs and a set of open-shop jobs.We assume without loss of generality that p 1 ≥ p 2 ≥ . . .≥ p and q +1 ≥ q +2 ≥ . . .≥ q n .Mixed shops have many real-life applications and have been studied since the 1980's.The scheduling of medical tests in an outpatient health care facility and the scheduling of classes/exams in an academic institution are two typical examples, where the patients (students, respectively) must complete a number of medical tests (academic activities, respectively); some of these activities must be done in the same sequential order while the others can be finished in any order; and the time-spans for all these activities should not overlap with each other.The proportionate shops were also introduced in the 1980's [11] and they are one of the most specialized shops with respect to the job processing times which have received many studies [12].
Masuda et al. [10] and Strusevich [16] considered the two-machine mixed shop problem to minimize the makespan, i.e., M 2 || C max ; they both showed that the problem is polynomial time solvable.Shakhlevich and Sotskov [14] studied mixed shops for processing two jobs with an arbitrary regular objective function.Brucker [1] surveyed the known results on the mixed shop problems either with two machines or for processing two jobs.Shakhlevich et al. [13] studied the mixed shop problems with more than two machines for processing more than two jobs, with or without preemption.Shakhlevich et al. [15] reviewed the complexity results on the mixed shop problems with three or more machines for processing a constant number of jobs. When which is solvable in polynomial time [2].When F = ∅, the problem reduces to the O3 | prpt | C max problem, which is ordinary (or called weakly) NP-hard [8].It follows that the M 3 | prpt | C max problem is at least ordinary NPhard.Recently, Koulamas and Kyparisis [7] showed that for some very special cases, the M 3 | prpt | C max problem is solvable in polynomial time; for the nonsolvable case, they showed an absolute performance bound of 2 max{p 1 , q +1 } and presented a 5/3-approximation algorithm.
In this paper, we design an improved 4/3-approximation algorithm for (the non-solvable case of) the M 3 | prpt | C max problem, and show that the performance ratio of 4/3 is asymptotically tight.When the largest job is a flowshop job, that is p 1 ≥ q +1 , we present a fully polynomial-time approximation scheme (FPTAS).On the negative side, while the F 3 | prpt | C max problem is polynomial-time solvable, we show an interesting hardness result that adding one single open-shop job to the job set makes the problem NP-hard if this open-shop job is larger than any flow-shop job.We construct the reduction from the well-known Partition problem [3].
The rest of the paper is organized as follows.In Sect.2, we introduce some notations and present a lower bound on the optimal makespan C * max .We present in Sect. 3 the FPTAS for the M 3 | prpt | C max problem when p 1 ≥ q +1 .The 4/3-approximation algorithm for the case where p 1 < q +1 is presented in Sect.4, and the performance ratio of 4/3 is shown to be asymptotically tight.We show in Sect. 5 that, when there is only one open-shop job J n and p 1 < q n , the M 3 | prpt | C max problem is NP-hard, through a reduction from the Partition problem.We conclude the paper with some remarks in Sect.6.

Preliminaries
For any subset of jobs X ⊆ F, the total processing time of the jobs of X on one machine is denoted as For any subset of jobs Y ⊆ O, the total processing time of the jobs of Y on one machine is denoted as The set minus operation J \ {J} for a single job J ∈ J is abbreviated as J \ J throughout the paper.Given that the load (i.e., the total job processing time) of each machine is P (F) + Q(O), the job J +1 has to be processed by all three machines, and one needs to process all the flow-shop jobs of F, the following lower bound on the optimum C * max is established [2,7]: 3 An FPTAS for the Case Where p 1 ≥ q +1 In this section, we design an approximation algorithm A( ) for the M 3 | prpt | C max problem when p 1 ≥ q +1 , for any given > 0. The algorithm A( ) produces a schedule π with its makespan C π max < (1 + )C * max , and its running time is polynomial in both n and 1/ .
Consider a bipartition {A, B} of the job set O = {J +1 , J +2 , . . ., J n }, i.e., A∪ B = O and A∩B = ∅.Throughout the paper, a part of the bipartition is allowed to be empty.The following procedure Proc(A, B, F) produces a schedule π: 1. the jobs of F are processed in the longest processing time (LPT) order on all three machines, and every job is processed first on M 1 , then on M 2 , lastly on M 3 ; 2. the jobs of A are processed in the LPT order on all three machines, and every one is processed first on M 2 , then on M 3 , lastly on M 1 ; 3. the jobs of B are processed in the LPT order on all three machines, and every one is processed first on M 3 , then on M 1 , lastly on M 2 ; and 4. the machine M 1 processes (the jobs of) F first, then B, lastly A, denoted as F, B, A ; 5. the machine M 2 processes A first, then F, lastly B, denoted as A, F, B ; 6. the machine M 3 processes B first, then A, lastly F, denoted as B, A, F .Proc(A, B, F) runs in O(n log n) time to produce the schedule π, of which an illustration is shown in Fig. 1.

The following two lemmas state that if both
then the schedule π produced by Proc(A, B, F) is optimal.Due to the space limit, we refer the readers to our arXiv submission [9] for the detailed proofs.
Lemma 1 [9].If both Q(A) ≤ p 1 and Q(B) ≤ p 1 , then the schedule π produced by Proc(A, B, F) is optimal, with its makespan . Now we are ready to present the approximation algorithm A( ), for any > 0. In the first step, we check whether then we run Proc(O, ∅, F) to construct a schedule π and terminate the algorithm.The schedule π is optimal by Lemma 1.
In the second step, the algorithm A( ) constructs an instance of the Knapsack problem [3], in which there is an item corresponding to the job J i ∈ O, also denoted as J i .The item J i has a profit q i and a size q i .The capacity of the knapsack is p 1 .The Min-Knapsack problem is to find a subset of items of minimum profit that cannot be packed into the knapsack, and it admits an FPTAS [6].The algorithm A( ) runs a (1 + )-approximation algorithm for the Min-Knapsack problem to obtain a job subset A. It then runs Proc(A, O \ A, F) to construct a schedule, denoted as π 1 .
The Max-Knapsack problem is to find a subset of items of maximum profit that can be packed into the knapsack, and it admits an FPTAS, too [5].In the third step, the algorithm A( ) runs a (1 − )-approximation algorithm for the Max-Knapsack problem to obtain a job subset B. Then it runs Proc(O \ B, B, F) to construct a schedule, denoted as π 2 .
The algorithm A( ) outputs the schedule with a smaller makespan between π 1 and π 2 .A high-level description of the algorithm A( ) is provided in Fig. 2.

Fig. 2. A high-level description of the algorithm A( ).
In the following performance analysis, we assume without of loss of generality that Q(O) > p 1 .We have the following (in-)equalities inside the algorithm A( ): where OPT 1 (OPT 2 , respectively) is the optimum to the constructed Min-Knapsack (Max-Knapsack, respectively) problem.

Lemma 3. In the algorithm
Proof.Note that the job subset A is computed in Step 2.1 of the algorithm A( ), and it satisfies Eq. (3).By the definition of OPT 1 in Eq. ( 2) and using Eq.(3), we have This finishes the proof of the lemma.

Lemma 4. In the algorithm
Proof.Consider an arbitrary optimal schedule π * that achieves the makespan C * max .Note that the flow-shop job J 1 is first processed on the machine M 1 , then on machine M 2 , and last on machine M 3 .
In the schedule π * , let S i and C i be the start processing time and the finish processing time of the job J 1 on the machine M i , respectively, for i = 1, 2, 3. On the machine M 2 , let J 1 = O 1 ∪ F 1 denote the subset of jobs processed before J 1 , and J 2 = O 2 ∪ F 2 denote the subset of jobs processed after J 1 , where {O 1 , O 2 } is a bipartition of the job set O and {F 1 , F 2 } is a bipartition of the job set F \ J 1 .Also, let δ 1 and δ 2 denote the total amount of machine idle time for M 2 before processing J 1 and after processing J 1 , respectively (see Fig. 3 for an illustration).Fig. 3.An illustration of an optimal schedule π * , in which J 1 and J 2 are the subsets of jobs processed on M2 before J1 and after J1, respectively; δ1 δ2 are the total amount of machine idle time for M2 before processing J1 and after processing J1, respectively.
Note that F = J 1 ∪ F 1 ∪ F 2 is the set of flow-shop jobs.The job J 1 and the jobs of F 1 should be finished before time S 2 on the machine M 1 , and the job J 1 and the jobs of F 2 can only be started after time C 2 on the machine M 3 .That is, and If Q(O 1 ) ≤ p 1 , then we have Q(O 1 ) ≤ OPT 2 by the definition of OPT 2 in Eq. ( 4).Combining this with Eq. ( 6), we achieve that δ ) ≤ OPT 2 by the definition of OPT 2 in Eq. ( 4).Combining this with Eq. ( 7), we achieve that This finishes the proof of the lemma.

Lemma 5. In the algorithm
and the schedule π 2 is constructed by Proc(B, B, F).We distinguish the following two cases according to the value of Q(B).
Case 1. Q(B) ≤ p 1 .In this case, the schedule π 2 is optimal by Lemma 1. Case 2. Q(B) > p 1 .The schedule π 2 constructed by Proc(B, B, F) has the following properties (see Fig. 4 for an illustration): Combining Eq. ( 5) with Lemma 4, we have where the last inequality is due to OPT 2 ≤ p 1 < C * max .This finishes the proof of the lemma.

Lemma 6. In the algorithm
, and the schedule π 1 is constructed by Proc(A, A, F).By a similar argument as in Case 2 in the proof of Lemma 5, replacing the two job sets B, B by the two job sets A, A, we conclude that the makespan of the schedule π 1 is achieved on the machine 1) with the assumption that p 1 − OPT 1 < Q(A), we have where the last inequality follows from This finishes the proof of the lemma.

Theorem 1. The algorithm A( ) is a Poly(n, 1/ )-time (1 + )-approximation for the problem
Proof.First of all, the procedure Proc(X , Y, F) on a bipartition {X , Y} of the job set O takes O(n log n) time.Recall that the job set A is computed by a (1+ )approximation for the Min-Knapsack problem, which takes a polynomial time in both n and 1/ ; the other job set B is computed by a (1 − )-approximation for the Max-Knapsack problem, which also takes a polynomial time in both n and 1/ .The total running time of the algorithm A( ) is thus polynomial in both n and 1/ too.
When Q(O) ≤ p 1 , or the job set O \ A computed in Step 2.1 of the algorithm A 1 ( ) has total processing time not less than p 1 , the schedule constructed in the algorithm A( ) is optimal by Lemmas 1 and 2. When Q(O \ A) < p 1 , the smaller makespan between the two schedules π 1 and π 2 constructed by the algorithm A( ) is less than (1 + ) of the optimum by Lemmas 5 and 6.Therefore, the algorithm A( ) has a worst-case performance ratio of (1 + ).This finishes the proof of the theorem.In this section, we present a 4/3-approximation algorithm for the M 3 | prpt | C max problem when p 1 < q +1 , and we show that this ratio of 4/3 is asymptotically tight.
Proof.Consider first the case where there are at least two open-shop jobs.Construct a permutation schedule π in which the job processing order for M 1 is J +3 , . . ., J n , F, J +1 , J +2 , where the jobs of F are processed in the LPT order; the job processing order for M 2 is J +2 , J +3 , . . ., J n , F, J +1 ; the job processing order for M 3 is J +1 , J +2 , J +3 , . . ., J n , F .See Fig. 5 for an illustration, where the start processing time for J +3 on M 2 is q +1 , and the start processing time for J +3 on M 3 is 2q +1 .One can check that the schedule π is feasible when p 1 < q +1 , and it can be constructed in O(n log n) time.The makespan of the schedule π is C π max = P (F) + Q(O) + q +1 − q +2 .Combining this with Eq. (1), we have When there is only one open-shop job J +1 , construct a permutation schedule π in which the job processing order for M 1 is F, J +1 , where the jobs of F are processed in the LPT order; the job processing order for M 2 is F, J +1 ; the job processing order for M 3 is J +1 , F .If P (F) ≤ q +1 , then π has makespan 3q +1 and thus is optimal.If P (F) > q +1 , then π has makespan C π max ≤ 2q +1 + P (F) ≤ 4  3 C * max .This finishes the proof of the theorem.Remark 1. Construct an instance in which p i = 1 −1 for all i = 1, 2, . . ., , q +1 = 1 and q i = 1 n− −2 for all i = +2, +3, . . ., n.Then for this instance, the schedule π constructed in the proof of Theorem 2 has makespan C π max = 4 + 1 −1 ; an optimal schedule has makespan C * max = 3 + 1 −1 + 1 n− −2 (see for an illustration in Fig. 6).This suggests that the approximation ratio of 4/3 is asymptotically tight for the algorithm in the proof of Theorem 2. Proof.An instance of the Partition problem consists of a set S = {a 1 , a 2 , a 3 , . . ., a m } where each a i is a positive integer and a 1 +a 2 +. ..+a m = 2B, and the query is whether or not S can be partitioned into two parts such that each part sums to exactly B. Let x > B, and we assume that a 1 ≥ a 2 ≥ . . .≥ a m .We construct an instance of the M 3 | prpt | C max problem as follows: there are in total m + 2 flow-shop jobs, and their processing times are p 1 = x, p 2 = x, and p i+2 = a i for i = 1, 2, . . ., m; there is only one open-shop job with processing time q m+3 = B + 2x.Note that the total number of jobs is n = m + 3, and one sees that the open-shop job is larger than any flow-shop job.
If the set S can be partitioned into two parts S 1 and S 2 such that each part sums to exactly B, then we let We construct a permutation schedule π in which the job processing order for M 1 is J 1 , J 2 , J m+3 , where the jobs of J 1 and the jobs of J 2 are processed in the LPT order, respectively; the job processing order for M 2 is J 1 , J m+3 , J 2 ; the job processing order for M 3 is J m+3 , J 1 , J 2 .See Fig. 7 for an illustration, in which J 1 starts at time 0 on M 1 , starts at time x on M 2 , and starts at time B + 2x on M 3 ; J 2 starts at time B + x on M 1 , starts at time 2B + 4x on M 2 , and starts at time 2B + 5x on M 3 ; J m+3 starts at time 0 on M 3 , starts at time B + 2x on M 2 , and starts at time 2B + 4x on M 1 .The feasibility is trivial and its makespan is C π max = 3B + 6x, suggesting the optimality.Conversely, if the optimal makespan for the constructed instance is 3B + 6x = 3q m+3 , then we will show next that S admits a partition into two equal parts.The partition of the flow-shop jobs {J 1 , J 2 } is correspondingly constructed.In the schedule, the jobs of J 1 and the jobs of J 2 are processed in the LPT order, respectively.
Firstly, we see that the second machine processing the open-shop job J m+3 cannot be M 1 , since otherwise M 1 has to process all the jobs of F before J m+3 , leading to a makespan greater than 3B + 6x; the second machine processing the open-shop job J m+3 cannot be M 3 either, since otherwise M 3 has no room to process any job of F before J m+3 , leading to a makespan larger than 3B + 6x too.Therefore, the second machine processing the open-shop job J m+3 has to be M 2 , see Fig. 8 for an illustration.Denote the job subsets processed before and after the job J m+3 on M 2 as F 1 and F 2 , respectively.Since x > B, neither of F 1 and F 2 may contain both J 1 and J 2 , which have processing times x.It follows that F 1 and F 2 each contains exactly one of J 1 and J 2 , and subsequently P (F 1 ) = P (F 2 ) = B + x.Therefore, the jobs of J 1 \ {J 1 , J 2 } have a total processing time of exactly B, suggesting a subset of S sums to exactly B. This finishes the proof of the theorem.

Concluding Remarks
In this paper, we studied the three-machine proportionate mixed shop problem M 3 | prpt | C max .We presented first an FPTAS for the case where p 1 ≥ q +1 ; and then proposed a 4/3-approximation algorithm for the other case where p 1 < q +1 , for which we also showed that the performance ratio of 4/3 is asymptotically tight.The F 3 | prpt | C max problem is polynomial-time solvable; we showed an interesting hardness result that adding only one open-shop job to the job set makes the problem NP-hard if the open-shop job is larger than any flow-shop job.
We believe that when p 1 < q +1 , the M 3 | prpt | C max problem can be better approximated than 4/3, and an FPTAS is perhaps possible.Nevertheless, a first step towards such an FPTAS is to design an FPTAS for the special case where there is only one open-shop job and the open-shop job is larger than any flow-shop job.

Fig. 1 .
Fig. 1.An illustration of the schedule π produced by Proc(A, B, F ), where {A, B} is a bipartition of the set O and the jobs of each of A, B, F are processed in the LPT order on all three machines.

Fig. 4 .
Fig. 4.An illustration of the schedule π 2 constructed by Proc(B, B, F ) in Case 2, where Q(B) ≤ p1 and Q(B) > p1.The machines M1 and M2 do not idle; the machine M3 may idle between processing the job set B and the job set B and may idle between processing the job set B and the job set F .M3 starts processing the job set F at time p1 + Q(B).

1 .
The jobs are processed consecutively on the machine M 1 since J 1 is the largest job.The completion time ofM 1 is thus C π 2 1 = Q(O) + P (F).2.The jobs are processed consecutively on the machine M 2 due to Q(B) ≤ p 1 and Q(B) > p 1 .The completion time of M 2 is thus C π 2 2 = Q(O) + P (F). 3. The machine M 3 starts processing the job set F consecutively at time p 1

Fig. 7 .
Fig. 7.A feasible schedule π for the constructed instance of the M 3 | prpt | Cmax problem, when the set S can be partitioned into two equal parts S1 and S2.The partition of the flow-shop jobs {J 1 , J 2 } is correspondingly constructed.In the schedule, the jobs of J 1 and the jobs of J 2 are processed in the LPT order, respectively.