**3. Parallel Batch Machines (***m ≥* **1)**

In this section, we consider the online scheduling on *m* parallel batch machines and the jobs belong to *m* incompatible deteriorating job families. We prove the lower bound and construct the best possible online algorithm with a competitive ratio of 1 + *α*max.

**Theorem 3.** *For problem Pm*|*online,rj,p-batch*, *b* = ∞,*m-family*, *pj* = *αjt*|*C*max*, no online algorithm exists with a competitive ratio less than* 1 + *α*max*.*

**Proof.** Let *H* be any online algorithm and *I* be a job instance provided by the adversary. In the instance *I*, all the jobs have a deterioration rate of *α*.

At time *t*0, *m* jobs *J*1, *J*2, ··· , *Jm* from different families arrive. Suppose that job *Jj* starts processing at time *sj* in *σ*, *j* = 1, 2, ··· , *m*.

If a job *Jk* exists such that *sk* ≥ (1 + *α*)*t*0, where 1 ≤ *k* ≤ *m*, then the adversary does not release other jobs. Hence,

$$\mathcal{C}\_{\max}(\sigma) \ge (1+\mathfrak{a})s\_k \ge (1+\mathfrak{a})^2 t\_0 \text{ and } \mathcal{C}\_{\max}(\pi) = (1+\mathfrak{a})t\_0.$$

We have *C*max(*σ*)/*C*max(*π*) ≥ 1 + *α* = 1 + *α*max.

If for each job *Jj* with 1 ≤ *j* ≤ *m*, *sj* < (1 + *α*)*t*0, let *Jl* ∈ {*J*1, *J*2, ··· , *Jm*} is the last starting job. At time *sl* + , a copy of the job *Jj*( *j* = 1, 2, ··· , *m*) arrives. We have:

$$\mathbb{C}\_{\max}(\sigma) \ge (1+\kappa)^2 s\_l \text{ and } \mathbb{C}\_{\max}(\pi) = (1+\kappa)(s\_l + \epsilon).$$

Hence, *C*max(*σ*)/*C*max(*π*) ≥ (1 + *α*)*sl*/(*sl* + ) → 1 + *α* = 1 + *α*max, as → 0. The result follows.

Before providing the online algorithm, we define some notations used in the following:

*U*(*t*): the set of the unprocessed jobs at time *t*.

*α*max(*t*): the maximum deterioration rate of the jobs arrived at *t* or before *t*.

*m*(*t*): the number of the idle machines at time *t*.

*f*(*t*): the number of job families in *U*(*t*) at time *t*.

*Bi*(*t*): the nonempty set of the unprocessed jobs of the same family at time *t*, where 1 ≤ *i* ≤ *f*(*t*).

*Ji* (*t*): the job with the maximum deterioration rate in *Bi*(*t*), where 1 ≤ *i* ≤ *f*(*t*).

*αi* (*t*): the deterioration rate of the job *J<sup>i</sup>* (*t*), where 1 ≤ *i* ≤ *f*(*t*).

Without loss of generality, assume that *<sup>α</sup>*1(*t*) <sup>≥</sup> *<sup>α</sup>*2(*t*) ≥ ··· ≥ *<sup>α</sup>f*(*t*)(*t*). The online algorithm, called *A*<sup>2</sup> (Algorithm 2), can be stated as follows.


Input: Job instance *I*. **do** Step 0: Set *t* = *t*0. Step 1: If *U*(*t*) = ∅, then go to Step 6. Step 2: If *m*(*t*) = *m*, and *t* ≥ (1 + *α*max(*t*))*t*0, then at time *t*, start *Bi*(*t*) as a single batch on the idle machine for any *<sup>i</sup>* <sup>=</sup> 1, 2, ··· , *<sup>f</sup>*(*t*). Reset *<sup>t</sup>* = (<sup>1</sup> <sup>+</sup> *<sup>α</sup>f*(*t*)(*t*))*t*. Go to Step 1. Step 3: If *m*(*t*) = *m*, and *t* < (1 + *α*max(*t*))*t*0, then reset *t* = *t* ∗, such that *t* ∗ is either the arrival time of the next job or (1 + *α*max(*t*))*t*0. Go to Step 1. Step 4: If *<sup>m</sup>*(*t*) <sup>&</sup>lt; *<sup>m</sup>*, and *<sup>t</sup>* <sup>≥</sup> (<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*t*))(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*1(*t*))*t*0, then at time *<sup>t</sup>*, start *Bi*(*t*) as a single batch on the idle machine for any *i* = 1, 2, ··· , min{*m*(*t*), *f*(*t*)}. Reset *t* = *t* ∗, such that *t* ∗ is either the arrival time of the next job or (1 + *α*min{*m*(*t*), *<sup>f</sup>*(*t*)}(*t*))*t*. Go to Step 1. STEP 5: If *m*(*t*) < *m*, and *t* < (1 + *α*max(*t*))(1 + *α*1(*t*))*t*0, then reset *t* = *t* ∗, such that either *t* ∗ is the arrival time of the next job or *m*(*t* ∗) > *m*(*t*), or *t* <sup>∗</sup> = (1 + *α*max(*t*))(1 + *α*1(*t*))*t*0. Step 6: If new jobs arrive after *t*, then reset *t* as the arrival time of the first new job. Go to Step 1. Output: Job schedule *σ*.

