Efficient Generation of Random One-Factorizations for Complete
Graphs
Maya Dotan∗
Nati Linial†
arXiv:1707.00477v1 [math.CO] 3 Jul 2017
Abstract
It is well known that for every even integer n, the complete graph Kn has a one-factorization, namely
a proper edge coloring with n − 1 colors. However, very little is known about the possible structure of
one-factorizations. Thus, many extremal questions suggest themselves, and those are presently wide open.
We also know essentially nothing about the typical properties of one-factorizations of Kn for large n. It
is therefore of great interest to find a good method for generating random one-factorizations. The present
article takes the first steps in this direction. We first present a simple and very natural algorithm that
generates random one-factorizations. We conjecture (and this is supported by numerical evidence) that this
algorithm runs in time polynomial(n). Our main technical contribution is a variant of that algorithm with
polynomial(n) run time that can generate every one-factorization of Kn .
We also raise many questions and conjectures regarding the possible and typical structure of onefactorizations.
1
Introduction
It is a very old result (e.g. [7]) that for every even integer n, the complete graph Kn has a one-factorization,
namely, a proper coloring of the edges with n − 1 colors. This is often described as a schedule for the games
in a league of n teams. Clearly, a one-factorization of Kn is comprised of n − 1 color classes, each of which
is a perfect matching of n/2 edges. Accordingly, one speaks of n − 1 rounds of games in each of which the n
teams are paired up to play. If the edge ij is colored k, this means that teams i and j meet exactly once - at
round k. There is a considerable body of research dedicated to the study of one-factorizations, e.g., [15, 17].
However, our perspective is different, since, as explained below, we study one-factorizations in the context of
high dimensional combinatorics.
We use the shorthand OF for one-factorization and we write OFn to indicate the order of the complete graph
that is being factored.
The enumeration of OFs is a challenging problem. Of course, we do not expect to have a closed form formula
for fn , the number of distinct OFn ’s. The largest n for which fn is known is n = 14 [9]. At present even the
asymptotic behavior of fn is still not fully resolved. The currently best known asymptotic bounds for fn , are
(1 + o(1)) ·
n (n
e2
2
/2)
2
n (n /2)
≥ fn ≥ (1 + o(1)) · 2
4e
Experts in the field seem confident that the upper bound gives the correct asymptotic value, but this remains
unproven at present.
Let us recall next some basic notions in high-dimensional combinatorics. Let k ≥ 2 be an integer. A
(k − 1)-dimensional permutation [12] is a map A : [t]k → {0, 1} with the following property: For every index
k ≥ i ≥ 1 and for every choice of values t ≥ yj ≥ 1, for all j 6= i, there is exactly one value t ≥ z ≥ 1 for which
A(y1 , . . . , yi−1 , z, yi+1 , . . . , yd+1 ) = 1. We note that a one-dimensional permutation is simply a permutation
matrix and that a two-dimensional permutation is synonymous with a Latin square. Also, a OF can be viewed
as a Latin square with the following two properties: (i) It is symmetric w.r.t. the main diagonal, and (ii) All
∗ Department
of Computer Science, Hebrew University, Jerusalem 91904, Israel. email: [email protected] .
of Computer Science, Hebrew University, Jerusalem 91904, Israel. email: [email protected] . Supported by ERC
grant 339096 "High dimensional combinatoric".
† Department
1
its diagonal entries equal n. There are many outstanding structural and enumerative questions concerning the
typical structure of high-dimensional permutations. In Section 3 we consider some of these open questions in
the more restricted case of OF’s.
One of our main goals here is to devise methods for efficient sampling of OFs, and as is customary with
problems of this type, we resort to the theory of rapidly mixing Markov Chains. It would be most desirable to
have a Markov Chain whose state space is comprised of all OFn ’s that has the following features: (i) Its limit
distribution is uniform, (ii) It mixes rapidly, and (iii) It is simple enough to provide a clear and focused view of
the typical properties of OFn ’s. Unfortunately, we are still unable to reach this goal and we develop, instead,
some substitutes. What we do accomplish here is to present a polynomial-time algorithm that generates random
OFn ’s.
2
2.1
A poly-time randomized generative algorithm for OFn ’s
General comments
Granted, we would ideally have a Markov Chain on OFn ’s with the above-mentioned desirable properties.
However, past experience with similar problems suggests that it is almost as good to have such a Markov Chain
M on a state space that includes OF’s as well as additional objects that can be viewed as "slightly defective"
OF’s. Thus we consider an extended state space along with a potential function Φ that measures how far a
given state of M is from being a bona fide OF. For most of our discussion we will be working with one specific
Markov Chain and one potential function Φ (but see Subsection 5.1). The only properties of Φ that we need
here are: (i) It takes the same value of all OFn , (ii) Its value on every other state of M is larger.
Most of our discussion refers to Markov Chains whose underlying graph is the following graph Gn . It has
n
(n − 1)( 2 ) vertices which correspond to all colorings (legal or not) of E(Kn ) with (n − 1) colors. Two vertices in
Gn are adjacent iff the corresponding colorings
are at Hamming distance one, namely, they differ on the color of
exactly one edge of Kn . Therefore, Gn is 3 n3 -regular, so that the limit distribution of the (usual, unobstructed)
random walk on it is uniform. In the language of sampling algorithms, the random walk on Gn can be viewed as
Naive edge-switching. Namely, we start with an arbitrary (e.g., random) coloring C of E(Kn ) with n − 1 colors.
As long as C is not a OF, choose a random edge e ∈ E(Kn ) a random color c ∈ [n − 1], and recolor e with c.
It is easy to see that this random walk is rapidly mixing and, as mentioned, its limit distribution is uniform.
However, it is not an efficient method to uniformly sample a OF since the OFs constitute a vanishingly small
subset of Gn ’s vertex set.
The standard way to deal with such problems, relies on the Metropolis filter, which biases the random walk
to favor vertices of lower potential Φ. This makes sense, since OFs are precisely the vertices at which Φ attains
its global minimum. For the details of the Metropolis filter we refer the reader to the beautiful exposition in [11],
and only provide some intuition and general remarks. The walk under the Metropolis filter proceeds as follows:
If we are currently at a vertex of Gn that corresponds to a coloring C, we pick uniformly at random a neighbor,
say the vertex that corresponds to coloring C 0 . If Φ(C 0 ) ≤ Φ(C), we take the step from C to C 0 . However, if
Φ(C 0 ) > Φ(C), we switch from coloring C to C 0 with probability = (C, C 0 ) > 0 and with probability 1 − we stay put at C. We omit the details of how to set the value of and only mention that it is a decreasing
function of Φ(C 0 ) − Φ(C), and can be taken, e.g., to be exponentially small in Φ(C 0 ) − Φ(C). The resulting
Markov Chain is connected, and its limit distribution is constant on all OFs. Whether the chain is rapidly
mixing and whether the OFs capture enough of the total limit distribution would depend on the specifics of the
construction. So, we raise the following problem:
Problem 1. Is there a Metropolis filter for Gn , under which the resulting Markov Chain is rapidly mixing and
the stationary probability of the one-factorizations is at least n−O(1) ?
Of particular interest is the limiting case = 0. Here the sampling algorithm takes the following simple form:
Switch from coloring C to its randomly picked neighbor C 0 iff Φ(C 0 ) ≤ Φ(C). Our simulations suggest that
convergence is rather fast and the run time to find a OFn grows like na for some a ≈ 3.5 (see figure 1). However,
this version of the algorithm is no longer guaranteed to sample OFs uniformly and our simulations for n = 8
(see figure 2 and table 3) indicate that the resulting distribution is not uniform. We have carried out additional,
less extensive simulations which suggest that for small enough > 0, the generation of a uniformly random
2
# Of OFs Reached This Amt. Of Times
Figure 1: Convergence rate of the naive algorithm with = 0
# Of Times An OF Was Reached
Figure 2: Limit Distribution of OF8 with = 0.
OF remains reasonably fast. Whether the resulting Markov chains indeed mixes rapidly remains unknown.
However, we do believe that:
Conjecture 1. Consider the following sampling process. It starts from a random coloring of E(Kn ) with
(n − 1) colors. At each step a random edge e and a random color c are picked and e is recolored to c iff this
3
does not increase the potential function Φ. With probability 1 − on (1) this process converges to a OFn in time
polynomial(n).
Since the fast convergence of this Metropolis chain (with = 0) remains conjectural, we offer a modification
of this algorithm, which we can prove reaches an OF quickly. This modification is presented in the following
section.
2.2
Dealing with locally optimal states
As mentioned, our algorithm moves between colorings of E(Kn ) with color set [n − 1]. We next introduce the
potential function Φ = Φ(C) that we use to measure how far the current coloring C is from being an OFn . Given
C, a vertex ν ∈ [n], and a color µ ∈ [n − 1], we let aν,µ (C) denote the number of µ-colored edges incident with
P
P
P
2
2
ν. We define Φ(ν) := µ (aν,µ (C)) and also Φ(C) := ν Φ(ν) = ν,µ (aν,µ (C)) . Note that Φ(ν) ≥ n − 1
with equality iff every color appears at the vertex ν exactly once and, likewise, Φ(C) ≥ n(n − 1) for all C with
equality iff C is a one-factorization. We generate one-factorizations through a process of random local changes
to colorings, which changes are intended to reduce the potential Φ.
Our algorithm starts at a uniformly chosen random vertex of Gn . In the first phase of the algorithm we take
random steps on Gn , from coloring C to C 0 only if Φ(C) > Φ(C 0 ). Such a move is called a type I step. We
proceed with this random walk until a locally optimal coloring is reached. Namely, one for which Φ cannot be
reduced by any single edge recoloring.
The new tool that we introduce is a two-vertex recoloring. In such a step we recolor some edges that are
incident with two vertices. Our main technical contribution is:
Theorem 1. If C is a locally optimal coloring of E(Kn ) that is not a one-factorization, then there are two
vertices x, y ∈ [n] and a recoloring of the edges incident with x, y such that the resulting coloring C 0 satisfies
Φ(C) > Φ(C 0 ). furthermore, it is possible to find the vertices x, y and the said recoloring in time poly(n).
The first step in proving the theorem is to show, in the next lemma, that locally optimal colorings have a
quite restricted structure. In such a coloring every monochromatic connected component is either a single edge
or a path with two edges. We refer to such a coloring as an IV coloring. We call a two-edge path a Vee. A
Vee has a center and two ends. Unless otherwise stated, when we speak of a Vee, we implicitly assume that it
is monochromatic. A Vee whose two edges are colored α is denoted by Veeα . Clearly, some colors are missing
at the Vee’s center vertex and if β is such a missing color we may refer to it Veeβα . (Note that β need not be
uniquely defined. There may be several colors missing at a Vee’s center). We also use the notation Veeβ to
indicate only that color β is missing at the Vee’s center.
Lemma 1. In a locally optimal coloring every color class is the vertex-disjoint union of edges and Vees.
Proof. We consider how Φ changes as we recolor the edge uv from i to j. Let us denote au,µ by xµ and av,µ by
yµ . The only aν,µ that are affected by this change are xi , xj , yi and yj . The following inequality expresses the
condition that Φ does not decrease as a result of this change
xi 2 + xj 2 + yi 2 + yj 2 ≤ (xi − 1)2 + (xj + 1)2 + (yi − 1)2 + (yj + 1)2 .
P
P
That is xi + yi ≤ xj + yj + 2. We sum this inequality over all j 6= i and use the fact that µ xµ = µ yµ = n − 1
to show that (n − 1) · (xi + yi ) ≤ 4n − 6. Since these variables are positive integers we conclude that (xi + yi ) ≤ 3.
It follows that for every i-colored edge either both its ends are incident with just a single i-colored edge or one
is incident with one and the other with two. The conclusion follows.
It is not hard to see that in a locally optimal coloring C there are precisely (Φ(C) − n(n − 1))/3 Vees.
Therefore, reducing Φ for a locally optimal coloring, is synonymous with a reduction in its number of Vees.
Type II and III steps are applied only to IV colorings. In such a step we recolor the edges incident with two
specially picked vertices, say u and v in a way that reduces Φ. Accomplishing this choice and the way to recolor
is the more elaborate part of this section. Roughly speaking, and as the above discussion suggests, it is good
to view this step as an attempt to reduce the number of Vees. For example, we may choose u and v so that at
least one of them is an end of a Vee. This means that the elimination of u and v destroys at least one Vee. Our
4
purpose would be to recolor the edges incident with u and v without creating any new Vees, thus reducing Φ,
as desired.
Let us consider what an IV coloring C looks like if it is not an OFn . Since C is not an OF, it contains some
monochromatic Vee, say Veeα . But n is even, so if C has exactly one Veeα , then necessarily there must be a
vertex that is incident to no α-colored edges. Such a vertex must, in turn, be the center of some Vee, say a
Veeγ for some γ 6= α. To sum up, if C is IV but not an OFn , and if C has a monochromatic Veeα , the C must
1. Contain a Veeα
γ for some γ 6= α. (See Figure: 3), or
2. Contain an additional Veeα (See Figure: 4)
v2
u2
v2
u2
u3
Figure 3: Corrected by type II step
α
u1
α
v3
γ
α
v1
α
missing γ
α
missing β
γ
missing α
α
missing β
v1
v3
u1
u3
Figure 4: Corrected by type III step
Our proof proceeds by finding a type II (resp. III) step that reduces the potential Φ.
We now introduce type II steps. Fix an IV coloring C that is not an OFn . A type II step satisfies the
following condition: For every vertex w 6= u, v either the edges wu and wv retain their original colors or they
exchange their colors between them. We wish to determine when there exists a type II step that decreases Φ.
(See Figure: 5)
Figure 5: Switch Move
We use, as above, the notation xµ := au,µ and yµ := av,µ .
Lemma 2. If |xλ −yλ | ≥ 2 for some color λ, then there is a type II recoloring step on vertices u, v that decreases
Φ.
P
P
2
Proof. Recall that Φ(C) = ν Φ(ν) = ν,µ (aν,µ (C)) . For every w 6= u, v, the term Φ(w) does not change in
a type II step. Let x0µ , yµ0 be the values of au,µ resp. av,µ after recoloring. The lemma claims that there is a
type II step for which
X
X
x2µ + yµ2 >
(x0µ )2 + (yµ0 )2 .
This inequality can be equivalently stated as
X
X
(xµ + yµ )2 + (xµ − yµ )2 >
(x0µ + yµ0 )2 + (x0µ − yµ0 )2 .
But it is clear that for every µ there holds xµ + yµ = x0µ + yµ0 (since we only exchange the order of the colors,
and not the repetition) and so, our claim would follow if we could prove
5
Claim 1. Assuming that |xλ − yλ | ≥ 2 for some color λ, there is a type II step at vertices u, v such that
|xµ − yµ | ≥ |x0µ − yµ0 | holds for every color µ and at least one of these inequalities is strict.
Claim 1 is a consequence of the following simple variation on Euler’s Theorem:
Claim 2. Every multigraph H (possibly with loops) can be oriented in such a way that for every vertex the
indegree and outdegree differ at most by one.
Proof. If H has cycles, pick one of them, orient it in a consistent manner, remove its edges from H and proceed
by induction. If H has no cycles, it is a forest. It suffices to deal separately with each connected component
and prove the claim for trees. Pick a path between two leaves of the tree and orient it consistently, then remove
the edges of the path and proceed by induction. These leaves will be the vertices for which the indegree and
outdegree differ by one. In all other vertices the indegree and outdegree coincide.
Let us construct the following multigraph H. Its vertex set is our set of colors {1, . . . , n − 1}. To every
vertex w 6= u, v there corresponds an edge in H. If in the original coloring the edges wu, wv are colored α and
β, then the edge that corresponds to w connects the vertices α and β in H. We consider an orientation of H
as given by Claim 2. Our interpretation is that if there is a directed edge γ → δ in this orientation, this means
that after recoloring, wu is colored γ and wv is colored δ. The conclusion of Claim 2 says that |x0µ − yµ0 | ≤ 1 for
all colors µ. However, as mentioned, there also holds xµ + yµ = x0µ + yµ0 , so that |xµ − yµ | ≥ |x0µ − yµ0 | for all
colors µ. Also, by assumption, |xλ − yλ | ≥ 2, so that for µ = λ the inequality is strict. The claim follows.
Type II steps thus deal successfully with the case of an IV coloring C that has a Veeα as well as a Veeα .
Just apply Lemma 2 with u, v the centers of these Vees and λ = α.
A type III recoloring step is applied in the only remaining case. Here the IV coloring C is not an OFn , and
it contains, for no λ, both a Veeλ and a Veeλ . As explained above, it must have at least two Vees of the form
Veeβα = {v1 , v2 , v3 } centered at v2 , and a Veeγα , but no Veeα , Veeβ or Veeγ . (We do not care whether β = γ or
not). A type III step is either a single edge recoloring or a single edge recoloring step followed by a type II step.
Let us recolor the edge v1 v2 from α to β. This clearly decreases Φ(v2 ) by 2, and note that Φ(v1 ) increases by
at most 2, since there are no Veeβ ’s in C. If this single edge change decreases Φ(C) we are done. If not, Φ did
γ
not change, and this means that there is now a Veeα
β centered at v1 . Together with the Veeα mentioned above,
we are now in a position to apply a type II improvement step. This completes the description of the algorithm
and yields.
This completes the proof of Theorem 1.
3
Some remarks and questions
1. We note that all three types of steps as described above can be realized by an appropriate random
recoloring of the edges incident with two properly selected vertices.
2. We introduce another graph called An . Its vertex set is the same as that of Gn , with vertices corresponding
to (proper or improper) colorings of E(Kn ) with (n − 1) colors. Two colorings (i.e., the two corresponding
vertices) are adjacent in An if it is possible two vertex switch from one coloring to the other by recoloring
the edges that are incident on some two vertices of Kn . The proof of Theorem 1 shows that An is a
connected graph. It is natural to ask whether the subgraph of An that is induced by all OFs is connected,
and the answer is negative. It is easily verified that the OF in the classical cyclically symmetric construction
[15] corresponds to an isolated vertex in An .
Following the common wisdom in the field of rapidly mixing Markov Chains (e.g., [16] or [8]), we may
consider a larger induced subgraph of An , and include not only OFs, but also colorings that are "nearly"
OFs. The idea is that this larger subgraph may have better expansion properties and yet the OFs constitute
a substantial part of its vertex set. Together this means that by taking a random walk that is restricted
to this larger vertex set we should be able to uniformly and efficiently sample a OFn . Concretely, we
may ask, e.g., whether the subgraph of An induced by colorings of "small enough" Φ is connected or even
rapidly mixing, and whether OFs constitute a substantial fraction of its vertex set.
Likewise, we may extend in the obvious way, the notion of a 2-vertex move to a 3-vertex move etc. This
suggests the question whether the resulting Markov Chain is connected, or even rapidly mixing. More
6
generally, we ask whether there is some k << n for which the Markov Chain that corresponds to k-vertex
recoloring is connected, or rapidly mixing. These questions remain open at this time.
3. We have described OF’s as Latin squares that satisfy a certain symmetry condition. A Steiner Triple
System (=STS) can also be viewed as a Latin squares that satisfies an even stronger symmetry requirement
and indeed much of what we say below applies as well to STS’s.
4. As mentioned, we would ideally want to sample OFs uniformly at random. The algorithm as described
above seems to yield a different distribution which may be interesting to understand as well. We ran
extensive simulations of our algorithm for n = 8. There are exactly 6 isomorphism classes of OFs of order
8 and the symmetry group of each class is known as well. We refer to the notation and classification in [4],
see also [17], Chapter 11. This yields the expected number of times to sample each class under uniform
distribution. In the following table we compare these figures with the actual number of samples.
Isomorphism type
A
B
C
D
E
F
Expected number under uniform distribution
4807.69
403846.15
269230.77
67307.69
100961.53
153846.15
Our Algorithm
547
355545
305384
66218
40735
231571
Table 1: Distribution over 1M OF8 Sampled From Our Algorithm
4
4.1
What do we expect from a random OF?
High girth
The search for high-girth graphs is a long and ongoing saga in modern graph theory. It is closely related
to key problems such as the study of expander graphs, to sparsity and small discrepancy in graphs. Similar
phenomena are of interest in OF’s as well. The most outstanding open question regarding high girth in OF is
Kotzig’s well-known conjecture from 1964 [10].
Conjecture 2 (Kotzig’s perfect OF conjecture). For every even n, there is a one-factorization of Kn in which
every two color classes form a Hamilton cycle.
This is known to be true for n = 2p and for n = p + 1 where p is an odd prime. In addition it is known for
a finite list of sporadic values of n.
Erdős has defined the girth of a Steiner Triple System X as the smallest integer g ≥ 5 such that there is a
set of g vertices that contains at least g − 2 triples of X. (Note that the girth of a graph is the least integer
g ≥ 3 such that there is a set of g vertices than spans ≥ g edges). He made the following conjecture:
Conjecture 3 (Erdős STS girth conjecture). There exist Steiner Triple Systems of arbitrarily high girth.
Our state of knowledge concerning this problem is rather dismal. In particular, not a single triple system is
known with girth ≥ 8. In this view, we raise the following relaxation of the Erdős conjecture.
Problem 2. Is there a constant c > 0 and a family of 3-uniform n-vertex hypergraphs with at least cn2
hyperedges and arbitrarily large girth?
Coming back to conjecture 2, we note that not much seems to be known about the union of three or more
log n
color classes. Moore’s bound says that the girth of an n-vertex d-regular graphs is at most (2 − on (1)) · log(d−1)
.
We believe that this bound is not sharp, and that the coefficient (2 − on (1)) in this bound should be replaceable
by a number strictly smaller than 2. Deciding this problem has turned out to be rather difficult. We raise the
following problem in the hope that it offers a viable approach to this question,
by way of studying OF’s.
Let d ≥ 3 be an integer, and let X be an OFn . Consider all the n−1
graphs
that can be obtained as the
d
log n
union of some d color classes classes in X. If each of these graphs can be made to have girth (2 − on (1)) · log(d−1)
(i.e., meet Moore’s bound) by removing only Od (1) of its edges, we say that X is d-perfect.
7
Problem 3. Do there exist for every d ≥ 3, arbitrarily large d-perfect one-factorizations?
For record, we believe that the answer is negative for every d ≥ 3, and hope that this may offer a strategy
toward showing that the Moore bound is not sharp.
4.2
Sparsity and low discrepancy
Concerning expansion and sparsity, many questions suggest themselves.
Problem 4. Is it true that for every d ≥ 3 and for every even n > n0 (d) there exists a one factorization of Kn
such that the union of any set of d color classes forms a Ramanujan graph?
We note that this question goes substantially beyond what is currently known. It has been longstanding open
question whether arbitrarily large d-regular Ramanujan graphs exist for every d ≥ 3. Substantial numerical
evidence suggests that the answer is positive. A possible approach to proving this is provided by the Bilu-Linial
signing conjecture [1]. In a recent breakthrough [14] Marcus, Spielman and Srivastava used their theory of
interlacing polynomials to establish this conjecture for bipartite graphs. Even more far reaching is the question
how likely it is for a large random d-regular graph to be Ramanujan. In this context one should mention
Friedman’s resolution [6] of Alon’s conjecture and the more recent work of Bordenave [2] pertaining to these
problems.
A less ambitious, but still interesting version of this problem is:
Problem 5. Is it true that for every d ≥ 3 and > 0 and for every even n > n0 (d, ), there exists a one
factorization of
√ Kn such that the union
√ of any d color classes forms a graph all of whose nontrivial eigenvalues
are between 2 d − 1 + and − − 2 d − 1?
Of course, even much weaker statements would be of great interest, e.g.,
Problem 6. Is it true that for every d ≥ 3 there is some > 0 such for every even n > n0 (d, ), there exists
a one factorization of Kn in which the union of any d color classes forms a graph all of whose nontrivial
eigenvalues are between d − and −d + ?
It is also natural to wonder about the following:
Problem 7. Do the phenomena considered in problems 4, 5 and 6 hold for asymptotically almost all onefactorizations?
Discrepancy in high-dimensional permutations is thoroughly discussed in [13], and much of this applies
verbatim to OF’s, so we will not further elaborate on this. However, we do raise some problems which are more
specific to OF’s.
For a set of vertices S in an edge-colored Kn , let γ(S) be the number of different colors of edges in the
subgraph induced by S. The deficit of a S is D(S) := |S|
2 − γ(S).
We wish to know whether there exist OF’s where all small sets have a small deficit. Concretely we ask:
Problem 8. For which n, k and d does it hold that every one-factorization of Kn has a set of k vertices with
deficit ≥ d ? (We allow dependencies among the parameters d, k and n).
We start with the following easy observation.
Proposition 1. If S is a set of vertices and l of the edges in E(S) are colored by only c colors, then D(S) ≥ l−c.
Here are some results results concerning Problem 8:
Theorem 2.
1. For every even integer n and for every n ≥ k ≥ 4, every order-n one-factorization has a set
of k vertices with deficit ≥ k − 3.
2. For every integer d ≥ −2 there is a C > 0 such that every order-n one-factorization has a set of k ≤ C·log n
vertices with deficit ≥ k + d.
8
Proof. To prove the first claim we use Proposition 1 with c = 2. Namely, we pick any two color classes and
consider the subgraph H ⊂ Kn that they form. Clearly, H is the disjoint union of alternating even cycles, and
it therefore has a set of k vertices that spans at least l = k − 1 edges. The claim follows.
For the second claim of the theorem we again use Proposition 1, now with c = 3. We also need the following
easy proposition whose proof essentially follows from the same argument that establishes the Moore bound.
Proposition 2. For every positive integer a there is some b > 0 such that every cubic graph of order n has a
set W of at most b · log n vertices which spans at least |W | + a edges. The bound is tight, up to the dependence
of b on a.
This second part of theorem follows by picking any three colors and applying Proposition 2 to the graph with
edges in those colors. The set W ⊆ V has the claimed deficit, where the relevant parameters for Proposition 1
are c = 3, l = k + a and d = a − 3.
Figure 6: Distribution of the second largest eigenvalue in 105 5-Regular√graphs sampled from OF100 , produced
by the algorithm. The vertical red line marks the Ramanujan bound 2 5 − 1 = 4.
We remark that from extensive simulations we ran it seems that this is the typical case.
4.3
Asymmetry
A symmetry of a OF X is specified by a permutation of the vertices π ∈ Sn and a permutation of the colors
τ ∈ Sn−1 , so that if the edge i, j is colored k in X, then the edge π(i), π(j) is colored τ (k). We say that X
is symmetric if such π 6= id and τ exist. Otherwise X is said to be asymmetric. It is a recurring theme in
probabilistic combinatorics that symmetry is rare. For example, there are several theorems which state that in
various models of random graphs, asymptotically almost all graphs are asymmetric. The analogous statement
for OFs was established by Cameron [3] and the numerical evidence from [5] suggests that symmetry among
OF’s is even rarer than what Cameron’s bound yields. We raise the following questions:
Problem 9.
• Improve the estimate for the fraction of OFn which are symmetric.
• Describe the most common symmetries that occur in OFs.
As theoretical computer scientists know very well, it is often hard to find hay in a haystack, so we ask:
Problem 10. Find explicit constructions of large asymmetric one-factorizations.
9
5
Another approach
Aside of the main algorithm that we discuss here, we have examined several other natural methods for generating
random OFs. We have also carried many simulations of these methods. The results of these simulations gave us
a good indication where to seek an algorithm whose correctness we could establish. We still believe that some
of these other methods are of interest and we sketch one of them below.
5.1
The "Four-Switch"
Start with n−1 randomly chosen perfect matchings on n vertices, each matching being identified with a separate
color. The trouble is, of course, that these color classes are not disjoint, so some edges of Kn may be uncolored,
while others carry several colors. The algorithm makes local changes to the matchings with the intention of
making them disjoint, and thus jointly constituting a OF. Here, too, we work with a potential function on such
a coloring of E(Kn ). Namely, Ψ(C) the potential Ψ of a coloring C is the number of uncolored edges. Clearly,
this number vanishes iff the coloring is an OF. Here is how the local change or four-switch works: Say that the
same color α appears on the edge a1 , a2 as well as on the edge b1 , b2 . We remove these two edges from the
α-colored matching and add to it instead the edges a1 , b1 and a2 , b2 .
It is useful to note that if the edge xy is multiply-colored, then both x and y are incident on uncolored edges.
A typical case in which a four-switch reduces the potential function is shown in Figures 7 and 8.
In some sense the scenario here resembles what happens with the main algorithm of this paper. Namely, we
first considered the algorithm which picks a random pair of equally colored edges, and carries out a four-switch
iff this decreases the potential function. This algorithm tends to get stuck in a local optimum. However, if we
allow as well switches under which the potential stays unchanged, then simulations suggest that a OF is reached
within polynomial(n) time. We state this in a conjecture:
Conjecture 4. Consider the algorithm that starts from a random collection of (n − 1) perfect matchings and
carries out in every step a randomly chosen four-switch that does not increase Ψ. This algorithm generates in
time polynomial(n) a one-factorization of Kn .
b1
Missing-edge
a1
b2
b1
b2
a1
a2
Missing-edge
a2
Figure 7: Before the switch
Figure 8: After the four-switch
References
[1] Yonatan Bilu and Nathan Linial. Lifts, discrepancy and nearly optimal spectral gap. Combinatorica,
26(5):495–519, 2006.
[2] Charles Bordenave. A new proof of friedman’s second eigenvalue theorem and its extension to random lifts.
arXiv preprint arXiv:1502.04482, 2015.
[3] Peter J Cameron. Asymmetric latin squares, steiner triple systems, and edge-parallelisms. arXiv preprint
arXiv:1507.02190, 2015.
[4] L. E. Dickson and F. H. Safford. 8. The American Mathematical Monthly, 13(6/7):150–151, 1906.
[5] Jeffrey H Dinitz, David K Garnick, and Brendan D McKay. There are 526,915,620 nonisomorphic onefactorizations of k12. Journal of Combinatorial Designs, 2(4):273–285, 1994.
10
[6] Joel Friedman. A proof of Alon’s second eigenvalue conjecture and related problems. American Mathematical
Soc., 2008.
[7] Marshall Hall. Combinatorial theory, volume 71. John Wiley & Sons, 1967.
[8] Mark Jerrum and Alistair Sinclair. Approximating the permanent. SIAM journal on computing, 18(6):1149–
1178, 1989.
[9] Petteri Kaski and Patric R. J. Östergå rd. There are 1, 132, 835, 421, 602, 062, 347 nonisomorphic onefactorizations of K14 . J. Combin. Des., 17(2):147–159, 2009.
[10] Anton Kotzig. Hamilton graphs and hamilton circuits. In Theory of Graphs and its Applications, Proceedings of the Symposium of Smolenice, pages 63–82, 1963.
[11] David Asher Levin, Yuval Peres, and Elizabeth Lee Wilmer. Markov chains and mixing times, 2009.
[12] Nathan Linial and Zur Luria. An upper bound on the number of high-dimensional permutations. Combinatorica, 34(4):471–486, 2014.
[13] Nathan Linial and Zur Luria. Discrepancy of high-dimensional permutations. Discrete Anal., 1:8, 2016.
[14] Adam W. Marcus, Daniel A. Spielman, and Nikhil Srivastava. Interlacing families. I: Bipartite Ramanujan
graphs of all degrees. Ann. Math. (2), 182(1):307–325, 2015.
[15] Eric Mendelsohn and Alexander Rosa. One-factorizations of the complete graph—a survey. Journal of
Graph Theory, 9(1):43–65, 1985.
[16] Alistair Sinclair. Algorithms for random generation and counting: A markov chain approachbirkhäuser,
1993.
[17] Walter D Wallis. One-factorizations, volume 390. Springer Science & Business Media, 2013.
11
© Copyright 2026 Paperzz