R E S E A R C H
Open Access
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 inO(√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 then-jobs batching problem and anym-jobs batching problem simultaneously, wherem≤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
Keywords: scheduling; batching; triangle structure; single machine
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 ofnjobs with identical processing time,J={j, . . . ,jn}={, . . . ,n},
to be processed on a single machine. In a given schedule, for each jobj∈J, we denote by Cjits completion time. The problem is, given job processing timepand setup timeS, to find the number of batchesk, and batch sizesbi, such thatki=bi=n, so as to minimize Coffmanet al.[] propose a backward dynamic programming algorithm, running inO(n)
andlcan be determined by the algorithm running inO(logplog(np)). However, Potts and Kovalyov [] point out that the algorithm by Shallcross [] is rather intricate. All of the op-timal 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 isk=√/ + np/S– /and the optimal batch sizesbiaren/k+S(k+ )/p–iS/pfor 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 inO(√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 then-jobs batching problem and anym-jobs batching problem simultaneously, wherem≤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 caseS=vpin Section and in the caseS=vp+εin Section , respectively, wherevand <ε<pare integers. Section 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 betweenpand 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 first-order difference sequence.
For ease of presentation, we sequence the jobs according to nonincreasing indices. Any solution of problem |pj=p,S–batch|
Cjis of the form
BS:Snk· · ·(nk–+ )Snk–· · ·(nk–+ )· · ·Sn· · ·,
wherekis the number of batches,
and the batch sizes areb=nk–nk–, . . . ,bk–=n–n,bk=n. Every solutionBS
corre-In order to solve the batch sizing problem, we obviously have to find a constantkand a sequence of indices
≤n<n<· · ·<nk=n
such that the above objective function value is minimized. Clearly, problem |pj=p,S– batch|Cjis a trivial matter whenS≤p. We have the following result.
Theorem If S≤p, then for problem|pj=p,S–batch|
Cj there exists an optimal solution in which k=n and ni=i for i= , . . . ,n,that is,b=· · ·=bk= .
By Theorem , we assume thatS>phereafter.
LetF(j) denote the minimum the sum of the completion times for thej-jobs batching problem containing jobs , . . . ,j. Coffmanet al.[] propose a backward dynamic program-ming algorithm. The initialization is
F() =
and the recursion forj= , . . . ,nis
F(j) =minjS+ (j–i)p+F(i)|≤i≤j– .
relationF(j,i+ ) < (>)F(j,i) stating thati+ is better (worse) thanias a successor ofjis equivalent to
(i) =F(i+ ) –F(i) < (>)jp.
To break ties when choosing the successor, we assume that if(i) =F(i+ ) –F(i) =jp,
that is,F(j,i+ ) =F(j,i), theni+ is better thanias a successor ofj. Thus, if the sequence
{(i)}+i=∞is strictly monotone increasing, the determining optimal successor ofjproblem
can be reduced to finding a nonnegative integertsuch that(t– )≤jp<(t), where
we define(–) = . We denote bySUCC(j) the optimal successor ofjhereafter.
Proposition Assume that the sequence{(i)}+i=–∞ is strictly monotone increasing and (t) –(t– )≥p for t= , , . . . .Then for each j there is a unique twith≤t≤j–
such that(t– )≤jp<(t)and t=SUCC(j).
Proof We first prove the existence by induction. Whenj= , we have =(–)≤p< () =F() –F() =S+pandSUCC() = . Now suppose that it holds whenj≤hfor
some positive integerh,i.e. there istwith ≤t≤h– such that (t– )≤hp< (t) <· · ·<(h– ). Forj=h+ , by the proposition and induction assumptions, we
have =(–)≤(h+ )p=hp+p<(h– ) +p≤(h). Thus, the existence holds for
j=h+ , and it follows that ((–),(), . . . ,(h)) is a partition of [,(h)).
Due to the fact that ((–),(), . . . ,(j– )) is a partition of [,(j– )) again, the
uniqueness holds.
Since the inequalities(–) <() <· · ·<(t– )≤jpimply thattis better than
t– ,t– better thant– , . . . , better than in order and the inequalitiesjp<(t) < · · ·<(j– ) imply thattis better thant+ ,t+ better thant+ , . . . ,j– better than
j– in order as a successor ofj, we havet=SUCC(j).
Now we give the key properties of the first-order difference.
Proposition If S>p,then the sequence{(i)}+i=–∞ is strictly monotone increasing and
p≤(t) –(t– )≤p for t= , , . . . .
Proof We prove this proposition by induction. Simple calculations yield
() =F() –F() =S+p,
F() =minF(, ),F(, ) =min(S+p) +S+p, (S+ p) = (S+ p),
() =F() –F() =S+ p>() >(–) =
and
() –() = p.
Now suppose that it holds whenj≤hfor some positive integerh,i.e.(–) <() < · · ·<(h) andp≤(t) –(t– )≤pfort= , , . . . ,h. We need to show that it holds
By the induction assumption and Proposition , we may assume thatSUCC(h+ ) =t,
where ≤t≤hand(t– )≤(h+ )p<(t). Sincep≤(t) –(t– ) and
p<S+p=() –(–), we see that the optimal successor ofhis eithert– ort
and ≤t– ≤h. Noting the fact that p<S+p=() –(–) and() –() =
p, along withp≤(t) –(t– ) fort= , . . . ,h, we have(h) > (h+ )p. Thus, the optimal successor ofh+ is between andh. By similar arguments forh, we see that the optimal successor ofh+ is eithertor t+ and ≤t+ ≤h. There are four
cases to consider: (a)SUCC(h) =SUCC(h+ ) =SUCC(h+ ) =t, (b)SUCC(h) =t– ,
SUCC(h+ ) =SUCC(h+ ) =t, (c)SUCC(h) =SUCC(h+ ) =t,SUCC(h+ ) =t+ ,
(d)SUCC(h) =t– ,SUCC(h+ ) =t,SUCC(h+ ) =t+ .
Case (a)SUCC(h) =SUCC(h+ ) =SUCC(h+ ) =t. In this case,
F(h) =hS+ (h–t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t).
Thus, we have
(h+ ) –(h) = p. ()
Case (b)SUCC(h) =t– ,SUCC(h+ ) =SUCC(h+ ) =t. In this case,
F(h) =hS+ (h–t+ )p
+F(t– ),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t).
Thus, we have
(h+ ) –(h) = (h+ )p–(t– ). ()
SinceSUCC(h+ ) =SUCC(h+ ) =t, the inequalities(t) > (h+ )p> (h+ )p≥(t–
) hold. This implies(h+ ) –(h) = (h+ )p–(t– )≥p. Noting the fact that
≤t≤h, by the induction assumption, we have(h+ ) –(h) = (h+ )p–(t– )≤ (t) –(t– )≤p.
Case (c)SUCC(h) =SUCC(h+ ) =t,SUCC(h+ ) =t+ . In this case,
F(h) =hS+ (h–t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t– )p
+F(t+ ).
Thus, we have
SinceSUCC(h) =SUCC(h+) =t, the inequalities(t) > (h+)p>hphold. This implies (h+ ) –(h) =(t) –hp≥p. Also, we have(h+ ) –(h) =(t) –hp≤p.
Otherwise,(t) –hp> pimplies(t) > (h+ )p. This contradicts with the fact that (t)≤(h+ )p<(t+ ).
Case (d)SUCC(h) =t– ,SUCC(h+ ) =t,SUCC(h+ ) =t+ . In this case,
F(h) =hS+ (h+ –t)p
+F(t– ),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t),
F(h+ ) = (h+ )S+ (h+ –t)p
+F(t+ ).
Thus, we have
(h+ ) –(h) =(t) –(t– ). ()
Since ≤t≤h, along with the induction assumption, the inequalitiesp≤(h+ ) –
(h)≤phold.
These two propositions, as well as the four formulas yielded in the proof of Propo-sition , are very important for our batch sizing problem. PropoPropo-sition ensures that the problem can be reduced to finding the interval formed by the first-order differ-ence 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 gers, and by the monotonicity each positive integer has a unique nonnegative inte-ger as its optimal successor. Based on the successor membership between these in-tegers, we can obtain a partition of the set of positive integers. We define Nk ={j| the optimal number of batches ofj-jobs batching problem is equal tok} for k = , , . . . , called thek-batches case set of numbers of jobs, and the sequence of integers inNkis in increasing natural order. Then (N, . . . ,Nk, . . .) is a partition of the set of position integers. LetC,i=ifori= , . . . ,|N|. ThenN= (C,, . . . ,C,|N|). We defineCk,i={j|SUCC(j)∈
Ck–,i} for k= , , . . . andi= , . . . ,|N|, called the ith periodic set of Nk, and the
se-quence of integers inCk,i is in increasing natural order. ThenNk= (Ck,, . . . ,Ck,|N|) and
(C,, . . . ,C,|N|, . . . ,Ck,, . . . ,Ck,|N|, . . .) 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 inCki(see Figure ).
In the following sections, we determine exactly the number of integers inCk,iand the optimal successor membership between the integers.
Figure 1 A basic diagram of the batching problem.
C, . . . C,|N|
C, . . . C,|N|
· · · . . . · · ·
Ck, . . . Ck,|N|
3 The triangle structure diagram in the caseS=vp
In this section we present a specific diagram of the batching problem withS=vp, which can be obtained in constant time. Since the diagram consists ofvtriangles 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 withS=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 se-quence, 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 dif-ference in the case S=vp, which will be given below, we can determine the first-order difference of the integers inN. Generally, we can compute the first-order difference of
the integers inNkif those inNk–are already known. The following two propositions
de-scribe the special properties of the first-order difference in the caseS=vp.
Proposition Assume S=vp.Then() –() = p,(j) –(j– ) = p if j and j–
have the same optimal successor and(j) –(j– ) =p otherwise for j= , , . . . .
Proof Since() =F() –F() =S+pand() =F() –F() =S+ p, we have() – () = p. SupposeSUCC(j) =t, wheret≥.
WhenSUCC(j– ) =SUCC(j) =SUCC(j+ ) =t, by (), we have(j) –(j– ) = p.
WhenSUCC(j– ) =SUCC(j) =tandSUCC(j+ ) =t+ , it follows from Proposition
that
(t– )≤(j– )p<jp<(t)≤(j+ )p. ()
Due toS=vpandF(i) =i(S+ (i–t)p) +F(t), whereSUCC(i) =t,F(i)/pis an integer fori= , , . . . . Thus,(i)/pis an integer fori= , , , . . . . By equation (),(t) – (j– )p= p.
So, we have(j) –(j– ) =(t) – (j– )p= p, following from equation ().
WhenSUCC(j– ) =t– ,SUCC(j) =tandSUCC(j+ ) =t+ , it follows from
Propo-sition that
(j– )p<(t– )≤jp<(t)≤(j+ )p. ()
Since both(t– )/pand(t)/pare integers, along with equation (), equation ()
implies(j) –(j– ) =(t) –(t– ) =p.
WhenSUCC(j– ) =t– andSUCC(j) =SUCC(j+ ) =t, it follows from Proposition
that
(j– )p<(t– )≤jp< (j+ )p<(t). ()
Since both(t– )/pand(t)/pare integers, along with equation (), equation ()
implies(j) –(j– ) = (j+ )p–(t– ) =p.
Proposition Assume S=vp.Then:
(ii) |Cki|=kfori= , . . . ,v.
(iii) Forj∈Nk,(j) –(j– ) = pifjis the last integer ofCkifori= , . . . ,v,
(j) –(j– ) =potherwise.
Proof We prove this proposition by induction. Clearly, all these results hold whenk= . Now suppose that they hold whenk=hfor some positive integerh,i.e.|Nh|=hv,|Chi|=h fori= , . . . ,vand forj∈Nh,(j) –(j– ) = pifjis the last integer ofChifori= , . . . ,v; (j) –(j– ) =potherwise. We need to show that they hold whenk=h+ . For any
i∈ {, . . . ,r}, by the induction assumption, we assumeChi= (a+ , . . . ,a+h), whereais a given positive integer, and we have
(a+ ) –(a) =· · ·=(a+h– ) –(a+h– ) =p
and
(a+h) –(a+h– ) = p.
Due to Proposition ,j∈Ch+,iif and only if
(a)≤jp<(a+h) =(a) + (h+ )p. ()
Noting the fact that(a)/pis a positive integer, the number of positive integers satisfying
equation () must beh+ . Thus, we have|Ch+,i|=h+ andCh+,i= (b,b+ , . . . ,b+h), whereb=(a)/p. Since(a+ ) –(a) =· · ·=(a+h– ) –(a+h– ) =p, we have
SUCC(j)=SUCC(j– ) forj=b,b+ , . . . ,b+h– . Since(a+h) –(a+h– ) = p, we
haveSUCC(b+h)=SUCC(b+h– ). Thus,
(b) –(b– ) =· · ·=(b+h– ) –(b+h– ) =p
and
(b+h) –(b+h– ) = p,
which follows from Proposition . By the arbitrariness ofi, result (i), result (ii) and result
(iii) hold fork=h+ .
We definef(j) = ((j) –(j– ))/pand denote byf(j) the node in Figure instead of integerjinCki. Now we can give the triangle structure diagram in constant time in the caseS=vp(see Figure ).
To use the information provided by the diagram, we denote by (k,i,w) thewth inte-ger in theith periodic setCki of thekth batch case setNk, i.e.(k,i,w) =
k–
t=tv+ (i–
.. .. ..
.. .. ..
.. .. .. .. .. ..
Figure 2 Triangle structure diagram in the caseS=vp.
Theorem Assume S=vp.Then for an arbitrary positive integer(k,i,w),the following hold and are decided in constant time:
(i)
SUCC(k,i,w) =
⎧ ⎪ ⎨ ⎪ ⎩
, ifk= ;
(k– ,i,w) ifw≤k– ; (k– ,i,w– ) ifw=k,
(ii) the optimal solution of(k,i,w)-jobs batch sizing problem
bt=
(k–t)v+i– fort= , . . . ,k–w;
(k–t)v+i fort=k–w+ , . . . ,k, ()
where allk,i,andwwithk≥,≤i≤v,and≤w≤kare integers.
Proof For anyn, we can give another kind of expression (k,i,w) in constant time. Also, the optimal successor andbtcan be decided in constant time. Thus, the specific expression of the optimal solution is decided in constant time.
In the casek= , (k,i,w) = (,i, ) =i<v+ . This implies (k,i,w)p< (v+ )p=(). By
Proposition ,SUCC(k,i,w) = . In the casek> , result (i) clearly follows from Proposi-tion or Figure . Due to result ,
SUCC(k–t+ ,i,w) = (k–t,i,w) fort= , . . . ,k–w,
SUCC(k–t+ ,i,k–t+ ) = (k–t,i,k–t) fort=k–w+ , . . . ,k– ,
SUCC(,i, ) = .
Thus,
bt= (k–t+ ,i,w) – (k–t,i,w)
=
k–t
h=
hv+ (i– )(k–t+ ) +w
–
k–t–
h=
hv+ (i– )(k–t) +w
fort= , . . . ,k–w,
bt= (k–t+ ,i,k–t+ ) – (k–t,i,k–t)
=
k–t
h=
hv+ (i– )(k–t+ ) + (k–t+ )
–
k–t–
h=
hv+ (i– )(k–t) + (k–t)
= (k–t)v+i
fort=k–w+ , . . . ,k– ,
bk= (,i, ) – =i.
For example, we consider an instance of the batch sizing problem with jobs and S= p. can be written as + + =–t=t× + ( – )× + = (, , ). By the tri-angle structure diagram in the caseS= p, we can obtain the successor relation between the number of jobs: (, , )→(, , )→(, , )→(, , )→(, , )→(, , )→ (, , )→(, , ). Thus, the optimal solution is (b, . . . ,b) = (, , , , , , ). Of
course, we may take the optimal solution by (). For example, for a problem with , jobs andS= p, by , = + + =–t= t× + ( – )× + = (, , ), the op-timal solution (b, . . . ,b) = (, , , , , , , , , , , , , ) as follows
from ().
We recall the solving formula by Santos [] and Santos and Magazine []: bi=n/k+ S(k+)/p–iS/pfori= , . . . ,k, wherek=√/ + np/S–/. The validity of the formula depends on whethern/k+S(k+)/p–iS/p, fori= , . . . ,k, are integers. First, it is necessary thatS/pis 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 formulab–b=· · ·=bk––bk=v, it follows from
the triangle structure diagram in the caseS=vtthatn= (k,i, ) and/orn= (k,i,k). Ifn= (k,i, ), thenn/k+S(k+ )/p= (kt=–tv+ (i– )k+ )/k+ (k+ )v/ = (k– )v/ +i– + /k+ (k+ )v/ =kv+i– + /k. Clearly, whenk> ,n/k+S(k+ )/pis not an integer otherwise. Casek= can be reduced to the casen= (k,i,k); ifn= (k,i,k), thenn/k+S(k+ )/p= (kt=–tv+ (i– )k+k)/k+ (k+ )v/ = (k– )v/ +i– + + (k+ )v/ =kv+iis an integer. Thus, the solving formula by Santos [] and Santos and Magazine [] is appropriate for the problem withS=vpandn=kt=–tv+ (i– )k+k, wherek,v, andi≤vare positive integers.
4 The triangle structure diagram in the caseS=vp+r
In this section we present a specific diagram of the batching problem withS=vp+rthat can be obtained inO(√n) time, where <r<pandvare integers. Since the diagram con-sists ofvthe 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 di-agram, we give the specific expression of the optimal solution for the any-number-jobs batching problem withS=vp+r.
Noting the fact that() =S+p= (v+ )p+r, we haveN= (, . . . ,v,v+ ). We rewrite
NkasNk= (Ck,, . . . ,Ck,v,Ak) fork= , , . . . .
the triangle structure diagram. The proposition below shows that the increments of the first-order difference for the firstkvintegers inNkare 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 qk–=
k–
t=|Nt|.Then:
(i) |Cki|=kfori= , . . . ,v.
(ii) (qk–+ (i– )k+k) –(qk–+ (i– )k) = (k+ )pfori= , . . . ,v.
(iii) (qk–+ik+w) –(qk–+ik+ (w– )) =
(qk–+ (i– )k+w) –(qk–+ (i– )k+ (w– ))fori= , . . . ,v– andw= , . . . ,k.
Proof We prove this proposition by induction. Clearly, all these results hold whenk= . Now suppose that they hold whenk=hfor some positive integerh. We need to show that they hold whenk=h+ . For anyi∈ {, . . . ,v}, by result (ii) withk=h:(qk–+ (i– )h+
h) –(qk–+ (i– )h) = (h+ )p, and it follows from Proposition that the result (i) holds
whenk=h+ .
Now we may writeCh+,ias (b+ , . . . ,b+ (h+ )), whereb=qh+ (i– )(h+ ). By Propo-sition , every integer inCh,imust be the optimal successor of some integer inCh+,iand there is an integer, saya+t, wherea=qh–+ (i– )h, inCh,isuch that it is the optimal successor of two integers inCh+,i. Thus, we have
SUCC(b+t) =a+t fort= , . . . , (t– ),
SUCC(b+t) =SUCC(b+t+ ) =a+t,
SUCC(b+t) =a+t– fort= (t+ ), . . . , (h+ ).
By equation (),
(b+t) –(b+t– ) =(a+t) –(a+t– ) ()
fort= , . . . , (t– ).
By equation (),
(b+t) –(b+t– ) = (b+t+ )p–(a+t– ). ()
By equation (),
(b+t+ ) –(b+t) =(a+t) – (b+t)p. ()
By equation (),
(b+t) –(b+t– ) =(a+t– ) –(a+t– ) ()
fort= (t+ ), . . . , (h+ ). Equations (), (), (), and (), along with the induction
assumption, imply(b+h+ ) –(b) =(a+h) –(a) +p= (h+ )p,i.e.the result
By the induction assumption, we see that for,i= , . . . ,v, the position of the integer in eachChisuch that it is the optimal successor of two integers inCh+,iis the same, respec-tively. Using a similar argument as in the proof of result (ii), we may obtain the respective formulas (), (), (), and () for eachi∈ {, . . . ,v}. The difference between them is that there are differentaandbfor different formulas. By comparing those formulas, along with the induction assumption, we see that result (iii) holds whenk=h+ .
The proposition below shows the number of integers inNkand the first-order difference of the last integer inNk. We defineQ(j) =(j)/p. In view of the fact that(j) is an integer
multiple ofQ(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 stillQ(j) as the first-order difference atj.
For example, the sequence{Q(i)}+i=–∞ is strictly monotone increasing, equation () becomes Q(h+ ) –Q(h) = (h+ ) –Q(t– ) and(qk–+ (i– )k+k) –(qk–+ (i– )k) = (k+ )p
impliesQ(qk–+ (i– )k+k) –Q(qk–+ (i– )k) = (k+ ). We denote byx) the maximal
integer less than the rational numberx. Clearly, <x–x)≤, for example,.) = and
) = .
Proposition Assume S=vp+r andε=r/p,where <r<p and v are integers.Then for
k= , , . . .
(i) |Ak|= +kε),
(ii) qk=k+kt=(tv+tε)), (iii) Q(qk) =
k
t=(tv+tε)) + (k+ ) + (k+ )v+ (k+ )ε,
where qk=kt=|Nt|is the last integer in Nk.
Proof We prove this proposition by induction.|A|= is known. Since <ε< , we have ε) = . This implies that the results (i) and (ii) hold whenk= . By Proposition ,Q(v) = Q() + v. SinceSUCC(v) =SUCC(v+ ) = , SUCC(v+ ) = and ε) = , by (), we have Q(q) =Q(v+ ) =Q(v) +Q() –v= v+ (v+ ) + ε–v=v+ + v+ ε. This
implies that result (iii) holds whenk= . Now suppose that they hold whenk=hfor some positive integerh. We need to show that they hold whenk=h+ . We know thatAh+= {j|(qh–|Ah|)≤jp<(qh)}orAh+={j|Q(qh–|Ah|)≤j<Q(qh)}. By Proposition
and the induction assumption,
Qqh–|Ah|=Q(qh–) + (h+ )v=
h–
t=
tv+tε)+h+hv+hε+ (h+ )v
=h+ (h+ )v+ h
t=
tv+tε)+hε–hε)
and
Q(qh) = (h+ ) + h+
t=
tv+tε)+(h+ )ε–(h+ )ε.
maximal positive integer less thanQ(qh) is (h+ ) +ht=+(tv+tε)). Thus,
This implies result (i) holds. Due to Proposition , we have
qh+=qh+ (h+ )v+ + (h+ )
This implies result (i) holds. To prove result (iii) withk=h+ , we consider two cases: (a)(h+ )ε) =hε), and (b)(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 assumev= . We denote by (k,w) thewth integer ofCk and by
Proposition Assume S=vp+r andε=r/p,where <r<p and v are integers.Then for k= , , . . . :
(i) (ck, . . . ,ckk)is a permutation of{, . . . ,k}.
(ii) Ifckt= ,thenSUCC(k,t) =SUCC(k,t+ ) = (k– ,t);ifck,k+t= ,then
SUCC(k,t) =SUCC(k,t+ ) = (k– ,t).
(iii) Triangle rule:
ck,w=ck–,rk–+w forw= , . . . ,k, ()
ck,k+w=ckw forw= , . . . ,rk, ()
ck,k+rk+=k+ . ()
Proof SinceF() = ,F()/p=v+ +εandF(j)/p=j(v+ε+ (j–SUCC(j))) +F(SUCC(j))/p forj= , , . . . ,Q(j) = (F(j+ ) –F(j))/pis a linear function ofε. Now we prove this propo-sition by induction. Simple calculations yield
Q(, ) = +ε;
Q(, ) = +ε, Q(, + ) = + ε;
Q(, ) = +ε, Q(, ) = + ε, Q(, + ) = + ε
ifr≤ and
Q(, ) = +ε, Q(, ) = + ε, Q(, + ) = +ε, Q(, + ) = + ε
ifr> . This implies that all results hold whenk= andk= . Now suppose that they
hold whenk=hfor some positive integerh≥. We need to show that they hold when k=h+ .
Now we prove result (i). There are two cases to consider: (a)SUCC(h+ , ) =SUCC(h+ , ) = (h, ), and (b)SUCC(h+ , )=SUCC(h+ , ).
Case (a)SUCC(h+ , ) =SUCC(h+ , ) = (h, ). By equation (),Q(h+ , ) =Q(h,h+ ( +rh)) + (h+ , ) –Q(h– , (h– ) + ( +rh–)). Due to the induction assumption,ch,h+(+rh)= h+ andch–,(h–)+(+rh–)=h. Thus, we havech+,= .
By equation (),Q(h+ , ) =Q(h+ , ) +Q(h, ) – (h+ , ). Thus, we havech+,=ch+,+
ch,=ch,+ .
By equation (),Q(h+ , ) =Q(h+ , ) +Q(h, ) –Q(h, ). Thus, we havech+,=ch+,+
ch,–ch,=ch,+ +ch,–ch,=ch,+ . Similarly, we havech+,w=ch,w–+ forw= , . . . ,h+ .
Thus,
(ch+,, . . . ,ch+,h+) = (,ch,+ ,ch,+ , . . . ,ch,h+ ). ()
This, along with the induction assumption, implies that (ch+,, . . . ,ch+,h+) is a permutation
of{, . . . ,h+ }. Thus, result (i) holds in the case.
Case (b) SUCC(h+ , )=SUCC(h+ , ). We assume SUCC(h+ ,t) =SUCC(h+
ch,–ch–,(h–)+(+rh–)= (h+ ) +ch,–h=ch,+ . Similarly, we havech+,w=ch,w+ for
w= , . . . ,t– .
By equation (),Q(h+ ,t) =Q(h+ ,t– ) + (h+ ,t+ ) –Q(h,t– ). Thus, we have
ch+,t=ch+,t––ch,t–= .
By equation (),Q(h+ ,t+ ) =Q(h+ ,t) +Q(h,t) – (h+ ,t– ). Thus, we have
ch+,t+=ch+,t+ch,t=ch,t+ . Similarly, we havech+,w=ch,w–+ forw=t+ , . . . ,h+ .
Thus,
(ch+,, . . . ,ch+,h+) = (ch,+ , . . . ,ch,t–+ , ,ch,t+ , . . . ,ch,h+ ). ()
This, along with the induction assumption, implies that (ch+,, . . . ,ch+,h+) is a permutation
of{, . . . ,h+ }. Thus, result (i) holds in the case.
By the same arguments as in the proof of result (i), we have
(ch+,(h+)+, . . . ,ch+,(h+)+(rh++)) = (ch,h++ , . . . ,ch,h+(rh+)+ ) ()
ifrh+=rh;
(ch+,(h+)+, . . . ,ch+,(h+)+(rh++))
= (ch,h++ , . . . ,ch,h+(t–)+ , ,ch,h+(t)+ , . . . ,ch,h+(rh+)+ ) ()
ifrh+=rh+ , where ≤t≤(rh+ ). Due to equations (), (), (), and (), result (ii)
holds whenk=h+ .
Before other results are proved, we give an assertion, as follows.
Assume thatcj–andcjare the coefficients ofεcorresponding toQ(j– ) andQ(j)
re-spectively, wherej∈Nkandk≥. Then
(∗) jis the optimal successor of two integers ifcj–ε–cj–ε) >cjε–cjε);
(∗∗) jis the optimal successor of one integer ifcj–ε–cj–ε)≤cjε–cjε).
We prove this assertion by contradiction. We writeQ(j– ) andQ(j) asa+cj–εand b+cjε, respectively, whereaandb are integers. Clearly,a+cj–ε) + is the minimal
integer greater than or equal toQ(j– ) andb+cjε) the maximal positive integer less thanQ(j). Suppose that result (∗) does not hold. Then we haveb+cjε) – (a+cj–ε)) = .
Bycj–ε–cj–ε) >cjε–cjε),Q(j) =b+cjε) + (cjε–cjε)) <a+cj–ε) + (cj–ε–cj–ε)) + =
Q(j– ) + ,i.e. Q(j) –Q(j– ) < . This contradicts Proposition .
Suppose that result (∗∗) does not hold. Thenb+cjε) – (a+cj–ε)) = . Ifcj–ε–cj–ε) <
cjε–cjε), using a similar argument as in the proof of result (∗), we can deduce thatQ(j) – Q(j– ) > . This contradicts Proposition . Ifcj–ε–cj–ε) =cjε–cjε), thenQ(j) –Q(j– ) = . In the casej∈Ck, this, along with Proposition , impliesQ(i) –Q(i– ) = for
an arbitraryi∈Ck withi=j. And then we haveci–ε–ci–ε) =ciε–ciε). Since{cj|
j∈Ck}={, , . . . ,k}, we haveε–ε) = ε–ε). This contradicts <ε< . In the case
j∈Ak,Q(j) –Q(j– ) = contradicts the fact thatQ(qk) –Q(qk–rk– ) =rk+ +εand Q(i) –Q(i– )≥ for any integeri.
We proceed with our proof. Note the fact that the coefficient permutations of the opti-mal successors corresponding to{(h,rh+ ), . . . , (h,h+rh+ )}and{(h+ , ), . . . , (h+ ,h+ )} are (ch–,rh–+, . . . ,ch–,(h–)+(rh–+)) and (ch,, . . . ,ch,h), respectively. By the induction
assump-tion, we have (ch–,rh–+, . . . ,ch–,(h–)+(rh–+)) = (ch,, . . . ,ch,h) and both are the same
permu-tation of{, . . . ,h}. This, along with the assertion, implies that either
(a) ch+,w=ch,rh+w=ch,w–+ forw= , . . . ,h+ or
(b) ch+,w=ch,rh+w=ch,w+ forw= , . . . ,t– ,ch+,t=ch,rh+t= and
ch+,w=ch,rh+w=ch,w–+ forw=t+ , . . . ,h+ , where≤t≤hand ch,t–ε–ch,t–ε) >ch,tε–ch,tε).
Since both (ch+,, . . . ,ch+,h+) and (ch,rh+, . . . ,ch,h+rh+) are permutations of {, . . . ,h+ }, along with result (ii) and the fact that (ch,, . . . ,ch,h) is a permutation of{, . . . ,h}, we have ch+,=ch,rh+= ,ch+,=ch,rh+=ch,+ in the case (a) andch+,=ch,rh+=ch,+ in the case (b). Thus, equation () holds whenk=h+ .
Now we prove equation (). There are two cases to consider: (a) rh+ =rh and
(b)rh+=rh+ .
Case (a)rh+=rh. By equation (),ch+,(h+)+w=ch,h+w+ forw= , . . . ,rh+. By the
induction assumption,ch,h+w=ch,wforw= , . . . ,rh. This, along withch,h=ch–,(h–)+rh–+=
k and the assertion, implies thatch+,w=ch,h+w+ =ch+,(h+)+wforw= , . . . ,rh+. Thus,
equation () holds in the case.
Case (b) rh+ =rh + . By equation (), ch+,(h+)+w =ch,h+w + for w= , . . . ,t–
, ch+,(h+)+t = and ch+,(h+)+w =ch,h+w–+ for w=t + , . . . ,rh+, where ≤ t ≤
(rh+ ) If ≤t≤rh, using similar arguments as in Case (a), we find that equation
() holds in the case. If t =rh+ , then ch+,(h+)+rh+ = . This, along with equation
(), implies that (ch+,rh++, . . . ,ch+,(h+)+rh++) is a permutation of{, . . . ,h+ } and /∈
{ch+,rh++, . . . ,ch+,h+}. Using similar arguments as in Case (a), we find that <ch+,w=
ch+,(h+)+w=ch,w+ forw= , . . . ,rh+– . It follows from (ch+,, . . . ,ch+,h+) is a
permuta-tion of{, . . . ,h+ }thatch+,rh+= . Thus, equation () holds in the case.
Equation () has been proven in Proposition .
We denote by the coefficient ofεcorresponding to integerjthe node in Figure instead of the integer jinCki. Using the triangle rule in Proposition , we may give a triangle structure diagram in the caseS=vp+r.
We now show that the triangle structure diagram can be decided inO(√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 ofkrows 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 beO(√n), the triangle structure diagram can be decided inO(√n) time.
In order to better understand the characters of the triangle structure diagram, we give an example. GivenS= andp= , thenε= ., and the triangle structure diagram of the batching problem is given in Figure
.. .. .. .. .. .. .. .. ..
Figure 3 Triangle structure diagram in the caseS=vp+r= 2×100 + 41.
(ck,k+, . . . ,ck,k+rk+), andr= . Using the triangle rule, a recursion for determining the position of may be formulated as follows:
c() = ;
c(k) =
c(k– ) –rk– ifrk–=rk–;
(k– ) +c(k– ) –rk– ifrk–=rk–+
()
fork= , , . . . ,
a(k) =
+∞ ifrk=rk–;
c(k) ifrk=rk–+
()
fork= , , . . . .
Now we show that the recursion is correct. Whenrk–=rk–, by equation (),c(k–
) >rk–. By equation (),c(k) =c(k– ) –rk–. Whenrk–=rk–+ , by equation (),
a(k– ) =c(k– ). By equation (),c(k) =k– ((rk–+ ) –c(k– )) = (k– ) +c(k– ) –rk–.
Thus, equation () holds for k= , , . . . . Equation () follows from equation () for k= , , . . . .
By the recursion above, we see that the positions of ‘’ in each row can be decided in constant time. The total of the positions of ‘’ inkrows needs to be decided and the posi-tion of ‘’ in the first row is known. Thus, all of the posiposi-tions of ‘’ in the triangle structure diagram can be decided inO(√n) time.
We denote by (k,i,wk) and (k,wk) thewkth integer in theith periodic setCkiof thekth batch case setNk, and thewkth integer inAk, respectively,i.e.(k,i,wk) =kt=–|Nt|+ (i– )k+wkand (k,wk) =
k–
t=|Nt|+vk+wk. Now we give the last result as follows.
Theorem Assume S=vp+r with <r<p.Then for arbitrary positive integers(k,i,wk) and(k,wk),the following hold and are decided in O(√n)time:
(i)
SUCC(k,i,wk) =
⎧ ⎪ ⎨ ⎪ ⎩
ifk= ;
(ii)
(iv) The optimal solution of(k,wk)-jobs batch sizing problem is
The result forj= , . . . ,k– can be proved similarly. The result fort=kis
bk= (,i, ) – =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 jobs,S= andp= . Since can be written as = + + =–h=|Nh|+ ( – ) + = (, , ). By the triangle structure diagram in the case S=vp+r= × + , we can ob-tain the successor relation between the number of jobs: →→→→→→ →→→,i.e., (, , )→(, , )→(, , )→(, , )→(, , )→(, , )→ (, , ) → (, , )→ (, , ) → (, , ). Thus, the optimal solution is (b, . . . ,b) =
(, , , , , , , , ). Of course, we may have the optimal solution by equation (). However, before we solve the instance, we need to go to computerrj,c(j),a(j) andjh=|Nh| as follows:
levelj: · · ·;
rj · · ·;
c(j) · · ·;
a(j) +∞ +∞ +∞ +∞ +∞ +∞ · · ·;
j
h=|Nh| · · ·.
Using equation (), we have
byw= ≤c() = ,b= ( – ) + + = andw=w= ;
byw= >c() = ,b= ( – ) + + + = andw=w– = ;
byw= >c() = ,b= ( – ) + + + = andw=w– = ;
byw= ≤c() = ,b= ( – ) + + = andw=w= ;
byw= >c() = ,b= ( – ) + + + = andw=w– = ;
byw= ≤c() = ,b= ( – ) + + = andw=w= ;
byw= >c() = ,b= ( – ) + + + = andw=w– = ;
byw= ≤c() = ,b= ( – ) + + = ;
b= .
Ifnis chosen = + + =–h= |Nh|+ × + = (, ), then using equation (), similarly we have (b, . . . ,b) = (, , , , , , , , , ).
5 Conclusions
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 ob-tained. 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.
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.
Author details
1Department of Mathematics, Taizhou University, Taizhou, Zhejiang 317000, P.R. China.2Department of Logistics and
Maritime Studies, Hong Kong Polytechnic University, Kowloom, Hong Kong, P.R. China.
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.
Received: 11 July 2013 Accepted: 26 December 2013 Published: 19 February 2014
References
1. Coffman, EG Jr., Yannakakis, M, Magazine, MJ, Santos, CA: Batch sizing and job sequencing on a single machine. Ann. Oper. Res.26, 135-147 (1990)
2. Naddef, D, Santos, C: One-pass batching algorithms for the one-machine problem. Discrete Appl. Math.21, 133-145 (1988)
3. Coffman, EG Jr., Nozari, A, Yannakakis, M: Optimal scheduling of products with two subassemblies on a single machine. Oper. Res.37, 426-436 (1989)
4. Shallcross, D: A polynomial algorithm for a one machine batching problem. Oper. Res. Lett.11, 213-218 (1992) 5. Potts, CN, Kovalyov, MY: Scheduling with batching: a review. Eur. J. Oper. Res.120, 228-249 (2000)
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. Santos, CA, Magazine, M: Batching in single operation manufacturing systems. Oper. Res. Lett.4, 99-103 (1985) 8. Albers, S, Brucker, P: The complexity of one-machine batching problems. Discrete Appl. Math.47, 87-107 (1993)
doi:10.1186/1687-1847-2014-71
Cite this article as:Li et al.:Triangle structure diagrams for a single machine batching problem with identical jobs.