Triangle structure diagrams for a single machine batching problem with identical jobs

• 440 Accesses

Abstract

The problem of batching identical jobs on a single machine to minimize the completion time is studied by employing the difference analysis technique. Constant processing times and batch setup times are assumed. We first establish the relation between the optimal solution and the first-order difference of the optimal objective function in terms of the number of jobs and investigate the properties of the first-order difference. Then we obtain the triangle structure diagram of the batching problem in $O( n )$ time at most by using the permutation of some numbers which describe the character of the first-order difference. The diagrams enable us to see clearly the specific expressions of optimal solutions for the n-jobs batching problem and any m-jobs batching problem simultaneously, where $m≤n$. Also, we show that the result proposed by Santos (MSc thesis, 1984) and Santos and Magazine (Oper. Res. Lett. 4:99-103, 1985) is a special case of our result.

MSC:90B30, 90B35.

1 Introduction

Consider the problem of scheduling identical jobs on a single machine, in which the jobs are processed in batches, with a setup time for each batch. The completion time of a job coincides with the completion time of the last scheduled job in its batch and all jobs in this batch have the same completion time. For a given number of jobs, we want to choose batch sizes so as to minimize the sum of the completion times of the jobs. There is a trade-off between keeping the number of setups incurred small, by having large batches, and keeping small the time each job waits for its batch to finish, by having small batches.

Formally, there is a set of n jobs with identical processing time, $J={ j 1 ,…, j n }={1,…,n}$, to be processed on a single machine. In a given schedule, for each job $j∈J$, we denote by $C j$ its completion time. The problem is, given job processing time p and setup time S, to find the number of batches k, and batch sizes $b i$, such that $∑ i = 1 k b i =n$, so as to minimize $∑ j = 1 n C j = ∑ i = 1 k b i ∑ j = 1 i (S+ b j p)$. The problem is referred to as $1| p j =p,S−batch|∑ C j$.

