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

The problem of batching identical jobs on a single machine to minimize the completion time is studied by employing the diﬀerence analysis technique. Constant processing times and batch setup times are assumed. We ﬁrst establish the relation between the optimal solution and the ﬁrst-order diﬀerence of the optimal objective function in terms of the number of jobs and investigate the properties of the ﬁrst-order diﬀerence. 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 ﬁrst-order diﬀerence. The diagrams enable us to see clearly the speciﬁc 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 character of the ﬁrst-order diﬀerence. The diagrams enable us to see clearly the speciﬁc expressions of optimal solutions for the n -jobs batching problem and any m -jobs batching problem simultaneously, where m ≤ n . The diﬀerence analysis technique employed by us should be used for solving other batching problems.


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  , . . . , j n } = {, . . . , 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 k i= b i = n, so as to minimize n j= C j = k i= b i i j= (S + b j p). The problem is referred to as |p j = p, S -batch| C j . There are several different versions of solving the problem |p j = p, S -batch| C j . Coffman et al. [] propose a backward dynamic programming algorithm, running in O(n  ) 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 -iS)/p , http://www.advancesindifferenceequations.com/content/2014/1/71 and l can be determined by the algorithm running in O(log p log(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 = √ / + np/S -/ and the optimal batch sizes b i are n/k + S(k + )/p -iS/p for i = , . . . , 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  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  and in the case S = vp + ε in Section , respectively, where v and  < ε < p are integers. Section  contains a conclusion and a discussion of some possible extensions.

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 p. 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 firstorder difference sequence.
For ease of presentation, we sequence the jobs according to nonincreasing indices. Any solution of problem |p j = p, S -batch| C j is of the form BS : Sn k · · · (n k- + )Sn k- · · · (n k- + ) · · · Sn  · · · , where k is the number of batches,  ≤ n  < n  < · · · < n k = n http://www.advancesindifferenceequations.com/content/2014/1/71 and the batch sizes are b  = n kn k- , . . . , b k- = n n  , b k = n  . Every solution BS corresponds to an objective function value In order to solve the batch sizing problem, we obviously have to find a constant k and a sequence of indices  ≤ n  < n  < · · · < n k = n such that the above objective function value is minimized. Clearly, problem |p j = p, S -batch| C j is a trivial matter when S ≤ p. We have the following result.
Theorem  If S ≤ p, then for problem |p j = p, S -batch| C j there exists an optimal solution in which k = n and n i = i for i = , . . . , n, that is, b  = · · · = b k = .
By Theorem , 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 , . . . , j. Coffman et al. [] propose a backward dynamic programming algorithm. The initialization is F() =  and the recursion for j = , . . . , n is Under the most natural implementation, the algorithm requires O(n  ) 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  ≤ t ≤ j - such that Thus, we have Let {  (i)} +∞ i= denote the first-order difference sequence of the optimal objective function in terms of the number of jobs, where  (i) = F(i + ) -F(i) for i = , , , . . . . The http://www.advancesindifferenceequations.com/content/2014/1/71 relation F(j, i + ) < (>) F(j, i) stating that i +  is better (worse) than i as a successor of j is equivalent to  To break ties when choosing the successor, we assume that if  i= is strictly monotone increasing, the determining optimal successor of j problem can be reduced to finding a nonnegative integer t such that  (t -) ≤ jp <  (t), where we define  (-) = . We denote by SUCC(j) the optimal successor of j hereafter.

