<s>
Interval	B-Algorithm
scheduling	I-Algorithm
is	O
a	O
class	O
of	O
problems	O
in	O
computer	B-General_Concept
science	I-General_Concept
,	O
particularly	O
in	O
the	O
area	O
of	O
algorithm	O
design	O
.	O
</s>
<s>
The	O
interval	B-Algorithm
scheduling	I-Algorithm
maximization	O
problem	O
(	O
ISMP	O
)	O
is	O
to	O
find	O
a	O
largest	O
compatible	O
set	O
,	O
i.e.	O
,	O
a	O
set	O
of	O
non-overlapping	O
intervals	O
of	O
maximum	O
size	O
.	O
</s>
<s>
The	O
group	O
interval	B-Algorithm
scheduling	I-Algorithm
decision	O
problem	O
(	O
GISDP	O
)	O
is	O
to	O
decide	O
whether	O
there	O
exists	O
a	O
compatible	O
set	O
in	O
which	O
all	O
groups	O
are	O
represented	O
.	O
</s>
<s>
The	O
group	O
interval	B-Algorithm
scheduling	I-Algorithm
maximization	O
problem	O
(	O
GISMP	O
)	O
is	O
to	O
find	O
a	O
largest	O
compatible	O
set	O
-	O
a	O
set	O
of	O
non-overlapping	O
representatives	O
of	O
maximum	O
size	O
.	O
</s>
<s>
GISMPk	O
is	O
a	O
restricted	O
version	O
of	O
GISMP	O
in	O
which	O
the	O
number	O
of	O
intervals	O
in	O
each	O
group	O
is	O
at	O
most	O
k	O
.	O
This	O
problem	O
is	O
often	O
called	O
JISPk	O
,	O
where	O
J	O
stands	O
for	O
Job	B-Application
.	O
</s>
<s>
All	O
these	O
problems	O
are	O
special	O
cases	O
of	O
single-machine	B-Algorithm
scheduling	I-Algorithm
,	O
since	O
they	O
assume	O
that	O
all	O
tasks	O
must	O
run	O
on	O
a	O
single	O
processor	O
.	O
</s>
<s>
Single-machine	B-Algorithm
scheduling	I-Algorithm
is	O
a	O
special	O
case	O
of	O
optimal	B-Algorithm
job	I-Algorithm
scheduling	I-Algorithm
.	O
</s>
<s>
The	O
following	O
greedy	B-Algorithm
algorithm	I-Algorithm
,	O
called	O
Earliest	B-Operating_System
deadline	I-Operating_System
first	I-Operating_System
scheduling	I-Operating_System
,	O
does	O
find	O
the	O
optimal	O
solution	O
for	O
unweighted	O
single-interval	O
scheduling	O
:	O
</s>
<s>
This	O
proves	O
that	O
the	O
greedy	B-Algorithm
algorithm	I-Algorithm
indeed	O
finds	O
an	O
optimal	O
solution	O
.	O
</s>
<s>
A	O
more	O
formal	O
explanation	O
is	O
given	O
by	O
a	O
Charging	B-General_Concept
argument	I-General_Concept
.	O
</s>
<s>
The	O
greedy	B-Algorithm
algorithm	I-Algorithm
can	O
be	O
executed	O
in	O
time	O
O(n log n )	O
,	O
where	O
n	O
is	O
the	O
number	O
of	O
tasks	O
,	O
using	O
a	O
preprocessing	O
step	O
in	O
which	O
the	O
tasks	O
are	O
sorted	O
by	O
their	O
finishing	O
times	O
.	O
</s>
<s>
This	O
can	O
be	O
shown	O
by	O
a	O
reduction	O
from	O
the	O
following	O
version	O
of	O
the	O
Boolean	B-Algorithm
satisfiability	I-Algorithm
problem	I-Algorithm
,	O
which	O
was	O
shown	O
to	O
be	O
NP-complete	O
likewise	O
to	O
the	O
unrestricted	O
version	O
.	O
</s>
<s>
Given	O
an	O
instance	O
of	O
this	O
satisfiability	B-Algorithm
problem	I-Algorithm
,	O
construct	O
the	O
following	O
instance	O
of	O
GISDP	O
.	O
</s>
<s>
GISDP2	O
can	O
be	O
solved	O
at	O
polynomial	O
time	O
by	O
the	O
following	O
reduction	O
to	O
the	O
2-satisfiability	B-Application
problem	O
:	O
</s>
<s>
The	O
satisfiability	O
of	O
such	O
formulas	O
can	O
be	O
decided	O
in	O
time	O
linear	O
in	O
the	O
number	O
of	O
clauses	O
(	O
see	O
2-SAT	B-Application
)	O
.	O
</s>
<s>
The	O
following	O
greedy	B-Algorithm
algorithm	I-Algorithm
finds	O
a	O
solution	O
that	O
contains	O
at	O
least	O
1/2	O
of	O
the	O
optimal	O
number	O
of	O
intervals	O
:	O
</s>
<s>
A	O
formal	O
explanation	O
is	O
given	O
by	O
a	O
Charging	B-General_Concept
argument	I-General_Concept
.	O
</s>
<s>
The	O
greedy	B-Algorithm
algorithm	I-Algorithm
selects	O
only	O
1	O
interval	O
0	O
..	O
2	O
from	O
group	O
#1	O
,	O
while	O
an	O
optimal	O
scheduling	O
is	O
to	O
select	O
1	O
..	O
3	O
from	O
group	O
#2	O
and	O
then	O
4	O
..	O
6	O
from	O
group	O
#1	O
.	O
</s>
<s>
Using	O
the	O
technique	O
of	O
Linear	B-Algorithm
programming	I-Algorithm
relaxation	I-Algorithm
,	O
it	O
is	O
possible	O
to	O
approximate	O
the	O
optimal	O
scheduling	O
with	O
slightly	O
better	O
approximation	O
factors	O
.	O
</s>
<s>
An	O
interval	B-Algorithm
scheduling	I-Algorithm
problem	O
can	O
be	O
described	O
by	O
an	O
intersection	O
graph	O
,	O
where	O
each	O
vertex	O
is	O
an	O
interval	O
,	O
and	O
there	O
is	O
an	O
edge	O
between	O
two	O
vertices	O
if	O
and	O
only	O
if	O
their	O
intervals	O
overlap	O
.	O
</s>
<s>
In	O
this	O
representation	O
,	O
the	O
interval	B-Algorithm
scheduling	I-Algorithm
problem	O
is	O
equivalent	O
to	O
finding	O
the	O
maximum	O
independent	O
set	O
in	O
this	O
intersection	O
graph	O
.	O
</s>
<s>
The	O
optimum	O
for	O
the	O
non-weighted	O
version	O
can	O
found	O
with	O
the	O
earliest	B-Operating_System
deadline	I-Operating_System
first	I-Operating_System
scheduling	I-Operating_System
.	O
</s>
<s>
Weighted	O
interval	B-Algorithm
scheduling	I-Algorithm
is	O
a	O
generalization	O
where	O
a	O
value	O
is	O
assigned	O
to	O
each	O
executed	O
task	O
and	O
the	O
goal	O
is	O
to	O
maximize	O
the	O
total	O
value	O
.	O
</s>
<s>
The	O
interval	B-Algorithm
scheduling	I-Algorithm
problem	O
is	O
1-dimensional	O
–	O
only	O
the	O
time	O
dimension	O
is	O
relevant	O
.	O
</s>
<s>
See	O
identical-machines	B-Algorithm
scheduling	I-Algorithm
.	O
</s>
<s>
Single-machine	B-Algorithm
scheduling	I-Algorithm
is	O
also	O
a	O
very	O
similar	O
problem	O
.	O
</s>