There are several different versions of solving the problem $1| p j =p,S−batch|∑ C j$. Coffman et al.  propose a backward dynamic programming algorithm, running in $O( n 2 )$ time. A faster solution algorithm is given Naddef and Santos , running in $O((p/s)n)$ time. Another is given by Coffman, Nozari and Yannakakis , running in $O( n )$ time. Shallcross  presents an optimal solution of the form $b i = { ⌊ ( c − i S ) / p ⌋ , 1 ≤ i ≤ l , ⌊ ( c − i S − 1 ) / p ⌋ , l < i ≤ k ,$ where c and l can be determined by the algorithm running in $O(logplog(np))$. However, Potts and Kovalyov  point out that the algorithm by Shallcross  is rather intricate. All of the optimal solutions mentioned above are not of the specific expression. Potts and Kovalyov  point out that a key to the development of a polynomial algorithm is provided by Santos  and Santos and Magazine  who analyze a continuous relaxation in which batch sizes are not constrained to be integer. Specifically, they show that the optimal number of batches is $k=⌈ 1 / 4 + 2 n p / S −1/2⌉$ and the optimal batch sizes $b i$ are $n/k+S(k+1)/2p−iS/p$ for $i=1,…,k$.

The results by Santos  and Santos and Magazine  are important because the specific expressions of the optimal solutions are given, which contributes so as not only to be much easier to implement in solving the problem than other algorithms, but also it entails a proof of the complexity for other scheduling problems. For example, Albers and Brucker  give the NP-hardness proofs of two batching problems by using the expression by Santos  and Santos and Magazine . One slightly regrets that the specific expressions of the optimal solutions are only appropriate for some of the problem instances. One would like to know whether there is a specific solution formula that applies to all of the problem instances. This is the reason for studying the problem here. In this paper, we first establish the relation between the optimal solution and the first-order difference of the optimal objective function in terms of the number of jobs and we investigate the properties of the first-order difference. Then, we obtain the triangle structure diagram of the batching problem in $O( n )$ time at most by using the permutation of some numbers which describe the character of the first-order difference. The diagrams enable us to see clearly the specific expressions of optimal solutions for the n-jobs batching problem and any m-jobs batching problem simultaneously, where $m≤n$.

This paper is organized as follows. In Section 2 we build the relation between the optimal solution and the first-order difference of the optimal objective function in terms of the number of jobs and investigate the properties of the first-order difference. The triangle structure diagrams are shown in the case $S=vp$ in Section 3 and in the case $S=vp+ε$ in Section 4, respectively, where v and $0<ε are integers. Section 5 contains a conclusion and a discussion of some possible extensions.

2 Properties of the first-order difference

In this section, we introduce the concept of differences of the optimal objective function in terms of the number of jobs, and we show that the first-order difference sequence is strictly monotone increasing and each term in the second-order difference sequence, that is, each increment of the first-order difference terms, is between p and 2p. Using the properties, we can reduce the batch sizing problem to finding some interval such that some fixed number exactly fall in it, where the interval consists of two adjacent terms in the first-order difference sequence.

For ease of presentation, we sequence the jobs according to nonincreasing indices. Any solution of problem $1| p j =p,S−batch|∑ C j$ is of the form

$BS:S n k ⋯( n k − 1 +1)S n k − 1 ⋯( n k − 2 +1)⋯S n 1 ⋯1,$

where k is the number of batches,

$1≤ n 1 < n 2 <⋯< n k =n$

and the batch sizes are $b 1 = n k − n k − 1 ,…, b k − 1 = n 2 − n 1 , b k = n 1$. Every solution BS corresponds to an objective function value

$F(BS)= ∑ j = 1 n C j = ∑ i = 1 k b i ∑ j = 1 i (S+ b j p)= ∑ i = 1 k n i ( S + ( n i − n i − 1 ) p ) ,$

where $n 0 =0$.

In order to solve the batch sizing problem, we obviously have to find a constant k and a sequence of indices

$1≤ n 1 < n 2 <⋯< n k =n$

such that the above objective function value is minimized. Clearly, problem $1| p j =p,S−batch|∑ C j$ is a trivial matter when $S≤p$. We have the following result.

Theorem 1 If $S≤p$, then for problem $1| p j =p,S−batch|∑ C j$ there exists an optimal solution in which $k=n$ and $n i =i$ for $i=1,…,n$, that is, $b 1 =⋯= b k =1$.

By Theorem 1, we assume that $S>p$ hereafter.

Let $F(j)$ denote the minimum the sum of the completion times for the j-jobs batching problem containing jobs $1,…,j$. Coffman et al.  propose a backward dynamic programming algorithm. The initialization is

$F(0)=0$

and the recursion for $j=1,…,n$ is

$F(j)=min { j [ S + ( j − i ) p ] + F ( i ) ∣ 0 ≤ i ≤ j − 1 } .$

Under the most natural implementation, the algorithm requires $O( n 2 )$ time. Below we do further research into the recursion formula, so as to determine completely the optimal successor t of j, that is, an integer t with $0≤t≤j−1$ such that

$F(j)=j [ S + ( j − t ) p ] +F(t)$
(1)

holds.

For $0≤i≤j−1$, set

$F(j,i)=j [ S + ( j − i ) p ] +F(i).$

Thus, we have

$F(j)= min i = 1 j − 1 F(j,i).$

Let ${ Δ 1 ( i ) } i = 0 + ∞$ denote the first-order difference sequence of the optimal objective function in terms of the number of jobs, where $Δ 1 (i)=F(i+1)−F(i)$ for $i=0,1,2,…$ . The relation $F(j,i+1)<(>)F(j,i)$ stating that $i+1$ is better (worse) than i as a successor of j is equivalent to

$Δ 1 (i)=F(i+1)−F(i)<(>)jp.$

To break ties when choosing the successor, we assume that if $Δ 1 (i)=F(i+1)−F(i)=jp$, that is, $F(j,i+1)=F(j,i)$, then $i+1$ is better than i as a successor of j. Thus, if the sequence ${ Δ 1 ( i ) } i = 0 + ∞$ is strictly monotone increasing, the determining optimal successor of j problem can be reduced to finding a nonnegative integer t such that $Δ 1 (t−1)≤jp< Δ 1 (t)$, where we define $Δ 1 (−1)=0$. We denote by $SUCC(j)$ the optimal successor of j hereafter.

Proposition 1 Assume that the sequence ${ Δ 1 ( i ) } i = − 1 + ∞$ is strictly monotone increasing and $Δ 1 (t)− Δ 1 (t−1)≥p$ for $t=1,2,…$ . Then for each j there is a unique $t 0$ with $0≤ t 0 ≤j−1$ such that $Δ 1 ( t 0 −1)≤jp< Δ 1 ( t 0 )$ and $t 0 =SUCC(j)$.

Proof We first prove the existence by induction. When $j=1$, we have $0= Δ 1 (−1)≤p< Δ 1 (0)=F(1)−F(0)=S+p$ and $SUCC(1)=0$. Now suppose that it holds when $j≤h$ for some positive integer h, i.e. there is $t 0$ with $0≤ t 0 ≤h−1$ such that $Δ 1 ( t 0 −1)≤hp< Δ 1 ( t 0 )<⋯< Δ 1 (h−1)$. For $j=h+1$, by the proposition and induction assumptions, we have $0= Δ 1 (−1)≤(h+1)p=hp+p< Δ 1 (h−1)+p≤ Δ 1 (h)$. Thus, the existence holds for $j=h+1$, and it follows that $( Δ 1 (−1), Δ 1 (0),…, Δ 1 (h))$ is a partition of $[0, Δ 1 (h))$.

Due to the fact that $( Δ 1 (−1), Δ 1 (0),…, Δ 1 (j−1))$ is a partition of $[0, Δ 1 (j−1))$ again, the uniqueness holds.

Since the inequalities $Δ 1 (−1)< Δ 1 (0)<⋯< Δ 1 ( t 0 −1)≤jp$ imply that $t 0$ is better than $t 0 −1$, $t 0 −1$ better than $t 0 −2,…,1$ better than 0 in order and the inequalities $jp< Δ 1 ( t 0 )<⋯< Δ 1 (j−1)$ imply that $t 0$ is better than $t 0 +1$, $t 0 +1$ better than $t 0 +2,…,j−2$ better than $j−1$ in order as a successor of j, we have $t 0 =SUCC(j)$. □

Now we give the key properties of the first-order difference.

Proposition 2 If $S>p$, then the sequence ${ Δ 1 ( i ) } i = − 1 + ∞$ is strictly monotone increasing and $p≤ Δ 1 (t)− Δ 1 (t−1)≤2p$ for $t=1,2,…$ .

Proof We prove this proposition by induction. Simple calculations yield

$Δ 1 ( 0 ) = F ( 1 ) − F ( 0 ) = S + p , F ( 2 ) = min { F ( 2 , 1 ) , F ( 2 , 0 ) } = min { 2 ( S + p ) + S + p , 2 ( S + 2 p ) } = 2 ( S + 2 p ) , Δ 1 ( 1 ) = F ( 2 ) − F ( 1 ) = S + 3 p > Δ 1 ( 0 ) > Δ 1 ( − 1 ) = 0$

and

$Δ 1 (1)− Δ 1 (0)=2p.$

Now suppose that it holds when $j≤h$ for some positive integer h, i.e. $Δ 1 (−1)< Δ 1 (0)<⋯< Δ 1 (h)$ and $p≤ Δ 1 (t)− Δ 1 (t−1)≤2p$ for $t=1,2,…,h$. We need to show that it holds when $j=h+1$.

By the induction assumption and Proposition 1, we may assume that $SUCC(h+1)= t 0$, where $0≤ t 0 ≤h$ and $Δ 1 ( t 0 −1)≤(h+1)p< Δ 1 ( t 0 )$. Since $p≤ Δ 1 ( t 0 )− Δ 1 ( t 0 −1)$ and $2p, we see that the optimal successor of h is either $t 0 −1$ or $t 0$ and $0≤ t 0 −1≤h$. Noting the fact that $2p and $Δ 1 (1)− Δ 1 (0)=2p$, along with $p≤ Δ 1 (t)− Δ 1 (t−1)$ for $t=2,…,h$, we have $Δ 1 (h)>(h+2)p$. Thus, the optimal successor of $h+2$ is between 0 and h. By similar arguments for h, we see that the optimal successor of $h+2$ is either $t 0$ or $t 0 +1$ and $0≤ t 0 +1≤h$. There are four cases to consider: (a) $SUCC(h)=SUCC(h+1)=SUCC(h+2)= t 0$, (b) $SUCC(h)= t 0 −1$, $SUCC(h+1)=SUCC(h+2)= t 0$, (c) $SUCC(h)=SUCC(h+1)= t 0$, $SUCC(h+2)= t 0 +1$, (d) $SUCC(h)= t 0 −1$, $SUCC(h+1)= t 0$, $SUCC(h+2)= t 0 +1$.

Case (a) $SUCC(h)=SUCC(h+1)=SUCC(h+2)= t 0$. In this case,

$F ( h ) = h [ S + ( h − t 0 ) p ] + F ( t 0 ) , F ( h + 1 ) = ( h + 1 ) [ S + ( h + 1 − t 0 ) p ] + F ( t 0 ) , F ( h + 2 ) = ( h + 2 ) [ S + ( h + 2 − t 0 ) p ] + F ( t 0 ) .$

Thus, we have

$Δ 1 (h+1)− Δ 1 (h)=2p.$
(2)

Case (b) $SUCC(h)= t 0 −1$, $SUCC(h+1)=SUCC(h+2)= t 0$. In this case,

$F ( h ) = h [ S + ( h − t 0 + 1 ) p ] + F ( t 0 − 1 ) , F ( h + 1 ) = ( h + 1 ) [ S + ( h + 1 − t 0 ) p ] + F ( t 0 ) , F ( h + 2 ) = ( h + 2 ) [ S + ( h + 2 − t 0 ) p ] + F ( t 0 ) .$

Thus, we have

$Δ 1 (h+1)− Δ 1 (h)=(h+2)p− Δ 1 ( t 0 −1).$
(3)

Since $SUCC(h+1)=SUCC(h+2)= t 0$, the inequalities $Δ 1 ( t 0 )>(h+2)p>(h+1)p≥ Δ 1 ( t 0 −1)$ hold. This implies $Δ 1 (h+1)− Δ 1 (h)=(h+2)p− Δ 1 ( t 0 −1)≥p$. Noting the fact that $1≤ t 0 ≤h$, by the induction assumption, we have $Δ 1 (h+1)− Δ 1 (h)=(h+2)p− Δ 1 ( t 0 −1)≤ Δ 1 ( t 0 )− Δ 1 ( t 0 −1)≤2p$.

Case (c) $SUCC(h)=SUCC(h+1)= t 0$, $SUCC(h+2)= t 0 +1$. In this case,

$F ( h ) = h [ S + ( h − t 0 ) p ] + F ( t 0 ) , F ( h + 1 ) = ( h + 1 ) [ S + ( h + 1 − t 0 ) p ] + F ( t 0 ) , F ( h + 2 ) = ( h + 2 ) [ S + ( h + 2 − t 0 − 1 ) p ] + F ( t 0 + 1 ) .$

Thus, we have

$Δ 1 (h+1)− Δ 1 (h)= Δ 1 ( t 0 )−hp.$
(4)

Since $SUCC(h)=SUCC(h+1)= t 0$, the inequalities $Δ 1 ( t 0 )>(h+1)p>hp$ hold. This implies $Δ 1 (h+1)− Δ 1 (h)= Δ 1 ( t 0 )−hp≥p$. Also, we have $Δ 1 (h+1)− Δ 1 (h)= Δ 1 ( t 0 )−hp≤2p$. Otherwise, $Δ 1 ( t 0 )−hp>2p$ implies $Δ 1 ( t 0 )>(h+2)p$. This contradicts with the fact that $Δ 1 ( t 0 )≤(h+2)p< Δ 1 ( t 0 +1)$.

Case (d) $SUCC(h)= t 0 −1$, $SUCC(h+1)= t 0$, $SUCC(h+2)= t 0 +1$. In this case,

$F ( h ) = h [ S + ( h + 1 − t 0 ) p ] + F ( t 0 − 1 ) , F ( h + 1 ) = ( h + 1 ) [ S + ( h + 1 − t 0 ) p ] + F ( t 0 ) , F ( h + 2 ) = ( h + 2 ) [ S + ( h + 1 − t 0 ) p ] + F ( t 0 + 1 ) .$

Thus, we have

$Δ 1 (h+1)− Δ 1 (h)= Δ 1 ( t 0 )− Δ 1 ( t 0 −1).$
(5)

Since $1≤ t 0 ≤h$, along with the induction assumption, the inequalities $p≤ Δ 1 (h+1)− Δ 1 (h)≤2p$ hold. □

These two propositions, as well as the four formulas yielded in the proof of Proposition 2, are very important for our batch sizing problem. Proposition 1 ensures that the problem can be reduced to finding the interval formed by the first-order difference problem. Proposition 2 and the four formulas make it possible to determine exactly the first-order difference sequence. $p≤ Δ 1 (h+1)− Δ 1 (h)≤2p$ implies that each nonnegative integer must be the optimal successor of one or two positive integers, and by the monotonicity each positive integer has a unique nonnegative integer as its optimal successor. Based on the successor membership between these integers, we can obtain a partition of the set of positive integers. We define for $k=1,2,…$ , called the k-batches case set of numbers of jobs, and the sequence of integers in $N k$ is in increasing natural order. Then $( N 1 ,…, N k ,…)$ is a partition of the set of position integers. Let $C 1 , i =i$ for $i=1,…,| N 1 |$. Then $N 1 =( C 1 , 1 ,…, C 1 , | N 1 | )$. We define $C k , i ={j∣SUCC(j)∈ C k − 1 , i }$ for $k=2,3,…$ and $i=1,…,| N 1 |$, called the i th periodic set of $N k$, and the sequence of integers in $C k , i$ is in increasing natural order. Then $N k =( C k , 1 ,…, C k , | N 1 | )$ and $( C 1 , 1 ,…, C 1 , | N 1 | ,…, C k , 1 ,…, C k , | N 1 | ,…)$ is a partition of the set of position integers. Based on the successor membership between these periodic sets, we now give a basic diagram of the batching problem as follows, where the nodes in the diagram consist of the integers in $C k i$ (see Figure 1).

In the following sections, we determine exactly the number of integers in $C k , i$ and the optimal successor membership between the integers.

3 The triangle structure diagram in the case $S=vp$

In this section we present a specific diagram of the batching problem with $S=vp$, which can be obtained in constant time. Since the diagram consists of v triangles in the shape, we call it a triangle structure diagram. Using the optimal successor membership between the integers presented by the diagram, we give the specific expression of the optimal solution for an any-number-jobs batching problem with $S=vp$, and show that the result proposed by Santos  and Santos and Magazine  is a special case of our result.

The diagram depends exactly on the first-order difference sequence. To compute the sequence, we can first obtain values $Δ 1 (0), Δ 1 (1),…, Δ 1 (| N 1 |)$ by simple calculations. Then using the results of the previous section and the special properties of the first-order difference in the case $S=vp$, which will be given below, we can determine the first-order difference of the integers in $N 2$. Generally, we can compute the first-order difference of the integers in $N k$ if those in $N k − 1$ are already known. The following two propositions describe the special properties of the first-order difference in the case $S=vp$.

Proposition 3 Assume $S=vp$. Then $Δ 1 (1)− Δ 1 (0)=2p$, $Δ 1 (j)− Δ 1 (j−1)=2p$ if j and $j−1$ have the same optimal successor and $Δ 1 (j)− Δ 1 (j−1)=p$ otherwise for $j=2,3,…$ .

Proof Since $Δ 1 (0)=F(1)−F(0)=S+p$ and $Δ 1 (1)=F(2)−F(1)=S+3p$, we have $Δ 1 (1)− Δ 1 (0)=2p$. Suppose $SUCC(j)= t 0$, where $t 0 ≥0$.

When $SUCC(j−1)=SUCC(j)=SUCC(j+1)= t 0$, by (2), we have $Δ 1 (j)− Δ 1 (j−1)=2p$.

When $SUCC(j−1)=SUCC(j)= t 0$ and $SUCC(j+1)= t 0 +1$, it follows from Proposition 1 that

$Δ 1 ( t 0 −1)≤(j−1)p
(6)

Due to $S=vp$ and $F(i)=i(S+(i−t)p)+F(t)$, where $SUCC(i)=t$, $F(i)/p$ is an integer for $i=1,2,…$ . Thus, $Δ 1 (i)/p$ is an integer for $i=0,1,2,…$ . By equation (6), $Δ 1 ( t 0 )−(j−1)p=2p$. So, we have $Δ 1 (j)− Δ 1 (j−1)= Δ 1 ( t 0 )−(j−1)p=2p$, following from equation (4).

When $SUCC(j−1)= t 0 −1$, $SUCC(j)= t 0$ and $SUCC(j+1)= t 0 +1$, it follows from Proposition 1 that

$(j−1)p< Δ 1 ( t 0 −1)≤jp< Δ 1 ( t 0 )≤(j+1)p.$
(7)

Since both $Δ 1 ( t 0 −1)/p$ and $Δ 1 ( t 0 )/p$ are integers, along with equation (5), equation (7) implies $Δ 1 (j)− Δ 1 (j−1)= Δ 1 ( t 0 )− Δ 1 ( t 0 −1)=p$.

When $SUCC(j−1)= t 0 −1$ and $SUCC(j)=SUCC(j+1)= t 0$, it follows from Proposition 1 that

$(j−1)p< Δ 1 ( t 0 −1)≤jp<(j+1)p< Δ 1 ( t 0 ).$
(8)

Since both $Δ 1 ( t 0 −1)/p$ and $Δ 1 ( t 0 )/p$ are integers, along with equation (3), equation (8) implies $Δ 1 (j)− Δ 1 (j−1)=(j+1)p− Δ 1 ( t 0 −1)=p$. □

Proposition 4 Assume $S=vp$. Then:

1. (i)

$| N k |=kv$ for $k=1,2,…$ .

2. (ii)

$| C k i |=k$ for $i=1,…,v$.

3. (iii)

For $j∈ N k$, $Δ 1 (j)− Δ 1 (j−1)=2p$ if j is the last integer of $C k i$ for $i=1,…,v$, $Δ 1 (j)− Δ 1 (j−1)=p$ otherwise.

Proof We prove this proposition by induction. Clearly, all these results hold when $k=1$. Now suppose that they hold when $k=h$ for some positive integer h, i.e. $| N h |=hv$, $| C h i |=h$ for $i=1,…,v$ and for $j∈ N h$, $Δ 1 (j)− Δ 1 (j−1)=2p$ if j is the last integer of $C h i$ for $i=1,…,v$; $Δ 1 (j)− Δ 1 (j−1)=p$ otherwise. We need to show that they hold when $k=h+1$. For any $i∈{1,…,r}$, by the induction assumption, we assume $C h i =(a+1,…,a+h)$, where a is a given positive integer, and we have

$Δ 1 (a+1)− Δ 1 (a)=⋯= Δ 1 (a+h−1)− Δ 1 (a+h−2)=p$

and

$Δ 1 (a+h)− Δ 1 (a+h−1)=2p.$

Due to Proposition 1, $j∈ C h + 1 , i$ if and only if

$Δ 1 (a)≤jp< Δ 1 (a+h)= Δ 1 (a)+(h+1)p.$
(9)

Noting the fact that $Δ 1 (a)/p$ is a positive integer, the number of positive integers satisfying equation (9) must be $h+1$. Thus, we have $| C h + 1 , i |=h+1$ and $C h + 1 , i =(b,b+1,…,b+h)$, where $b= Δ 1 (a)/p$. Since $Δ 1 (a+1)− Δ 1 (a)=⋯= Δ 1 (a+h−1)− Δ 1 (a+h−2)=p$, we have $SUCC(j)≠SUCC(j−1)$ for $j=b,b+1,…,b+h−1$. Since $Δ 1 (a+h)− Δ 1 (a+h−1)=2p$, we have $SUCC(b+h)≠SUCC(b+h−1)$. Thus,

$Δ 1 (b)− Δ 1 (b−1)=⋯= Δ 1 (b+h−1)− Δ 1 (b+h−2)=p$

and

$Δ 1 (b+h)− Δ 1 (b+h−1)=2p,$

which follows from Proposition 3. By the arbitrariness of i, result (i), result (ii) and result (iii) hold for $k=h+1$. □

We define $f(j)=( Δ 1 (j)− Δ 1 (j−1))/p$ and denote by $f(j)$ the node in Figure 1 instead of integer j in $C k i$. Now we can give the triangle structure diagram in constant time in the case $S=vp$ (see Figure 2).

To use the information provided by the diagram, we denote by $(k,i,w)$ the w th integer in the i th periodic set $C k i$ of the k th batch case set $N k$, i.e. $(k,i,w)= ∑ t = 1 k − 1 tv+(i−1)k+w$ under $S=vp$. For example, $(4,3,2)= ∑ t = 1 4 − 1 tv+(3−1)4+2=28$ if $v=3$. Since $( C 1 , 1 ,…, C 1 , v ,…, C k , 1 ,…, C k , v ,…)$ is a partition of the set of position integers, we may write every position integer $n= ∑ t = 1 k − 1 tv+(i−1)k+w$ as $(k,i,w)$, where all k, i, and w with $k≥1$, $1≤i≤v$ and $1≤w≤k$ are integers. We define $(0,0,0)=0$. Now we give one of our main results.

Theorem 2 Assume $S=vp$. Then for an arbitrary positive integer $(k,i,w)$, the following hold and are decided in constant time:

1. (i)
2. (ii)

the optimal solution of $(k,i,w)$-jobs batch sizing problem

(10)

where all k, i, and w with $k≥1$, $1≤i≤v$, and $1≤w≤k$ are integers.

Proof For any n, we can give another kind of expression $(k,i,w)$ in constant time. Also, the optimal successor and $b t$ can be decided in constant time. Thus, the specific expression of the optimal solution is decided in constant time.

In the case $k=1$, $(k,i,w)=(1,i,1)=i. This implies $(k,i,w)p<(v+1)p= Δ 1 (0)$. By Proposition 1, $SUCC(k,i,w)=0$. In the case $k>1$, result (i) clearly follows from Proposition 4 or Figure 2. Due to result 1,

Thus,

$b t = ( k − t + 1 , i , w ) − ( k − t , i , w ) = ( ∑ h = 1 k − t h v + ( i − 1 ) ( k − t + 1 ) + w ) − ( ∑ h = 1 k − t − 1 h v + ( i − 1 ) ( k − t ) + w ) = ( k − t ) v + i − 1$

for $t=1,…,k−w$,

$b t = ( k − t + 1 , i , k − t + 1 ) − ( k − t , i , k − t ) = ( ∑ h = 1 k − t h v + ( i − 1 ) ( k − t + 1 ) + ( k − t + 1 ) ) − ( ∑ h = 1 k − t − 1 h v + ( i − 1 ) ( k − t ) + ( k − t ) ) = ( k − t ) v + i$

for $t=k−w+1,…,k−1$,

$b k =(1,i,1)−0=i.$

□

For example, we consider an instance of the batch sizing problem with 100 jobs and $S=4p$. 100 can be written as $84+14+2= ∑ t = 1 7 − 1 t×4+(3−1)×7+2=(7,3,2)$. By the triangle structure diagram in the case $S=4p$, we can obtain the successor relation between the number of jobs: $(7,3,2)→(6,3,2)→(5,3,2)→(4,3,2)→(3,3,2)→(2,3,2)→(1,3,1)→(0,0,0)$. Thus, the optimal solution is $( b 1 ,…, b 7 )=(26,22,18,14,10,7,3)$. Of course, we may take the optimal solution by (10). For example, for a problem with $1,023$ jobs and $S=10p$, by $1,019=910+98+11= ∑ t = 1 14 − 1 t×10+(8−1)×14+11=(14,8,11)$, the optimal solution $( b 1 ,…, b 14 )=(137,127,117,108,98,88,78,68,58,48,38,28,18,8)$ as follows from (10).

We recall the solving formula by Santos  and Santos and Magazine : $b i =n/k+S(k+1)/2p−iS/p$ for $i=1,…,k$, where $k=⌈ 1 / 4 + 2 n p / S −1/2⌉$. The validity of the formula depends on whether $n/k+S(k+1)/2p−iS/p$, for $i=1,…,k$, are integers. First, it is necessary that $S/p$ is an integer, i.e. $S=vp$, which is the same as the case considered by us in this section. Noting the fact in the solving formula $b 1 − b 2 =⋯= b k − 1 − b k =v$, it follows from the triangle structure diagram in the case $S=vt$ that $n=(k,i,1)$ and/or $n=(k,i,k)$. If $n=(k,i,1)$, then $n/k+S(k+1)/2p$ = $( ∑ t = 1 k − 1 tv+(i−1)k+1)/k+(k+1)v/2$ = $(k−1)v/2+i−1+1/k+(k+1)v/2$ = $kv+i−1+1/k$. Clearly, when $k>1$, $n/k+S(k+1)/2p$ is not an integer otherwise. Case $k=1$ can be reduced to the case $n=(k,i,k)$; if $n=(k,i,k)$, then $n/k+S(k+1)/2p$ = $( ∑ t = 1 k − 1 tv+(i−1)k+k)/k+(k+1)v/2=(k−1)v/2+i−1+1+(k+1)v/2$ = $kv+i$ is an integer. Thus, the solving formula by Santos  and Santos and Magazine  is appropriate for the problem with $S=vp$ and $n= ∑ t = 1 k − 1 tv+(i−1)k+k$, where k, v, and $i≤v$ are positive integers.

4 The triangle structure diagram in the case $S=vp+r$

In this section we present a specific diagram of the batching problem with $S=vp+r$ that can be obtained in $O( n )$ time, where $0 and v are integers. Since the diagram consists of v the same triangles and has a triangle-like shape, we call it a triangle structure diagram. Using the optimal successor membership between integers presented by the diagram, we give the specific expression of the optimal solution for the any-number-jobs batching problem with $S=vp+r$.

Noting the fact that $Δ 1 (0)=S+p=(v+1)p+r$, we have $N 1 =(1,…,v,v+1)$. We rewrite $N k$ as $N k =( C k , 1 ,…, C k , v , A k )$ for $k=1,2,…$ .

The diagram depends on the first-order difference sequence. Similar to the process in the last section, we first explore the properties of the first-order difference and then give the triangle structure diagram. The proposition below shows that the increments of the first-order difference for the first kv integers in $N k$ are of periodicity. Using this property, we can reduce the calculated amount of determining the first-order difference.

Proposition 5 Assume $S=vp+r$, where $0 and v are integers, and let $q k − 1 = ∑ t = 1 k − 1 | N t |$. Then:

1. (i)

$| C k i |=k$ for $i=1,…,v$.

2. (ii)

$Δ 1 ( q k − 1 +(i−1)k+k)− Δ 1 ( q k − 1 +(i−1)k)=(k+1)p$ for $i=1,…,v$.

3. (iii)

$Δ 1 ( q k − 1 +ik+w)− Δ 1 ( q k − 1 +ik+(w−1))$ = $Δ 1 ( q k − 1 +(i−1)k+w)− Δ 1 ( q k − 1 +(i−1)k+(w−1))$ for $i=1,…,v−1$ and $w=1,…,k$.

Proof We prove this proposition by induction. Clearly, all these results hold when $k=1$. Now suppose that they hold when $k=h$ for some positive integer h. We need to show that they hold when $k=h+1$. For any $i∈{1,…,v}$, by result (ii) with $k=h$: $Δ 1 ( q k − 1 +(i−1)h+h)− Δ 1 ( q k − 1 +(i−1)h)=(h+1)p$, and it follows from Proposition 1 that the result (i) holds when $k=h+1$.

Now we may write $C h + 1 , i$ as $(b+1,…,b+(h+1))$, where $b= q h +(i−1)(h+1)$. By Proposition 2, every integer in $C h , i$ must be the optimal successor of some integer in $C h + 1 , i$ and there is an integer, say $a+ t 0$, where $a= q h − 1 +(i−1)h$, in $C h , i$ such that it is the optimal successor of two integers in $C h + 1 , i$. Thus, we have

By equation (5),

$Δ 1 (b+t)− Δ 1 (b+t−1)= Δ 1 (a+t)− Δ 1 (a+t−1)$
(11)

for $t=1,…,( t 0 −1)$.

By equation (3),

$Δ 1 (b+ t 0 )− Δ 1 (b+ t 0 −1)=(b+ t 0 +1)p− Δ 1 (a+ t 0 −1).$
(12)

By equation (4),

$Δ 1 (b+ t 0 +1)− Δ 1 (b+ t 0 )= Δ 1 (a+ t 0 )−(b+ t 0 )p.$
(13)

By equation (5),

$Δ 1 (b+t)− Δ 1 (b+t−1)= Δ 1 (a+t−1)− Δ 1 (a+t−2)$
(14)

for $t=( t 0 +2),…,(h+1)$. Equations (11), (12), (13), and (14), along with the induction assumption, imply $Δ 1 (b+h+1)− Δ 1 (b)= Δ 1 (a+h)− Δ 1 (a)+p=(h+2)p$, i.e. the result (ii) holds when $k=h+1$.

By the induction assumption, we see that for, $i=1,…,v$, the position of the integer in each $C h i$ such that it is the optimal successor of two integers in $C h + 1 , i$ is the same, respectively. Using a similar argument as in the proof of result (ii), we may obtain the respective formulas (11), (12), (13), and (14) for each $i∈{1,…,v}$. The difference between them is that there are different a and b for different formulas. By comparing those formulas, along with the induction assumption, we see that result (iii) holds when $k=h+1$. □

The proposition below shows the number of integers in $N k$ and the first-order difference of the last integer in $N k$. We define $Q(j)= Δ 1 (j)/p$. In view of the fact that $Δ 1 (j)$ is an integer multiple of $Q(j)$ and the fact that all results above relative to the first-order difference hold if we replace ‘$Δ 1$’ by ‘Q’ and remove ‘p’, we call still $Q(j)$ as the first-order difference at j. For example, the sequence ${ Q ( i ) } i = − 1 + ∞$ is strictly monotone increasing, equation (3) becomes $Q(h+1)−Q(h)=(h+2)−Q( t 0 −1)$ and $Δ 1 ( q k − 1 +(i−1)k+k)− Δ 1 ( q k − 1 +(i−1)k)=(k+1)p$ implies $Q( q k − 1 +(i−1)k+k)−Q( q k − 1 +(i−1)k)=(k+1)$. We denote by $⌊x)$ the maximal integer less than the rational number x. Clearly, $0, for example, $⌊4.2)=4$ and $⌊4)=3$.

