HAL Id: hal-00341359
https://hal.archives-ouvertes.fr/hal-00341359
Submitted on 27 Mar 2014
HAL is a multi-disciplinary open access archive for the deposit and dissemination of sci- entific research documents, whether they are pub- lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
Eric Angel, Evripidis Bampis, Fanny Pascual
To cite this version:
Eric Angel, Evripidis Bampis, Fanny Pascual. How good are SPT schedules for fair optimality criteria.
2nd Multidisciplinary International Conference on Scheduling : Theory and Applications (MISTA
2005), Jul 2005, New York, NY., United States. pp.244–257. �hal-00341359�
More formally, we denote by
the ordered collection
(l1;:::;l
n
)
and we as- sume that the indexing is chosen so that
l1 l2 ln. Our scheduling instance
Iis completely defined by the system
(;m), where
mis the num- ber of (identical) processors. Let
ibe a collection of processing times de- fined by
k = fln;ln 1;:::;ln m+1g,
k 1 = fln m;:::;ln 2m+1g,
:::,
1
=fl
n (k 1)m
;:::;l
1
g
, where
k =dnm
e
. The collection
iis called the
ithrank of tasks with respect to
(;m). Consider a schedule obtained by schedul- ing the tasks rank-by-rank in the order
1;
2
;:::;
k
and such that no two tasks of the same rank are scheduled on the same processor. Notice that any permutation of the tasks of the same rank assures the optimality of the sched- ule with respect to the sum of completion times criterion. This is the family of schedules that we call SPT schedules in the sequel.
We are interested to know whether among the SPT schedules, which are the optimal schedules for the sum of completion times criterion, it is possible to obtain good solutions for the following optimality criteria:
- the maximum sum of completion times per machine:
max1im X
T
j 2P
i C
j
. This measure captures the wish of distributing as much as possible the total sum of completion times among the
mmachines of the system.
- the global fairness [4]: For two vectors
X;Y 2V(I), we write
X4Yif
XiY
i
for all
i. The global approximation ratio of
X, denoted by
gbl(X)
, is the smallest
such that
!X 4 !Yfor all
Y 2 V(I). Informally
gbl(X)
is the smallest
for which
!Xis an
-approximation, in the coordinate-wise sense, to every vector
Y 2V(I). The best global approximation ratio achievable on the instance
Iis then defined as
gbl
(I)= inf
X2V(I)
gbl (X):
- the individual fairness: The individual happiness factor compares the completion time of a task with the smallest possible completion time of the same task in any feasible schedule. More formally, we define
ind
(X)
to be the smallest
such that
X 4Yfor all
Y 2V(I). The best approximation ratio achievable on the instance
Iis then defined as
ind
(I)= inf
X2V(I)
ind (X):
Our approach is in the same vein as the one of Bruno et al. [3] who con-
sidered the following question: among all optimal schedules for the sum of
P
1P
1P
2P
21 1
1
1 1
1 5 5
6 7 5
3
max. sum of completion times = 7
(total) sum of completion times = 11 (total) sum of completion times = 10
max. sum of completion times = 6
Figure 1. Instance for which the optimal solutions to the problems Minimize
P
n
j=1 C
j
and
MinMaxSCT
are different.
completion times, is it possible to compute one that minimizes the makespan?
(They proved that the problem is
NP-hard.) For a related problem, see also [6].
Organization of the paper and our contribution In Section 2, we consider the problem of minimizing the maximum completion time per machine (
MinMax SCT
). We first show that contrarily to the sum of completion times, the problem
Min Max SCTis
NP-hard. Furthermore, we show that an SPT schedule is a
(3 3=m+1=m2)-approximation algorithm for the
Min MaxSCT
problem and that there are instances for which any SPT schedule cannot achieve an approximation guarantee better than
2 2m 2
+m
. In Section 3, we consider the global approximation ratio and we prove that SPT schedules have an approximation ratio of
2 1=m(and that no algorithm can have a better approximation ratio if
m=2). Philips et al. [5] presented a 3-approximation for the same problem when release dates are taken into account. For the in- dividual happiness factor however the performance ratio cannot be bounded by any constant but we prove that a SPT schedule obtains the best possible performance guarantee. Finally, we focus on a more restricted version of the individual happiness factor where the obtained solutions are compared with respect to the family of SPT schedules and we prove a 2-approximation bound.
2. The
Min Max SCTproblem
We first remark that the problem of minimizing the sum of completion times and the
Min Max SCTproblem are different. To see that consider the fol- lowing instance: three tasks of length
1and a task of length
5on two identical processors (see Figure 1). The optimal solution for the problem of minimizing the sum of completion times consists in putting two tasks of length
1on a pro- cessor, and the other two tasks on the other processors (total sum of completion times
=10, maximum sum of completion times per processor
=7). The op- timal solution of
Min Max SCTconsists in putting the three tasks of length
1
on a processor, and the task of length
5on the other processor (total sum of
completion times
=11, maximum sum of completion time per processor
=6).
2.1 Hardness
We prove in this section that the
Min Max SCTproblem is
NP-hard.
Theorem 2.1 Min Max SCT
is
NP-hard.
Proof: Consider the decision version of the
Min Max SCTproblem:
MinMaxSCT
problem: Given a system
(;m), and a number
k. Does there exist a schedule such that its maximum sum of completion times is smaller than or equal to
k?
We will show that the
partitionproblem which is known to be
NP-hard [2] can be phrased in terms of problem
Min Max SCT.
Partition
problem: Given a collection
C=fx1;x
2
;:::;x
n
g
of integers.
Does there exist a partition
(A;B)of
C, i.e.
A[B=Cand
A\B =;, such that
P
x2A x=
P
x2B x
?
Given an instance of
partitionwith a collection
C=fx1;x
2
;:::;x
n g
of non decreasing integers
x1 x2 xn, we define a system
(;2)and a limit
ksuch that the
MinMaxSCTinstance admits a solution if and only the instance of
partitionadmits a solution. Let
k= 32 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
. We now define the system
(;2): we have
2ntasks
T1;T
2
;:::;T
2n
to schedule on
2processors
P1and
P2. Let
lidenote the execution time of task
Ti. Let the execution times
= fl1;l
2
;:::;l
2n
g
be such that
l2j 1= P
j 1
i=1 x
i
n i+1
and
l
2j
= P
j
i=1 x
i
n i+1
, for
j2f1;2;:::;ng. For example, (if
n6),
l1 =0; l2= x1n
;
l
3
= x
1
n
; l
4
= x
1
n +
x
2
n 1
;
l
5
= x
1
n +
x
2
n 1
; l
6
= x
1
n +
x
2
n 1 +
x
3
n 2
;
l
2n 1
= x
1
n +
x
2
n 1
++ x
n 1
2
;
l
2n
= x
1
n +
x
2
n 1
++ xn
1
2 +x
n
Let us now show that there is a solution of the
Min Max SCTproblem if and only if there is a solution of
partition.
If a partition
(A;B)exists for
Cthen there is a solution of the
Min MaxSCT
problem: we can obtain for our system
(;2)a schedule whose maxi- mum sum of completion times is
32 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
. This schedule can be obtained by assigning tasks
T2j 1and
T2jat rank
j: assign task
T2jto
P
1
and
T2j 1to
P2if
xj 2A, otherwise assign
T2jto
P2and
T2j 1to
P1. Indeed, the execution time of a task added at the
jthrank will be counted
n j+1
times in the sum of the completion times of its processor. For ex-
ample, the execution time of the last task of a processor will be counted only
once, whereas the execution time of the first task of a processor will be counted
n
times (because there are
ntasks on each processor). Thus the contribution to the sum of completion times per processor of the task
T2j 1(resp.
T2j), assigned at the
jthrank, is
(n j+1)l2j 1(resp.
(n j+1)l2j=
(n j+1)(l
2j 1 +
x
j
n j+1
)
). The difference between these two contributions is then
xj: if
xj2A
(i.e.
T2jis assigned to
P1) then the contribution of the
jthtask of
P1is equal to the contribution of the
jthtask of
P2, plus
xj. Likewise, if
xj2B
(i.e.
T2jis assigned to
P2) then the contribution of the
jthtask of
P2is equal to the contribution of the
jthtask of
P1, plus
xj. Thus, the sum of the completion times of the tasks of
P1is
P
n
j=1 T
2j 1 +
P
x
j 2A
x
j
, and the sum of the completion times of the tasks of
P2is
P
n
j=1 T
2j 1
+ P
x
j 2B
x
j
. Moreover
P
n
j=1 T
2j 1
=(n 1) x1
n
+(n 2) x2
n 1 ++
x
n 1
2
=
x
1 x1
n +x
2 x2
n 1
++x
n 1 x
n 1
2
= P
n
i=1 x
i P
n
i=1 x
i
n i+1
. So the sum of the completion times of the tasks of
P1is
(P
n
i=1 x
i P
n
i=1 xi
n i+1 )+
P
x
j 2A
x
j
, and the sum of the completion times of the tasks of
P2is
(P
n
i=1 x
i
P
n
i=1 x
i
n i+1 )+
P
x
j 2B
x
j
. If there is partition of
C(i.e.
P
x
j 2A
= P
x
j 2B
= P
n
i=1 x
i
2
) then the maximum sum of completion times per processor is equal to
(P
n
i=1 x
i P
n
i=1 xi
n i+1 )+
P
n
i=1 x
i
2
= 3
2 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
= k
. Thus, if there is a solution of
partition
, there is a solution of the
Min Max SCTproblem.
Let us now show that if there is a solution of the
Min Max SCTproblem, then there is also a solution of
partition. If the maximum sum of the comple- tion times per processor is smaller than or equal to
32 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
, then we have a SPT schedule. Indeed, the total sum of the completion times of a SPT schedule is
S=2
3
2 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
, as we saw it above, and a schedule has a minimum total sum of completion times if and only if it is a SPT schedule [3]. Since the total sum of completion times cannot be greater than twice the maximum sum of completion times per processor, a schedule which is a solution of the
Min Max SCTproblem is a SPT schedule. In any SPT schedule, the tasks of length
l2iand
l2i 1are at the
ithrank, because
l
1
< l
2 l
3
< :::l
2j 1
< l
2j l
2j+1
< l
2j+2
< l
n
. So, in any SPT schedule, the sum of completion times of
P1minus the one of
P2is equal to
P
T
2j 2P
1 x
j P
T
2j 2P
2 x
j
. If there is a solution of the
Min Max SCTproblem with
k = 32 (
P
n
i=1 x
i )
P
n
i=1 x
i
n i+1
then the sum of the completion times of
P1is equal to the sum of the completion times of
P2(otherwise the sum of completion times of all the tasks would be smaller than
S), and then
P
T2j2P1 x
j
= P
T2j2P2 x
j
: there is a partition of
Cand we can construct this
partition
(A;B)by placing
xjin
Aif
T2jis assigned to
P1and
xjin
Bif
T2jis assigned to
P2.
22.2 Approximation
In this section, we show that an optimal algorithm for the sum of comple- tion times criterion gives a 3-approximate solution for the
Min Max SCTproblem. Consider the following algorithm, denoted by SPT
greedy:
Order tasks by non decreasing execution times. At each step
i, for
1 i n, schedule the current task on the processor which has the smallest completion time.
This algorithm gives an optimal solution for the problem of minimizing the sum of completion times of the tasks. Let us show that this algorithm is a
(3 3
m +
1
m 2
)
-approximation algorithm for
Min Max SCT.
In order to let SPT
greedybe deterministic when several processors have the smallest execution time, we will refer in the proofs to the following algorithm, which is a greedy SPT algorithm (Proposition 2.1 shows that we add at each step a task on a processor which has the smallest completion time):
Order tasks by non decreasing execution times. At each step
i
, for
1 i n, schedule the current task on the processor
P
imodm
.
Proposition 2.1
a) At the beginning of step
iof SPT
greedy, the processor
Pimodmis the processor which has the smallest completion time and the smallest sum of completion times.
b) At the end of step
iof SPT
greedy, the processor
Pimodmis the processor which has the largest sum of completion times.
Proof:
a) We are at the beginning of step
i. Let
be the processor
Pimodm, and let
pdenote its completion time. Let us show that
has the smallest completion time:
– For each
k>imodm, processor
Pkhas a completion time greater
than or equal to
p. Indeed
Pkhas the same number of tasks as
and, for each
isuch that
1inumber of tasks on
, the
i-th task
of
Pkis greater than or equal to the
i-th task of
, by construction.
– For each
k<imodm, processor
Pkhas a completion time greater than or equal to
p. Indeed the number of tasks on
Pkis equal to the number of tasks on
plus one, and, for each
isuch that
1 i(number of tasks on
), the
(i+1)-th task of
Pkis greater than or equal to the
i-th task of
, by construction.
We use the same reasoning to show that
has the smallest sum of com- pletion times.
b) We are at the end of step
i. Let
be the processor
Pimodm, and let
pdenote its sum of completion times at this step. Let us show that
has the largest sum of completion times:
– For each
k > imodm, processor
Pkhas a sum of completion times smaller than or equal to
p. Indeed
Pkhas one task less than
and, for each
isuch that
1 i<number of tasks on
, the
i-th task of
Pkis smaller than or equal to the
(i+1)-th task of
, by construction.
– For each
k < imodm, processor
Pkhas a sum of completion times smaller or equal to
p. Indeed
Pkhas the same number of tasks as
and, for each
isuch that
1 inumber of tasks on
, the
i-th task of
Pkis smaller than or equal to the
i-th task of
, by construction.
2
Proposition 2.2
Let
OPTbe the maximum sum of completion times of a solution of
Min Max SCT. We have:
OPT
Min
(P
n
j=1 C
j )
m
;
where Min
(P
n
j=1 C
j
)
is the optimal value for the problem of minimizing the sum of completion times.
Proof: We will prove this proposition by contradiction. Let us suppose that we have
OPT < Min(P
n
j=1 Cj)
m
.
By definition each processor has a sum of completion times smaller than or equal to OPT:
8i2f1;:::;mg;P
T
j 2P
i C
j
OPT:
So,
P
n
j=1 C
j
= P
m
i=1 P
Tj2Pi C
j
mOPT
, and
OPTP
n
j=1 C
j
m
Min(
P
n
j=1 C
j )
m
;
a contradiction.
2Theorem 2.2
The algorithm SPT
greedyachieves an approximation guaran- tee of
(3 3m +
1
m 2
)
for
Min Max SCT.
Proof: Before we add the last task
Tn, the processor
Pxon which
Tnwill be scheduled has the smallest sum of completion times, denoted by
p, and the smallest completion time, denoted by
e(Proposition 2.1 a). Let
lndenote the execution time of task
Tn. The processor on which the last task is scheduled has the largest sum of completion times (Proposition 2.1 b), so:
max
1im P
Tj2Pi C
j
= P
Tj2Px C
j
=p+e+l
n
P
n 1
j=1 C
j
m
+e+l
n
Since SPT
greedygives an optimal solution of the minimum sum of comple- tion times problem, and since the completion time of
Tnin SPT
greedyis
e+ln, we have:
max
1im P
T
j 2P
i C
j
Min(Pn
j=1 C
j ) (e+l
n )
m
+e+l
n
MinPn
j=1 C
j
m
+(1 1
m )(e+l
n ):
Since
e+lnm
OPT
(because
eis the minimum completion time at step
n 1), and
lnOPT, we have:
e+l
n
= e+ l
n
m +
(m 1)ln
m
(1+ m 1
m
)OPT
(2
1
m )OPT
Moreover, since
MinP
n
j=1 Cj
m
OPT
(Proposition 2.2), we have:
max
1im P
T
j 2P
i C
j
OPT +(1 1
m )(2
1
m )OPT
(3
3
m +
1
m 2
)OPT:
2
Lower bound for SPT
greedy. We now show that SPT
greedydoes not achieve an approximation guarantee better than
2 2m 2
+m
. Consider the following instance:
mprocessors,
m(m 1)tasks of length
1and a task of length
B= P
m
i=1 i=
m(m+1)
2
.
SPT
greedywill schedule
m 1tasks of length
1on each processor, and the
task of length
Bwill be the last task of the first processor (see Figure 2). The
max. sum of completion times = 11 P
P
2P
1P
2P
3P
31 1
1 1
1 1 1
1
1 1
1 1 6
6
max. sum of completion times = 6
1
Figure 2. SPT
greedydoes not achieve an approximation guarantee better than (
2 2m 2
+m
):
example with m=3
maximum sum of completion times is then
P
m 1
i=1
i+(m 1)+B
, which is equal to
2(P
m
i=1 i) 1
.
An optimal solution for
Min Max SCTwould be the following one:
schedule
mtasks of length
1on each of the
(m 1)first processors, and the task of length
Bon the last processor. The maximum sum of completion times in this solution is then
P
m
i=1 i
.
So the ratio between the maximum sum of completion times of these two schedules is
2(P
m
i=1 i) 1
P
m
i=1 i
, which is equal to
2(1 1m 2
+m
)
, which tends towards
2
when
mgets large.
3. Fairness measures
In this section we will consider fairness measures in order to compare a schedule given by the greedy SPT algorithm, SPT
greedy, to any other schedule.
3.1 Global fairness measure
We will first use the fairness measure introduced in [4], namely the global approximation ratio. We prove that SPT
greedyhas a global approximation ratio of
2 1m
for the problem that we consider (and which is denoted by P
kall ), and that no algorithm can achieve a better global approximation ratio if
m=2.
Theorem 3.1
One has
gbl
(I) 2 1
m
for all instances
Iof schedul- ing on
midentical parallel machines (P
kall), for any
m 1. Moreover the completion times vector
Xof a schedule returned by SPT
greedyverifies
gbl
(X)2 1
m
.
Proof: Let us consider an instance
Iof tasks
Ti(
i 2 f1;:::;ng) ordered by increasing lengths. Let MR be the maximal ratio between a schedule
XSPTreturned by SPT
greedyand any schedule
Y: MR
= maxY!
X
SPT
!
, where
XY
means
maxi XiY
i
. So we have
8Y 2 V(I);!
XSPT
!
Y
MR, and then
!
X
SPT 4
MR
!Y. So MR
=gbl(XSPT). We will show that MR cannot be greater than
2 1
m
. Let us consider that this ratio is the
ithcoordinate of
!
X
SPT
, divided by the
ithcoordinate of
!Y(
i2f1;:::;ng).
The worst ratio can be achieved if the completion time of the
ithtask is as large as possible in the SPT
greedyschedule. By construction, in a schedule returned by SPT
greedy, the
ithcompletion time is the completion time of the task
T
i
, and
Tiis started after the tasks from
T1to
Ti 1, and before the tasks from
T
i+1
to
Tn. Since SPT
greedyis a greedy algorithm, the worst completion time of the
ithtask is achieved when the
(i 1)first tasks are completed when the
ithtask start to be executed: in this case, the completion time of
Tiis
P
i 1
j=1 l
j
m +l
i
. So the worst completion time of
Tiin an SPT
greedyschedule is
P
i 1
j=1 lj
m +l
i
. Let us now find the minimal value which can be taken by the
ithcoordinate of
!Y, an ordered completion time vector of a schedule of
I. Note that this value cannot be smaller than
li: indeed
!Yiis the
ithcompletion time and is then greater or equal to
(i 1)other completion times, and
liis the length of the
ithsmallest task. Note also that
!Yicannot be smaller than
P
i
j=1 l
j
m
: indeed this is the minimum completion time of the
ismallest tasks (when no processor is idle). Therefore, we have:
MR
P
i 1
j=1 l
j
m +l
i
max
P
i
j=1 l
j
m
; l
i
:
Let
Adenote
P
i
j=1 l
j
m
. We now consider the two possible cases:
Suppose that
li A, we have: MR
P
i 1
j=1 l
j
m +l
i
l
i
A l
i
m +l
i
l
i
A
l
i +1
1
m 2
1
m
Suppose that
li< A
, we have: MR
P
i 1
j=1 l
j
m +l
i
P
i
j=1 l
j
m
A l
i
m +l
i
A
1+
li
A (1
1
m )2
1
m
In both cases, we have MR
2 1m
. Since MR
= gbl (XSPT
)
, and since
X
SPT
is the completion time vector of the SPT
greedyschedule of
I, we proved that a schedule
Xreturned by SPT
greedyverifies
gbl(X)2 1
m
, and so that
gbl
(I)2 1
m
.
2completion times vector: X2=(1, 1,3) P
P
2P
1P
21
1 1 1
2
2
completion times vector: X1=(1, 2, 2)
1
Figure 3. Example where we have
gbl (I)=3
2
=2 1
m
.
Let us now show that it is not possible to have
gbl
(I) < 2 1
m
for all instances
Iof (P
kall). Indeed, if
m = 2, it is not possible to have always
gl ob (I)<
3
2
:
Theorem 3.2
It is not possible to have
gbl (I) <
3
2
for all instances
Iof scheduling on two identical parallel machines.
Proof: let us consider a system with two processors,
P1and
P2. Let us con- sider the following instance
I: a task
T1of length
1,
T2of length
1, and
T3of length
2. Consider the two completion times vector
X1 =(1;2;2)(obtained by putting
T1and
T2on
P1and
T3on
P2: see Figure 3) and
X2= (1;1;3)
(obtained by putting
T1and
T3on
P1and
T2on
P2). We have:
gbl(X1) =2, and
gbl(X
2 )=
3
2
. For each vector
Y 2V(I), we have
X!1 4!
Y
or
X!2 4!
Y
. So for each vector
Y 2V(I), we have
gbl(Y) 3
2
, and so
gbl (I)=
3
2
.
23.2 Individual fairness measure
In this section, we will compare the completion time of each task in a so- lution given by SPT
greedyto the best completion time this task could have in another schedule.
Theorem 3.3
ind
(I) 1 + n 1
m
for all instances
Iof scheduling on
m
identical parallel machines (P
k ind all), for any
m 1. Moreover the completion times vector
Xof a schedule returned by SPT
greedyverifies
ind
(X)1+ n 1
m
.
Proof: Let us consider an instance
Iof tasks
Ti(
i 2 f1;:::;ng) ordered by non decreasing lengths. It is easy to see that
ind(X
SPT
)
is the maximal ratio between a schedule
XSPTreturned by SPT
greedyand any schedule
Y. We will show that
ind(X
SPT
)
cannot be greater than
1+ n 1m