<s>
In	O
combinatorial	O
mathematics	O
,	O
a	O
Langford	B-Algorithm
pairing	I-Algorithm
,	O
also	O
called	O
a	O
Langford	B-Algorithm
sequence	I-Algorithm
,	O
is	O
a	O
permutation	B-Algorithm
of	O
the	O
sequence	O
of	O
2n	O
numbers	O
1	O
,	O
1	O
,	O
2	O
,	O
2	O
,	O
...	O
,	O
n	O
,	O
n	O
in	O
which	O
the	O
two	O
1s	O
are	O
one	O
unit	O
apart	O
,	O
the	O
two	O
2s	O
are	O
two	O
units	O
apart	O
,	O
and	O
more	O
generally	O
the	O
two	O
copies	O
of	O
each	O
number	O
k	O
are	O
k	O
units	O
apart	O
.	O
</s>
<s>
Langford	B-Algorithm
pairings	I-Algorithm
are	O
named	O
after	O
C	O
.	O
Dudley	O
Langford	O
,	O
who	O
posed	O
the	O
problem	O
of	O
constructing	O
them	O
in	O
1958	O
.	O
</s>
<s>
Langford	B-Algorithm
's	I-Algorithm
problem	I-Algorithm
is	O
the	O
task	O
of	O
finding	O
Langford	B-Algorithm
pairings	I-Algorithm
for	O
a	O
given	O
value	O
of	O
n	O
.	O
</s>
<s>
The	O
closely	O
related	O
concept	O
of	O
a	O
Skolem	B-Algorithm
sequence	I-Algorithm
is	O
defined	O
in	O
the	O
same	O
way	O
,	O
but	O
instead	O
permutes	O
the	O
sequence	O
0	O
,	O
0	O
,	O
1	O
,	O
1	O
,	O
...	O
,	O
n1	O
,	O
n1	O
.	O
</s>
<s>
A	O
Langford	B-Algorithm
pairing	I-Algorithm
for	O
n	O
=	O
3	O
is	O
given	O
by	O
the	O
sequence	O
2	O
,	O
3	O
,	O
1	O
,	O
2	O
,	O
1	O
,	O
3	O
.	O
</s>
<s>
Langford	B-Algorithm
pairings	I-Algorithm
exist	O
only	O
when	O
n	O
is	O
congruent	O
to	O
0	O
or	O
3	O
modulo	O
4	O
;	O
for	O
instance	O
,	O
there	O
is	O
no	O
Langford	B-Algorithm
pairing	I-Algorithm
when	O
n	O
=	O
1	O
,	O
2	O
,	O
or	O
5	O
.	O
</s>
<s>
As	O
describes	O
,	O
the	O
problem	O
of	O
listing	O
all	O
Langford	B-Algorithm
pairings	I-Algorithm
for	O
a	O
given	O
n	O
can	O
be	O
solved	O
as	O
an	O
instance	O
of	O
the	O
exact	O
cover	O
problem	O
,	O
but	O
for	O
large	O
n	O
the	O
number	O
of	O
solutions	O
can	O
be	O
calculated	O
more	O
efficiently	O
by	O
algebraic	O
methods	O
.	O
</s>
<s>
used	O
Skolem	B-Algorithm
sequences	I-Algorithm
to	O
construct	O
Steiner	O
triple	O
systems	O
.	O
</s>
<s>
In	O
the	O
1960s	O
,	O
E	O
.	O
J	O
.	O
Groth	O
used	O
Langford	B-Algorithm
pairings	I-Algorithm
to	O
construct	O
circuits	O
for	O
integer	O
multiplication	O
.	O
</s>