Proposition 6 Assume $S=vp+r$ and $ε=r/p$, where $0 and v are integers. Then for $k=1,2,…$

1. (i)

$| A k |=1+⌊kε)$,

2. (ii)

$q k =k+ ∑ t = 1 k (tv+⌊tε))$,

3. (iii)

$Q( q k )= ∑ t = 1 k (tv+⌊tε))+(k+1)+(k+1)v+(k+1)ε$,

where $q k = ∑ t = 1 k | N t |$ is the last integer in $N k$.

Proof We prove this proposition by induction. $| A 1 |=1$ is known. Since $0<ε<1$, we have $⌊ε)=0$. This implies that the results (i) and (ii) hold when $k=1$. By Proposition 5, $Q(v)=Q(0)+2v$. Since $SUCC(v)=SUCC(v+1)=0$, $SUCC(v+2)=1$ and $⌊ε)=0$, by (4), we have $Q( q 1 )=Q(v+1)=Q(v)+Q(0)−v=2v+2(v+1)+2ε−v=v+2+2v+2ε$. This implies that result (iii) holds when $k=1$. Now suppose that they hold when $k=h$ for some positive integer h. We need to show that they hold when $k=h+1$. We know that $A h + 1 ={j∣ Δ 1 ( q h −| A h |)≤jp< Δ 1 ( q h )}$ or $A h + 1 ={j∣Q( q h −| A h |)≤j. By Proposition 5 and the induction assumption,

$Q ( q h − | A h | ) = Q ( q h − 1 ) + ( h + 1 ) v = ∑ t = 1 h − 1 ( t v + ⌊ t ε ) ) + h + h v + h ε + ( h + 1 ) v = h + ( h + 1 ) v + ∑ t = 1 h ( t v + ⌊ t ε ) ) + ( h ε − ⌊ h ε ) )$