Proposition  Assume that the sequence {  (i)} +∞
i=- is strictly monotone increasing and Proof We first prove the existence by induction. When j = , we have  =  . For j = h + , by the proposition and induction assumptions, we . Thus, the existence holds for j = h + , and it follows that (  (-),  (), . . . ,  (h)) is a partition of [,  (h)).
Since the inequalities  (-) <  () < · · · <  (t  -) ≤ jp imply that t  is better than t  -, t  - better than t  -, . . . ,  better than  in order and the inequalities jp <  (t  ) < · · · <  (j -) imply that t  is better than t  + , t  +  better than t  + , . . . , j - better than j - in order as a successor of j, we have t  = SUCC(j). By the induction assumption and Proposition , we may assume that SUCC(h + ) = t  , where  ≤ t  ≤ h and  (t  -) ≤ (h + )p <  (t  ). Since p ≤  (t  ) - (t  -) and p < S + p =  () - (-), we see that the optimal successor of h is either t  - or t  and  ≤ t  - ≤ h. Noting the fact that p < S + p =  () - (-) and  () - () = p, along with p ≤  (t) - (t -) for t = , . . . , h, we have  (h) > (h + )p. Thus, the optimal successor of h +  is between  and h. By similar arguments for h, we see that the optimal successor of h +  is either t  or t  +  and  ≤ t  +  ≤ h. There are four cases to consider: In this case, Thus, we have In this case, Thus, we have In this case, Thus, we have (  ) http://www.advancesindifferenceequations.com/content/2014/1/71 Since SUCC(h) = SUCC(h+) = t  , the inequalities  (t  ) > (h+)p > hp hold. This implies This contradicts with the fact that Thus, we have These two propositions, as well as the four formulas yielded in the proof of Proposition , are very important for our batch sizing problem. Proposition  ensures that the problem can be reduced to finding the interval formed by the first-order difference problem. Proposition  and the four formulas make it possible to determine exactly the first-order difference sequence. p ≤  (h + ) - (h) ≤ p 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 N k = {j | the optimal number of batches of j-jobs batching problem is equal to k} for k = , , . . . , 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  , . . . , N k , . . .) is a partition of the set of position integers.
. . and i = , . . . , |N  |, called the ith periodic set of N k , and the sequence of integers in C k,i is in increasing natural order.
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 ki (see Figure ).
In the following sections, we determine exactly the number of integers in C k,i and the optimal successor membership between the integers.

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  (),  (), . . . ,  (|N  |) 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  . Generally, we can compute the first-order difference of the integers in N k if those in N k- are already known. The following two propositions describe the special properties of the first-order difference in the case S = vp.
Since both  Proof We prove this proposition by induction. Clearly, all these results hold when k = . Now suppose that they hold when k = h for some positive integer h, i.e.
We need to show that they hold when k = h + . For any i ∈ {, . . . , r}, by the induction assumption, we assume C hi = (a + , . . . , a + h), where a is a given positive integer, and we have Noting the fact that  (a)/p is a positive integer, the number of positive integers satisfying equation () must be h + . Thus, we have |C h+,i | = h +  and C h+, which follows from Proposition . By the arbitrariness of i, result (i), result (ii) and result (iii) hold for k = h + .
We define f (j) = (  (j) - (j -))/p and denote by f (j) the node in Figure  instead of integer j in C ki . Now we can give the triangle structure diagram in constant time in the case S = vp (see Figure ).
To use the information provided by the diagram, we denote by (k, i, w) the wth integer in the ith periodic set C ki of the kth batch case set N k , i.e.  Theorem  Assume S = vp. Then for an arbitrary positive integer (k, i, w), the following hold and are decided in constant time: where all k, i, and w with k ≥ ,  ≤ i ≤ v, and  ≤ 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.

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  < r < p 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.
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 http://www.advancesindifferenceequations.com/content/2014/1/71 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  Assume S = vp + r, where  < r < p and v are integers, and let q k- = k- t= |N t |. Then: . By Proposition , every integer in C h,i must be the optimal successor of some integer in C h+,i and there is an integer, say a + t  , where a = q h- + (i -)h, in C h,i such that it is the optimal successor of two integers in C h+,i . Thus, we have By equation (), for t = , . . . , (t  -). By equation (), By equation (), By equation (), By the induction assumption, we see that for, i = , . . . , v, the position of the integer in each C hi such that it is the optimal successor of two integers in C h+,i is the same, respectively. Using a similar argument as in the proof of result (ii), we may obtain the respective formulas (), (), (), and () for each i ∈ {, . . . , 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 + .
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) =  (j)/p. In view of the fact that  (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 '  ' by 'Q' and remove 'p' , we call still Q(j) as the first-order difference at j.
. We denote by x) the maximal integer less than the rational number x. Clearly,  < xx) ≤ , for example, .) =  and ) = .
Proposition  Assume S = vp + r and ε = r/p, where  < r < p and v are integers. Then for k = , , . . .
Proof We prove this proposition by induction. |A  | =  is known. Since  < ε < , we have ε) = . This implies that the results (i) and (ii) hold when k = . By Proposition , This implies that result (iii) holds when k = . Now suppose that they hold when k = h for some positive integer h. We need to show that they hold when k = h + . We know that By Proposition  and the induction assumption, and Q(q h ) = (h + ) + h+ t= tv + tε) + (h + )ε -(h + )ε .
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 , we assume v = . We denote by (k, w) the wth integer of C k and by (k, k +w) the wth integer of A k . We define (k, ) = (k, )- and (k, k +) = (k, k), respectively. c k,w denotes the coefficient of ε in Q(k, w) for w = , . . . , k + kε) + , or the coefficient of (k, w) for short. We set r k = kε). http://www.advancesindifferenceequations.com/content/2014/1/71 Proposition  Assume S = vp + r and ε = r/p, where  < r < p and v are integers. Then for k = , , . . . : (i) (c k , . . . , c kk ) is a permutation of {, . . . , k}.  We denote by the coefficient of ε corresponding to integer j the node in Figure  instead of the integer j in C ki . Using the triangle rule in Proposition , 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 , 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 =  and p = , then ε = ., and the triangle structure diagram of the batching problem is given in Figure  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 '' in (c k, , . . . , c k,k ) and (c k,k+ , . . . , c k,k+r k + ). We denote by c(k) and a(k) the positions in (c k, , . . . , c k,k ) and (c k,k+ , . . . , c k,k+r k + ) where  lies, respectively. We define a(k) = +∞ if there is not  in http://www.advancesindifferenceequations.com/content/2014/1/71  (c k,k+ , . . . , c k,k+r k + ), and r  = . Using the triangle rule, a recursion for determining the position of  may be formulated as follows: √ n) time. We denote by (k, i, w k ) and (k, w k ) the w k th integer in the ith periodic set C ki of the kth batch case set N k , and the w k th integer in A k , respectively, i.e. (k, i, w k ) = k- t= |N t | + (i -)k + w k and (k, w k ) = k- t= |N t | + vk + w k . Now we give the last result as follows.
Theorem  Assume S = vp + r with  < r < p. Then for arbitrary positive integers (k, i, w k ) and (k, w k ), the following hold and are decided in O( √ n) time: if w k ≤ a(k); (k -, w k -) if w k > a(k).
(iii) The optimal solution of the (k, i, w k )-jobs batch sizing problem is for j = , . . . , k, where c(j) is given by equation (), and w j- = w j if w j ≤ c(j) and w j- = w j - if w j > c(j) for j = k, . . . , . (iv) The optimal solution of (k, w k )-jobs batch sizing problem is for j = , . . . , k, where a(j) is given by equation (), and w j- = w j if w j ≤ a(j) and w j- = w j - if w j > a(j) for j = k, . . . , .
Proof For any j = , . . . , 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 = , (k, i, w k ) = (, i, ) = i < v +  + ε = Q(). By Proposition , SUCC(k, i, w k ) = . In the case k > , result (i) clearly follows from Proposition  or Figure  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.