**Algorithm** *H*<sup>2</sup>

At current time *t*, if some machine is idle, *U*(*t*) = ∅, when *t* ≥ (1 + *βm*)*r*max(*t*) + *βm*; then, start the jobs in *U*(*t*) as a batch on the idle machine that has the minimum number of batches at the moment. Otherwise, do nothing but wait.

Following the notation in Zhang et al. [3], we also call batches that start at (1 + *βm*)*r*max(*t*) + *β<sup>m</sup>* regular batches. From Lemma 1 of Zhang et al. [3], we have

**Lemma 2.** *All batches generated by algorithm H*<sup>1</sup> *and H*<sup>2</sup> *are regular batches.*

**Lemma 3.** *When cij* = *a* + *cj, Then, MMC*(*π*) = *a* + *c*max*; When cij* = *a* · *cj, then MMC*(*π*) = *a* · *c*max*.*

**Proof.** The offline optimal objective case of the maximum machine cost *MMC* is: all jobs can form one batch starting at the last arrival time on an arbitrary machine. Thus, when *cij* = *a* + *cj*, the maximum machine cost is *MMC*(*π*) = *a* + *c*max; when *cij* = *a* · *cj*, the maximum machine cost is *MMC*(*π*) = *a* · *c*max.

**Theorem 2.** *For problem Pm*|*online*, *p* − *batch*, *b* = ∞, *pj* = 1|*Lex*(*C*max, *MMC*)*, when cij* = *a* + *cj or cij* <sup>=</sup> *<sup>a</sup>* · *cj,* <sup>1</sup> <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *m,* <sup>1</sup> <sup>≤</sup> *<sup>j</sup>* <sup>≤</sup> *n, algorithm <sup>H</sup>*<sup>1</sup> *is a best possible online algorithm with a competitive ratio of* (<sup>1</sup> <sup>+</sup> *<sup>β</sup>m*, *<sup>n</sup> <sup>m</sup>* )*.*

**Proof.** When *cij* = *a* + *cj*, suppose that the schedule generated by algorithm *H*<sup>1</sup> is *σ* <sup>1</sup>. From Lemmas 1 and 2, we can know that