**Example 2.** *To make the algorithm more intuitive, we present an instance* I<sup>2</sup> *in Table 2. Figure 2 depicts the schedule generated by Algorithm 2 and Figure 3 is an optimal offline schedule for* I2*.*

*We have C*max(*σ*) = 12 *and C*max(*π*) = 8*.*


**Table 2.** Instance I2.

**Figure 2.** Schedule generated by *A*<sup>2</sup> for Instance I2.

**Figure 3.** Optimal offline schedule for Instance I2.

Suppose that Algorithm 2 generates *n* batches *B*1, *B*2, ··· *Bn*. For batch *Bi*, we define some notations in the following:

*Ji*: the job with the maximum deterioration rate in *Bi*.

*αi*: the deterioration rate of *Ji* or the deterioration rate of *Bi*.

*ri*: the arrival time of *Ji*.

*si*: the starting time of *Bi* in *σ*, suppose that *s*<sup>1</sup> ≤ *s*<sup>2</sup> ≤···≤ *sn*.

The following is the competition ratio analysis of the Algorithm 2.

Let *Bl* be the first batch in *σ* assuming the objective value. *Bi* is a regular batch if *si* = max{(1 + *<sup>α</sup>*max(*si*))*t*0,*ri*} or max{(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*si*))*t*0,*ri*} <sup>&</sup>lt; *si* <sup>≤</sup> (<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*si*))(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*1(*si*))*t*0.

