<s>
In	O
combinatorial	O
mathematics	O
,	O
a	O
superpermutation	O
on	O
n	O
symbols	O
is	O
a	O
string	O
that	O
contains	O
each	O
permutation	B-Algorithm
of	O
n	O
symbols	O
as	O
a	O
substring	O
.	O
</s>
<s>
While	O
trivial	O
superpermutations	O
can	O
simply	O
be	O
made	O
up	O
of	O
every	O
permutation	B-Algorithm
concatenated	O
together	O
,	O
superpermutations	O
can	O
also	O
be	O
shorter	O
(	O
except	O
for	O
the	O
trivial	O
case	O
of	O
n	O
=	O
1	O
)	O
because	O
overlap	O
is	O
allowed	O
.	O
</s>
<s>
For	O
instance	O
,	O
in	O
the	O
case	O
of	O
n	O
=	O
2	O
,	O
the	O
superpermutation	O
1221	O
contains	O
all	O
possible	O
permutations	B-Algorithm
(	O
12	O
and	O
21	O
)	O
,	O
but	O
the	O
shorter	O
string	O
121	O
also	O
contains	O
both	O
permutations	B-Algorithm
.	O
</s>
<s>
First	O
,	O
the	O
superpermutation	O
of	O
order	O
is	O
split	O
into	O
its	O
individual	O
permutations	B-Algorithm
in	O
the	O
order	O
of	O
how	O
they	O
appeared	O
in	O
the	O
superpermutation	O
.	O
</s>
<s>
Each	O
of	O
those	O
permutation	B-Algorithm
are	O
then	O
placed	O
next	O
to	O
a	O
copy	O
of	O
themselves	O
with	O
an	O
nth	O
symbol	O
added	O
in	O
between	O
the	O
two	O
copies	O
.	O
</s>
<s>
For	O
example	O
,	O
a	O
superpermutation	O
of	O
order	O
3	O
can	O
be	O
created	O
from	O
one	O
with	O
2	O
symbols	O
;	O
starting	O
with	O
the	O
superpermutation	O
121	O
and	O
splitting	O
it	O
up	O
into	O
the	O
permutations	B-Algorithm
12	O
and	O
21	O
,	O
the	O
permutations	B-Algorithm
are	O
copied	O
and	O
placed	O
as	O
12312	O
and	O
21321	O
.	O
</s>
<s>
Another	O
way	O
of	O
finding	O
superpermutations	O
lies	O
in	O
creating	O
a	O
graph	O
where	O
each	O
permutation	B-Algorithm
is	O
a	O
vertex	O
and	O
every	O
permutation	B-Algorithm
is	O
connected	O
by	O
an	O
edge	O
.	O
</s>
<s>
Each	O
edge	O
has	O
a	O
weight	O
associated	O
with	O
it	O
;	O
the	O
weight	O
is	O
calculated	O
by	O
seeing	O
how	O
many	O
characters	O
can	O
be	O
added	O
to	O
the	O
end	O
of	O
one	O
permutation	B-Algorithm
(	O
dropping	O
the	O
same	O
number	O
of	O
characters	O
from	O
the	O
start	O
)	O
to	O
result	O
in	O
the	O
other	O
permutation	B-Algorithm
.	O
</s>
<s>
Any	O
hamiltonian	O
path	O
through	O
the	O
created	O
graph	O
is	O
a	O
superpermutation	O
,	O
and	O
the	O
problem	O
of	O
finding	O
the	O
path	O
with	O
the	O
smallest	O
weight	O
becomes	O
a	O
form	O
of	O
the	O
traveling	B-Algorithm
salesman	I-Algorithm
problem	I-Algorithm
.	O
</s>
<s>
In	O
September	O
2011	O
,	O
an	O
anonymous	O
poster	O
on	O
the	O
Science	O
&	O
Math	O
("/	O
sci/	O
"	O
)	O
board	B-Application
of	O
4chan	O
proved	O
that	O
the	O
smallest	O
superpermutation	O
on	O
n	O
symbols	O
(	O
n	O
≥	O
2	O
)	O
has	O
at	O
least	O
length	O
n	O
!	O
</s>
<s>
In	O
reference	O
to	O
the	O
Japanese	O
anime	O
series	O
The	O
Melancholy	O
of	O
Haruhi	O
Suzumiya	O
,	O
the	O
problem	O
was	O
presented	O
on	O
the	O
imageboard	O
as	O
"	O
The	O
Haruhi	B-Algorithm
Problem	I-Algorithm
"	O
:	O
if	O
you	O
wanted	O
to	O
watch	O
the	O
14	O
episodes	O
of	O
the	O
first	O
season	O
of	O
the	O
series	O
in	O
every	O
possible	O
order	O
,	O
what	O
would	O
be	O
the	O
shortest	O
string	O
of	O
episodes	O
you	O
would	O
need	O
to	O
watch	O
?	O
</s>
<s>
For	O
"	O
The	O
Haruhi	B-Algorithm
Problem	I-Algorithm
"	O
specifically	O
(	O
the	O
case	O
for	O
14	O
symbols	O
)	O
,	O
the	O
current	O
lower	O
and	O
upper	O
bound	O
are	O
93,884,313,611	O
and	O
93	O
,	O
924	O
,	O
230	O
,	O
411	O
,	O
respectively	O
.	O
</s>
<s>
On	O
20	O
October	O
2018	O
,	O
by	O
adapting	O
a	O
construction	O
by	O
Aaron	O
Williams	O
for	O
constructing	O
Hamiltonian	O
paths	O
through	O
the	O
Cayley	O
graph	O
of	O
the	O
symmetric	B-Algorithm
group	I-Algorithm
,	O
Science	O
Fiction	O
author	O
and	O
mathematician	O
Greg	O
Egan	O
devised	O
an	O
algorithm	O
to	O
produce	O
superpermutations	O
of	O
length	O
n	O
!	O
</s>
