Resolution of the Oberwolfach problem

The Oberwolfach problem, posed by Ringel in 1967, asks for a decomposition of $K_{2n+1}$ into edge-disjoint copies of a given $2$-factor. We show that this can be achieved for all large $n$. We actually prove a significantly more general result, which allows for decompositions into more general types of factors. In particular, this also resolves the Hamilton-Waterloo problem for large $n$.


Introduction
A central theme in Combinatorics and related areas is the decomposition of large discrete objects into simpler or smaller objects. In graph theory, this can be traced back to the 18th century, when Euler asked for which orders orthogonal Latin squares exist (which was finally answered by Bose, Shrikhande, and Parker [5]). This question can be reformulated as the existence question for resolvable triangle decompositions in the balanced complete tripartite graph. (Here a resolvable triangle decomposition is a decomposition into edgedisjoint triangle factors.) In the 19th century, Walecki proved the existence of decompositions of the complete graph K n (with n odd) into edge-disjoint Hamilton cycles and Kirkman formulated the school girl problem. The latter triggered the question for which n the complete graph on n vertices admits a resolvable triangle decomposition, which was finally resolved in the 1970s by Ray-Chaudhuri and Wilson [32] and independently by Jiaxi. This topic has developed into a vast area with connections e.g. to statistical design and scheduling, Latin squares and arrays, graph labellings as well as combinatorial probability.
A far reaching generalisation of Walecki's theorem and Kirkman's school girl problem is the following problem posed by Ringel in Oberwolfach in 1967 (cf. [27]). Problem 1.1 (Oberwolfach problem). Let n ∈ N and let F be a 2-regular graph on n vertices. For which (odd) n and F does K n decompose into edge-disjoint copies of F ? Addressing conference participants in Oberwolfach, Ringel fittingly formulated his problem as a scheduling assignment for diners: assume n people are to be seated around round tables for n−1 2 meals, where the total number of seats is equal to n, but the tables may have different sizes. Is it possible to find a seating chart such that every person sits next to any other person exactly once?
We answer this affirmatively for all sufficiently large n. Note that the Oberwolfach problem does not have a positive solution for every odd n and F (indeed, there are four known exceptions).
A further generalisation is the Hamilton-Waterloo problem; here, two cycle factors are given and it is prescribed how often each of them is to be used in the decomposition. We also resolve this problem in the affirmative (for large n) via the following even more general result. We allow an arbitrary collection of types of cycle factors, as long as one type appears linearly many times. This immediately implies that the Hamilton-Waterloo problem has a solution for large n for any bounded number of given cycle factors. Theorem 1.2. For every α > 0, there exists an n 0 ∈ N such that for all odd n ≥ n 0 the following holds. Let F 1 , . . . , F k be 2-regular graphs on n vertices and let m 1 , . . . , m k ∈ N be such that i∈[k] m i = (n − 1)/2 and m 1 ≥ αn. Then K n admits a decomposition into graphs H 1 , . . . , H (n−1)/2 such that for exactly m i integers j, the graph H j is isomorphic to F i . Theorem 1.3. For given ∆ ∈ N and α > 0, there exist ξ 0 > 0 and n 0 ∈ N such that the following holds for all n ≥ n 0 and ξ < ξ 0 . Let F, H be collections of graphs satisfying the following: • F is a collection of at least αn copies of F , where F is a 2-regular n-vertex graph; • each H ∈ H is a ξ-separable n-vertex r H -regular graph for some r H ≤ ∆; • e(F ∪ H) = n 2 . Then K n decomposes into F ∪ H.
Clearly, Theorem 1.3 implies Theorem 1.2 and also its corresponding version if n is even and we ask for a decomposition of K n minus a perfect matching.
While far more general than the Oberwolfach problem, Theorem 1.3 may be just the tip of the iceberg, and it seems possible that the following is true. Conjecture 1.4. For all ∆ ∈ N, there exists an n 0 ∈ N so that the following holds for all n ≥ n 0 . Let F 1 , . . . , F t be n-vertex graphs such that F i is r i -regular for some r i ≤ ∆ and i∈[t] r i = n − 1. Then there is a decomposition of K n into F 1 , . . . , F t . The above conjecture is implicit in the 'meta-conjecture' on decompositions proposed in [1].
Rather than considering decompositions of the complete graph K n , it is also natural to consider decompositions of host graphs of large minimum degree (this has applications e.g. to the completion of partial decompositions of K n ). Indeed, a famous conjecture of Nash-Williams [30] states that every n-vertex graph G of minimum degree at least 3n/4 has a triangle decomposition (subject to the necessary divisibility conditions). The following conjecture would (asymptotically) transfer this to arbitrary 2-regular spanning graphs. Conjecture 1.5. Suppose G is an n-vertex r-regular graph with even r ≥ 3 4 n + o(n) and F is a 2-regular graph on n vertices. Then G decomposes into copies of F .
The (asymptotic version of the) Nash-Williams conjecture was reduced to its fractional version in [4]. In combination with [11], this shows that the Nash-Williams conjecture holds with 3n/4 replaced by 9n/10 + o(n). There has also been considerable progress on decomposition problems involving such host graphs of large minimum degree into other fixed subgraphs H rather than triangles [14,28]. It turns out that the chromatic number of H is a crucial parameter for this problem. In particular, as proved in [14], for bipartite graphs H the 'decomposition threshold' is always at most 2 3 n + o(n). Clearly, one can generalise Conjecture 1.5 in this direction, e.g. to determine the decomposition threshold for K r -factors. It might also be true that the '3/4' in Conjecture 1.5 can be replaced by '2/3' if F consists only of even cycles. We are confident that the ideas from this paper will be helpful in approaching these and other related problems. As remarked in Section 5, the current method already allows us to replace K n by any 2r-regular host graph G with 2r ≥ (1 − ε)n.
This paper is organised as follows. In Section 2 we provide an overview of our approach and in Section 3 we collect several embedding and decomposition results including the bandwidth theorem for approximate decompositions from [9] and a special case of a result of Keevash [23] on resolvable designs. We prove Theorem 1.3 in Section 4 and add some concluding remarks in Section 5.

Proof sketch
For simplicity, we just sketch the argument for the setting of the Oberwolfach problem; that is, we aim to decompose K n into n−1 2 copies of an n-vertex 2-regular graph F . The proof essentially splits into two cases. In the first case we assume that almost all vertices of F belong to 'short' cycles, of length at most 500. Note that there must be some cycle length, say ℓ * , such that at least n/600 vertices of F lie in cycles of length ℓ * . We will take a suitable number of random slices of the edges of K n and then first embed, for every desired copy of F , all cycles whose lengths are different from ℓ * . For this, we use standard tools based on the Rödl nibble. We then complete the decomposition by embedding all the cycles of length ℓ * . This last step uses a special case of a recent result of Keevash on the existence of resolvable designs [23].
The second case is much more involved and forms the core of the proof. We are now guaranteed that a (small) proportion of vertices of F lies in 'long' cycles. To motivate our approach, consider the following simplified setup. Suppose F consists only of cycles whose lengths are divisible by 3, and suppose for the moment we seek an F -decomposition of a 3-partite graph G with equitable vertex partition (V 1 , V 2 , V 3 ) (so G is a C 3 -blowup). Let ℓ 1 , . . . , ℓ t be the sequence of cycle lengths appearing in F . Now, take any permutation π on V 3 which consists of cycles of lengths ℓ 1 /3, . . . , ℓ t /3. For instance, a C 3 in F corresponds to a fixed point in π, and a C 6 in F corresponds to a transposition in π. Now, define an auxiliary graph π(G) by 'rewiring' the edges between V 2 and V 3 according to π. More precisely, we By 'reversing' the rewiring, we obtain a copy of F in G. More precisely, let π −1 (F ′ ) be the graph obtained from F ′ by replacing What is more, this rewiring is canonical in the following sense: if F ′ and F ′′ are edge-disjoint C 3 -factors in π(G), then π −1 (F ′ ) and π −1 (F ′′ ) will be edge-disjoint copies of F in G. Thus, a resolvable C 3 -decomposition of π(G) immediately translates into an F -decomposition of G.
Similarly, if all cycle lengths in F are divisible by 4, we can reduce the problem of finding an F -decomposition of a C 4 -blowup to the problem of finding a resolvable C 4 -decomposition of a suitably rewired C 4 -blowup. In order to deal with arbitrary 2-regular graphs F , we interweave such constructions for C 3 , C 4 and C 5 . In Sections 4.1 and 4.2, we will construct an 'absorbing graph' G which is a partite graph on 18 vertex classes such that finding an F -decomposition of G can be reduced to finding resolvable C 3 , C 4 , C 5 -decompositions of suitable auxiliary graphs, in a similar way as sketched above. Crucially, G has this property in a robust sense: even if we delete an arbitrary sparse graph L from G, as long as some necessary divisibility conditions hold, we are still able to find an F -decomposition of G − L.
The overall strategy is thus as follows: first, we remove G from K n . Then we find an approximate decomposition of the remainder, which leaves a sparse leftover. For this, we employ the recent bandwidth theorem for approximate decompositions [9]. (The existence of an approximate decomposition of K n − G would also follow directly from the blow-up lemma for approximate decompositions [24], but this would leave a leftover whose density is larger than that of the absorbing graph G, making our approach infeasible.) We then deal with this leftover by using some edges of G, in a very careful way, such that the remainder of G is still appropriately divisible. The remainder of G then decomposes as sketched above. In order to decompose the auxiliary graphs, we again use a very special case of the main result in [23]. The fact that we are guaranteed that F has some long cycles will be helpful to construct the absorbing graph G, more precisely, to ensure that all the 18 vertex classes are of linear size. It is also essential when dealing with the leftover of the approximate decomposition.

