**Algorithm 1.** *For problem* (1, *c*)|*τ*| ∑ *wjCj on instance* J *.*

Step 1. Schedule the jobs in the order *J*1, *J*2,..., *Jn* on the vehicle without idle time.

Step 2. Form batches and process them on the batching machine by using the following strategy: When the batching machine is idle at time *t* and some jobs are available for processing at time *t*, it forms and process a new batch, which contains as many jobs as possible subject to the batch capacity *c*, by the rule that jobs with small subscriptions have the priority to be processed.

Clearly, Algorithm 1 runs in *O*(*n*) time. To analyze the worst-case performance ratio of Algorithm 1, we first establish a lower bound of the optimal cost of problem (1, *c*)|*τ*| ∑ *wjCj* on instance J .

**Lemma 2.** *Let π*<sup>∗</sup> *be an optimal schedule of instance* J *and, for each j* ∈ {1, 2, ... , *n*}*, let J*[*j*] *denote the job that occupies the jth position on the vehicle in π*∗*. Then*

$$\sum\_{j=1}^{n} w\_{[j]} \mathbb{C}\_{[j]}(\pi^\*) \ge \frac{1}{3} \left( \sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{[j]} (p\_{1,[i]} + p/c) + (3a + 2p - \pi) \sum\_{j=1}^{n} w\_{[j]} \right). \tag{18}$$

**Proof.** Since *π*<sup>∗</sup> satisfies the property in (17), we may assume that *C*[1](*π*∗) ≤ *C*[2](*π*∗) ≤···≤ *C*[*n*](*π*∗). Note that *c* ≥ 2 is the batch capacity and each batch has a processing time *p*. Moreover, the first batch on the batching machine starts at a time greater than *τ*[1] = *p*1,[1] − *τ*. For each *j* = 1, 2, ... , *n*, at least *j*/*c* batches are completed by time *C*[*j*](*π*∗) on the batch machine. Then we have *C*[*j*](*π*∗) ≥ *p*1,[1] − *τ* + *j*/*cp* for *j* = 1, 2, . . . , *n*. Consequently, we have

$$\sum\_{j=1}^{n} w\_{[j]} \mathbb{C}\_{[j]}(\pi^\*) \ge (p\_{1,[1]} - \pi) \sum\_{j=1}^{n} w\_{[j]} + p \sum\_{j=1}^{n} [j/c] w\_{[j]}.\tag{19}$$

From (16), for each *j* = 1, 2, ··· , *n*, we also have *C*[*j*](*π*∗) ≥ *C*1,[*j*](*π*∗) + *p*, which implies that *<sup>C</sup>*[*j*](*π*∗) <sup>≥</sup> <sup>∑</sup>*<sup>j</sup> <sup>i</sup>*=<sup>1</sup> *p*1,[*i*] + *p* − *τ*. Consequently, we have

$$\sum\_{j=1}^{n} w\_{[j]} \mathbb{C}\_{[j]}(\boldsymbol{\pi}^\*) \ge \sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{[j]} p\_{1,[i]} + (p - \boldsymbol{\pi}) \sum\_{j=1}^{n} w\_{[j]}.\tag{20}$$

From the above two inequalities, (19) and (20), we obtain

$$\begin{split} \mathfrak{Z} \sum\_{j=1}^{n} w\_{[\bar{j}]} \mathbb{C}\_{[\bar{j}]}(\pi^\*) &\quad \geq \ \sum\_{j=1}^{n} w\_{[\bar{j}]} \left( p\_{1,[\bar{1}]} - \pi + \lceil \bar{j}/c \rceil p + 2 \sum\_{i=1}^{j} p\_{1,[\bar{i}]} + 2(p-\pi) \right) \\ &\quad \geq \ \sum\_{j=1}^{n} w\_{[\bar{j}]} \left( \sum\_{i=1}^{j} (p\_{1,[\bar{i}]} + p/c) + 3a + 2p - \pi \right) \\ &= \ \ \sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{[\bar{j}]} \left( p\_{1,[\bar{i}]} + p/c \right) + \left( 3a + 2p - \pi \right) \sum\_{j=1}^{n} w\_{[\bar{j}]}. \end{split}$$