$$\mathbb{C}\_{\max}(\sigma\_1') = (1 + \beta\_m)r\_{\max} + \beta\_m + 1 = (1 + \beta\_m)(r\_{\max} + 1) \le (1 + \beta\_m)\mathbb{C}\_{\max}(\pi).$$

In the following, we prove *MMC*(*σ* <sup>1</sup>) ≤ *<sup>n</sup> <sup>m</sup>* · *MMC*(*π*). Suppose, in *σ* <sup>1</sup>, that the machine *Mx* has the maximum machine cost, Then,

$$\text{MMC}(\sigma\_1') = \mathcal{c}\_{M\_x}.\tag{2}$$

We distinguish the following cases:

**Case** 1 The number of batches on machine *Mx* is no more than *<sup>n</sup> <sup>m</sup>* . Thus,

$$c\_{M\_x} \le \left\lceil \frac{n}{m} \right\rceil \cdot a + \sum\_{1 \le I \le \left\lceil \frac{n}{m} \right\rceil} c\_{B\_{l\_X}},$$

$$\le \quad \left\lceil \frac{n}{m} \right\rceil \cdot (a + c\_{\text{max}}).$$

In addition, by (2), we have

$$MMC(\sigma\_1') = c\_{M\_x} \le \lceil \frac{n}{m} \rceil \cdot (a + c\_{\text{max}}) .$$

From Lemma 3, we get

$$M\text{MC}(\sigma\_1') \le \lceil \frac{n}{m} \rceil \cdot M\text{MC}(\pi).$$

**Case** 2 The number of batches on machine *Mx* is more than *<sup>n</sup> <sup>m</sup>* . Thus, there must be one machine that has less than *<sup>n</sup> <sup>m</sup>* batches. Suppose machine *Mx* is the machine that has less than *<sup>n</sup> <sup>m</sup>* batches; let *By* be the last batch to process on machine *Mx*.

Firstly, if machine *Mx* is idle directly before *sy*, let the total cost of batches that start before *sy* on *Mx* be *V*1. From algorithm *H*1, because the number of batches on machine *Mx* is no more than *n <sup>m</sup>* − 1, so

$$V\_1 \le \left( \lceil \frac{n}{m} \rceil - 1 \right) \cdot a + \sum\_{1 \le l \le \lceil \frac{n}{m} \rceil - 1} c\_{B\_{l\_{\chi^l}}}.\tag{3}$$

Moreover, from algorithm *H*1, the total cost of batches that start before *sy* on machine *Mx* is not greater than the total cost of batches start before *sy* on machine *Mx* , that is

$$c\_{M\_x} - (a + c\_{B\_y}) \le V\_{1\nu}$$

then from (3), we have

$$\begin{aligned} \mathcal{L}\_{M\_x} &\leq \quad \mathcal{V}\_1 + (a + c\_{B\_y}) \\ &\leq \quad (\lceil \frac{n}{m} \rceil - 1) \cdot a + \sum\_{1 \leq l \leq \lceil \frac{n}{m} \rceil - 1} c\_{B\_{l\_{x'}}} + (a + c\_{B\_y}) \\ &\leq \quad \lceil \frac{n}{m} \rceil \cdot a + (\lceil \frac{n}{m} \rceil - 1) \cdot c\_{\max} + c\_{\max} \\ &= \quad \lceil \frac{n}{m} \rceil \cdot (a + c\_{\max}) .\end{aligned}$$

In addition, by (2), we have

$$\text{MMC}(\sigma\_1') = c\_{M\_x} \le \lceil \frac{n}{m} \rceil \cdot (a + c\_{\text{max}}).$$

Lemma 3 shows that

$$\text{MMC}(\sigma'\_1) \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

Secondly, if machine *Mx* is busy directly before *sy*, let *By* be the last batch that is on machine *Mx* such that machine *Mx* is idle directly before *sy* . Supposing that there are *k* batches between *By* and *By* , we denote them as *B* <sup>1</sup>, *B* <sup>2</sup>, ··· , *B k*.

**Claim** *By* must exist and is not the first batch on *Mx*.

Otherwise, *By* does not exist or it is the first batch on *Mx*. This means that machine *Mx* is busy when *<sup>B</sup>*2*<sup>x</sup>* , *<sup>B</sup>*3*<sup>x</sup>* ,··· start on machine *Mx*. Since the number of batches on machine *Mx* is more than *<sup>n</sup> <sup>m</sup>* , the number of batches on machine *Mx* must be not less than *<sup>n</sup> <sup>m</sup>* , contradicting the assumption that the number of batches on machine *Mx* is less than *<sup>n</sup> <sup>m</sup>* . Thus, the claim holds.

Let the total cost of batches start before *sy* on machine *Mx* be *V*2. Then, from the definition of *By* and *Mx* , the number of batches that start before *sy* on machine *Mx* is no more than *<sup>n</sup> <sup>m</sup>* − (*k* + 2). Thus,

$$\begin{aligned} \left| V\_2 \right| &\leq \quad \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot a + \sum\_{1 \leq l \leq \lceil \frac{n}{m} \rceil - (k+2)} c\_{B\_{l\_{\mathbf{x'}}}} \\ &\leq \quad \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot a + \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot c\_{\max} \\ &= \quad \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot (a + c\_{\max}). \end{aligned}$$

That is,

$$V\_2 \le \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot (a + c\_{\max}).\tag{4}$$

Furthermore, by algorithm *H*1, the total cost of batches starting before *sy* on machine *Mx* is not greater than the total cost of batches starting before *sy* on machine *Mx* , then

$$c\_{M\_x} - (a + c\_{B\_y}) - (k \cdot a + \sum\_{1 \le l \le k} c\_{B\_l'}) - (a + c\_{B\_{y'}}) \le V\_2.$$

Thus, from (4), we know that

$$\begin{aligned} \mathfrak{c}\_{M\_3} &\leq \quad & \mathbb{V}\_2 + (a + c\_{B\_{\mathbf{y'}}}) + (k \cdot a + \sum\_{1 \leq I \leq k} c\_{B\_I^c}) + (a + c\_{B\_{\mathbf{y}}})\\ & \leq \quad & \left[ \lceil \frac{n}{m} \rceil - (k + 2) \right] \cdot (a + c\_{\max}) + (a + c\_{\max}) + (k \cdot a + k \cdot c\_{\max}) + (a + c\_{\max})\\ & = \quad & \lceil \frac{n}{m} \rceil \cdot (a + c\_{\max}). \end{aligned}$$

In addition, by (2), we have

$$MMC(\sigma\_1') = c\_{M\_x} \le \lceil \frac{n}{m} \rceil \cdot (a + c\_{\text{max}}) .$$

Lemma 3 shows that

$$M\text{MC}(\sigma'\_1) \le \lceil \frac{n}{m} \rceil \cdot M\text{MC}(\pi).$$

We know that *k* ≥ 1. When *k* = 0, similar to the above discussion, the conclusion also holds.

When *cij* <sup>=</sup> *<sup>a</sup>* · *cj*, suppose the schedule produced by algorithm *<sup>H</sup>*<sup>1</sup> is *<sup>σ</sup>* <sup>1</sup> . From Lemmas 1 and 2, we obtain that *C*max(*σ* <sup>1</sup> ) ≤ (1 + *βm*)*C*max(*π*). In the following, we want to prove that *MMC*(*σ* <sup>1</sup> ) ≤ *<sup>n</sup> <sup>m</sup>* · *MMC*(*π*). Supposing that machine *Mw* has maximum machine cost in *σ* <sup>1</sup> , Then,

$$\text{MMC}(\sigma\_1^{\prime\prime}) = \mathfrak{c}\_{M\_W}.\tag{5}$$

We distinguish the following cases:

**Case** 3 The number of batches is no more than *<sup>n</sup> <sup>m</sup>* on machine *Mw*. Then,

$$\begin{aligned} \mathcal{L}\_{M\_w} &\leq \sum\_{1 \leq I \leq \lceil \frac{H}{m} \rceil} (\boldsymbol{a} \cdot \boldsymbol{c}\_{B\_{l\_W}}) \\ &= \boldsymbol{a} \cdot \sum\_{1 \leq I \leq \lceil \frac{H}{m} \rceil} \boldsymbol{c}\_{B\_{l\_W}} \\ &\leq \quad \lceil \frac{H}{m} \rceil \cdot \boldsymbol{a} \cdot \boldsymbol{c}\_{\text{max}}. \end{aligned}$$
 
$$\mathcal{L}\_{M\_w} \leq \lceil \frac{H}{m} \rceil \cdot \boldsymbol{a} \cdot \boldsymbol{c}\_{\text{max}}. \tag{6}$$

Thus,

$$\text{MMC}(\sigma\_1^{\prime\prime}) = c\_{M\_{\text{uv}}} \le \lceil \frac{n}{m} \rceil \cdot (a \cdot c\_{\text{max}}) .$$

Lemma 3 shows that

From (5) and (6), we have

$$\text{MMC}(\sigma\_1'') \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

**Case** 4 The number of batches is more than *<sup>n</sup> <sup>m</sup>* on machine *Mw*. Thus, there must be one machine that has fewer than *<sup>n</sup> <sup>m</sup>* batches. Supposing that machine *Mw* is the machine for which the number of batches on it is less than *<sup>n</sup> <sup>m</sup>* , let *Bz* be the last batch to process on machine *Mw*.

If machine *Mw* is idle directly before *sz*, we denote the total cost of batches start before *sz* on machine *Mw* as *V* <sup>1</sup>, by algorithm *<sup>H</sup>*<sup>1</sup> because the number of batches on machine *Mw* is no more than *n <sup>m</sup>* − 1, hence

$$V\_1' \le a \cdot \sum\_{1 \le l \le \lceil \frac{n}{M} \rceil - 1} c\_{B\_{l\_{w'}}}.\tag{7}$$

Furthermore, by algorithm *H*1, the total cost of batches starting before *sz* on machine *Mw* is not greater than the total cost of batches starting before *sz* on machine *Mw* ; then,

$$c\_{M\_{\overline{w}}} - (a \cdot c\_{B\_{\overline{z}}}) \le V\_1'.$$

From (7), we have

$$\begin{aligned} \mathfrak{c}\_{M\_w} &\leq \quad & V'\_1 + a \cdot \mathfrak{c}\_{B\_z} \\ &\leq \quad & a \cdot \sum\_{1 \leq l \leq \lceil \frac{n}{m} \rceil - 1} \mathfrak{c}\_{B\_{l\_{w'}}} + a \cdot \mathfrak{c}\_{B\_z} \\ &\leq \quad & a \cdot (\lceil \frac{n}{m} \rceil - 1) \cdot \mathfrak{c}\_{\max} + a \cdot \mathfrak{c}\_{\max} \\ &= \quad & a \cdot \lceil \frac{n}{m} \rceil \cdot \mathfrak{c}\_{\max} .\end{aligned}$$

In addition, by (6), we have

$$\text{MMC}(\sigma\_1'') = c\_{M\_w} \le \lceil \frac{n}{m} \rceil \cdot a \cdot c\_{\text{max}}.$$

Lemma 3 shows that

$$\text{MMC}(\sigma\_1'') \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

If machine *Mw* is busy directly before *sz*, let *Bz* be the last batch on machine *Mw* such that machine *Mw* is idle directly before *sz* . Similarly, suppose there are *k* batches between *Bz* and *Bz*, we denote them as *B* <sup>1</sup>, *B* <sup>2</sup>, ··· , *B <sup>k</sup>*. From the discussion of case 2 in *cij* = *a* + *cj* situation, such *Bz* must exist and is not the first batch on *Mw*. Denoting the total cost of batches starting before *sz* on machine *Mw* is *V* <sup>2</sup>; thus, by the definition of *Bz* and *Mw* , the number of batches starting before *sz* on machine *Mw* is no more than *<sup>n</sup> <sup>m</sup>* − (*k* + 2). Then,

$$\begin{aligned} V\_2' &\leq \sum\_{1 \leq l \leq \lceil \frac{\mathfrak{m}}{m} \rceil - (k+2)} a \cdot \mathfrak{c}\_{B\_{l\_{\mathfrak{m}'}}} \\ &= \| a \cdot \sum\_{1 \leq l \leq \lceil \frac{\mathfrak{m}}{m} \rceil - (k+2)} \mathfrak{c}\_{B\_{l\_{\mathfrak{m}'}}} \\ &\leq \| a \cdot \lceil \lceil \frac{\mathfrak{m}}{m} \rceil - (k+2) \| \cdot \mathfrak{c}\_{\max} .\end{aligned}$$

Thus,

$$
\lambda V\_2' \le a \cdot \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot c\_{\max} \tag{8}
$$

Moreover, by algorithm *H*1, the total cost of batches starting before *sz* on machine *Mw* is not greater than the total cost of batches starting before *sz* on machine *Mw* , so

$$
\mathcal{c}\_{M\_{\mathcal{U}}} - (a \cdot \mathcal{c}\_{B\_{\mathcal{X}}}) - (a \cdot \sum\_{1 \le l \le k} \mathcal{c}\_{B\_l'}) - (a \cdot \mathcal{c}\_{B\_{z'}}) \le V\_2'.
$$

Therefore, from (8), we get

$$\begin{aligned} \mathfrak{c}\_{M\_{\mathcal{U}}} &\leq \quad & V\_{2}^{\prime} + a \cdot \mathfrak{c}\_{B\_{\underline{x}^{\prime}}} + a \cdot \sum\_{1 \leq l \leq k} \mathfrak{c}\_{B\_{l}^{\prime}} + a \cdot \mathfrak{c}\_{B\_{\underline{z}}} \\ &\leq \quad & a \cdot \left[ \lceil \frac{n}{m} \rceil - (k+2) \right] \cdot \mathfrak{c}\_{\max} + a \cdot \mathfrak{c}\_{\max} + a \cdot k \cdot \mathfrak{c}\_{\max} + a \cdot \mathfrak{c}\_{\max} \\ &= \quad & \lceil \frac{n}{m} \rceil \cdot a \cdot \mathfrak{c}\_{\max} .\end{aligned}$$

In addition, by (6), we have

$$MMC(\sigma\_1^{\prime\prime}) = c\_{M\_w} \le \lceil \frac{n}{m} \rceil \cdot (a \cdot c\_{\max})\,.$$

Lemma 3 shows that

$$\text{MMC}(\sigma\_1'') \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

We know that *k* ≥ 1. When *k* = 0, similar to the above discussion, the conclusion also holds. Overall, for problem *P*m|online, *p* − batch, *b* = ∞, *pj* = 1|*Lex*(*C*max, *MMC*), when *cij* = *a* + *cj* or *cij* <sup>=</sup> *<sup>a</sup>* · *cj*, 1 <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>m</sup>*, 1 <sup>≤</sup> *<sup>j</sup>* <sup>≤</sup> *<sup>n</sup>*, algorithm *<sup>H</sup>*<sup>1</sup> is a (<sup>1</sup> <sup>+</sup> *<sup>β</sup>m*, *<sup>n</sup> <sup>m</sup>* )-competitive online algorithm. Combining theorem 1, we obtain that algorithm *H*<sup>1</sup> is a best possible online algorithm.

**Lemma 4.** *In algorithm H*2*, there are at most <sup>n</sup> <sup>m</sup> batches on each machine.*

**Proof.** When *n* ≤ *m*, there is at most one batch on each machine, so the conclusion holds naturally. When *<sup>n</sup>* <sup>&</sup>gt; *<sup>m</sup>*, suppose, after the *<sup>k</sup>*th batch has been processed, that there are at most *<sup>k</sup> <sup>m</sup>* batches on each machine, and *m* ≤ *k* ≤ *n* − 1. In the following, we have an induction on *k*, to prove that, after the

(*<sup>k</sup>* <sup>+</sup> <sup>1</sup>)th batch has been processed, there are at most *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* batches on each machine. The batches are denoted by *B*1, *B*2, ··· , such that *s*<sup>1</sup> < *s*<sup>2</sup> < ··· .

**Case** <sup>1</sup> *<sup>k</sup>* <sup>=</sup> *qm* <sup>+</sup> *<sup>l</sup>*, and 1 <sup>≤</sup> *<sup>q</sup>* ≤ *<sup>n</sup> <sup>m</sup>* − 1, 1 ≤ *l* ≤ *m* − 1, where *q*, *l* are integers—as after the *k*th batch has been processed, there are *k* − *qm* = *l* machines in which their batch numbers are *k <sup>m</sup>* , and other *<sup>m</sup>* <sup>−</sup> (*<sup>k</sup>* <sup>−</sup> *qm*) = *<sup>m</sup>* <sup>−</sup> *<sup>l</sup>* machines in which their batch numbers are *<sup>k</sup> <sup>m</sup>* − 1. Let *sk* be the release time of *k*th batch, and *rk*<sup>+</sup><sup>1</sup> be the latest release time of jobs in (*k* + 1)th batch. Then, we get *rk*<sup>+</sup><sup>1</sup> > *sk*; otherwise, jobs in the (*k* + 1)th batch will process with jobs in the *k*th batch, a contradiction. Furthermore, by algorithm *H*1, we can get that the starting time of the (*k* + 1)th batch is (1 + *βm*)*rk*<sup>+</sup><sup>1</sup> + *βm*. In addition, because

$$\begin{aligned} (1+\beta\_m)r\_{k+1}+\beta\_m &> & (1+\beta\_m)s\_k+\beta\_m \\ &=& (1+\beta\_m)^2r\_k+(1+\beta\_m)\beta\_m+\beta\_m \\ &>& (1+\beta\_m)^2s\_{k-1}+(1+\beta\_m)\beta\_m+\beta\_m \\ &\vdots\\ &>& (1+\beta\_m)^m s\_{k+1-m}+\sum\_{i=0}^{m-1}\beta\_m(1+\beta\_m)^i \\ &=& (1+\beta\_m)^m s\_{k+1-m}+(1+\beta\_m)^m-1 \\ &=& \frac{\beta\_m+2}{\beta\_m+1}(s\_{k+1-m}+1)-1 \\ &=& s\_{k+1-m}+\frac{s\_{k+1-m}+1}{\beta\_m+1} \\ &\ge& s\_{k+1-m}+1, \end{aligned}$$

$$(1 + \beta\_m)r\_{k+1} + \beta\_m \ge s\_{k+1-m} + 1.\tag{9}$$

We use *sk*<sup>+</sup>1−*<sup>m</sup>* to represent the starting time of the (*<sup>k</sup>* + 1 − *<sup>m</sup>*)th batch. From (9), it shows that, when the (*k* + 1)th batch starts, the (*k* + 1 − *m*)th batch has been completed. Then, *l* batches that start before the (*k* + 1 − *m*)th batch also have been completed. We define these *l* batches as *Bk*<sup>+</sup>1−*m*−*l*, *Bk*<sup>+</sup>1−*m*−(*l*−1), ···, *Bk*−*m*. Then, when the (*<sup>k</sup>* + <sup>1</sup>)th batch starts, *<sup>l</sup>* + 1 batches *Bk*<sup>+</sup>1−*m*−*l*, *Bk*<sup>+</sup>1−*m*−(*l*−1), ···, *Bk*−*m*, *Bk*<sup>+</sup>1−*<sup>m</sup>* have been completed. In addition, because of *<sup>k</sup>* = *qm* + *<sup>l</sup>*, when the (*k* + 1)th batch starts, there is at least one machine that is idle. In addition, it can be known, by algorithm *<sup>H</sup>*2, that the number of batches on this idle machine is *<sup>k</sup> <sup>m</sup>* − 1. Hence, after the (*k* + 1)th batch is completed, the number of batches on this idle machine is *<sup>k</sup> <sup>m</sup>* − <sup>1</sup> <sup>+</sup> <sup>1</sup> <sup>=</sup> *<sup>k</sup> <sup>m</sup>* . Moreover, because *<sup>k</sup> <sup>m</sup>* <sup>=</sup> *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* when *k* = *qm* + *l*, there are *k* − *qm* + 1 = *l* + 1 machines whose batch numbers are *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* , and other *<sup>m</sup>* <sup>−</sup> (*<sup>k</sup>* <sup>−</sup> *qm* <sup>+</sup> <sup>1</sup>) = *<sup>m</sup>* <sup>−</sup> *<sup>l</sup>* <sup>−</sup> 1 machines that have *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* − 1 batches. This means that there are at most *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* batches on each machine. The result follows.

**Case** <sup>2</sup> *<sup>k</sup>* <sup>=</sup> *qm* and 1 <sup>≤</sup> *<sup>q</sup>* ≤ *<sup>n</sup> <sup>m</sup>* − 1, where *q* is an integer. After the (*k* + 1)th batch is processed, one machine has *<sup>k</sup> <sup>m</sup>* <sup>+</sup> 1 batches, and the number of batches on other machines is still *<sup>k</sup> <sup>m</sup>* . Furthermore, *<sup>k</sup> <sup>m</sup>* <sup>+</sup> <sup>1</sup> <sup>=</sup> *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* when *<sup>k</sup>* <sup>=</sup> *qm*. Thus, every machine has at most *<sup>k</sup>*+<sup>1</sup> *<sup>m</sup>* batches. The results follow.

**Theorem 3.** *For problem Pm*|*online*, *p* − *batch*, *b* = ∞, *pj* = 1|*Lex*(*C*max, *MMC*)*, when cij* = *a* + *cj or cij* <sup>=</sup> *<sup>a</sup>* · *cj,* <sup>1</sup> <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *m,* <sup>1</sup> <sup>≤</sup> *<sup>j</sup>* <sup>≤</sup> *n, algorithm <sup>H</sup>*<sup>2</sup> *is the best possible online algorithm with a competitive ratio of* (<sup>1</sup> <sup>+</sup> *<sup>β</sup>m*, *<sup>n</sup> <sup>m</sup>* )*.*

**Proof.** When *cij* = *a* + *cj*, suppose the schedule generated by algorithm *H*<sup>2</sup> is *σ* <sup>2</sup>. From Lemma 1 and Lemma 2, we have

$$\mathbb{C}\_{\max}(\sigma'\_2) = (1 + \beta\_m)r\_{\max} + \beta\_m + 1 = (1 + \beta\_m)(r\_{\max} + 1) \le (1 + \beta\_m) \cdot \mathbb{C}\_{\max}(\pi).$$

In the following, we want to prove *MMC*(*σ* <sup>2</sup>) ≤ *<sup>n</sup> <sup>m</sup>* · *MMC*(*π*). Suppose machine *Mx* has the maximum machine cost, Then,

$$\text{MMC}(\sigma'\_2) = \mathfrak{c}\_{M\_x}.\tag{10}$$

From Lemma 4, we know that the number of batches on machine *Mx* is no more than *<sup>n</sup> <sup>m</sup>* ; then, from (10), we get

$$\begin{aligned} \text{MMC}(\sigma'\_2) &= \begin{array}{c} \text{c}\_{M\_x} \\ & \leq \ \lceil \frac{n}{m} \rceil \cdot a + \sum\limits\_{1 \leq l \leq \lceil \frac{n}{m} \rceil} \text{c}\_{B\_{l\_x}} \\ & \leq \ \lceil \frac{n}{m} \rceil \cdot a + \lceil \frac{n}{m} \rceil \cdot \text{c}\_{\text{max}} \\ & = \ \lceil \frac{n}{m} \rceil \cdot (a + \text{c}\_{\text{max}}) . \end{array} \end{aligned}$$

In addition, Lemma 3 shows that

$$\text{MMC}(\sigma'\_2) \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

When *cij* <sup>=</sup> *<sup>a</sup>* · *cj*, suppose the schedule produced by algorithm *<sup>H</sup>*<sup>2</sup> is *<sup>σ</sup>* <sup>2</sup> . From Lemmas 1 and 2, we can get *C*max(*σ* <sup>2</sup> ) ≤ (1 + *βm*) · *C*max(*π*)—the following to prove *MMC*(*σ* <sup>2</sup> ) ≤ *<sup>n</sup> <sup>m</sup>* · *MMC*(*π*).

Assume that machine *Mw* is the machine with the maximum cost, Then,

$$
\hbar \text{MMC}(\sigma\_2^{\prime\prime}) = \mathfrak{c}\_{M\_w}.\tag{11}
$$

From Lemma 4, we know that the number of batches on machine *Mw* is no more than *<sup>n</sup> <sup>m</sup>* ; then, from (11), we get

$$\begin{aligned} \text{MMC}(\sigma\_2^{\prime\prime}) &= \quad \mathcal{c}\_{\mathcal{M}\_W} \\ &\leq \quad \sum\_{1 \leq I \leq \lceil \frac{\mathfrak{g}}{m} \rceil} a \cdot \mathcal{c}\_{\mathcal{B}\_{\mathbb{I}\_W}} \\ &\leq \quad \lceil \frac{n}{m} \rceil \cdot (a \cdot \mathcal{c}\_{\text{max}}) .\end{aligned}$$

From Lemma 3, we have

$$\text{MMC}(\sigma\_2'') \le \lceil \frac{n}{m} \rceil \cdot \text{MMC}(\pi).$$

To sum up, for problem *P*m|online, *p* − batch, *b* = ∞, *pj* = 1|*Lex*(*C*max, *MMC*), when *cij* = *a* + *cj* or *cij* <sup>=</sup> *<sup>a</sup>* · *cj*, 1 <sup>≤</sup> *<sup>i</sup>* <sup>≤</sup> *<sup>m</sup>*, 1 <sup>≤</sup> *<sup>j</sup>* <sup>≤</sup> *<sup>n</sup>*, algorithm *<sup>H</sup>*<sup>2</sup> is an online algorithm with a competitive ratio of (<sup>1</sup> <sup>+</sup> *<sup>β</sup>m*, *<sup>n</sup> <sup>m</sup>* ).

Combining Theorem 1, it implies that algorithm *H*<sup>2</sup> is a best possible online algorithm.

#### **5. Conclusions**

In this paper, we established two best possible online algorithms for problem *P*m|online, *p* − batch, *b* = ∞, *pj* = 1|*Lex*(*C*max, *MMC*), when *cij* = *a* + *cj* or *cij* = *a* · *cj*, 1 ≤ *i* ≤ *m*, 1 ≤ *j* ≤ *n*. The algorithms provided in this paper are to minimize the maximum machine cost subject to the makespan being at its minimum. They are extensions of the algorithm in [3], which is only minimizing the makespan. Here, we suppose that all machines have the same fixed cost *a*; for further research, extending this problem to different machine costs *ai* is still an important research topic that needs to be studied.

**Author Contributions:** Conceptualization and methodology, W.L.; formal analysis and writing—original manuscript, W.Z. and X.C.; project management, supervision and writing-review, W.L. and X.C.

**Funding:** This Research was funded by the National Natural Science Foundation of China (Nos. 11571321, 11971443 and 11771406) and Postgraduate Education Reform Project of Henan Province (No. 2019SJGLX051Y).

**Acknowledgments:** We are grateful to the Associate Editor and four anonymous reviewers for their valuable comments, which helped us significantly improve the quality of our paper.

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