Preliminaries
In this section, we first introduce some notation, then a Chernoff-type concentration inequality, several graph embedding tools and notation concerning quasirandomness, as well as the framework of the result of Keevash on resolvable decompositions.
3.1. Notation. For a 2-regular graph F , let C(F ) denote the collection of cycles in F . We also refer to a 2-regular graph as a cycle factor. Let G be a graph. We denote by e(G) the number of edges of G, and by |G| the number of vertices of G. For sets U, U ′ ⊆ V (G), we define e G (U ) as the number of edges of the graph induced by U and e G (U, U ′ ) as the number of pairs (u, For a subgraph H ⊆ G, we write G − H for the graph with vertex set V (G) and edge set E(G) \ E(H). We write G \ X for the graph obtained from G by removing the vertices of X, and G \ H := G \ V (H). Given two graphs G 1 and G 2 , define G 1 △ G 2 to be the graph on Given graphs F and G, a function σ : for all xy ∈ E(F ). An injective homomorphism is called an embedding. For a fixed graph F , an F -factor in a graph G is a collection F of vertex-disjoint copies of F in G which cover all vertices of G. An F -decomposition of G is a collection F of edge-disjoint copies of F in G which cover all edges of G. An F -decomposition F is called resolvable if it can be partitioned into F -factors.
For a collection of graphs H, we define e(H) by H∈H e(H). We write G − H for the graph with vertex set V (G) and edge set E(G) \ H∈H E(H). We also write ∆(H) for the maximum degree of H∈H H. We say that . Let X be a set of disjoint vertex sets and R a graph on X . If G is a graph with vertex partition X , where each X ∈ X is independent in G, and such that e G (X, X ′ ) = 0 for all distinct X, X ′ ∈ X with XX ′ / ∈ E(R), then we say that G has reduced graph R. For a digraph D and a vertex v ∈ V (D), we write d + D (v) and d − D (v) for the number of outgoing and incoming arcs at v, respectively. We say that D is r- . Sometimes we write D for an oriented graph and then D is the undirected graph obtained from D by ignoring the orientations of D.
We write N 0 := N ∪ {0} and [n] := {1, . . . , n}. For a set of objects indexed by [t], we often treat indices modulo t, and define a mod t to be the unique integer b ∈ [t] such that a ≡ b mod t. For a, b, c ∈ R, we write a = b±c whenever a ∈ [b−c, b+c]. For a, b, c ∈ (0, 1], we write a ≪ b ≪ c in our statements to mean that there are increasing functions f, g : (0, 1] → (0, 1] such that whenever a ≤ f (b) and b ≤ g(c), then the subsequent result holds.
3.2. Probabilistic tools. At several stages of our proof we will apply the following standard Chernoff-type concentration inequalities. . Let X be the sum of n independent Bernoulli random variables. Then the following hold.
The following follows easily from Lemma 3.1(i). An explicit derivation can be found in [15].
Lemma 3.2. Let 1/n ≪ p, α, 1/B. Let I be a set of size at least αn and let (X i ) i∈I be a family of Bernoulli random variables with P [X i = 1] ≥ p. Suppose that I can be partitioned into at most B sets I 1 , . . . , I k such that for each j ∈ [k], the variables (X i ) i∈I j are independent. Let X := i∈I X i . Then we have

3.3.
Embedding and decomposition results. Frequently in our proof we want to embed parts of a 2-regular graph into 'random-like' graphs. For such a task, the blow-up lemma is a standard tool. We say that a graph G on n vertices is If V 1 and V 2 are disjoint vertex sets in G, we also say that It is well known that these conditions imply super-regularity (see [12]). We need the following version of the blow-up lemma of Komlós, Sárközy and Szemerédi, which we just state in the setting of quasirandom pairs. Lemma 3.3 (Blow-up lemma, [25]). Let 1/n ≪ ε ≪ κ, d, 1/∆, 1/r. Suppose that G is an n-vertex graph with vertex partition X and reduced graph R, where |R| ≤ r. Assume that Let H be a graph with ∆(H) ≤ ∆. Let X 0 ⊆ V (H) be independent such that |X 0 | ≤ εn and no two vertices in X 0 have a common neighbour in H. Assume that σ : H → R is a homomorphism such that |σ −1 (X)| = |X| for all X ∈ X , and φ 0 : Then there exists an embedding φ : The following is a straightforward consequence of the blow-up lemma. The following result due to Condon, Kim, Kühn and Osthus [9] is a key ingredient in our approach. It is in turn based on the blow-up lemma for approximate decompositions [24].
Theorem 3.5 ( [9]). For all ∆ ∈ N\{1}, 0 < ν < 1, there exist ξ > 0 and n 0 ∈ N such that for all n ≥ n 0 and 1 − 1 200∆ ≤ d ≤ 1 the following holds: Suppose that H is a collection of n-vertex ξ-separable graphs and G is an n-vertex graph such that . Then H packs into G.

3.4.
Partite decompositions of typical graphs. We will make use of a recent result of Keevash [23] on partite decompositions of typical (hyper-)graphs. His result applies in a far more general setting and we only need a simple consequence thereof here (see Theorem 3.6). For simplicity, we only introduce the relevant concepts for partite graph decompositions.
We first define typicality. Roughly speaking, a graph is typical if common neighbourhoods are as large as one would expect in a random graph. We also need such a notion for partite structures. Suppose that G is a graph with vertex partition (V 1 , . . . , V t ) (we do not assume that these sets are independent). Let τ : V (G) → [t] denote the assignment function such that v ∈ V τ (v) for all v ∈ V (G). Given a symmetric matrix D ∈ [0, 1] t×t , s ∈ N and ε > 0, we say that G is (ε, s, D)-typical if for any set S ⊆ V (G) with |S| ≤ s and any i ∈ [t], we have that Note that if G is a weighted binomial random graph where an edge between V i and V j is included with probability D ij , then (3.1) holds with high probability. Note also that if D ij = 0 and (3.1) holds, then e G (V i , V j ) = 0. We will often write If t = 1, we simply write (ε, s, D 11 )-typical instead of (ε, s, D)-typical.
Our aim is to decompose G into a given graph H, following a prescribed pattern. More precisely, let σ : V (H) → [t] be an assignment of the vertices of H to the vertex partition classes of G. Given an embedding φ : H → G of H into G such that τ (φ(x)) = σ(x) for all x ∈ V (H), we say that φ(H) is a σ-copy of H in G. A collection H of edge-disjoint σ-copies of H in G is called an (H, σ)-packing in G. We say that H is an (H, σ)-decomposition of G if, in addition, every edge of G is covered.
Roughly speaking, Theorem 3.6 guarantees an (H, σ)-decomposition of G under two assumptions: typicality and divisibility. We have already defined typicality of G. Now we relate the density matrix D to the given assignment σ of H. Let (P 1 , . . . , P t ) be the partition of V (H) induced by σ, i.e. P i = σ −1 (i) for each i ∈ [t]. We let I H,σ denote the symmetric indicator (t × t)-matrix defined as I H,σ ij := 1 if e H (P i , P j ) > 0 and I H,σ ij := 0 otherwise. We will later require that D ≥ d · I H,σ . This accounts for the fact that if some edge of H is mapped to (V i , V j ), then we require this pair to be sufficiently dense in G.
Finally, we say that G is (H, σ)-divisible if the following hold: . It is easy to see that (H, σ)-divisibility is a necessary condition for an (H, σ)-decomposition to exist. If σ is bijective, we follow the notation in [23] and simply say that G is H-balanced if it is (H, σ)-divisible, and an (H, σ)-decomposition is simply called a partite H-decomposition.  We now use Theorem 3.6 to deduce the two results about resolvable cycle decompositions which we will need later. The following will be used in Case 1 of our proof, where most vertices of F are contained in cycles of length at most 500.
Let W ℓ be the wheel graph with ℓ spokes and hub w, and let σ assign w to U and all other vertices to V .
Proof. Note that G is (W ℓ , σ)-divisible, so we can apply Theorem 3.6.
Note that given such a decomposition, for every vertex u ∈ U , the collection of all cycles which together with u form a wheel in the decomposition form a C ℓ -factor of G[N G (u)].
We will also need the following approximate version of Corollary 3.7, which is much simpler to prove and follows from standard hypergraph matching results based on the Rödl nibble. Note that we do not need to assume divisibility in this case, which makes it more convenient to apply.
Let W ℓ be the wheel graph with ℓ spokes and hub w, and let σ assign w to U and all other vertices to V . Then G has a (W ℓ , σ)-packing such that the leftover L satisfies ∆(L) ≤ γn.
Proof. Define an auxiliary 2ℓ-uniform hypergraph H with vertex set E(G) where the edges of H correspond to σ-copies of W ℓ in G. Using the typicality condition, we can count that every edge of G between V and U lies in The next result will be used in Case 2 of our proof. It asserts the existence of resolvable partite cycle decompositions in typical partite graphs. In the proof, we add a new vertex class of size equal to the number of cycle factors required for a resolvable decomposition, and join it completely to the rest of the graph. A wheel decomposition of this auxiliary graph encodes a resolvable cycle decomposition of the original graph. A very similar reduction has also been used e.g. in [23] to derive the existence of resolvable designs. We include a short proof for completeness.
Proof. Let W ℓ be the wheel graph with ℓ spokes and hub w. We extend G to a graph G ′ by adding a new vertex class V w of size r and joining each v ∈ V w to all vertices of G. Accordingly, extend D to a ((t + 1) It is also straightforward to check that G ′ is W ℓ -balanced. Thus, applying Theorem 3.6 to G ′ yields a partite W ℓ -decomposition W of G ′ . This gives us a resolvable partite The following proposition states that random slices of typical graphs are again typical. This is an easy consequence of Lemma 3.1(i).
and D ≥ dI for some indicator (t × t)matrix I. Suppose we choose a random subgraph G ′ of G by including each edge independently with probability p. Then G ′ is (1.1ε, s, pD)-typical with probability at least 1 − e − √ n .
We conclude this subsection with the following simple fact about the robustness of the typicality property.

Main proof
In this section, we prove Theorem 1.3. The proof divides into two cases. The first case assumes that the given 2-regular graph F has very few vertices in long cycles. In the second case, we are guaranteed that linearly many vertices of F lie in long cycles. The latter case is much more involved than the first case and needs some additional preliminary work. In the following subsections, we will develop the necessary tools for Case 2.
The following definition will be used throughout the section. Let X be a set of disjoint vertex sets and R an oriented graph on X . Assume that G is a graph with vertex partition X and reduced graph R (where each X ∈ X is independent in G). Let G R be the oriented graph obtained from G by orienting every edge e ∈ E(G) with the same direction as the reduced edge of R corresponding to e.
We say that G is r-balanced with respect to 4.1. Cyclic partitions. As sketched in Section 2, we reduce the problem of finding an Fdecomposition of a graph to finding resolvable C 3 , C 4 , C 5 -decompositions of suitable auxiliary graphs.
For ℓ ∈ N, we say that (a 1 , . . . , a t ) is a cyclic partition of ℓ if a i ∈ N for all i ∈ [t] and For a cyclic partition a = (a 1 , . . . , a t ) and a sequence a ′ = (a ′ 1 , . . . , a ′ t ′ ), we let c a (a ′ ) denote the number of appearances of a ′ in a, that is, }|. Note that if e.g. a = (a) and a ′ = (a, a), we have c a (a ′ ) = 1. To improve readability, we write c a (a) instead of c a ((a)) and c a (a, b) instead of c a ((a, b)). For a sequence a, we let a m denote the sequence which is the concatenation of m copies of a.
In this paper, we will only consider cyclic {3, 4, 5}-partitions a where c a (a, b) = c a (b, a) for all a, b ∈ {3, 4, 5}. For brevity, we will simply call these the admissible partitions. Let We now make some easy observations regarding admissible partitions. Proof. For the first part, write ℓ = 3x + 4y with x, y ∈ Z. If ℓ ≥ 12, we can clearly assume x, y ≥ 0, and this can also easily be checked if ℓ < 12 and ℓ = 5. Thus, unless ℓ = 5, we obtain a partition a consisting of x 3's and y 4's (in any order). Since c a (3, 4) = c a (4, 3), the partition a is also admissible. If ℓ = 5, we simply take (5). (This is in fact the reason why we allow 5's in admissible partitions, otherwise 3 and 4 would suffice.) Now, assume that ℓ ≥ 500. Choose ℓ − 61 < ℓ ′ ≤ ℓ − 13 such that ℓ ′ is divisible by 48. Then there is a partition of ℓ ′ such that each number 3, 4, 5 appears exactly ℓ ′ /12 times. Moreover, similarly as in the first part, there is an admissible partition a ′ of ℓ − ℓ ′ ≥ 13 that consists of a positive number of 4's followed by a positive number of 3's. We now construct a by concatenating a ℓ ′ /48 for each a ∈ {(3, 3), (3,4), (4,4), (4,5), (5,5), (3,5)} (in this order), and finally attaching a ′ . It is easy to check that a is an admissible partition of ℓ. Moreover, by construction, we have c a ((a, b) 6  For every ℓ ∈ N with ℓ ≥ 3, let a ℓ be an admissible partition of ℓ. Moreover, if ℓ ≥ 500, we also assume that c a ((a, b) 6 ) ≥ ℓ/200 for all (a, b) ∈ I. We fix a ℓ throughout the remainder of the paper. Moreover, whenever C is a cycle of length ℓ, we let a C := a ℓ and c C (·) := c a C (·). Hence, given any 2-regular graph F , we obtain a collection a F := {a C : C ∈ C(F )} of cyclic partitions. Since we fix our choice of a ℓ throughout, this collection is unique for every 2-regular graph F . We define the counting function (4.1) Proposition 4.3. Let F be a 2-regular graph on n vertices. Then the following hold: Proof. Items (i), (ii) and (iii) follow directly from Fact 4.2 and (4.1). (iv) follows by assumption on a ℓ and (4.1).
We now describe the structure of the absorbing graph, which we call an F -partition. Roughly speaking, an F -partition (X , R) consists of a suitable partition X of an n-set V into 18 sets and an (oriented) reduced graph R on X . Depending on the different parts of the proof, we will endow such a partition with additional structure. For instance, the sizes of the vertex classes in X are chosen such that there is a natural embedding of F into V with reduced graph R (cf. Definition 4.5), hence the name F -partition. Another crucial ingredient is a 'rewiring' permutation π on a special subset Y ⊆ V (cf. Definition 4.7 and Figure 1). The absorbing graph will be a graph G with vertex partition X and reduced graph R (cf. Section 4.2).

Definition 4.4 (F -partition). Let F be a 2-regular graph and assume that
• For all a ∈ {3, 4, 5} and i ∈ [a], let X a i be a subset of V of size c F (a) such that X := (X a i ) a∈{3,4,5},i∈[a] is a partition of V . This is possible by Proposition 4.3(ii). Moreover, for each a ∈ {3, 4, 5}, we partition X a 1 further using Proposition 4.3(iii), that is, let be a partition into sets of size c F (a, 3), c F (a, 4) and c F (a, 5), respectively. Let • We define two (oriented) reduced graphs, one for the partitionX and one for the refined partition X . DefineR onX as the union of the (oriented) cycles X a 1 X a 2 . . . X a a X a 1 for each a ∈ {3, 4, 5}. Define R on X as the union of an (oriented) path X a 2 . . . X a a for each a ∈ {3, 4, 5} as well as the (oriented) paths X a a X a,b 1 X b 2 for all (a, b) ∈ I (cf. Figure 1). • Note thatX andR are uniquely determined by X and R. Moreover, we let Note that if at least η|F | vertices of F lie in cycles of length at least 500, then Proposition 4.3(iv) implies that |X| ≥ η|F |/200 for all X ∈ X .
Definition 4.5 (F -homomorphism). Let (X , R) be an F -partition. An F -homomorphism σ : F → R for (X , R) is defined as follows: Consider C ∈ C(F ). We define a homomorphism σ C : C → R simply by walking in R as indicated by a C . More precisely, let a C = (a 1 , . . . , a t ) and write Figure 1. An F -partition with rewiring permutation π. The permutation π acts on the vertices in the coloured clusters (denoted by Y ). Every vertex has an upper and a lower colour (the vertex v has upper colour green and lower colour blue). The lower colour of v coincides with the upper colour of π(v); in the figure, π(v) lies in We record some easy properties of such a homomorphism.
Proof. Let σ be defined as in Definition 4.5. Consider C ∈ C(F ). Note that we have Moreover, if C denotes the orientation of C obtained by orienting xy ∈ E(C) with the orientation of σ C (x)σ C (y) in R, then C is 1-regular. Hence, F is clearly 1-regular. Moreover, for all a ∈ {3, 4, 5} and i ∈ [a] \ {1}, we have and similarly, for all (a, b) ∈ I, we have |σ −1 (X a,b Another property of an F -homomorphism σ, which will be crucial in Section 4.4, is that there are many subpaths of F whose σ-image winds at least 5 times around a given cycle in R. This follows from Proposition 4.3(iv).

4.2.
The robust decomposition lemma. In this subsection, we show that given an Fpartition (X , R), we can find a graph G with vertex partition X and reduced graph R, such that for any sparse subgraph L ⊆ G, the remainder G − L has an F -decomposition, subject to some divisibility conditions (cf. Lemma 4.11). This is arguably the core of our proof.
The construction of G is based on a 'rewiring permutation'. This permutation controls how we 'merge' resolvable C 3 , C 4 , C 5 -decompositions of suitable auxiliary graphs into an F -decomposition.
Definition 4.7 (F -rewiring). Let V be a set and assume that (X , R) is an F -partition of V . LetX ,R, Y be as in Definition 4.4. An F -rewiring (π, π * ) for (X , R) is defined as follows: • We define a permutation π on Y that is the disjoint union of permutations {π C } C∈C(F ) . To this end, for each C ∈ C(F ), let Y C ⊆ Y be a set which consists of c C (a, b) vertices from Clearly, we have for all (a, b) ∈ I (cf. Figure 1).
We use π * to switch between graphs with reduced graphs R andR, respectively. Let G ∞ be the set of all graphs G on V with E(G) ⊆ E ∞ , and let G •• be the set of all graphs G on V with E(G) ⊆ E •• . Clearly, π * induces a bijection between G ∞ and G •• , which we call π * again.
The following are the crucial properties of our rewiring procedure. (ii) Suppose that H ∈ G •• consists of an a-partite C a -factor on (X a 1 , . . . , X a a ) for each a ∈ {3, 4, 5}. For a vertex y ∈ X a 1 , let C y = yx a y be the copy of C a which contains y, where x The crucial observation is that π * −1 merges the cycles (C y ) y∈Y C to one copy of C.
Claim 1: For each C ∈ C(F ), let H C be the graph with vertex set y∈Y C V (C y ) and edge set π * −1 y∈Y C E(C y ) . Then H C ∼ = C.
Proof of claim: Fix some C ∈ C(F ). Note first that for every y ∈ Y C , the set of vertices spanned by the edges of π * −1 (E(C y )) is V (C y ) ∪ {π −1 (y)}. Indeed, since π(Y C ) = Y C , we have π −1 (y) ∈ V (C y ′ ) for some y ′ ∈ Y C . Thus, H C is well-defined. Now, let a C = (a 1 , . . . , a t ) and write Y C = {y 1 , . . . , y t }, where π(y i ) = y i+1 and y i ∈ X a i ,a i+1 1 for all i ∈ [t] (where y t+1 := y 1 and a t+1 := a 1 ). Consider i ∈ [t]. Recall that x (y i ) 2 is the neighbour of y i on C y i in X a i 2 . By definition of π * , we have that ) is a path from y i to y i−1 of length a i . Since the internal vertices of the paths P 1 , . . . , P t are mutually disjoint, we conclude that the union H C of these t paths is a cycle of length a 1 + · · · + a t = |C|. − The following lemma will be used to define the absorbing graph. Lemma 4.9. Suppose 1/n ≪ ε ≪ 1/s, β, d, 1/t. Let V 1 , . . . , V t be sets of size n each (indices modulo t). Let U be a collection of at most e n 1/10 sets such that for every U ∈ U , we have |U | ≥ βn and U ⊆ V i for some i ∈ [t]. Then there exists a graph G with vertex partition (V 1 , . . . , V t ) satisfying the following: Proof. For each i ∈ [t], let M i be a decomposition of the complete bipartite graph between V i and V i+1 into perfect matchings. Equivalently, consider an n-edge-colouring. Let G be the (random) graph obtained by activating each M ∈ i∈[t] M i independently with probability d.
Using Lemma 3.2 and a union bound, it is easy to see that G satisfies (i) with probability at least 1 − e −n 1/7 . Moreover, standard properties of the binomial distribution yield that G satisfies (ii) with probability at least Ω d (n −t/2 ). Thus, there exists a graph G with the desired properties.
Later on, we will also need the following related result. Proof. Let r := 2⌊dn/2⌋. If n is even, K n has a 1-factorization and we can generate the desired graph as the union of random perfect matchings as above. If n is odd, we take a quasirandom r-regular graph G ′ on n − 1 vertices first. Then choose a random subset N ⊆ V (G ′ ) of size r. It is well known that G ′ [N ] has with high probability a perfect matching M (since r is even). Then removing M and adding a new vertex with neighbourhood N yields the desired graph.
We are now ready to prove the robust decomposition lemma. It guarantees the existence of an absorbing graph G which not only has an F -decomposition itself, but even after removing a sparse balanced subgraph, it is still F -decomposable.
Lemma 4.11. Suppose 1/n ≪ ε ≪ η, α. Let F be a 2-regular graph on n vertices and assume that at least ηn vertices lie in cycles of length at least 500. Let V be a vertex set of size n and let (X , R) be an F -partition of V . There exists a graph G with vertex partition X and reduced graph R which satisfies the following properties: for every subgraph L ⊆ G which is r L -balanced with respect to (X , R) for some r L ≤ √ εn, the remainder G − L has an F -decomposition.
We claim that G is the desired graph. First, observe that G 3 ∪ G 4 ∪ G 5 is r-balanced with respect to (X ,R), and thus G is rbalanced with respect to (X , R) by Lemma 4.8(i). In particular, G is 2r-regular, proving (i).
Next, from (a) and our choice of U a , we can also deduce that for each a ∈ {3, 4, 5}, the following pairs are (ε, d a )-quasirandom: Note that for all (a, b) . This proves (ii). It remains to prove the essential claim, which is (iii). To this end, let L ⊆ G be any subgraph which is r L -balanced with respect to (X , R) for some r L ≤ √ εn. Let r ′ := r − r L .
Clearly, G − L is then r ′ -balanced with respect to (X , R). Lemma 4.8(i) implies that G ′ := π * (G − L) is r ′ -balanced with respect to (X ,R). For a ∈ {3, 4, 5}, let The balancedness of G ′ implies that d G ′ a (v, X a i−1 ) = d G ′ a (v, X a i+1 ) = r ′ for all v ∈ X a i and i ∈ [a] (indices modulo a).

4.3.
Crossing edge absorption. In this subsection, we prove the main tool for the first step of our absorption process (Lemma 4.12). Roughly speaking, it states that given a graph G with a vertex partition (V 1 , . . . , V t ) which is quasirandom inside the clusters and sufficiently sparse between the clusters, we can utilize copies of F to cover all edges between clusters.
Lemma 4.12. Suppose 1/n ≪ ε ≪ η, 1/t. Let F be an n-vertex 2-regular graph with at least ηn vertices belonging to cycles of length at least 15t. Let (V 1 , . . . , V t ) be a vertex partition of an n-vertex graph G with vertex set V such that |V i | ≥ ηn and . Let L be a graph with vertex set V such that the following hold: Then there exists a subgraph G ′ of G such that G ′ ∪ L has an F -decomposition.
Note that condition (iii) is clearly necessary. Moreover, we need at least a few edges between clusters (e.g. if F is a Hamilton cycle) and it turns out that the condition in (ii) suffices.
In the proof of Lemma 4.12 we rely on Lemma 4.14. The statement of Lemma 4.14 is similar to the statement of Lemma 4.12. However, in Lemma 4.14 L is a matching which we cover with a single copy of F . For the proof of Lemma 4.14 we use Lemma 4.13. Proof. The proof consists of three steps. In the first step, we define a very simple assignment In the second step, we modify f 1 slightly to obtain a different assignment f 2 . Both assignments essentially ignore the edges of F and only make sure that (i) holds with f replaced by f 1 and f 2 , respectively. In the final step, it is then easy to obtain an assignment f from f 2 which satisfies (i)-(iv).
We write C 1 , . . . , C s for the cycles in F . Let x 1 , . . . , x n be an ordering of the vertices of F such that all vertices in C i precede all vertices in C j for all i < j. For i ∈ [t], let I i := {1 + j<i n j , 2 + j<i n j , . . . , j≤i n j }. Clearly, I 1 , . . . , I t is a partition of [n]. This also gives rise to our first assignment f 1 by defining f 1 (x k ) := i whenever k ∈ I i .
Recall that every cycle of F has length at least 30. Hence for all i ∈ [t], there are (disjoint) intervals I − i , I + i ⊆ I i of size 6 such that (a) for all k, k ′ ∈ I − i , the vertices x k , x k ′ belong to the same cycle of F and analogously for I + i ; (b) max I − i ≤ min I i + 10 and min I + i ≥ max I i − 10. Next, we slightly modify f 1 . Roughly speaking, f 2 arises from f 1 by interchanging I + It is easy to find an assignment f : V (C j ) → [t] of the vertices of a single cycle C j such that • the set E of all edges xy ∈ E(C j ) with |{f (x), f (y)}| = 2 is an induced matching in F ; • and the number of edges xy ∈ E(C j ) with {f (x), f (y)} = {i, i + 1} equals 4 if j is the unique integer such that both n(i, j), n(i + 1, j) are positive, 2 if n(i, j), n(i + 1, j), n(i, j * ), n(i + 1, j * ) are positive for some j * ∈ [s] \ {j} and otherwise 0.
Combining these assignments for all cycles yields an assignment f satisfying (i)-(iv). Proof. For i ∈ [t], define n i := |V i |. We first allocate all short cycles of F to the clusters V i . To this end, let F < be the subgraph of F which consists of all cycles of length less than 15t, and let F ≥ be the subgraph of F which consists of all cycles of length at least 15t. Let σ ′ : V (F < ) → [t] be such that n ′ i := n i − |σ ′−1 (i)| ≥ ηn/2t for all i ∈ [t] and σ ′ (x) = σ ′ (y) for all xy ∈ E(F < ). Clearly, σ ′ exists.
Our next goal is to find a function σ ′′ : V (F ≥ ) → [t] such that the following hold: We will find σ ′′ with the help of Lemma 4.13. Before this, we show how to complete the proof based on (a)-(c). Assume that σ ′′ satisfies (a)-(c). Obviously, we will embed E onto M . Let It is easy to see that φ := i∈[t] φ t is the desired embedding, where φ(E) = M . It remains to find σ ′′ . Clearly, we may assume that t ≥ 2. First, let R be the graph on [t] where ij ∈ E(R) if and only if e M (V i , V j ) is odd. Clearly, R is Eulerian. Hence, R has a decomposition C into cycles. For C ∈ C and i ∈ [t], we define Now, for all i ∈ [t], we define Thus, we can apply Lemma 4.13 to find a function f : V (F ≥ ) → [t] such that the following hold: We will obtain σ ′′ from f by changing the image of a few vertices. Roughly speaking, we repeatedly take a subpath of F which is currently embedded into V i and then move three consecutive vertices into another cluster V j . Apart from moving three vertices from V i to V j , this also produces two crossing edges (which do not share an endpoint). More precisely, for i ∈ [t], an i-target is a subpath P ⊆ F ≥ \ f −1 (V (E * )) of length 3t such that f (V (P )) = {i}. Clearly, for each i ∈ [t], there are at least 2εn vertex-disjoint i-targets.
For all i ∈ [t], let P i be a set of t j=i+1 def(i, j) vertex-disjoint i-targets, and let {P i,j : j = i + 1, . . . , t} be a partition of P i such that |P i,j | = def(i, j). For every C ∈ C with i = min V (C), let P C be an i-target which is vertex-disjoint from all the previously chosen targets (as there are 2εn vertex-disjoint i-targets, P C exists by (4.11)). Let P := i∈[t] P i ∪ C∈C P C be the set of all these targets.
We now define σ ′′ . For each target P ∈ P, write P = x (P ) 3t+1 . For every vertex x ∈ V (F ≥ ) which is not contained in any P ∈ P, we let σ ′′ (x) := f (x). For all i, j ∈ [t] with i < j and all P ∈ P i,j , we define, for all k ∈ [3t + 1], thus σ ′′ satisfies (a). Condition (b) clearly holds for the restriction σ ′′ ↾ P for every P ∈ P. Thus, (b) follows from (iii) and the fact that all the paths in P are vertex-disjoint and for every i-target P , we have σ ′′ (x (P ) s ) = i for s ∈ {1, 2, 3t, 3t + 1}. Finally, let i, j ∈ [t] with i < j. The union of all P ∈ P i,j gives rise to exactly 2def(i, j) edges xy ∈ E(F ≥ ) with {σ ′′ (x), σ ′′ (y)} = {i, j}. Moreover, if e M (V i , V j ) is even, then there is no cycle C ∈ C with ij ∈ E(C). If e M (V i , V j ) is odd, then there is exactly one cycle C ∈ C with ij ∈ E(C), and P C gives rise to exactly one edge xy ∈ E(F ≥ ) with {σ ′′ (x), σ ′′ (y)} = {i, j}. Together with (ii), (iv) and the definition of def(i, j), this implies (c).
We can now prove Lemma 4.12. Essentially, we need to decompose L into suitable matchings and then apply Lemma 4.14 to each matching.
Proof of Lemma 4.12. We call a matching . The main part of the proof is to partition E(L) into good matchings. We achieve this in three steps. In the first step, we find a good matching M 0 such that for L ′ := L − M 0 the number of edges between two clusters is always even. In the second step, we partition L ′ [V i , V j ] into matchings of size 2, and in the final step we combine these matchings to obtain a decomposition of L ′ into good matchings.
To this end, let Next, for all distinct i, j ∈ [t], we partition the edges of L ′ [V i , V j ] into matchings of size 2. Since the maximum degree of the line graph of L ′ (V i , V j ) is at most 2∆(L ′ ) ≤ e L ′ (V i , V j )/2, the complement of the line graph of L ′ (V i , V j ) has a perfect matching, which yields the desired partition. We call such a matching of size 2 an edge pair.
An admissible colouring is a proper edge-colouring of L ′ where two edges that form an edge pair receive the same colour.
We now admissibly colour L ′ with s := ⌈ε 3/4 n⌉ colours. First, since e L ′ (V i , V j ) − 4s − 8t∆(L) ≥ 2, it is easy to find a partial admissible colouring such that for every pair ij ∈ [t] 2 and each colour k ∈ [s], exactly two edge pairs in L ′ [V i , V j ] are coloured k. In a second phase, we order the remaining edge pairs arbitrarily and then colour them successively, each time picking an available colour that appears least often in the current colouring. Clearly, since at each step, there are at least s − 4∆(L ′ ) > ε 3/4 n/2 colours available for the considered edge pair, no colour class will have size more than 2ε 1/4 n in the completed colouring.
It is easy to see that each colour class of this colouring is a good matching. To conclude, we obtained a decomposition M of L into s + 1 good matchings. Finally, we apply Lemma 4.14 s + 1 times in turn to cover all these matchings. More precisely, we embed one copy of F into the union of M ∈ M and the subgraph of G induced by all edges that are not covered by earlier applications of Lemma 4.14. Clearly, at any stage of the procedure the uncovered edges in G[V i ] induce an (ε 1/2 , d i )-quasirandom graph for every i ∈ [t].

Atom absorption.
This subsection is devoted to the proof of the following lemma which states that if we are given a graph G as in Lemma 4.11(ii), and a regular 'leftover' inside each partition class, then we can absorb this leftover by using a few edges of G. Moreover, the subgraph A which we use from G will be balanced with respect to (X , R), thus ensuring that G − A still has an F -decomposition (cf. Lemma 4.11(iii)). Lemma 4.15. Suppose 1/n ≪ ε ≪ η. Let F be a 2-regular graph on n vertices and assume that at least ηn vertices lie in cycles of length at least 500. Let V be a vertex set of size n and assume that (X , R) is an F -partition. Assume that G is a graph with vertex partition X and reduced graph R such that for all XX ′ ∈ E(R), the pair G[X, X ′ ] is (ε, d XX ′ )-quasirandom for some d XX ′ ≥ η. Suppose that r ≤ εn and that L X is a 2r-regular graph on X for each X ∈ X . Let L := X∈X L X . Then there exists a subgraph A ⊆ G which is r A -balanced with respect to (X , R) for some r A ≤ √ εn such that A ∪ L has an F -decomposition.
As in the previous subsection, we will prove Lemma 4.15 by splitting L into suitable matchings and then employing the blow-up lemma to extend each such matching into a copy of F . How the latter can be done for a single matching is proved in Lemma 4.17. Recall that since (X , R) is an F -partition, Definition 4.5 yields a natural homomorphism σ : F → R for which we could straightforwardly apply the blow-up lemma to find a copy of F in G. However, such a copy of F would not contain any edges of L. In order to extend a given matching into a copy of F , we will locally modify σ. Because of divisibility issues, we perform this surgery not for single matching edges, but group them into smallest balanced edge sets, which we refer to as atoms. For each atom, we will perform a slight surgery on σ to make sure that the copy of F found with the blow-up lemma will cover this particular atom.
For a ∈ {3, 4, 5}, an {a}-atom is a matching of size a, consisting of one edge inside X a,a  Proof. Observe first that every atom satisfies (4.12) and (4.13). Thus, if H is the edgedisjoint union of atoms, it also satisfies (4.12) and (4.13). For the converse, repeatedly remove atoms from H, until this is no longer possible. Using (4.12) and (4.13), it is easy to see that at the end of this procedure, there can be no edge left.
Recall that for a subgraph A of G, where G is as in the statements of Lemmas 4.15 and 4.17, we write A R for the oriented graph obtained from A by orienting the edges according to the orientation of R.
Lemma 4.17. Suppose 1/n ≪ ε ≪ η. Let F be a 2-regular graph on n vertices and assume that at least ηn vertices lie in cycles of length at least 500. Let V be a vertex set of size n and assume that (X , R) is an F -partition. Assume that G is a graph with vertex partition X and reduced graph R such that for all XX ′ ∈ E(R), the pair G[X, X ′ ] is (ε, d XX ′ )-quasirandom for some d XX ′ ≥ η. Suppose that M is an oriented internally balanced matching of size at most εn. Then there exists a subgraph A ⊆ G such that A ∪ M ∼ = F and for every v ∈ V , we have d + Proof. Let A be a decomposition of M into atoms. Let σ : F → R be an F -homomorphism for (X , R) (cf. Definition 4.5) and let F denote the orientation of F obtained by orienting xy ∈ E(F ) with the orientation of σ(x)σ(y). By Fact 4.6, we have |σ −1 (X)| = |X| for all X ∈ X (4.14) and F is 1-regular.
Observe that R has a unique oriented ℓ-cycle D ℓ for each ℓ ∈ {3, 4, 5, 7, 8, 9}, namely, for distinct a, b ∈ {3, 4, 5}, we have D a = X a,a 1 X a 2 . . . X a a X a,a 1 ; Note that if O is an atom, then O consists of exactly one edge inside each vertex class Z ∈ V (D e(O) ). For ℓ ∈ {3, 4, 5, 7, 8, 9}, we say that P ⊆ F is an ℓ-target if P is a subpath of some cycle C ⊆ C(F ) such that σ(V (P )) ⊆ X∈V (D ℓ ) X and P has length 5ℓ. (In other words, the σ-image of P is a closed walk winding five times around the cycle D ℓ .) Our strategy is as follows. We modify σ (and obtain σ ′ ) in such a way that the σ ′ -image of P only winds four times around D ℓ but 'repeats' each cluster of D ℓ at some point exactly once; that is, two consecutive vertices of P are assigned to the same cluster. This ensures that we can cover the edges of O (which are inside the clusters) and at the same time exactly the same number of vertices are assigned to every particular cluster by σ and σ ′ .
First, we assign to each atom O ∈ A an e(O)-target P O such that all those targets are vertex-disjoint. This is possible by Proposition 4.3(iv). Indeed, for every a ∈ {3, 4, 5}, every appearance of (a) 6 in a C for some C ∈ C(F ) yields an a-target, and for all disinct a, b ∈ {3, 4, 5}, every appearance of (a, b) 6 in a C for some C ∈ C(F ) yields an (a + b)-target. Hence, for every ℓ ∈ {3, 4, 5, 7, 8, 9}, there are at least ηn/200 distinct ℓ-targets. Since |A| ≤ |M | ≤ εn, we can (greedily) choose an e(O)-target P O for each O ∈ A such that all the paths P O are vertex-disjoint.
For each atom O ∈ A, we will now partially embed P O to cover the edges of O. Crucially, for this we use exactly as many vertices from each cluster as indicated by σ. Thus, we will be able to apply the blow-up lemma to complete the embedding.
We now describe how the homomorphism σ can be modified on V (P O ) to absorb O. Consider some O ∈ A and let ℓ = e(O). Write P O = x 1 x 2 . . . x 5ℓ+1 . We may assume that D ℓ = Z 1 Z 2 . . . Z ℓ Z 1 is oriented as in R and σ(x 1 ) = Z 1 . Hence, σ( Recall that O consists of exactly one edge inside each vertex class Z i . Hence, we can write We now mark ℓ edges of P O which will later be embedded onto O. More precisely, let g := 4 if ℓ ∈ {4, 5, 7, 8} and g := 5 if ℓ ∈ {3, 9}. Let By construction, we have j i+1 ≡ j i + (g − 1) mod ℓ. By the choice of g, we have that g − 1 and ℓ are coprime. Thus, {j 1 , . . . , j ℓ } = [ℓ]. In other words, the σ O -image of P may be viewed as a walk in D ℓ which 'stops' in each Z ∈ V (D ℓ ) exactly once. This implies that for all Z ∈ V (D ℓ ), we have Note that σ O is not a homomorphism of P O into R. However, Moreover, it is compatible with σ in the following sense: is the set of heads of O. Having done this for all O ∈ A, we define Observe that Note that since g ≥ 4 and using (4.15), no two vertices in X + ∪X − have a common neighbour By (4.17) and (4.18), we have that σ ′ is a homomorphism from F ′ into R. Moreover, from (4.14) and (4.16) we can deduce that |σ ′−1 (X)| = |X| for all X ∈ X . Finally, we can apply the blow-up lemma (Lemma 3.3) to obtain an embedding φ : (4.19) and the definition of σ ′ , it is evident that Hence, A R ∪ M is 1-regular, as desired.
We will now deduce Lemma 4.15 from Lemma 4.17. In order to partition L into internally balanced matchings, it is convenient for us to exploit the following simple fact on the matching sequencibility of graphs. Proof. Suppose G is r-regular. As the edges of G can be properly coloured with r + 1 colours, there exist matchings M 1 , . . . , M r+1 in G which partition E(G) (suppose |M 1 | ≤ · · · ≤ |M r+1 |). Observe that |M 2 | ≥ n/4. Now, assume that for some i ∈ [r], the edges of M 1 , . . . , M i are ordered such that any n/12 consecutive edges form a matching. We call an edge in M i+1 blocked if it shares a vertex with some edge in M i that belongs to the last n/12 edges in the current ordering. Clearly, at most n/6 edges of M i+1 are blocked. Thus, we can extend the ordering by putting n/12 unblocked edges of M i+1 first and then the remaining ones.
We remark that the graph A in Lemma 4.17 is not balanced with respect to (X , R). However, the 'inbalancedness' of A is encoded in the orientation of the matching M . By decomposing L into suitable oriented matchings, it is not too difficult to ensure that the union of all graphs A over all these matchings will indeed be balanced.
Proof of Lemma 4.15. Note that since L is 2r-regular, there exists an orientation L of L such that L is r-regular, that is, d + We first partition L into small internally balanced matchings. For each X ∈ X , apply Fact 4.18 to obtain an ordering of the edges of L X such that any ηn/10 4 consecutive edges form a matching (recall that |X| ≥ ηn/200). We view each such ordering as a stack from which we repeatedly choose the first edge which has not been chosen before. We successively choose a set of edges M as follows: If for some S ∈ I ′ , there exists an S-atom of unchosen edges, then add those edges to M (taking the first unchosen edges from the appropriate stacks). Repeat this until |M | ≥ 2 √ εn or no atom can be found. Clearly, |M | ≤ 2 √ εn + 9 ≤ ηn/10 4 and thus M is a matching. Moreover, since M is the edge-disjoint union of atoms, it is internally balanced. By repeating this procedure, we obtain a collection M of edgedisjoint matchings. Note that for all a ∈ {3, 4, 5} and i ∈ [a], we have e L (X a i ) = r|X a i | = rc F (a). Similarly, for (a, b) ∈ I, using Proposition 4.3(i), we have that e L (X a,b . Clearly, since in each step we removed an atom from L, Fact 4.16 implies that the set of unchosen edges is the edge-disjoint union of atoms. In particular, we can find an atom as above until the very last edge of L is chosen. We conclude that M is a decomposition of L, and that all matchings in M have size at least 2 √ εn, except possibly for the last one. Thus, From now on, we view M as a set of oriented internally balanced matchings, where every edge simply inherits its orientation from L. We now apply Lemma 4.17 successively for each M ∈ M, to find a graph A M ⊆ G such that the following hold:

4.5.
Proof of Theorem 1.3. We are now ready to complete the proof of Theorem 1.3. The essential work has been done in the previous subsections. We now combine those results to finish the proof. We may clearly assume that ∆ ≥ 2 and that α ≤ 1 400∆ . Further, we choose new constants ξ, ε, µ, η > 0 and s ∈ N such that For the first part of the proof we assume that at least (1 − η)n vertices of F are contained in cycles of length at most 500. Since F is obviously ξ-separable, by moving a suitable number of copies of F from F to H, we may also assume that |F| = ⌈αn⌉ = (1 ± ξ)αn.
We will first use Theorem 3.5 to embed all graphs from H. Let d := 1 − 2α + ε. We partition the edges of K n into two graphs G ′ , G ′′ such that the following hold: (4.23) That such a partition exists can be seen easily via a probabilistic argument: for every edge independently, include it in G ′ with probability d and in G ′′ otherwise. Clearly, K n is (ξ/2, s, 1)-typical. Thus, Proposition 3.10 implies that G ′ and G ′′ satisfy (4.23) with high probability. Now we use Theorem 3.
It remains to show that G has an F -decomposition. Using Proposition 3.11, we can see that G is (ε 3/4 , s, 2α − ε)-typical, say, and therefore ( √ ε, s, 2α)-typical. Note that G is automatically 2|F|-regular. Before starting to decompose G, we first split F into three subgraphs according to the cycle lengths appearing in F . Let ℓ * ∈ {3, . . . , 500} be such that n ℓ * ≥ n/600. Clearly, ℓ * exists since 500 ℓ=3 n ℓ ≥ (1−η)n. Moreover, define I := {ℓ ∈ [500] \ {1, 2, ℓ * } : n ℓ ≥ ηn}. That is, I consists of 'significant' cycle lengths appearing in F (other than ℓ * ). Note that I might be empty. Define F 1 to be the disjoint union of n ℓ * /ℓ * cycles of length ℓ * . Let F 2 be the disjoint union of n ℓ /ℓ cycles of length ℓ, for each ℓ ∈ I. Finally, define F 3 as the disjoint union of n ℓ /ℓ cycles of length ℓ, for each ℓ ∈ [n] \ ({1, 2, ℓ * } ∪ I). Thus, F is the disjoint union of F 1 , F 2 and F 3 . Observe that (4.24) We will find the desired F -decomposition of G in three steps. First, we embed all the copies of F 2 , then those of F 3 , and finally we complete the decomposition by embedding all copies of F 1 . In order to keep track of the vertices which we have already used to embed some part of some copy of F , we introduce a set of new vertices. Consider a vertex set U of size exactly |F| disjoint from V . LetG be the graph on vertex set V ∪ U with all edges from G and all edges between V and U . Each vertex in U will represent one copy of F in the required decomposition of G. Let W F be the graph obtained from F by adding a universal vertex. We will decomposeG into copies of W F such that the universal vertices lie in U . Clearly, this corresponds to an F -decomposition of G.
We commence with the embedding of the copies of F 2 . To this end, partition the edge set of G (randomly) into graphs {G ℓ } ℓ∈I∪{ℓ * } , by including, for each ℓ ∈ I, each edge independently intoG ℓ with probability p ℓ := n ℓ n + µ, and intoG ℓ * with the remaining probability p ℓ * := 1 − ℓ∈I p ℓ . Note that since ℓ * / ∈ I, we have Thus, p ℓ * ≥ 1 700 . Since each graphG ℓ is a random subgraph ofG, Proposition 3.10 implies that for each ℓ ∈ I ∪ {ℓ * }, with probability at least 1 − 1/n, we have that In particular, a decomposition ofG into graphs {G ℓ } ℓ∈I∪{ℓ * } with these properties exists. From now on, fix such a decomposition. For ℓ ∈ N\{1, 2}, let W ℓ be the wheel graph with ℓ spokes and hub w, and let σ ℓ : V (W ℓ ) → {V, U } assign w to U and all other vertices of V (W ℓ ) to V .
For each u ∈ U , we want to discard s u wheels from W ℓ which contain u. We can do this independently for each u ∈ U , however we need to be careful not to delete too many wheels which contain a particular vertex v ∈ V . Thus, for each u ∈ U , we pick s u wheels from W ℓ which contain u uniformly at random, independently of the choices for other vertices u ′ ∈ U . Clearly, this yields W ′ ℓ ⊆ W ℓ such that every u ∈ U is the hub of exactly n ℓ /ℓ wheels in W ′ ℓ . Let L ′ ℓ be the new leftover. Clearly, d L ′ ℓ (u) ≤ ∆(L ℓ ) + ℓ · s u ≤ 3µn for all u ∈ U . Now, consider v ∈ V . If W ∈ W ℓ contains v and u, then the probability that W is discarded is s u /s ′ u . Since ℓ ∈ I, we have s ′ u ≥ n ℓ /ℓ ≥ ηn/ℓ and thus s u /s ′ u ≤ √ µ. With Lemma 3.1(ii), we conclude that with high probability, for all v ∈ V , at most 7 √ µ|U | wheels containing v Recall that each u ∈ U encodes a copy F u of F in the desired decomposition of G. At this stage, if we consider all wheels in ℓ∈I W ′ ℓ which contain u, this yields a copy F 2,u of F 2 . This concludes the first step.
To continue, we combine all the leftover graphs L ′ ℓ withG ℓ * , that is, we define By Proposition 3.11 and (4.25), G * is still (µ 1/3 , s, p ℓ * D)-typical. In the next step, we embed all copies of F 3 . For each u ∈ U , we want to embed a copy F 3,u of F 3 into G * [N G * (u)]. To ensure that these embeddings are edge-disjoint, we proceed sequentially. Suppose that for some subset U ′ ⊆ U , we have already successfully embedded such copies F 3,u ′ edge-disjointly whilst ensuring that ∆(F 3,U ′ ) ≤ 2η 1/4 n, (4.26) where F 3,U ′ := u ′ ∈U ′ F 3,u ′ . Now we want to find F 3,u such that the above holds with U ′ replaced by Since e(F 3,U ′ ) ≤ |U | · |F 3 | ≤ η 1/2 n 2 by (4.24), we deduce that |B| ≤ 2η 1/4 n. We exclude the vertices of B and the edges of F 3,U ′ when finding F 3,u . Let Claim 2: Every pair of vertices in G u has at least p 3 ℓ * α 2 n common neighbours (in G u ). Proof of claim: By Claim 2 and since |F 3 | ≤ η 1/2 n, we can greedily find a copy F 3,u of F 3 in G u by choosing one vertex after the other. Clearly, (4.26) still holds with U ′ replaced by U ′ ∪ {u}. Thus, we can carry out this embedding for all u ∈ U , which completes the second step.
Therefore, for every u ∈ U , the graph F 1,u ∪ F 2,u ∪ F 3,u is a copy of F in G, and all these copies are edge-disjoint. Hence, G has an F -decomposition. This completes the proof of Case 1.
We assume now that at least an η-fraction of vertices in F lie in cycles of length at least 500. Our strategy is as follows. Let (X , R) be an F -partition of V . We select the following three edge-disjoint graphs. Given (X , R), we set aside an absorbing graph G abs as in Lemma 4.11 and also reserve a regular graph G X which is the union of quasirandom graphs G X on X for each X ∈ X . We also set aside a random edge sliceG of the remaining graph. The graphG is much sparser than G X , and G X is much sparser than G abs . Then we apply the bandwidth theorem for approximate decompositions (Theorem 3.5) to find a packing of H in the remainder. This yields a very sparse uncovered leftover. Afterwards, we addG to the leftover from this packing to make it sufficiently well behaved. By Lemma 4.12, we can cover this new leftover with a few copies of F by using (additionally) only edges of G X . In a further step, we utilize Lemma 4.15 to cover the remaining edges of G X by using very few edges of G abs . In particular, by Lemma 4.11 the remaining subgraph of G abs will still admit an F -decomposition.
Now we turn to the details. Let (X , R) be an F -partition of V . First, we apply Lemma 4.11 (with η playing the roles of α and η, and µ playing the role of ε) to find a graph G abs with vertex partition X and reduced graph R which satisfies the following properties: (i) G abs is 2r-regular for some r ≤ ηn; (ii) for all XX ′ ∈ E(R), the pair G abs [X, X ′ ] is (µ, d XX ′ )-quasirandom for some η 2 /200 ≤ d XX ′ ≤ η; (iii) for every subgraph A ⊆ G abs that is r A -balanced with respect to (X , R) for some r A ≤ √ µn, the remainder G abs − A has an F -decomposition.
Hence, we can employ Lemma 4.12 (with 2ε, µη/200, 18 playing the roles of ε, η, t) to obtain a subgraph G ′ X of G X such that G ′ X ∪ L ′′ 1 has an F -decomposition. We now define Note that it remains to show that G abs ∪ L 2 = (G abs ∪ G X ∪ L ′ 1 ) − (G ′ X ∪ L ′′ 1 ) has an Fdecomposition. Clearly, both endpoints of any edge in L 2 lie in the same part X ∈ X . Moreover, as d L 2 (v) = 2r • + 2⌊εn⌋ − d G ′ X ∪L ′′ 1 (v) for all v ∈ V and G ′ X ∪ L ′′ 1 is even-regular, we deduce that L 2 is 2s-regular for some s ∈ N with s ≤ µn/2 + εn ≤ µn. Hence, by (ii), we can apply Lemma 4.15 (with µ playing the role of ε) to find a subgraph A ⊆ G abs such that A ∪ L 2 has an F -decomposition and A is r A -balanced with respect to (X , R) for some r A ≤ √ µn. Finally, by (iii), G abs − A also has an F -decomposition, which completes the proof.

Concluding remarks
Note that our main result (Theorem 1.3) is formulated in terms of decompositions of the complete graph K n . Essentially the same argument allows us to replace K n by any n-vertex regular host graph G which is almost complete in the sense that the degrees are n − o(n). This allows us to find an 'Oberwolfach factorization' where the first o(n) F -factors in K n can be chosen arbitrarily.
Theorem 5.1. For given ∆ ∈ N and α > 0, there exist ξ 0 > 0 and n 0 ∈ N such that the following holds for all n ≥ n 0 and ξ < ξ 0 . Let G be an r-regular n-vertex graph with r ≥ (1 − ξ)n and let F, H be collections of graphs satisfying the following: • F is a collection of at least αn copies of F , where F is a 2-regular n-vertex graph; • each H ∈ H is a ξ-separable n-vertex r H -regular graph for some r H ≤ ∆; • e(F ∪ H) = e(G). Then G decomposes into F ∪ H.
The proof of Theorem 5.1 is essentially the same as that of Theorem 1.3. The only significant difference is the construction of the absorbing graph G in the proof of Lemma 4.11. In Lemma 4.11, it was sufficient to prove simply the existence of such a graph. We achieved this by first proving the existence of suitable 'permuted blow-ups' G a for a ∈ {3, 4, 5}. The existence of the G a in turn followed from Lemma 4.9. We now need to find G in an r-regular graph G * of degree r ≥ (1 − ξ)n. For this, we argue as in the proofs of Lemmas 4.9 and 4.11: We first choose an F -partition (X , R) of V = V (G * ) and let G * * denote the spanning subgraph of G * containing all those edges which correspond to edges of R. Then for each a ∈ {3, 4, 5}, the graph π * (G * * )[X a 1 ∪· · ·∪X a a ] is a blown-up cycle. Our aim now is to construct a graph G a ⊆ π * (G * * )[X a 1 ∪ · · · ∪ X a a ] satisfying (a) and (b) in the proof of Lemma 4.11. This can be done similarly as before: since for each i ∈ [a] the pair π * (G * * )[X a i , X a i+1 ] has minimum degree at least (1− √ ξ)|X a i |, it contains at least (1−ξ 1/3 )|X a i | edge-disjoint perfect matchings. Choosing a suitable number of these at random as in the proof of Lemma 4.9 again gives the desired graph G a .