and

$Q( q h )=(h+1)+ ∑ t = 1 h + 1 ( t v + ⌊ t ε ) ) + ( ( h + 1 ) ε − ⌊ ( h + 1 ) ε ) ).$

By $0<(hε−⌊hε))≤1$ and $0<((h+1)ε−⌊(h+1)ε))≤1$, we see that the minimal positive integer greater than or equal to $Q( q h −| A h |)$ is $h+(h+1)v+ ∑ t = 1 h (tv+⌊tε))+1$, and the maximal positive integer less than $Q( q h )$ is $(h+1)+ ∑ t = 1 h + 1 (tv+⌊tε))$. Thus,

$| A h + 1 | = ( h + 1 ) + ∑ t = 1 h + 1 ( t v + ⌊ t ε ) ) − ( h + ( h + 1 ) v + ∑ t = 1 h ( t v + ⌊ t ε ) ) ) = 1 + ⌊ ( h + 1 ) ε ) .$

This implies result (i) holds. Due to Proposition 5, we have

$q h + 1 = q h + ( h + 1 ) v + 1 + ( h + 1 ) ⌊ ( h + 1 ) ε ) = h + ∑ t = 1 h ( t v + ⌊ t ε ) ) + ( h + 1 ) v + 1 + ⌊ ( h + 1 ) ε ) = ( h + 1 ) + ∑ t = 1 h + 1 ( t v + ⌊ t ε ) ) .$