Then the lemma follows immediately.

The following lemma is also useful in our discussion.

**Lemma 3.** *For any c indices i*1, *i*2, ··· , *ic* ∈ {1, 2, ··· , *n*}*, we have*

$$|p\_{1,i\_1} + p\_{1,i\_2} + \dots + p\_{1,i\_c} - p| \le \frac{\beta - a}{\beta + a} (p\_{1,i\_1} + p\_{1,i\_2} + \dots + p\_{1,i\_c} + p).$$

**Proof.** Let *x* = min{*p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* , *p*} and *y* = max{*p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* , *p*}. Then |*p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* − *p*| = *y* − *x* and *p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* + *p* = *x* + *y*. From the definitions of *α* and *β* in Equations (14) and (15), we further have *α* ≤ *x* ≤ *y* ≤ *β*. This implies that *yα* ≤ *βα* ≤ *xβ*. Now

$$\begin{aligned} &|p\_{1,i\_1} + p\_{1,i\_2} + \dots + p\_{1,i\_c} - p|(\beta + \alpha) \\ &= \quad (y - \mathbf{x})(\beta + \alpha) = y\beta + y\alpha - \mathbf{x}\beta - \mathbf{x}\alpha \\ &\le \quad y\beta - y\alpha + \mathbf{x}\beta - \mathbf{x}\alpha \\ &= \quad (\mathbf{x} + \mathbf{y})(\beta - \alpha) \\ &= \quad (\beta - \alpha)(p\_{1,i\_1} + p\_{1,i\_2} + \dots + p\_{1,i\_c} + p). \end{aligned}$$

It follows that |*p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* − *p*| ≤ (*β* − *α*)(*p*1,*i*<sup>1</sup> + *p*1,*i*<sup>2</sup> + ··· + *p*1,*ic* + *p*)/(*β* + *α*).

Now we are ready to establish our final result. Recall that *c* ≥ 2.

**Theorem 2.** *Algorithm 1 yields a schedule with cost no more than* 3*β*/(*α* + *β*) *times the cost of an optimal schedule.*

**Proof.** Let *π* be the schedule of instance J generated by Algorithm 1. Since the jobs in J are scheduled in the order *J*<sup>1</sup> ≺ *J*<sup>2</sup> ≺···≺ *Jn* on the vehicle without idle time, the implementation of Step 2 implies that, for *j* = 1, 2, . . . , *c*, we have

$$\begin{split} \mathsf{C}\_{j}(\pi) &\leq \ \sum\_{i=1}^{j} p\_{1,i} + 2p - \pi \\ &= \ \beta(\sum\_{i=1}^{j} p\_{1,i} + 2p - \pi) / (\beta + a) + a(\sum\_{i=1}^{j} p\_{1,i} + 2p - \pi) / (\beta + a) \\ &\leq \ \beta(\sum\_{i=1}^{j} p\_{1,i} + 2p - \pi) / (\beta + a) + 3a\beta / (\beta + a) \\ &\leq \ \beta(\sum\_{i=1}^{j} (p\_{1,i} + p/c) + 3a + 2p - \pi) / (\beta + a) . \end{split}$$

