<s>
The	O
3-partition	B-Algorithm
problem	I-Algorithm
is	O
a	O
strongly	O
NP-complete	O
problem	O
in	O
computer	B-General_Concept
science	I-General_Concept
.	O
</s>
<s>
The	O
problem	O
is	O
to	O
decide	O
whether	O
a	O
given	O
multiset	B-Language
of	O
integers	O
can	O
be	O
partitioned	O
into	O
triplets	O
that	O
all	O
have	O
the	O
same	O
sum	O
.	O
</s>
<s>
The	O
input	O
to	O
the	O
problem	O
is	O
a	O
multiset	B-Language
S	O
of	O
n	O
=	O
3	O
positive	O
integers	O
.	O
</s>
<s>
The	O
output	O
is	O
whether	O
or	O
not	O
there	O
exists	O
a	O
partition	O
of	O
S	O
into	O
m	O
triplets	O
S1	O
,	O
S2	O
,	O
…,	O
Sm	O
such	O
that	O
the	O
sum	O
of	O
the	O
numbers	O
in	O
each	O
one	O
is	O
equal	O
to	O
T	O
.	O
The	O
S1	O
,	O
S2	O
,	O
…,	O
Sm	O
must	O
form	O
a	O
partition	O
of	O
S	O
in	O
the	O
sense	O
that	O
they	O
are	O
disjoint	B-Algorithm
and	O
they	O
cover	O
S	O
.	O
</s>
<s>
The	O
3-partition	B-Algorithm
problem	I-Algorithm
remains	O
strongly	O
NP-complete	O
under	O
the	O
restriction	O
that	O
every	O
integer	O
in	O
S	O
is	O
strictly	O
between	O
T/4	O
and	O
T/2	O
.	O
</s>
<s>
There	O
is	O
feasible	O
3-partition	B-Algorithm
.	O
</s>
<s>
The	O
3-partition	B-Algorithm
problem	I-Algorithm
remains	O
NP-complete	O
even	O
when	O
the	O
integers	O
in	O
S	O
are	O
bounded	O
above	O
by	O
a	O
polynomial	O
in	O
n	O
.	O
In	O
other	O
words	O
,	O
the	O
problem	O
remains	O
NP-complete	O
even	O
when	O
representing	O
the	O
numbers	O
in	O
the	O
input	O
instance	O
in	O
unary	O
.	O
</s>
<s>
i.e.	O
,	O
3-partition	B-Algorithm
is	O
NP-complete	O
in	O
the	O
strong	O
sense	O
or	O
strongly	O
NP-complete	O
.	O
</s>
<s>
This	O
property	O
,	O
and	O
3-partition	B-Algorithm
in	O
general	O
,	O
is	O
useful	O
in	O
many	O
reductions	O
where	O
numbers	O
are	O
naturally	O
represented	O
in	O
unary	O
.	O
</s>
<s>
The	O
3-partition	B-Algorithm
problem	I-Algorithm
is	O
similar	O
to	O
the	O
partition	B-Algorithm
problem	I-Algorithm
,	O
in	O
which	O
the	O
goal	O
is	O
to	O
partition	O
S	O
into	O
two	O
subsets	O
with	O
equal	O
sum	O
,	O
and	O
the	O
multiway	B-Algorithm
number	I-Algorithm
partitioning	I-Algorithm
,	O
in	O
which	O
the	O
goal	O
is	O
to	O
partition	O
S	O
into	O
k	O
subsets	O
with	O
equal	O
sum	O
,	O
where	O
k	O
is	O
a	O
fixed	O
parameter	O
.	O
</s>
<s>
In	O
3-Partition	B-Algorithm
the	O
goal	O
is	O
to	O
partition	O
S	O
into	O
m	O
=	O
n/3	O
subsets	O
,	O
not	O
just	O
a	O
fixed	O
number	O
of	O
subsets	O
,	O
with	O
equal	O
sum	O
.	O
</s>
<s>
Partition	O
is	O
"	O
easier	O
"	O
than	O
3-Partition	B-Algorithm
:	O
while	O
3-Partition	B-Algorithm
is	O
strongly	O
NP-hard	O
,	O
Partition	O
is	O
only	O
weakly	O
NP-hard	O
-	O
it	O
is	O
hard	O
only	O
when	O
the	O
numbers	O
are	O
encoded	O
in	O
non-unary	O
system	O
,	O
and	O
have	O
value	O
exponential	O
in	O
n	O
.	O
When	O
the	O
values	O
are	O
polynomial	O
in	O
n	O
,	O
Partition	O
can	O
be	O
solved	O
in	O
polynomial	O
time	O
using	O
the	O
pseudopolynomial	B-Algorithm
time	I-Algorithm
number	I-Algorithm
partitioning	I-Algorithm
algorithm	O
.	O
</s>
<s>
The	O
goal	O
is	O
to	O
construct	O
m	O
triplets	O
,	O
each	O
of	O
which	O
contains	O
one	O
element	O
from	O
A	O
,	O
one	O
from	O
B	O
and	O
one	O
from	O
C	O
,	O
such	O
that	O
the	O
sum	O
of	O
each	O
triplet	O
is	O
T	O
.	O
This	O
problem	O
can	O
be	O
reduced	O
to	O
3-partition	B-Algorithm
as	O
follows	O
.	O
</s>
<s>
Every	O
solution	O
of	O
the	O
ABC-partition	O
instance	O
induces	O
a	O
solution	O
of	O
the	O
3-partition	B-Algorithm
instance	O
with	O
sum	O
.	O
</s>
<s>
Conversely	O
,	O
in	O
every	O
solution	O
of	O
the	O
3-partition	B-Algorithm
instance	O
,	O
all	O
triplet-sums	O
must	O
have	O
the	O
same	O
hundreds	O
,	O
tens	O
and	O
units	O
digits	O
,	O
which	O
means	O
that	O
they	O
must	O
have	O
exactly	O
1	O
in	O
each	O
of	O
these	O
digits	O
.	O
</s>
<s>
Garey	O
and	O
Johnson	O
(	O
1975	O
)	O
originally	O
proved	O
3-Partition	B-Algorithm
to	O
be	O
NP-complete	O
,	O
by	O
a	O
reduction	O
from	O
3-dimensional	O
matching	O
.	O
</s>
<s>
The	O
classic	O
reference	O
by	O
Garey	O
and	O
Johnson	O
(	O
1979	O
)	O
describes	O
an	O
NP-completeness	O
proof	O
,	O
reducing	O
from	O
3-dimensional	O
matching	O
to	O
4-partition	O
to	O
3-partition	B-Algorithm
.	O
</s>
<s>
The	O
NP-hardness	O
of	O
3-partition	B-Algorithm
was	O
used	O
to	O
prove	O
the	O
NP-hardness	O
rectangle	O
packing	O
,	O
as	O
well	O
as	O
of	O
Tetris	O
and	O
some	O
other	O
puzzles	O
,	O
and	O
some	O
job	B-General_Concept
scheduling	I-General_Concept
problems	I-General_Concept
.	O
</s>