This implies result (i) holds. To prove result (iii) with $k=h+1$, we consider two cases: (a1) $⌊(h+1)ε)=⌊hε)$, and (b1) $⌊(h+1)ε)=⌊hε)+1$.

Case (a1) $⌊(h+1)ε)=⌊hε)$. In this case, we have $| A h + 1 |=| A h |$. This implies that all the optimal successors of integers in $A h + 1$ are different. By equation (5), $Q( q h + 1 )−Q( q h + 1 −⌊(h+1)ε)−1)=Q( q h )−Q( q h −⌊(h)ε)−1)$. This, along with the induction assumption and Proposition 5, implies that

$Q ( q h + 1 ) = Q ( q h + 1 − ⌊ ( h + 1 ) ε ) − 1 ) + Q ( q h ) − Q ( q h − ⌊ h ε ) − 1 ) = Q ( q h ) + ( h + 2 ) v + ( Q ( q h ) − Q ( q h − 1 ) ) − ( h + 1 ) v = Q ( q h ) + v + ⌊ h ε ) + 1 + ( h + 2 ) v + ε = ∑ t = 1 h + 1 ( t v + ⌊ t ε ) ) + ( h + 2 ) + ( h + 2 ) v + ( h + 2 ) ε .$

Case (b1) $⌊(h+1)ε)=⌊hε)+1$. In this case, we have $| A h + 1 |=| A h |+1$. By similar arguments as used in the proof of Proposition 5, $Q( q h + 1 )−Q( q h + 1 −⌊(h+1)ε)−1)=Q( q h )−Q( q h −⌊(h)ε)−1)+1$. By the same argument as in Case (a1), we have

$Q ( q h + 1 ) = 1 + Q ( q h ) + v + ⌊ h ε ) + 1 + ( h + 2 ) v + ε = Q ( q h ) + ⌊ ( h + 1 ) ε ) + ( h + 1 ) v + 1 + v + ε = ∑ t = 1 h + 1 ( t v + ⌊ t ε ) ) + ( h + 2 ) + ( h + 2 ) v + ( h + 2 ) ε .$

This ends the proof for result (iii). □