For each *j* = *c* + 1, *c* + 2, . . . , *n*, we define *kj* = *j*/*c* − 1 and *lj* = *j* − *kjc*. Then, we have

$$\begin{split} \mathbb{C}\_{j}(\pi) &\leq \quad p + \max\{\mathbb{C}\_{1,j}(\pi) + p, \ \mathbb{C}\_{j-\varepsilon}(\pi)\} \\ &\leq \quad p + \max\{\mathbb{C}\_{1,j-\varepsilon}(\pi) + p + \sum\_{h=1}^{k} p\_{1,j-\varepsilon+h} \cdot \max\{\mathbb{C}\_{1,j-\varepsilon}(\pi) + p, \mathbb{C}\_{j-2\varepsilon}(\pi)\} + p\} \\ &\leq \quad p + \max\{\mathbb{C}\_{1,j-\varepsilon}(\pi) + p, \mathbb{C}\_{j-2\varepsilon}(\pi)\} + \max\{\sum\_{h=1}^{\varepsilon} p\_{1,j-\varepsilon+h}, p\} \\ &\leq \quad p + \max\{\mathbb{C}\_{1,j+\varepsilon}(\pi) + p, \mathbb{C}\_{j}(\pi)\} + \sum\_{i=1}^{k\_{j}-1} \max\{\sum\_{h=1}^{\varepsilon} p\_{1,j+i\varepsilon+h}, p\} \\ &\leq \quad p + \max\{\mathbb{C}\_{1,j+\varepsilon}(\pi) + p, \mathbb{C}\_{1,j}(\pi) + 2p\} + \sum\_{i=1}^{k\_{j}-1} \max\{\sum\_{h=1}^{\varepsilon} p\_{1,j+i\varepsilon+h}, p\} \\ &\leq \quad 2p + \mathbb{C}\_{1,j}(\pi) + \sum\_{i=0}^{k\_{j}-1} \max\{\sum\_{h=1}^{\varepsilon} p\_{1,j+i\varepsilon+h}, p\} \\ &= \quad \sum\_{i=1}^{l\_{j}} p\_{1,i} + 2p - \tau + \sum\_{i=0}^{k\_{j}-1} \max\{\sum\_{h=1}^{\varepsilon} p\_{1,j+i\varepsilon+h}, p\}. \end{split}$$

By Lemma 3 and using the algebraic equality

$$2 \cdot \max\{\mathbf{x}, y\} = \mathbf{x} + y + |\mathbf{x} - y|\_\prime \text{ for every two real numbers } \mathbf{x} \text{ and } y\}$$

we can obtain that

$$\begin{split} & \max \{ \sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h\prime} p \} \\ &= \quad \frac{1}{2} \Big( \sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h} + p + |\sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h} - p| \Big) \\ &\leq \quad \frac{1}{2} \Big( \sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h} + p + (\sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h} + p)(\beta - a)/(\beta + a) \Big) \\ &= \quad \beta(\sum\_{h=1}^{c} p\_{1,l\_{j}+ic+h} + p)/(\beta + a). \end{split}$$

Then, we have

$$\begin{split} \mathsf{C}\_{j}(\pi) &\leq \begin{aligned} \mathsf{C}\_{j}(\pi) &\leq \ (\sum\_{i=1}^{l\_{j}} p\_{1,i} + 2p - \pi) + \frac{\beta}{\beta + a} \sum\_{i=0}^{k\_{j}-1} (\sum\_{h=1}^{c\_{j}} p\_{1,l\_{j}+ic+h} + p) \\ &= \ \frac{\frac{\beta}{\beta+a} (\sum\_{i=1}^{l\_{j}} p\_{1,i} + 2p - \pi) + \frac{\beta}{\beta + a} \left(\sum\_{i=0}^{k-1} (\sum\_{h=1}^{c\_{i}} p\_{1,l+i+h} + p) + (\sum\_{i=1}^{l\_{j}} p\_{1i} + 2p - \pi)\right) \\ &\leq \ \frac{\frac{\alpha}{\beta+a} \cdot 3\beta + \frac{\beta}{\beta+a} \left(\sum\_{i=1}^{l} p\_{1,i} + jp/c + 2p - \pi\right) \\ &= \ \frac{\beta}{\beta + a} \left(\sum\_{i=1}^{l} (p\_{1,i} + p/c) + 3a + 2p - \pi\right). \end{aligned} \end{split}$$

where <sup>∑</sup>*lj <sup>i</sup>*=<sup>1</sup> *p*1,*<sup>i</sup>* + 2*p* − *τ* ≤ 3*β* follows from the definition of *β*. Consequently, we have

$$\sum\_{j=1}^{n} w\_{j} \mathbb{C}\_{j}(\pi) \le \frac{\beta}{\beta + \alpha} \left( \sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{j} (p\_{1,i} + p / c) + (3a + 2p - \pi) \sum\_{j=1}^{n} w\_{j} \right) . \tag{21}$$

Now let *π*<sup>∗</sup> be an optimal schedule of instance J , and for each *j* ∈ {1, 2, ... , *n*}, let *J*[*j*] denote the job that occupies the *j*th position on the vehicle in *π*∗. Moreover, we consider the classical scheduling problem 1|| ∑ *wjCj* on job instance J = {*J* <sup>1</sup>, *J* <sup>2</sup>, ... , *J <sup>n</sup>*}, where each job *J <sup>j</sup>* has a processing time *p*1,*<sup>j</sup>* + *p*/*c* and a weight *wj*. We consider the two schedules *σ* = (*J* <sup>1</sup>, *J* <sup>2</sup>, ... , *J <sup>n</sup>*) and *σ*∗ = (*J* [1] , *J* [2] , ... , *J* [*n*] ) of problem 1|| ∑ *wjCj* on job instance J . From Smith [11], the well-known WSPT rule solves problem 1|| ∑ *wjCj* optimally. Thus, from the relations in (13), *σ* is an optimal schedule of problem 1|| ∑ *wjCj* on job instance J . It follows that ∑*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> *wjCj*(*σ*) <sup>≤</sup> <sup>∑</sup>*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> *wjCj*(*σ*∗). Note that ∑*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> *wjCj*(*σ*) = <sup>∑</sup>*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> <sup>∑</sup>*<sup>j</sup> <sup>i</sup>*=<sup>1</sup> *wj*(*p*1,*<sup>i</sup>* <sup>+</sup> *<sup>p</sup>*/*c*) and <sup>∑</sup>*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> *wjCj*(*σ*∗) = <sup>∑</sup>*<sup>n</sup> <sup>j</sup>*=<sup>1</sup> <sup>∑</sup>*<sup>j</sup> <sup>i</sup>*=<sup>1</sup> *w*[*j*](*p*1,[*i*] + *p*/*c*). Then, we have

