<s>
Longest-processing-time-first	O
(	O
LPT	O
)	O
is	O
a	O
greedy	B-Algorithm
algorithm	I-Algorithm
for	O
job	B-Algorithm
scheduling	I-Algorithm
.	O
</s>
<s>
The	O
LPT	B-Algorithm
algorithm	I-Algorithm
works	O
as	O
follows	O
:	O
</s>
<s>
Order	O
the	O
jobs	O
by	O
descending	O
order	O
of	O
their	O
processing-time	O
,	O
such	O
that	O
the	O
job	O
with	O
the	O
longest	B-Algorithm
processing	I-Algorithm
time	I-Algorithm
is	O
first	O
.	O
</s>
<s>
Step	O
2	O
of	O
the	O
algorithm	O
is	O
essentially	O
the	O
list-scheduling	B-Algorithm
(	O
LS	O
)	O
algorithm	O
.	O
</s>
<s>
LPT	O
was	O
first	O
analyzed	O
by	O
Ronald	O
Graham	O
in	O
the	O
1960s	O
in	O
the	O
context	O
of	O
the	O
identical-machines	B-Algorithm
scheduling	I-Algorithm
problem	O
.	O
</s>
<s>
LPT	O
can	O
also	O
be	O
described	O
in	O
a	O
more	O
abstract	O
way	O
,	O
as	O
an	O
algorithm	O
for	O
multiway	B-Algorithm
number	I-Algorithm
partitioning	I-Algorithm
.	O
</s>
<s>
When	O
used	O
for	O
identical-machines	B-Algorithm
scheduling	I-Algorithm
,	O
LPT	O
attains	O
the	O
following	O
approximation	O
ratios	O
.	O
</s>
<s>
The	O
operation	O
of	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
can	O
be	O
partitioned	O
into	O
three	O
phases	O
:	O
</s>
<s>
Then	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
returns	O
:	O
</s>
<s>
Then	O
,	O
the	O
approximation	O
ratio	O
of	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
is	O
.	O
</s>
<s>
Proof	O
:	O
if	O
Pi	O
contains	O
only	O
one	O
number	O
x	O
,	O
then	O
it	O
is	O
dominated	O
by	O
the	O
optimal	O
bin	O
Qj	O
which	O
contains	O
x.givese	O
some	O
input	O
x	O
is	O
at	O
least	O
3	O
,	O
and	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
puts	O
it	O
in	O
some	O
Pi	O
.	O
</s>
<s>
Then	O
,	O
since	O
there	O
is	O
a	O
bundle	O
with	O
sum	O
less	O
than	O
3	O
,	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
will	O
not	O
put	O
any	O
other	O
input	O
in	O
Pi	O
,	O
contradicting	O
the	O
previous	O
lemma	O
.	O
</s>
<s>
During	O
the	O
run	O
of	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
,	O
the	O
sum	O
in	O
every	O
bin	O
Pi	O
becomes	O
at	O
least	O
8/3	O
before	O
the	O
sum	O
of	O
any	O
bin	O
exceeds	O
4	O
.	O
</s>
<s>
The	O
first	O
2m	O
inputs	O
are	O
:	O
2m-1	O
,	O
2m-1	O
,	O
2m-2	O
,	O
2m-2	O
,	O
...	O
,	O
m	O
,	O
m	O
.	O
The	O
last	O
m-1	O
inputs	O
are	O
all	O
m	O
.	O
Then	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
returns	O
:	O
</s>
<s>
These	O
results	O
hold	O
also	O
for	O
machines	B-Algorithm
with	I-Algorithm
different	I-Algorithm
speeds	I-Algorithm
.	O
</s>
<s>
Besides	O
the	O
simple	O
case	O
of	O
identical-machines	B-Algorithm
scheduling	I-Algorithm
,	O
LPT	O
has	O
been	O
adapted	O
to	O
more	O
general	O
settings	O
.	O
</s>
<s>
In	O
uniform-machines	B-Algorithm
scheduling	I-Algorithm
,	O
different	O
machines	O
may	O
have	O
different	O
speeds	O
.	O
</s>
<s>
In	O
the	O
balanced	B-Algorithm
partition	I-Algorithm
problem	I-Algorithm
,	O
there	O
are	O
constraints	O
on	O
the	O
number	O
of	O
jobs	O
that	O
can	O
be	O
assigned	O
to	O
each	O
machine	O
.	O
</s>
<s>
Kellerer	O
and	O
Woeginger	O
study	O
a	O
variant	O
in	O
which	O
there	O
are	O
at	O
most	O
3*m	O
jobs	O
,	O
and	O
each	O
machine	O
must	O
contain	O
at	O
most	O
3	O
jobs	O
(	O
this	O
can	O
be	O
seen	O
as	O
a	O
generalization	O
of	O
3-partition	B-Algorithm
problem	I-Algorithm
)	O
.	O
</s>
<s>
A	O
simple	O
heuristic	O
algorithm	O
,	O
called	O
SLPT	O
,	O
assigns	O
each	O
kernel	O
to	O
a	O
different	O
subset	O
,	O
and	O
then	O
runs	O
the	O
LPT	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Often	O
,	O
the	O
inputs	O
come	O
online	B-Algorithm
,	O
and	O
their	O
sizes	O
becomes	O
known	O
only	O
when	O
they	O
arrive	O
.	O
</s>
<s>
List	B-Algorithm
scheduling	I-Algorithm
is	O
a	O
similar	O
algorithm	O
that	O
takes	O
a	O
list	O
in	O
any	O
order	O
,	O
not	O
necessarily	O
sorted	O
.	O
</s>
<s>
A	O
more	O
sophisticated	O
adaptation	O
of	O
LPT	O
to	O
an	O
online	B-Algorithm
setting	O
attains	O
an	O
approximation	O
ratio	O
of	O
3/2	O
.	O
</s>