The proposition below shows that the optimal successor membership between numbers of jobs is exactly determined by the coefficients of ε in the expression of the first-order difference. To determine the optimal successor membership between the numbers of jobs, by Proposition 5, we assume $v=1$. We denote by $(k,w)$ the w th integer of $C k 1$ and by $(k,k+w)$ the w th integer of $A k$. We define $(k,0)=(k,1)−1$ and $(k,k+0)=(k,k)$, respectively. $c k , w$ denotes the coefficient of ε in $Q(k,w)$ for $w=1,…,k+⌊kε)+1$, or the coefficient of $(k,w)$ for short. We set $r k =⌊kε)$.

Proposition 7 Assume $S=vp+r$ and $ε=r/p$, where $0 and v are integers. Then for $k=1,2,…$ :

1. (i)

$( c k 1 ,…, c k k )$ is a permutation of ${1,…,k}$.

2. (ii)

If $c k t 0 =1$, then $SUCC(k, t 0 )=SUCC(k, t 0 +1)=(k−1, t 0 )$; if $c k , k + t 0 =1$, then $SUCC(k, t 0 )=SUCC(k, t 0 +1)=(k−1, t 0 )$.

3. (iii)

Triangle rule:

(15)
(16)
$c k , k + r k + 1 =k+1.$
(17)

Proof Since $F(0)=0$, $F(1)/p=v+1+ε$ and $F(j)/p=j(v+ε+(j−SUCC(j)))+F(SUCC(j))/p$ for $j=1,2,…$ , $Q(j)=(F(j+1)−F(j))/p$ is a linear function of ε. Now we prove this proposition by induction. Simple calculations yield

$Q ( 0 , 0 ) = 2 + ε ; Q ( 1 , 1 ) = 4 + ε , Q ( 1 , 1 + 1 ) = 5 + 2 ε ; Q ( 2 , 1 ) = 7 + ε , Q ( 2 , 2 ) = 8 + 2 ε , Q ( 2 , 2 + 1 ) = 9 + 3 ε$

if $r 2 ≤1$ and

$Q(2,1)=7+ε,Q(2,2)=8+2ε,Q(2,2+1)=10+ε,Q(2,2+2)=10+3ε$

if $r 2 >1$. This implies that all results hold when $k=1$ and $k=2$. Now suppose that they hold when $k=h$ for some positive integer $h≥2$. We need to show that they hold when $k=h+1$.

Now we prove result (i). There are two cases to consider: (a3) $SUCC(h+1,1)=SUCC(h+1,2)=(h,1)$, and (b3) $SUCC(h+1,1)≠SUCC(h+1,2)$.

Case (a3) $SUCC(h+1,1)=SUCC(h+1,2)=(h,1)$. By equation (3), $Q(h+1,1)=Q(h,h+(1+ r h ))+(h+1,2)−Q(h−1,(h−1)+(1+ r h − 1 ))$. Due to the induction assumption, $c h , h + ( 1 + r h ) =h+1$ and $c h − 1 , ( h − 1 ) + ( 1 + r h − 1 ) =h$. Thus, we have $c h + 1 , 1 =1$.

By equation (4), $Q(h+1,2)=Q(h+1,1)+Q(h,1)−(h+1,1)$. Thus, we have $c h + 1 , 2 = c h + 1 , 1 + c h , 1 = c h , 1 +1$.

By equation (5), $Q(h+1,3)=Q(h+1,2)+Q(h,2)−Q(h,1)$. Thus, we have $c h + 1 , 3 = c h + 1 , 2 + c h , 2 − c h , 1 = c h , 1 +1+ c h , 2 − c h , 1 = c h , 2 +1$. Similarly, we have $c h + 1 , w = c h , w − 1 +1$ for $w=4,…,h+1$. Thus,

$( c h + 1 , 1 ,…, c h + 1 , h + 1 )=(1, c h , 1 +1, c h , 2 +1,…, c h , h +1).$
(18)

This, along with the induction assumption, implies that $( c h + 1 , 1 ,…, c h + 1 , h + 1 )$ is a permutation of ${1,…,h+1}$. Thus, result (i) holds in the case.

Case (b3) $SUCC(h+1,1)≠SUCC(h+1,2)$. We assume $SUCC(h+1, t 0 )=SUCC(h+1, t 0 +1)=(h, t 0 )$, where $1< t 0 ≤h$. By equation (5), $Q(h+1,1)=Q(h,h+(1+ r h ))+Q(h,1)−Q(h−1,(h−1)+(1+ r h − 1 ))$. Due to the induction assumption, $c h + 1 , 1 = c h , h + ( 1 + r h ) + c h , 1 − c h − 1 , ( h − 1 ) + ( 1 + r h − 1 ) =(h+1)+ c h , 1 −h= c h , 1 +1$. Similarly, we have $c h + 1 , w = c h , w +1$ for $w=2,…, t 0 −1$.

By equation (3), $Q(h+1, t 0 )=Q(h+1, t 0 −1)+(h+1, t 0 +1)−Q(h, t 0 −1)$. Thus, we have $c h + 1 , t 0 = c h + 1 , t 0 − 1 − c h , t 0 − 1 =1$.

By equation (4), $Q(h+1, t 0 +1)=Q(h+1, t 0 )+Q(h, t 0 )−(h+1, t 0 −1)$. Thus, we have $c h + 1 , t 0 + 1 = c h + 1 , t 0 + c h , t 0 = c h , t 0 +1$. Similarly, we have $c h + 1 , w = c h , w − 1 +1$ for $w= t 0 +2,…,h+1$. Thus,

$( c h + 1 , 1 ,…, c h + 1 , h + 1 )=( c h , 1 +1,…, c h , t 0 − 1 +1,1, c h , t 0 +1,…, c h , h +1).$
(19)

This, along with the induction assumption, implies that $( c h + 1 , 1 ,…, c h + 1 , h + 1 )$ is a permutation of ${1,…,h+1}$. Thus, result (i) holds in the case.

By the same arguments as in the proof of result (i), we have

$( c h + 1 , ( h + 1 ) + 1 ,…, c h + 1 , ( h + 1 ) + ( r h + 1 + 1 ) )=( c h , h + 1 +1,…, c h , h + ( r h + 1 ) +1)$
(20)

if $r h + 1 = r h$;

$( c h + 1 , ( h + 1 ) + 1 , … , c h + 1 , ( h + 1 ) + ( r h + 1 + 1 ) ) = ( c h , h + 1 + 1 , … , c h , h + ( t 0 − 1 ) + 1 , 1 , c h , h + ( t 0 ) + 1 , … , c h , h + ( r h + 1 ) + 1 )$
(21)

if $r h + 1 = r h +1$, where $1≤ t 0 ≤( r h +1)$. Due to equations (18), (19), (20), and (21), result (ii) holds when $k=h+1$.

Before other results are proved, we give an assertion, as follows.

Assume that $c j − 1$ and $c j$ are the coefficients of ε corresponding to $Q(j−1)$ and $Q(j)$ respectively, where $j∈ N k$ and $k≥2$. Then

() j is the optimal successor of two integers if $c j − 1 ε−⌊ c j − 1 ε)> c j ε−⌊ c j ε)$;

() j is the optimal successor of one integer if $c j − 1 ε−⌊ c j − 1 ε)≤ c j ε−⌊ c j ε)$.

We prove this assertion by contradiction. We write $Q(j−1)$ and $Q(j)$ as $a+ c j − 1 ε$ and $b+ c j ε$, respectively, where a and b are integers. Clearly, $a+⌊ c j − 1 ε)+1$ is the minimal integer greater than or equal to $Q(j−1)$ and $b+⌊ c j ε)$ the maximal positive integer less than $Q(j)$. Suppose that result () does not hold. Then we have $b+⌊ c j ε)−(a+⌊ c j − 1 ε))=1$. By $c j − 1 ε−⌊ c j − 1 ε)> c j ε−⌊ c j ε)$, $Q(j)=b+⌊ c j ε)+( c j ε−⌊ c j ε)), i.e. $Q(j)−Q(j−1)<1$. This contradicts Proposition 2.

