<s>
In	O
combinatorial	O
mathematics	O
,	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
or	O
problème	B-Algorithm
des	I-Algorithm
ménages	I-Algorithm
asks	O
for	O
the	O
number	O
of	O
different	O
ways	O
in	O
which	O
it	O
is	O
possible	O
to	O
seat	O
a	O
set	O
of	O
male-female	O
couples	O
at	O
a	O
round	O
dining	O
table	O
so	O
that	O
men	O
and	O
women	O
alternate	O
and	O
nobody	O
sits	O
next	O
to	O
his	O
or	O
her	O
partner	O
.	O
</s>
<s>
are	O
called	O
the	O
ménage	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
Until	O
the	O
work	O
of	O
,	O
solutions	O
to	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
took	O
the	O
form	O
of	O
first	O
finding	O
all	O
seating	O
arrangements	O
for	O
the	O
women	O
and	O
then	O
counting	O
,	O
for	O
each	O
of	O
these	O
partial	O
seating	O
arrangements	O
,	O
the	O
number	O
of	O
ways	O
of	O
completing	O
it	O
by	O
seating	O
the	O
men	O
away	O
from	O
their	O
partners	O
.	O
</s>
<s>
from	O
which	O
the	O
ménage	B-Algorithm
numbers	I-Algorithm
themselves	O
can	O
easily	O
be	O
calculated	O
.	O
</s>
<s>
Solutions	O
to	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
may	O
be	O
interpreted	O
in	O
graph-theoretic	O
terms	O
,	O
as	O
directed	O
Hamiltonian	O
cycles	O
in	O
crown	O
graphs	O
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
,	O
the	O
vertices	O
of	O
the	O
graph	O
represent	O
men	O
and	O
women	O
,	O
and	O
the	O
edges	O
represent	O
pairs	O
of	O
men	O
and	O
women	O
who	O
are	O
allowed	O
to	O
sit	O
next	O
to	O
each	O
other	O
.	O
</s>
<s>
However	O
,	O
two	O
Hamiltonian	O
cycles	O
are	O
considered	O
to	O
be	O
equivalent	O
if	O
they	O
connect	O
the	O
same	O
vertices	O
in	O
the	O
same	O
cyclic	O
order	O
regardless	O
of	O
the	O
starting	O
vertex	O
,	O
while	O
in	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
the	O
starting	O
position	O
is	O
considered	O
significant	O
:	O
if	O
,	O
as	O
in	O
Alice	O
's	O
tea	O
party	O
,	O
all	O
the	O
guests	O
shift	O
their	O
positions	O
by	O
one	O
seat	O
,	O
it	O
is	O
considered	O
a	O
different	O
seating	O
arrangement	O
even	O
though	O
it	O
is	O
described	O
by	O
the	O
same	O
cycle	O
.	O
</s>
<s>
than	O
the	O
ménage	B-Algorithm
numbers	I-Algorithm
.	O
</s>
<s>
The	O
problem	O
of	O
counting	O
matchings	O
in	O
a	O
bipartite	O
graph	O
,	O
and	O
therefore	O
a	O
fortiori	O
the	O
problem	O
of	O
computing	O
ménage	B-Algorithm
numbers	I-Algorithm
,	O
can	O
be	O
solved	O
using	O
the	O
permanents	O
of	O
certain	O
0-1	B-Algorithm
matrices	I-Algorithm
.	O
</s>
<s>
In	O
the	O
case	O
of	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
,	O
the	O
matrix	B-Architecture
arising	O
from	O
this	O
view	O
of	O
the	O
problem	O
is	O
the	O
circulant	O
matrix	B-Architecture
in	O
which	O
all	O
but	O
two	O
adjacent	O
elements	O
of	O
the	O
generating	O
row	O
equal	O
1	O
.	O
</s>
<s>
Tait	O
's	O
motivation	O
for	O
studying	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
came	O
from	O
trying	O
to	O
find	O
a	O
complete	O
listing	O
of	O
mathematical	O
knots	O
with	O
a	O
given	O
number	O
of	O
crossings	O
,	O
say	O
n	O
.	O
In	O
Dowker	O
notation	O
for	O
knot	O
diagrams	O
,	O
an	O
early	O
form	O
of	O
which	O
was	O
used	O
by	O
Tait	O
,	O
the	O
2n	O
points	O
where	O
a	O
knot	O
crosses	O
itself	O
,	O
in	O
consecutive	O
order	O
along	O
the	O
knot	O
,	O
are	O
labeled	O
with	O
the	O
2n	O
numbers	O
from	O
1	O
to	O
2n	O
.	O
</s>
<s>
This	O
graph	O
is	O
formed	O
by	O
removing	O
a	O
Hamiltonian	O
cycle	O
(	O
connecting	O
consecutive	O
numbers	O
)	O
from	O
a	O
complete	O
bipartite	O
graph	O
(	O
connecting	O
all	O
pairs	O
of	O
numbers	O
with	O
different	O
parity	O
)	O
,	O
and	O
so	O
it	O
has	O
a	O
number	O
of	O
matchings	O
equal	O
to	O
a	O
ménage	B-Algorithm
number	I-Algorithm
.	O
</s>
<s>
However	O
,	O
the	O
knot	O
listing	O
problem	O
has	O
some	O
additional	O
symmetries	O
not	O
present	O
in	O
the	O
ménage	B-Algorithm
problem	I-Algorithm
:	O
one	O
obtains	O
different	O
Dowker	O
notations	O
for	O
the	O
same	O
knot	O
diagram	O
if	O
one	O
begins	O
the	O
labeling	O
at	O
a	O
different	O
crossing	O
point	O
,	O
and	O
these	O
different	O
notations	O
should	O
all	O
be	O
counted	O
as	O
representing	O
the	O
same	O
diagram	O
.	O
</s>
<s>
For	O
this	O
reason	O
,	O
two	O
matchings	O
that	O
differ	O
from	O
each	O
other	O
by	O
a	O
cyclic	B-Algorithm
permutation	I-Algorithm
should	O
be	O
treated	O
as	O
equivalent	O
and	O
counted	O
only	O
once	O
.	O
</s>