**Lemma 3.** *Suppose that only one job Ji exists in batch Bi of σ, i* = 1, 2, ··· , *n, then the value of C*max(*σ*)/*C*max(*π*) *does not decrease.*

**Proof.** From Algorithm 2, the start time of batch *Bi* is only related to the maximum deterioration rate of the jobs in this batch and the maximum deterioration rate of all jobs that have arrived. So, the value of *C*max(*σ*) does not change when we assume each batch *Bi* has only one job *Ji*. The reduction in the number of jobs may decrease the value of *C*max(*π*), so the value of *C*max(*σ*)/*C*max(*π*) does not decrease.

In the following, we assume that only one job *Ji* exists in batch *Bi* of *σ*, *i* = 1, 2, ··· , *n*. Per Lemma 3, this does not influence the competition ratio analysis of Algorithm 2.

**Lemma 4.** *α<sup>l</sup>* = *α*1(*sl*)*.*

**Proof.** Obviously, *<sup>α</sup><sup>l</sup>* <sup>≤</sup> *<sup>α</sup>*1(*sl*). If *<sup>α</sup><sup>l</sup>* <sup>&</sup>lt; *<sup>α</sup>*1(*sl*), since *<sup>J</sup>*1(*sl*) <sup>∈</sup> *<sup>U</sup>*(*sl*), then

$$\mathcal{C}\_{\max}(\sigma) \ge (1 + \mathfrak{a}^1(s\_l))s\_l > (1 + \mathfrak{a}\_l)s\_l.$$

This contradicts the completion time of *Bl* being the maximum completion time. Hence, *α<sup>l</sup>* = *α*1(*sl*).

**Lemma 5.** *If the batch Bl is a regular batch, then C*max(*σ*)/*C*max(*π*) ≤ 1 + *α*max*.*

**Proof.** Since *Bl* is a regular batch, then

$$s\_l = \max\{ (1 + \kappa\_{\max}(s\_l)) t\_{0\prime} r\_l \}\_{\prime l}$$

or

$$\max\{ (1 + \mathfrak{a}\_{\max}(s\_l))t\_0, r\_l \} < s\_l \le (1 + \mathfrak{a}\_{\max}(s\_l))(1 + \mathfrak{a}^1(s\_l))t\_0.$$

**Case 1** *sl* = max{(1 + *α*max(*sl*))*t*0,*rl*}.

Then

$$\begin{aligned} \mathsf{C}\_{\mathsf{max}}(\sigma) &= \quad (1 + \mathfrak{a}\_{l})s\_{l} \\ &= \quad \max\{ (1 + \mathfrak{a}\_{l})(1 + \mathfrak{a}\_{\max}(s\_{l}))t\_{0}, (1 + \mathfrak{a}\_{l})r\_{l} \} \\ &\leq \quad (1 + \mathfrak{a}\_{\max}) \max\{ (1 + \mathfrak{a}\_{l})t\_{0}, r\_{l} \} \\ &\leq \quad (1 + \mathfrak{a}\_{\max}) \mathsf{C}\_{\mathsf{max}}(\pi). \end{aligned}$$

**Case 2** max{(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*sl*))*t*0,*rl*} <sup>&</sup>lt; *sl* <sup>≤</sup> (<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*sl*))(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*1(*sl*))*t*0.

In this case, at time *sl*, some batches must have a start time less than *sl* being processed. Let *Ba* be the last such batch to start, then *sa* < *sl* ≤ (1 + *αa*)*sa*. Hence,

$$\mathbb{C}\_{\text{max}}(\sigma) = (1 + a\_l)s\_l \le (1 + a\_l)(1 + a\_d)s\_d. \tag{5}$$

Suppose that *rl* ≤ *sa*. Since *sl* > *sa*, the batch with a larger deterioration rate has higher priority in *<sup>σ</sup>*, then *<sup>α</sup><sup>l</sup>* <sup>≤</sup> *<sup>α</sup><sup>a</sup>* <sup>≤</sup> *<sup>α</sup>*1(*sa*) per Algorithm 2. At time *sa*, *Jl* does not start processing. This indicates that there is no machine that can process *Jl* at time *sa*, i.e., *m*(*sa*) < *f*(*sa*) ≤ *m*. From Algorithm 2, we know that *sa* <sup>≥</sup> (<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*sa*))(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*1(*sa*))*t*0. By Lemma 4, we have *<sup>α</sup><sup>l</sup>* <sup>=</sup> *<sup>α</sup>*1(*sl*). Hence,

$$
\mathfrak{a}^1(\mathfrak{s}\_a) \ge \mathfrak{a}\_a \ge \mathfrak{a}\_l = \mathfrak{a}^1(\mathfrak{s}\_l).
$$

By the definition of *Ba*, we have *α*max(*sa*) = *α*max(*sl*), so

$$s\_a \ge (1 + a\_{\max}(s\_a))(1 + a^1(s\_a))t\_0 \ge (1 + a\_{\max}(s\_l))(1 + a^1(s\_l))t\_0 \ge s\_l.$$

This contradicts *sa* < *sl*. Hence *rl* > *sa*. Thus, *C*max(*π*) ≥ (1 + *αl*)*rl* > (1 + *αl*)*sa*. From Equation (5), we have

$$
\mathbb{C}\_{\max}(\sigma) / \mathbb{C}\_{\max}(\pi) < 1 + \kappa\_a \le 1 + \kappa\_{\max}.
$$

In the following, we discuss the case where *Bl* is not a regular batch. This implies that no machine is idle immediately before time *sl*, where *sl* <sup>&</sup>gt; max{(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max(*sl*))(<sup>1</sup> <sup>+</sup> *<sup>α</sup>*1(*sl*)*t*0,*rl*}. Renumber the *<sup>m</sup>* last batches starting on the *m* machines before time *sl* to *Bl*,1, *Bl*,2, ··· , *Bl*,*m*, such that *sl*,1 ≤ *sl*,2 ≤···≤ *sl*,*m*. By Lemma 4, we have *α<sup>l</sup>* = *α*1(*sl*). So,

$$\mathcal{C}\_{\text{max}}(\sigma) = (1 + a\_l)s\_l \le (1 + a\_l) \min\_{1 \le j \le m} \{ (1 + a\_{l,j})s\_{l,j} \}. \tag{6}$$

If *sl*,1 = *sl*,2 = ··· = *sl*,*<sup>k</sup>* = ··· = *sl*,*<sup>m</sup>* < *sl*, then *Jl*,1, *Jl*,2, ··· , *Jl*,*<sup>m</sup>* belong to *m* different job families and one of them belongs to the same family with *Jl*. Then *rl* > *sl*,1 and *C*max(*π*) ≥ (1 + *αl*)*rl* > (1 + *αl*)*sl*,1. From Equation (6), we have:

$$C\_{\max}(\sigma) \le (1 + a\_l) \min\_{1 \le j \le m} \{ (1 + a\_{l,j}) s\_{l,1} \} < \min\_{1 \le j \le m} (1 + a\_{l,j}) \le 1 + a\_m.$$

In the following, we suppose that *sl*,*<sup>i</sup>* < *sl*,*i*+<sup>1</sup> for some *i* ∈ {1, 2, ··· , *m* − 1}. Let *k* be the index that satisfies *sl*,1 = *sl*,2 = ··· = *sl*,*<sup>k</sup>* < *sl*,*k*+<sup>1</sup> ≤ ··· ≤ *sl*,*<sup>m</sup>* < *sl*, then *αl*,1 ≥ *αl*,2 ≥ ··· ≥ *αl*,*<sup>k</sup>* and *Jl*,1 <sup>=</sup> *<sup>J</sup>*1(*sl*,1). If *<sup>k</sup>* <sup>≥</sup> 2, then we observe that any two jobs from {*Jl*,1, *Jl*,2, ··· , *Jl*,*k*} belong to different job families. Define

$$I\_1 = \{J\_{l,1}, J\_{l,2}, \dots, J\_{l,k}\} \text{ and } I\_2 = \{J\_{l,k+1}, \dots, J\_{l,m}\}.$$

**Lemma 6.** *For any job Jl*,*<sup>j</sup>* ∈ *I*2*, we have sl*,*<sup>j</sup>* ≥ (1 + *α*max(*sl*,*j*))(1 + *αl*,*j*)*t*0*.*

**Proof.** Since *sl*,1 = *sl*,2 = ··· = *sl*,*<sup>k</sup>* < *sl*,*k*+<sup>1</sup> ≤··· ≤ *sl*,*<sup>m</sup>* < *sl*, there is no idle machine immediately before time *sl*, and *Bl*,1, *Bl*,2, ··· , *Bl*,*<sup>m</sup>* is the *m* last batches starting on the *m* machines before time *sl*, then *m*(*t*) < *m* for any time *t* ∈ [*sl*,*k*<sup>+</sup>1,*sl*,*m*]. From Algorithm 2, we have: *sl*,*<sup>j</sup>* ≥ (1 + *α*max(*sl*,*j*))(1 + *αl*,*j*)*t*<sup>0</sup> for any job *Jl*,*<sup>j</sup>* ∈ *I*2.

**Lemma 7.** *If rl* > *sl*,*k*+1*, then C*max(*σ*)/*C*max(*π*) ≤ 1 + *α*max*.*

**Proof.** Since *rl* > *sl*,*k*<sup>+</sup>1, then *C*max(*π*) ≥ (1 + *αl*)*rl* > (1 + *αl*)*sl*,*k*<sup>+</sup>1. From Equation (6), we have:

$$\mathbb{C}\_{\text{max}}(\sigma) \le (1 + \mathfrak{a}\_I) \min\_{1 \le j \le m} \{ (1 + \mathfrak{a}\_{l,j}) \mathfrak{s}\_{l,j} \} \le (1 + \mathfrak{a}\_I)(1 + \mathfrak{a}\_{l,k+1}) \mathfrak{s}\_{l,k+1}.$$

Hence,

$$
\mathbb{C}\_{\max}(\sigma) / \mathbb{C}\_{\max}(\pi) < 1 + \kappa\_{l,k+1} \le 1 + \kappa\_{\max}.
$$

**Lemma 8.** *If rl* ≤ *sl*,*k*+1*, then C*max(*σ*)/*C*max(*π*) ≤ 1 + *α*max*.*

**Proof.** Since *rl* ≤ *sl*,*k*<sup>+</sup>1, from Algorithm 2, we have:

$$
\alpha\_I \le \min \{ \alpha\_{I,j} | I\_{l,j} \in I\_2 \}. \tag{7}
$$

If a job *Jl*,*<sup>h</sup>* ∈ *I*2\{*Jl*,*k*+1} exists such that *rl*,*<sup>h</sup>* > *sl*,*k*<sup>+</sup>1, then from Equation (7), we obtain:

$$\mathcal{C}\_{\max}(\pi) \ge (1 + \kappa\_{l,h})r\_{l,h} > (1 + \kappa\_{l,h})s\_{l,k+1} \ge (1 + \kappa\_l)s\_{l,k+1} - 1$$

From Equation (6), we have:

$$\mathcal{C}\_{\text{max}}(\sigma) \le (1 + \mathfrak{a}\_l) \min\_{1 \le j \le m} \{ (1 + \mathfrak{a}\_{l,j}) \mathfrak{s}\_{l,j} \} \le (1 + \mathfrak{a}\_l)(1 + \mathfrak{a}\_{l,k+1}) \mathfrak{s}\_{l,k+1}.$$

Hence,

$$
\mathbb{C}\_{\max}(\sigma) / \mathbb{C}\_{\max}(\pi) \prec 1 + \kappa\_{l,k+1} \le 1 + \kappa\_{\max}.
$$

Suppose that, for any job *Jl*,*<sup>h</sup>* ∈ *I*2\{*Jl*,*k*+1}, *rl*,*<sup>h</sup>* ≤ *sl*,*k*<sup>+</sup>1. Since *rl*,*k*+<sup>1</sup> ≤ *sl*,*k*+<sup>1</sup> and *rl* ≤ *sl*,*k*<sup>+</sup>1, then the arrival time of all jobs from *I*<sup>2</sup> {*Jl*} is less than *sl*,*k*<sup>+</sup>1. Thus, any two jobs from *<sup>I</sup>*<sup>2</sup> {*Jl*} belong to distinct job families.

**Claim** At least one job in *I*<sup>2</sup> {*Jl*} has an arrival time greater than *sl*,*k*.

Otherwise, if the arrival time of all jobs is less than or equal to *sl*,*k*, then all jobs in *I*<sup>1</sup> *I*<sup>2</sup> {*Jl*} are available at time *sl*,1, and each job independently forms a batch in *σ*. We obtain that every two jobs from *I*<sup>1</sup> *I*<sup>2</sup> {*Jl*} belong to distinct job families. Since *<sup>I</sup>*<sup>1</sup> *I*<sup>2</sup> {*Jl*} = {*Jl*,1, *Jl*,2, ··· , *Jl*,*m*} {*Jl*}, then *f*(*sl*,1) = *m* + 1 > *m*. This contradicts *f*(*sl*,1) ≤ *m*. The claim follows.

Since at least one job from *I*<sup>2</sup> {*Jl*} arrives after *sl*,*k*, from Equation (7), we have:

$$\mathcal{C}\_{\text{max}}(\pi) > (1 + \alpha\_l)\mathbf{s}\_{l,k}.$$

From Equation (6), we have:

$$\mathcal{C}\_{\max}(\sigma) \le (1 + \alpha\_l) \min\_{1 \le j \le m} \{ (1 + \alpha\_{l,j}) s\_{l,j} \} \le (1 + \alpha\_l)(1 + \alpha\_{l,k}) s\_{l,k} \dots$$

Hence,

$$\mathcal{C}\_{\max}(\sigma) / \mathcal{C}\_{\max}(\pi) < 1 + \alpha\_{l,k} \le 1 + \kappa\_{\max}.$$

From Lemmas 5, 7 and 8, and Theorem 3, we obtain the following theorem.

**Theorem 4.** *For problem Pm*|*online,rj,p-batch*, *b* = ∞,*m-family*, *pj* = *αjt*|*C*max*, Algorithm 2 has a competitive ratio of* 1 + *α*max *and is the best possible.*

#### **4. Conclusions and Future Research**

In this paper, we outlined two best possible online algorithms. The first algorithm for problem 1|online,*rj*,p-batch, *b* = ∞,f-family, *pj* = *αjt*|*C*max is a simple delay algorithm. We obtained the delay time by analyzing the properties of the unprocessed jobs, providing the best possible online algorithm with the competitive ratio of (<sup>1</sup> <sup>+</sup> *<sup>α</sup>*max)*<sup>f</sup>* . The second algorithm for problem *Pm*|online,*rj*,p-batch, *<sup>b</sup>* <sup>=</sup> ∞,*m*-family, *pj* = *αjt*|*C*max is a more complex delay algorithm. We obtained the different delay times depending on the number of idle machines and provide the best possible online algorithm with the competitive ratio of 1 + *α*max. The results are shown in Table 3.



In future research, the general linear deterioration effect, such as *pj* = *αjsj* + *βj*, is worthy of research. In additional, for the online scheduling problem on *m* parallel machines with linear deteriorating jobs to minimize the makespan, Yu et al. [22] only proved that no deterministic online algorithm is better than (1 + *α*max)-competitive when *m* = 2, where *α*max is the maximum deterioration rate of all jobs. However, no best possible online algorithm has been reported. This is also a topic for further study.

**Author Contributions:** Conceptualization, methodology and funding acquisition, W.L.; formal analysis and writing-original draft preparation, L.W.; writing—review, supervision and project administration, W.L. and X.C.; investigation, H.Y. All authors have read and agreed to the published version of the manuscript.

**Funding:** Research supported by NSFC (Nos. 11571321,11971443 and 11771406).

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **References**


c 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