Suppose that result () does not hold. Then $b+⌊ c j ε)−(a+⌊ c j − 1 ε))=2$. If $c j − 1 ε−⌊ c j − 1 ε)< c j ε−⌊ c j ε)$, using a similar argument as in the proof of result (), we can deduce that $Q(j)−Q(j−1)>2$. This contradicts Proposition 2. If $c j − 1 ε−⌊ c j − 1 ε)= c j ε−⌊ c j ε)$, then $Q(j)−Q(j−1)=2$. In the case $j∈ C k 1$, this, along with Proposition 5, implies $Q(i)−Q(i−1)=1$ for an arbitrary $i∈ C k 1$ with $i≠j$. And then we have $c i − 1 ε−⌊ c i − 1 ε)= c i ε−⌊ c i ε)$. Since ${ c j ∣j∈ C k 1 }={1,2,…,k}$, we have $ε−⌊ε)=2ε−⌊2ε)$. This contradicts $0<ε<1$. In the case $j∈ A k$, $Q(j)−Q(j−1)=2$ contradicts the fact that $Q( q k )−Q( q k − r k −1)= r k +1+ε$ and $Q(i)−Q(i−1)≥1$ for any integer i.

This assertion, along with the arguments used in the proof of result (i), implies that $( c h + 1 , 1 ,…, c h + 1 , ( h + 1 ) + r h + 1 + 1 )$ is exactly determined by $( c h , 1 ,…, c h , h + r h + 1 )$ and $c h − 1 , ( h − 1 ) + ( r h − 1 + 1 )$.

We proceed with our proof. Note the fact that the coefficient permutations of the optimal successors corresponding to ${(h, r h +1),…,(h,h+ r h +1)}$ and ${(h+1,1),…,(h+1,h+1)}$ are $( c h − 1 , r h − 1 + 1 ,…, c h − 1 , ( h − 1 ) + ( r h − 1 + 1 ) )$ and $( c h , 1 ,…, c h , h )$, respectively. By the induction assumption, we have $( c h − 1 , r h − 1 + 1 ,…, c h − 1 , ( h − 1 ) + ( r h − 1 + 1 ) )=( c h , 1 ,…, c h , h )$ and both are the same permutation of ${1,…,h}$. This, along with the assertion, implies that either

(a4) $c h + 1 , w = c h , r h + w = c h , w − 1 +1$ for $w=3,…,h+1$

or

(b4) $c h + 1 , w = c h , r h + w = c h , w +1$ for $w=2,…, t 0 −1$, $c h + 1 , t 0 = c h , r h + t 0 =1$ and $c h + 1 , w = c h , r h + w = c h , w − 1 +1$ for $w= t 0 +1,…,h+1$, where $2≤ t 0 ≤h$ and $c h , t 0 − 1 ε−⌊ c h , t 0 − 1 ε)> c h , t 0 ε−⌊ c h , t 0 ε)$.

Since both $( c h + 1 , 1 ,…, c h + 1 , h + 1 )$ and $( c h , r h + 1 ,…, c h , h + r h + 1 )$ are permutations of ${1,…,h+1}$, along with result (ii) and the fact that $( c h , 1 ,…, c h , h )$ is a permutation of ${1,…,h}$, we have $c h + 1 , 1 = c h , r h + 1 =1$, $c h + 1 , 2 = c h , r h + 2 = c h , 1 +1$ in the case (a4) and $c h + 1 , 1 = c h , r h + 1 = c h , 1 +1$ in the case (b4). Thus, equation (15) holds when $k=h+1$.

Now we prove equation (16). There are two cases to consider: (a5) $r h + 1 = r h$ and (b5) $r h + 1 = r h +1$.

Case (a5) $r h + 1 = r h$. By equation (20), $c h + 1 , ( h + 1 ) + w = c h , h + w +1$ for $w=1,…, r h + 1$. By the induction assumption, $c h , h + w = c h , w$ for $w=1,…, r h$. This, along with $c h , h = c h − 1 , ( h − 1 ) + r h − 1 + 1 =k$ and the assertion, implies that $c h + 1 , w = c h , h + w +1= c h + 1 , ( h + 1 ) + w$ for $w=1,…, r h + 1$. Thus, equation (16) holds in the case.

Case (b5) $r h + 1 = r h +1$. By equation (21), $c h + 1 , ( h + 1 ) + w = c h , h + w +1$ for $w=1,…, t 0 −1$, $c h + 1 , ( h + 1 ) + t 0 =1$ and $c h + 1 , ( h + 1 ) + w = c h , h + w − 1 +1$ for $w= t 0 +1,…, r h + 1$, where $1≤ t 0 ≤( r h +1)$ If $1≤ t 0 ≤ r h$, using similar arguments as in Case (a5), we find that equation (16) holds in the case. If $t 0 = r h +1$, then $c h + 1 , ( h + 1 ) + r h + 1 =1$. This, along with equation (15), implies that $( c h + 1 , r h + 1 + 1 ,…, c h + 1 , ( h + 1 ) + r h + 1 + 1 )$ is a permutation of ${1,…,h+2}$ and $1∉{ c h + 1 , r h + 1 + 1 ,…, c h + 1 , h + 1 }$. Using similar arguments as in Case (a5), we find that $1< c h + 1 , w = c h + 1 , ( h + 1 ) + w = c h , w +1$ for $w=1,…, r h + 1 −1$. It follows from $( c h + 1 , 1 ,…, c h + 1 , h + 1 )$ is a permutation of ${1,…,h+1}$ that $c h + 1 , r h + 1 =1$. Thus, equation (16) holds in the case.

Equation (17) has been proven in Proposition 6. □

We denote by the coefficient of ε corresponding to integer j the node in Figure 1 instead of the integer j in $C k i$. Using the triangle rule in Proposition 7, we may give a triangle structure diagram in the case $S=vp+r$.

We now show that the triangle structure diagram can be decided in $O( n )$ time. By the triangle rule in Proposition 7, we see that given the permutation of the numbers in the front row, the permutation of the numbers in the back row can be decided in constant time. The total of the permutations of k rows needs to be decided and the permutation of the first row is known. Because the number of batches in an optimal solution turns out to be $O( n )$, the triangle structure diagram can be decided in $O( n )$ time.

In order to better understand the characters of the triangle structure diagram, we give an example. Given $S=241$ and $p=100$, then $ε=0.41$, and the triangle structure diagram of the batching problem is given in Figure 3

From the arguments above, we see clearly that the optimal successor membership between the numbers of jobs can exactly be determined by the position of ‘1’ in $( c k , 1 ,…, c k , k )$ and $( c k , k + 1 ,…, c k , k + r k + 1 )$. We denote by $c(k)$ and $a(k)$ the positions in $( c k , 1 ,…, c k , k )$ and $( c k , k + 1 ,…, c k , k + r k + 1 )$ where 1 lies, respectively. We define $a(k)=+∞$ if there is not 1 in $( c k , k + 1 ,…, c k , k + r k + 1 )$, and $r 0 =0$. Using the triangle rule, a recursion for determining the position of 1 may be formulated as follows:

(22)

for $k=2,3,…$ ,

(23)

for $k=1,2,…$ .

Now we show that the recursion is correct. When $r k − 1 = r k − 2$, by equation (16), $c(k−1)> r k − 1$. By equation (15), $c(k)=c(k−1)− r k − 1$. When $r k − 1 = r k − 2 +1$, by equation (16), $a(k−1)=c(k−1)$. By equation (16), $c(k)=k−(( r k − 1 +1)−c(k−1))=(k−1)+c(k−1)− r k − 1$. Thus, equation (22) holds for $k=2,3,…$ . Equation (23) follows from equation (16) for $k=1,2,…$ .

By the recursion above, we see that the positions of ‘1’ in each row can be decided in constant time. The total of the positions of ‘1’ in k rows needs to be decided and the position of ‘1’ in the first row is known. Thus, all of the positions of ‘1’ in the triangle structure diagram can be decided in $O( n )$ time.

We denote by $(k,i, w k )$ and $(k, w k )$ the $w k$th integer in the i th periodic set $C k i$ of the k th batch case set $N k$, and the $w k$th integer in $A k$, respectively, i.e. $(k,i, w k )= ∑ t = 1 k − 1 | N t |+(i−1)k+ w k$ and $(k, w k )= ∑ t = 1 k − 1 | N t |+vk+ w k$. Now we give the last result as follows.