$$\sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{j} (p\_{1,i} + p/c) \le \sum\_{j=1}^{n} \sum\_{i=1}^{j} w\_{[j]} (p\_{1,[i]} + p/c). \tag{22}$$

By applying the inequality in Equation (22) to Equations (18) and (21), we obtain

$$\sum w\_{\boldsymbol{j}} \mathbb{C}\_{\boldsymbol{j}}(\boldsymbol{\pi}) \leq \frac{3\beta}{\beta + \alpha} \sum w\_{[\boldsymbol{j}]} \mathbb{C}\_{[\boldsymbol{j}]}(\boldsymbol{\pi}^\*) $$

This completes the proof.

#### **4. Conclusions**

We studied the coordination of transportation and batching scheduling with one single vehicle for minimizing the total weighted completion time of the jobs without considering the processing cost of the batching machine. For this problem, we showed a unary NP-hardness of at least 3 for each batch capacity and presented a polynomial-time 3-approximation algorithm when the batch capacity is at least 2.

Future research may consider to include the processing cost in the objective function. In particular, approximation behavior of the problem (1, *c*)|*τ*| ∑ *wjCj* + *α*(*b*) with *α*(*b*) = *λb* being a linear function in *b* is worthy of study. Moreover, when the batch capacity is given by *c* = 2, the computational complexity of problem (1, 2)|*τ*| ∑ *wjCj* + *α*(*b*) is still open. A polynomial-time approximation scheme for solving problem (1, *c*)|*τ*| ∑ *wjCj* is also expected.

**Author Contributions:** Conceptualization, methodology, and writing—original manuscript: H.W.; project management, supervision, and writing—review: J.Y.; data curation and formal analysis: Y.G.

**Funding:** This research was funded by the National Natural Science Foundation of China under grant numbers 11671368, 11771406, and 11901539. The third author was also supported by the China Postdoctoral Science Foundation under grant number 2019M652555.

**Acknowledgments:** The authors would like to thank the Associate Editor and the anonymous referees for their constructive comments and helpful suggestions.

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

#### **References**


c 2019 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/).