Theorem 3 Assume $S=vp+r$ with $0. Then for arbitrary positive integers $(k,i, w k )$ and $(k, w k )$, the following hold and are decided in $O( n )$ time:

1. (i)
2. (ii)
3. (iii)

The optimal solution of the $(k,i, w k )$-jobs batch sizing problem is

(24)

for $j=1,…,k$, where $c(j)$ is given by equation (22), and $w j − 1 = w j$ if $w j ≤c(j)$ and $w j − 1 = w j −1$ if $w j >c(j)$ for $j=k,…,2$.

1. (iv)

The optimal solution of $(k, w k )$-jobs batch sizing problem is

(25)

for $j=1,…,k$, where $a(j)$ is given by equation (23), and $w j − 1 = w j$ if $w j ≤a(j)$ and $w j − 1 = w j −1$ if $w j >a(j)$ for $j=k,…,2$.

Proof For any $j=1,…,k$, given $c(j)$ and $a(j)$, we can decide its the optimal successor and $b j$ in constant time. Since $c(j)$ and $a(j)$ can be decided in $O( n )$ time, the specific expression of the optimal solution is decided in $O( n )$ time.

In the case $k=1$, $(k,i, w k )=(1,i,1)=i. By Proposition 1, $SUCC(k,i, w k )=0$. In the case $k>1$, result (i) clearly follows from Proposition 7 or Figure 3. Similarly, result (ii) holds.

Now we show result (iii) for the case with $j=1$. When $w k ≤c(k)$, due to result (i), $SUCC(k,i, w k )=(k−1,i, w k )$. Thus,

$b 1 = ( k , i , w k ) − ( k − 1 , i , w k ) = ( ∑ h = 1 k − 1 | N h | + ( i − 1 ) k + w k ) − ( ∑ h = 1 k − 2 | N h | + ( i − 1 ) ( k − 1 ) + w k ) = | N k − 1 | + ( i − 1 ) = ( k − 1 ) v + r k − 1 + i .$

When $w k >c(k)$, due to result (i), $SUCC(k,i, w k )=(k−1,i, w k −1)$. Thus,

$b 1 = ( k , i , w k ) − ( k − 1 , i , w k − 1 ) = ( ∑ h = 1 k − 1 | N h | + ( i − 1 ) k + w k ) − ( ∑ h = 1 k − 2 | N h | + ( i − 1 ) ( k − 1 ) + ( w k − 1 ) ) = | N k − 1 | + ( i − 1 ) + 1 = ( k − 1 ) v + r k − 1 + i + 1 .$

The result for $j=2,…,k−1$ can be proved similarly. The result for $t=k$ is

$b k =(1,i,1)−0=i.$

This finishes the proof of result (iii).

Using similar arguments as in the proof of result (iii), result (iv) can be proved. □

For example, we consider the instance of a batch sizing problem with 105 jobs, $S=241$ and $p=100$. Since 105 can be written as $105=91+9+5= ∑ h = 1 9 − 1 | N h |+(2−1)9+5=(9,2,5)$. By the triangle structure diagram in the case $S=vp+r=2×100+41$, we can obtain the successor relation between the number of jobs: $8→7→6→6→5→4→3→2→1→1$, i.e., $(9,2,5)→(8,2,5)→(7,2,4)→(6,2,3)→(5,2,3)→(4,2,2)→(3,2,2)→(2,2,1)→(1,2,1)→(0,0,0)$. Thus, the optimal solution is $( b 1 ,…, b 9 )=(21,19,17,14,12,9,7,4,2)$. Of course, we may have the optimal solution by equation (24). However, before we solve the instance, we need to go to computer $r j$, $c(j)$, $a(j)$ and $∑ h = 1 j | N h |$ as follows:

Using equation (24), we have

by $w 9 =5≤c(9)=6$, $b 1 =(9−1)2+3+2=21$ and $w 8 = w 9 =5$;

by $w 8 =5>c(8)=1$, $b 2 =(9−2)2+2+2+1=19$ and $w 7 = w 8 −1=4$;

by $w 7 =4>c(7)=3$, $b 3 =(9−3)2+2+2+1=17$ and $w 6 = w 7 −1=3$;

by $w 6 =3≤c(6)=5$, $b 4 =(9−4)2+2+2=14$ and $w 5 = w 6 =3$;

by $w 5 =3>c(5)=2$, $b 5 =(9−5)2+1+2+1=12$ and $w 4 = w 5 −1=2$;

by $w 4 =2≤c(4)=3$, $b 6 =(9−6)2+1+2=9$ and $w 3 = w 4 =2$;

by $w 3 =2>c(3)=1$, $b 7 =(9−7)2+0+2+1=7$ and $w 2 = w 3 −1=1$;

by $w 2 =1≤c(2)=1$, $b 8 =(9−8)2+0+2=4$;

$b 9 =2$.

If n is chosen $137=113+20+4= ∑ h = 1 10 − 1 | N h |+2×10+4=(10,4)$, then using equation (25), similarly we have $( b 1 ,…, b 10 )=(25,22,19,17,15,13,10,8,5,3)$.

5 Conclusions

In this paper the problem of batching identical jobs on a single machine to minimize the completion time is studied by employing the difference analysis technique. We first establish the relation between the optimal solution and the first-order difference of the optimal objective function in terms of the number of jobs and investigate the properties of the first-order difference. Then, we obtain the triangle structure diagram of the batching problem in $O( n )$ time at most by using the permutation of some numbers which describe the character of the first-order difference. The diagrams enable us to see clearly the specific expressions of optimal solutions for the n-jobs batching problem and any m-jobs batching problem simultaneously, where $m≤n$. The difference analysis technique employed by us should be used for solving other batching problems. Analysis of many batching problems shows that, in some cases, the sequencing and batching of jobs can be decoupled. Once a sequence of jobs is known, dynamic programming is often adopted to solve the batching problem. In the case the difference expression of the optimal solution function may be obtained. It become possible that the solving algorithm may be improved by employing the difference analysis technique. The difference analysis technique should be a better tool for solving discrete mathematics problems.

References

1. 1.

Coffman EG Jr., Yannakakis M, Magazine MJ, Santos CA: Batch sizing and job sequencing on a single machine. Ann. Oper. Res. 1990, 26: 135–147. 10.1007/BF02248589

2. 2.

Naddef D, Santos C: One-pass batching algorithms for the one-machine problem. Discrete Appl. Math. 1988, 21: 133–145. 10.1016/0166-218X(88)90049-2

3. 3.

Coffman EG Jr., Nozari A, Yannakakis M: Optimal scheduling of products with two subassemblies on a single machine. Oper. Res. 1989, 37: 426–436. 10.1287/opre.37.3.426

4. 4.

Shallcross D: A polynomial algorithm for a one machine batching problem. Oper. Res. Lett. 1992, 11: 213–218. 10.1016/0167-6377(92)90027-Z

5. 5.

Potts CN, Kovalyov MY: Scheduling with batching: a review. Eur. J. Oper. Res. 2000, 120: 228–249. 10.1016/S0377-2217(99)00153-8

6. 6.

Santos, CA: Batching and sequencing decisions under lead time considerations for single machine problems. MSc thesis, Department of Management Sciences, University of Waterloo, Canada (1984)

7. 7.

Santos CA, Magazine M: Batching in single operation manufacturing systems. Oper. Res. Lett. 1985, 4: 99–103. 10.1016/0167-6377(85)90011-2

8. 8.

Albers S, Brucker P: The complexity of one-machine batching problems. Discrete Appl. Math. 1993, 47: 87–107. 10.1016/0166-218X(93)90085-3

Acknowledgements

This research was supported in part by the Zhejiang Natural Science Foundation of China Grant Y6110054, the Shanxi Scholarship Council of China, and the Hong Kong Polytechnic University Research Grant J-BB7D and The Hong Kong CERG Research Fund 5515/10H.

Author information

Correspondence to Shanlin Li.

Competing interests

The authors declare that they have no competing interests.

Authors’ contributions

All authors contributed equally to the manuscript and typed, read, and approved the final manuscript.

Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

Rights and permissions

Open Access This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Reprints and Permissions 