Robust (rainbow) subdivisions and simplicial cycles

We present several results in extremal graph and hypergraph theory of topological nature. First, we show that if $\alpha>0$ and $\ell=\Omega(\frac{1}{\alpha}\log\frac{1}{\alpha})$ is an odd integer, then every graph $G$ with $n$ vertices and at least $n^{1+\alpha}$ edges contains an $\ell$-subdivision of the complete graph $K_t$, where $t=n^{\Theta(\alpha)}$. Also, this remains true if in addition the edges of $G$ are properly colored, and one wants to find a rainbow copy of such a subdivision. In the sparser regime, we show that properly edge colored graphs on $n$ vertices with average degree $(\log n)^{2+o(1)}$ contain rainbow cycles, while average degree $(\log n)^{6+o(1)}$ guarantees rainbow subdivisions of $K_t$ for any fixed $t$, thus improving recent results of Janzer and Jiang et al., respectively. Furthermore, we consider certain topological notions of cycles in pure simplicial complexes (uniform hypergraphs). We show that if $G$ is a $2$-dimensional pure simplicial complex ($3$-graph) with $n$ $1$-dimensional and at least $n^{1+\alpha}$ 2-dimensional faces, then $G$ contains a triangulation of the cylinder and the M\"obius strip with $O(\frac{1}{\alpha}\log\frac{1}{\alpha})$ vertices. We present generalizations of this for higher dimensional pure simplicial complexes as well. In order to prove these results, we consider certain (properly edge colored) graphs and hypergraphs $G$ with strong expansion. We argue that if one randomly samples the vertices (and colors) of $G$ with not too small probability, then many pairs of vertices are connected by a short path whose vertices (and colors) are from the sampled set, with high probability.


Introduction
Extremal graph and hypergraph theory is one of the central areas of combinatorics.Given a family of r-uniform hypergraphs (or r-graphs, for short) H, one is interested in approximating the maximum number of edges in an r-graph G on n vertices which avoids a copy of every member of H.This is called the extremal number of H.In this paper, we consider the extremal numbers of certain families that are topological in nature, and study so called rainbow variants as well.

Robust subdivisions
A fundamental result of Mader [40] from 1967 states that if G is a graph on n vertices, which contains no subdivision of the complete graph K t , then G has O t (n) edges.Bollobás and Thomason [3], and independently Komlós and Szemerédi [30] further improved this by showing that such a graph has at most O(t 2 n) edges.Since then, numerous variations of this problem have been considered.A particularly interesting direction is when one wants to control the size of the forbidden subdivision.Montgomery [41] showed that the same bounds hold if one forbids all subdivisions of K t of size at most O t (log n).However, the situation changes if we forbid only constant sized subdivisions.Indeed, in a subdivision of K t (where t ≥ 3) in which each edge is subdivided at most ℓ times, the girth is at most 3ℓ + 3, and it is well known that there exist graphs with n vertices, n 1+Ω(1/ℓ) edges, and girth more than 3ℓ + 3, see e.g.[13].On the other hand, Kostochka and Pyber [31] proved that every graph with n vertices and at least 4 t 2 n 1+α edges contains a subdivision of K t on at most 7t 2 logt/α vertices, which answered a question of Erdős [10].This was improved by Jiang [22], who showed that any graph with n > n 0 (t, ε) vertices and n 1+α edges contains a subdivision of K t , in which each edge is subdivided at most O(1/α) times.Further strengthenings were provided by Jiang and Seiver [25], and the current state of the art is due to O. Janzer [20]: if ℓ is even, there exists ε = ε(t, ℓ) such that every graph with n > n(ε,t) vertices and n 1+1/ℓ−ε edges contains a subdivision of K t , in which each edge is subdivided exactly ℓ − 1 times.We will refer to this as an (ℓ − 1)-subdivision.Simple probabilistic arguments show that this result is optimal up the value of ε, which must tend to 0 as t tends to infinity.
Most of the aforementioned results focused on the case where t is a constant, and do not (seem to) apply if t = t(n) is some rapidly growing function of n.In this direction, it follows from the celebrated dependent random choice method [14] that n-vertex dense graphs contain a 1-subdivision of K t for some t = Ω( √ n).More precisely, Alon, Krivelevich and Sudakov [1] proved that any graph with n vertices and at least δ n 2 edges contains a 1-subdivision of K t , where t = δ n 1/2 /4.See also [14] for a very short proof of a slightly weaker result.Note that this result is no longer meaningful if G has o(n 3/2 ) edges, and simple probabilistic arguments show that for every ε > 0 there are graphs with n 3/2−ε edges containing no 1-subdivision of K t for t ≥ t 0 (ε).
In an attempt to unify many of the aforementioned results, we investigate the problem of finding ℓ-subdivisions of K t , where ℓ is constant and t = t(n) might grow rapidly.But what kind of result can one hope for?Consider graphs G with n vertices and roughly n 1+α edges.If G is the union of complete balanced bipartite graphs of size n α , then G contains no subdivision of K t for t > n α/2 .Also, there are graphs G with n vertices and n 1+α edges having girth Ω(1/α).Therefore, a reasonable conjecture to make is that such graphs contain ℓ-subdivisions of K t with t = n Θ(α) and ℓ = Ω(1/α).Our main theorem shows that this conjecture is almost true.
Note that the condition of ℓ being odd is necessary, as the complete bipartite graph does not contain a subdivision of the triangle, where each edge is subdivided an even number of times.Also, in exchange for getting worse bounds on ℓ, we can replace t = n Θ(α) with t = n α/2−ε for every ε > 0 (assuming n is sufficiently large with respect to ε as well).See Theorem 2.13 for the formal statement.
The proof of Theorem 1.1 proceeds via studying a family of graphs, which we refer to as α-maximal.We say that a graph G is α-maximal if G maximizes the quantity e(H)/v(H) 1+α among its subgraphs H.These graphs naturally appear in connection to degenerate Turán problems: indeed, if one tries to prove that every graph G with n vertices and Ω(n 1+α ) edges contains some forbidden graph F, it is enough to prove this in case G is α-maximal, as we can always pass to the subgraph H of G maximizing e(H)/v(H) 1+α .We remark that α-maximality is a special case of ψ-maximality, which was introduced by Komlós and Szemerédi [30], however, we are unaware whether this instance was studied before.
We show that if G is α-maximal, then G has extraordinary vertex-and edge-expansion properties.In particular, if one samples the vertices of G with probability d(G) −O (1) (where d(G) denotes the average degree), then with high probability, many pairs of vertices are connected by a short path, whose internal vertices are from the sample.A similar result remains true if the graph is properly edge colored, and we sample colors as well.

Rainbow cycles and subdivisions
A proper coloring of the edges of a graph is a coloring, in which no two neighboring edges receive the same color.A rainbow copy of a graph in an edge colored graph is a copy in which no two edges are colored with the same color.The study of rainbow Turán problems was initiated by Keevash, Mubayi, Sudakov, and Verstraëte [27].The general question under consideration is that given a graph H, or more generally a family of graphs H, at most how many edges can a properly edge colored graph on n vertices have if it does not contain a rainbow copy of a member of H.This is called the rainbow extremal number of H.
Surprisingly, the rainbow extremal number of cycles are already not well understood.It is an elementary result in graph theory that every graph with n vertices and n edges contains a cycle.In contrast, there are properly edge colored graphs with n vertices and average degree Ω(log n) containing no rainbow cycles.Indeed, consider the graph of the hypercube Q m , that is, V (Q m ) = {0, 1} m , and two vertices are joined by an edge if they differ in one coordinate.Coloring an edge with color i if its end-vertices differ in coordinate i gives a proper coloring with no rainbow cycles.On the other hand, Das, Lee, and Sudakov [8] proved that average degree e (log n) 1/2+o (1) guarantees a rainbow cycle, which was further improved to O((log n) 4 ) by O. Janzer [19].By studying properly edge colored α-maximal graphs with α ≈ 1/ log n, we are able to get within a log factor of the lower bound.Theorem 1.2.Let G be a properly edge colored graph with n vertices containing no rainbow cycles.Then G has at most n(log n) 2+o (1) edges.
We remark that our method is very different from the approach of O. Janzer [19], it is closer in spirit to that of [8].
A rainbow variant of the forbidden subdivision problem was recently proposed by Jiang, Methuku, and Yepremyan [24].They proved that if a properly edge colored graph G on n vertices contains no rainbow subdivision of K t for some fixed t, then G has at most ne O( √ log n) vertices.This upper bound was subsequently improved to n(log n) 60 by Jiang, Letzter, Methuku, and Yepremyan [23].A simple consequence of our tools is the following further improvement.
Theorem 1.3.Let t be a positive integer, and let G be a properly edge colored graph with n vertices containing no rainbow subdivision of K t .Then G has at most n(log n) 6+o (1) edges.
Finally, we present a rainbow variant of Theorem 1.1 as well.
Then G contains a rainbow ℓ-subdivision of K t , where t ≥ n c 2 α .

Cycles in simplicial complexes
In the second part of our paper, we study extremal problems about cycles in hypergraphs.A celebrated result of Bondy and Simonovits [4] states that if G is a graph on n vertices containing no cycle of length 2ℓ for ℓ ≥ 2, then G has O(n 1+1/ℓ ) edges.On the other hand, graphs avoiding cycles of odd length can have quadratically many edges.Problems about extending these results to uniform hypergraphs are widely studied.It is already not clear how one defines cycles in r-uniform hypergraphs (or r-graphs, for short), and indeed, there are several different notions studied in the literature.A Berge cycle of length ℓ is an r-graph consisting of ℓ edges e 0 , . . ., e ℓ−1 , e ℓ = e 0 together with ℓ distinct vertices v 1 , . . ., v ℓ such that v i ∈ e i−1 ∩ e i for i ∈ [ℓ].The extremal numbers of Berge cycles are studied in [2,17], and are fairly well understood.A linear cycle of length ℓ is an r-graph with ℓ edges e 0 , . . ., e ℓ−1 , e ℓ = e 0 such that in the circular order, any two consecutive edges intersect in exactly one vertex, and non-consecutive edges are disjoint.The extremal numbers of linear cycles are also well understood, see [29].
Finally, a tight cycle of length ℓ is a sequence of ℓ vertices v 1 , . . ., v ℓ together with the ℓ edges formed by r-tuples of consecutive vertices in the circular order.Perhaps, this definition of a cycle is the most mysterious.Indeed, until recently, very little was known about its extremal numbers.It was an old conjecture of Sós, see also [44], that any r-graph with n vertices and at least n−1 r−1 contains a tight cycle (of some length) if n is sufficiently large.This was disproved in a strong sense by B. Janzer [18], who showed that an r-graph on n vertices can have Ω(n r−1 log n/ log log n) edges without containing a tight cycle.On the other hand, Sudakov and Tomon [43] proved the upper bound n r−1+o (1) , which was further improved by Letzter [34] to O(n r−1 (log n) 5 ).However, none of these proofs seem to extend to give any bounds on the extremal numbers of the tight cycle of fixed length ℓ.Verstraëte [44] proposed the conjecture that if r divides ℓ, then any r-graph with n vertices containing no tight cycle of length ℓ can have at most O(n r−1+2(r−1)/ℓ ) edges.The complete r-partite r-graph shows that if r ∤ ℓ, then the extremal number is Θ(n r ).
In this paper, we are interested in cycles from a topological perspective.An r-uniform hypergraph corresponds to the (r − 1)-dimensional pure simplicial complex equal to the downset generated by the set of edges.In the case of graphs, cycles are exactly the homeomorphic copies of S 1 , while subdivisions of K t are the homeomorphic copies of K t .Consider 3-uniform tight cycles.Interestingly, tight cycles of even length are homeomorphic to the cylinder S 1 × B 1 , while tight cycles of odd length are homeomorphic to the Möbius strip, see Figure 1.This motivates the question that at most how many edges can a 3-uniform hypergraph on n vertices have without containing a homeomorphic copy of the cylinder or Möbius strip on ℓ vertices.Before we embark on this problem, let us discuss further related results.
Another natural way to define cycles in r-graphs from a topological perspective is to consider homeomorphic copies of the sphere S r−1 .This problem was already considered in 1973 by Brown, Erdős and Sós [5], who showed that a 3-graph with n-vertices containing no homeomorphic copy of S 2 has at most O(n 5/2 ) edges, and this bound is the best possible.Recently, Kupavskii, Polyanskii, Tomon, and Zakharov [33] showed that the same bounds hold if we forbid homeomorphic copies of any fixed orientable surface.This answered a question of Linial [35,36], who in general proposed many topological problems about r-graphs.Long, Narayanan, and Yap [37] proved that for every r there exists λ = λ (r) > 0 such that if H is an r-graph, then any r-graph on n vertices avoiding homeomorphic copies of H has at most O H (n r−λ ) edges.Determining the optimal value of λ (r) for r ≥ 3 remains an interesting open problem.
Let us get back to the problem of forbidding triangulations of the cylinder and the Möbius strip.In [33], Kupavskii, Polyanskii, Tomon, and Zakharov studied so called topological cycles, which are special triangulations of the cylinder and the Möbius strip.In Theorem 3.9, they proved that every 3-graph with n vertices and at least n 2+α edges contains a topological cycle on at most O(1/α) vertices.However, upon closer inspection of their proof, the topological cycle they find is always a triangulation of the cylinder.Roughly, the reason for this is that they reduce the problem of finding topological cycles to a problem about finding rainbow cycles in certain properly edge colored graphs.However, in this setting, even cycles correspond to cylinders, and odd cycles correspond to the Möbius strip.As the extremal number of odd cycles is Ω(n 2 ), this method completely breaks in case one wants to forbid the Möbius strip.See a formal discussion of this in Section 3.With a different approach, we overcome this obstacle.
Theorem 1.5.(Informal.)Let α > 0, and let G be a 3-graph on n vertices with at least n 2+α edges.If n ≥ n 0 (α), then G contains a triangulation of the cylinder and the Möbius strip on O( 1 α log 1 α ) vertices.We remark that a simple probabilistic argument shows that there are 3-graphs G with n vertices and more than n 2+α edges such that every triangulation of the cylinder and the Möbius strip in G has at least 1/α vertices.See Lemma 3.6 for a detailed argument.
Instead of proving Theorem 1.5, we prove a result which applies to much sparser 3-graphs as well.Given a 3-graph G, let p(G) denote the number of 1-dimensional faces of G, that is, the number of pairs of vertices which appear in an edge.As proved by Letzter [34], slightly improving the result of Sudakov and Tomon [43], if a 3-graph G satisfies e(G) = Ω(p(G)(log p(G)) 5 ), then G contains a tight cycle.A similar strengthening of Theorem 1.5 also holds.Clearly, this theorem implies Theorem 1.5 noting that p(G) ≤ n 2 .For the formal version of Theorem 1.6, as well as generalizations for r-graphs, see Section 3, Theorem 3.8 and Theorem 3.18.In order to prove Theorem 1.6, we study an analogue of α-maximality for hypergraphs.Here, we say that G is α-maximal if G maximizes the quantity e(H)/p(H) 1+α among its subhypergraphs H.We show that α-maximal hypergraphs have unusually good expansion properties.In the case of hypergraphs, it is already not clear how one defines expansion, and indeed, this has become a popular topic with several different definitions, see the survey of Lubotzky [39].However, most of these definitions are quite technical, and so far lacking combinatorial applications.Our notion of expansion is simple, we only require that subsets of 1-dimensional faces expand via 2-dimensional faces.
In the concluding remarks, we present some applications of our formal Theorem 3.8 about the extremal numbers of cycles in the hypercube.
Organization of the paper.We present our graph theoretic notation and some probabilistic tools in the next subsection, and introduce α-maximal graphs in Section 2.2.Then, we prepare and prove Theorems 1.2, 1.3, and 1.4 in the rest of Section 2. In Section 3.1, we formally discuss simplicial complexes, hypergraphs, and introduce the notion of higher order walks, paths and cycles.We continue with the definition and properties of α-maximal hypergraphs in Section 3.2.We present the proof of Theorem 1.5 in Sections 3.3 and 3.4, and then we conclude our paper with some remarks.

Rainbow cycles and subdivisions 2.1 Preliminaries
Let us introduce our notation, which is mostly conventional.We omit floors and ceilings whenever they are not crucial.Given a graph G, v(G) = |V (G)|, e(G) = |E(G)| denotes the number of vertices and edges of G, respectively, and values from [0, 1], let X = ∑ n i=1 X i and µ = E(X).Then The following estimates will also come in handy.Each can be verified using simple calculus.
We will make use of the following graph theoretic concentration inequality.Roughly, it says that given a bipartite graph, if we randomly sample the vertices in one of the parts, the size of the neighbourhood of the sample is very unlikely to be much smaller than its expected value.
Lemma 2.3.Let p ∈ (0, 1], and λ > 1.Let G be a bipartite graph with vertex classes A and B. Let U ⊂ A be a random sample, each vertex included independently with probability p.Let µ := E(|N(U)|), and suppose that every vertex in A has degree at most K.If K ≤ µ 32λ log 2 (λ p −1 ) , then Proof.Let ∆ := λ p , B 0 = {v ∈ B : deg(v) ≥ ∆}, and B 1 = B \ B 0 .For v ∈ B, let X v be the indicator random variable of the event v ∈ N(U).Then µ = ∑ v∈B E(X v ).Consider two cases.
where the last inequality holds by Claim 2.2.Observe that ∑ v∈B 1 deg(v) = e G (A, B 1 ) =: t, so summing the previous inequality for every v ∈ B 1 implies that Here the last inequality holds by noting that ∑ v∈B 1 E(X v ) ≤ µ.For i = 0, . . ., ⌊log 2 ∆⌋, let Then there exists I ∈ {0, . . ., ⌊log 2 ∆⌋} such that the bipartite graph e G (A,C I ) contains at least t/2 log 2 ∆ edges.Set k := 2 I , then k .Next, we will construct disjoint sets V 1 , . . .,V ℓ ⊂ C I , each of size at most s such that V 1 , . . .,V ℓ cover at least half of the elements of C I , and we stop, otherwise let V be a set of randomly chosen s elements (with repetition) of C. For a vertex w ∈ A, let d w denote its degree in . Recall that every vertex in A has degree at most K, so Therefore, Claim 2.2 implies P(w ∈ N(V )) ≥ sd w 2|C| .Hence, Here, the last inequality holds because in G[A ∪C], the degree of every vertex in C is at least k.Thus, there exists a choice for , let Y i be the indicator random variable of the event N(U) ∩V i ̸ = / 0.Then, as in Case 1, we have E(Y i ) ≥ 1 − e −λ .Therefore, with probability at least 1 − 2e −λ , at least half of the indices i ∈ [ℓ] satisfy that N(U) ∩V i ̸ = / 0, which implies that |N(U)| ≥ ℓ 2 .This finishes Case 2. as Finally, we prove a variant of the previous lemma, in which one has a proper edge-coloring, and we sample colors as well.The proof is very similar to that of Lemma 2.3, so we mostly highlight the differences.Given an edge coloring of a graph G, Q is a subset of the colors, and U ⊂ V (G), let N Q (U) denote the set of vertices v ∈ V (G) \U that are joined to some element of U by an edge of color in Q.
Lemma 2.4.Let p, p c ∈ (0, 1], and λ > 1.Let G be a bipartite graph with vertex classes A and B, and let f : E(G) → R be a proper edge coloring.Let U ⊂ A be a random sample of vertices, each vertex included independently with probability p, and let Q ⊂ R be a random sample of colors, each included independently with probability p c .Let µ := E(|N Q (U)|), and suppose that every vertex in A has degree at most K.If K + |A| ≤ µ 128λ log 2 (λ (p•p c ) −1 ) , then Repeating the same calculations as in Lemma 2.3, we get where t = e G (A, B 1 ).Define C I , k, s = 2∆ k as before, and recall that We will construct disjoint sets V 1 , . . .,V ℓ ⊂ C I , each of size at most s such that V 1 , . . .,V ℓ cover at least half of the elements of C I , and G[A ∪V i ] has at least ∆ unique edges for i ∈ [ℓ].Suppose that we already constructed V 1 , . . .,V j , and let we stop, otherwise let V = {v 1 , . . ., v s } be a set of randomly chosen s elements (with repetition) of C. Given an edge {u, v} with u ∈ A, v ∈ C, the probability that {u, v} is unique in G[A ∪V ] is at least Indeed, for every i ∈ [s], we have |C| , and for j ∈ [s] \ {i}, the probability that v j is not a neighbour of u, or has an edge of color f ({u, v}), is at least 1 − K+|A| |C| .Here, (K+|A|)s |C| ≤ 1 4 by repeating the same calculations as in (2.1).Hence, we can write Therefore, the expected number of unique edges in This implies that there is a choice for V with at least ∆ unique edges, set This finishes Case 2. by the same calculations as in Lemma 2.3.

α-maximal graphs
In this section, we introduce α-maximal graphs and study their properties.
An obvious, but highly useful property of α-maximal graphs is that every graph contains one.Indeed, the subgraph H maximizing the quantity d(H)/v(H) α is α-maximal.Moreover, if a graph G has n vertices and average degree at least cn α , then it contains an α-maximal subgraph H of average degree at least c, and thus of size at least c.In the next lemma, we list a number of further properties of α-maximal graphs.In particular, we show that they have large minimum degree, and that they are excellent vertexand edge-expanders.
Lemma 2.5.(Properties of α-maximal graphs) Let 0 < α < 1  2 , let G be an α-maximal graph on n vertices, and let d (ii) Let δ be the minimum degree of G, and let v be a vertex of degree δ .Let H = G be the subgraph of G we get after removing v, then by the definition of α-maximal, we have This can be rewritten as ADVANCES IN COMBINATORICS, 2024:1, 37 pp.
(iii) We have Using the inequalities As in (iii), we can further bound the right hand side from below by c(1+α) Comparing the lower and upper bound on e(G[X ∪ N(X)]), we get The last inequality follows by Claim 2.2.
Note that by taking C to be a small constant, every graph G on n vertices of average degree d contains a C/(log n)-maximal subgraph H of average degree at least d(1 − ε).The graph H satisfies that if X ⊂ V (H) and |X| ≤ v(H)/2, then |N(X)| = Ω(|X|/ log n).Graphs with similar expansion properties commonly appear in the study of sparse extremal problems, see e.g.[24,41,42,43].Our definition immediately implies their existence in every graph with positive constant average degree, unlike earlier arguments.

Colorful expansion of random samples
In this section, we prepare the main technical tools needed to prove our rainbow results.To give some motivation, let us briefly outline the proof of Theorem 1.3, as the proof of our other results follow on a very similar line.
Outline of the proof of Theorem 1.3.Let G be a graph on n vertices of average degree at least d = (log n) 6+ε , and let f : E(G) → R be a proper edge coloring.We want to prove that G contains rainbow subdivision of K t .Let α = 1/ log n, then G contains an α-maximal subgraph H with average degree Ω(d).Clearly, it is enough to show that H contains a rainbow subdivision of K t .One of our main technical results, Lemma 2.7, tells us that if one samples the vertices and colors of H with probability p = (log n) −1−ε/10 , and v ∈ V (H), then with high probability at least 1/3 proportion of the vertices of H can be reached from v by a rainbow path of length at most ℓ = (log n) 1+o (1) , whose internal vertices are from the vertex sample, and whose edges are colored with the sampled colors.By considering a random partition of the vertices and colors into s = 1/p parts, we argue that at least Ω(v(H) 2 ) pairs of vertices (x, y) have the property that there are at least Ω(s) internally vertex disjoint paths of length at most ℓ between x and y, such that no color appears twice in the union of these paths.Let L be the graph whose edges are such pairs of vertices.We are almost done.We find a 1-subdivision of K t in L, and greedily replace each edge xy of this subdivision by a path of H between x and y making sure that we avoid repeating vertices and colors.This is possible as ℓt 2 = o(s).
Most of the work needed to prove our theorems is concentrated in the following technical lemma.It roughly says that if G is α-maximal, B ⊂ V (G), and U is a random sample of B, where each vertex is sampled with some not too small probability, then U expands as well as one would expect any |B| element subset of V (G) to expand.
Let us introduce some notation.Let G be a graph and f : E(G) → R be a coloring of the edges, where R is some finite set.Given U ⊂ V (G) and Q ⊂ R, a (U, Q)-path in G is a rainbow path in which every internal vertex is contained in U, and every edge is colored with a color from Q. Furthermore, let φ : V (G) → 2 V (G)∪R be a function that assigns every vertex a set of forbidden vertices and colors.For X ⊂ V (G) and Q ⊂ R, define the restricted neighborhood with respect to the colors in Q as 2 ), let n be a positive integer and λ > 10 10 log 2 p•p c .Let G be a graph on n vertices with proper edge coloring f : E(G) → R, and B ⊂ V (G) satisfying the following properties.
• G is α-maximal, Let U ⊂ B be a random sample of the vertices, each element chosen with probability p, and let Q ⊂ R be a random sample of colors, each element chosen with probability p c .Then with probability at least Proof.Write d = cn α .Let H be the bipartite graph with vertex classes B and N(B), in which x ∈ B and y ∈ N(B) are joined by an edge if xy ∈ E(G), y ̸ ∈ φ (x) and f (xy) ̸ ∈ φ (x).Also, let H Q be the subgraph of H in which we keep only the edges, whose color is in Q.Our goal is to show that |N H Q (U)| is large with high probability.
We are going to consider three cases, depending on the degree distribution of H.
, and let Y ⊂ B be the set of vertices x such that deg by the multiplicative Chernoff bound.Assume that |Z| ≥ λ p −1 c , and let Z 0 be any λ p −1 c element subset of Z. Now let us sample the colors.Consider the bipartite graph J with vertex classes R and N H (Z 0 ), in which r ∈ R is joined to y ∈ N H (Z 0 ) if there is an edge of color r between y and Z 0 .Then every vertex in J (in both parts) has degree at most |Z 0 |, and J has at least Λ|Z 0 | edges.Let us apply Lemma 2.3 to the bipartite graph J, with the following substitutions: where the last inequality holds by Claim 2.2 and noting that Therefore, we have µ ) is satisfied (using our lower bound on λ ), so we can apply Lemma 2.3 to conclude that Noting that In what follows, suppose that |Y | ≤ 2λ (p • p c ) −1 , and let Therefore, we can write Here, the second inequality holds by the α-maximality of G, while the third inequality follows from The fourth inequality is true as Comparing the lower and upper bound, we get Here, the second inequality follows from Claim 2.2.Therefore, it suffices to show that We have Therefore, E(X) ≤ |S|e −λ , and by Markov's inequality, P(X ≥ |S|/2) ≤ 2e −λ .This finishes the second case.
For each v ∈ T , let X v be the indicator random variable of the event where the last inequality holds by Claim 2.2.Let X := ∑ v∈T X v .Then Let us apply Lemma 2.4 with the following assignments: , where the last inequality holds by our lower bound on λ .Also, , where the second inequality holds by our lower bound on d, and the last inequality holds by our lower bound on λ .Therefore, the desired condition of Lemma 2.4 is satisfied, so we have Noting that , this finishes Case 3. and the proof of the lemma.
From this, we deduce that if one samples the vertices and colors of an α-maximal graph with appropriate probabilities, then many vertices can be reached by a short rainbow path from a given vertex v, whose internal vertices and colors are from the sample.In the next lemma, C will denote some unspecified, large absolute constant.More precisely, we prove that there exists some constant C such that the following lemma is true.
Let G be an α-maximal graph on n vertices with proper edge coloring f : Let U be a random sample of vertices, each chosen with probability p, and let Q ⊂ R be a random sample of the colors, each chosen with probability p c .Then for every vertex v ∈ V (G), with probability at least 1 − O(α −1 log(1/τ)e −λ ), at least n 1−τ vertices of G can be reached from v by a (U, Q)-path of length at most O(α −1 log(1/τ)).
Proof.Let ℓ = 100α −1 log(1/τ) (then ℓ ≤ dα/64 is satisfied), and let q, q c ∈ (0, 1] be the unique solutions of the equations p = 1 − (1 − q) ℓ−1 and p c = 1 − (1 − q c ) ℓ , respectively.If p = 1, then q = 1.In general, q = Ω(p/ℓ) and q c = Ω(p c /ℓ).Instead of sampling the vertices with probability p, we sample the vertices in ℓ − 1 rounds, in each round with probability q, independently from the other rounds, and similarly with the colors (this method is sometimes referred to as "sprinkling").For i = 1, . . ., ℓ − 1, let U i be a random sample of the vertices, each vertex chosen with probability q, and for i = 1, . . ., ℓ, let Q i be a random sample of R, each color chosen independently with probability q c .Then ℓ−1 i=1 U i has the same distribution as U, and ℓ i=1 Q i has the same distribution as Q.For i = 1, . . ., ℓ − 1, let B i be the set of vertices that can be reached from v by a (U ∪R be any function that assigns every x ∈ B i the set of vertices and colors that appear on such a path, and let dq c /2.Therefore, by the multiplicative Chernoff bound, we have In what comes, we assume that Here, C ′ denotes a large unspecified constant depending on C. Also, the second inequality holds by omitting a factor of p −1 c ≥ 1 and n α ≥ 1, and recalling the bounds on q and q c .The inequality 6 (q • q c ) −1 holds as well, so as long as |B i | ≤ n/3, the desired conditions of Lemma 2.6 are satisfied (with q instead of p, and q c instead of p c ).Therefore, we can conclude that − 1 with probability at least 1 − 2e −λ .Note that the left side of the minimum is at least n α , so the minimum is always attained by the right side.Therefore, with probability at least 1 − 2e −λ .Hence, with probability at least 1 Write In the last inequality, we used that the function f β (x) = 3 4 + 1 4 x β − x β /4 is nonnegative for x ≥ 1 and β > 0, which can be seen from f β (1) = 0 and f In case α is a constant, we can prove a slightly stronger version of the previous lemma, following the same proof.We omit the details.Lemma 2.8.Let p, p c , τ ∈ (0, 1], α ∈ (0, 1  2 ), and let ℓ be a positive integer satisfying ℓ ≥ Cα −1 log(1/τ).Let n be a positive integer which is sufficiently large with respect to α, τ, ℓ.Let G be an α-maximal graph on n vertices with proper edge coloring f : Let U be a random sample of the vertices, each chosen with probability p, and let Q ⊂ R be a random sample of the colors, each chosen with probability p c .Then with probability at least 1 − e n −Ω(α 2 ) , for every vertex v ∈ V (G), at least n 1−τ vertices of G can be reached from v by a (U, Q)-path of length exactly ℓ.

Proofs of the rainbow theorems
In this section, we present the proofs of Theorems 1.2 (rainbow cycle), 1.3 (rainbow subdivision) and 1.4 (large rainbow subdivision).Note that Theorem 1.1 (large subdivision) then immediately follows from Theorem 1.4.Let us start with Theorem 1.2, which we restate as follows.
such that each color appears independently with probability p c = 1/4 in each part.For i ∈ [4], let B i be the set of vertices that can be reached from v by a (V (G), Q i )-path.Applying Lemma 2.7 with the parameters above (with m instead of n), we get the following.With probability at least 1 − O(α −1 log(1/τ)e −λ ) > 4/5, we have Note that there exists 1 ≤ i < j ≤ 4 such that B i ∩ B j is nonempty, let w ∈ B i ∩ B j be an arbitrary vertex.Then w can be reached by a (V (G), Q i )-path P 1 and a (V (G), Q j )-path P 2 from v. The union of P 1 and P 2 is a rainbow circuit, so in particular it contains a rainbow cycle.
In what follows, we prove our results about rainbow subdivisions.In order to do this, we use the result of [1] mentioned in the introduction.
Lemma 2.10.( [1]) If G is a graph on n vertices with at least δ n 2 edges, then G contains a 1-subdivision of K t for t = δ n 1/2 /4.
Theorem 2.11.Let t be a positive integer, ε ∈ (0, 1).If n is sufficiently large, G is a properly edge colored graph with n vertices and d(G) ≥ (log n) 6+ε , then G contains a rainbow subdivision of K t .Proof.Let s := (log n) 1+ε/10 , α = 1/ log 2 n, p = p c = 1/s, and λ = (log n) ε/10 6 .Let H be the subgraph of G maximizing the quantity . .,U s be a random partition of V (H) such that each vertex appears in each part independently with probability p = 1/s.Similarly, let Q 1 , . . ., Q s be a random partition of R such that each color appears in each part independently with probability p c = 1/s.For i ∈ [s], let B i be the set of vertices which can be reached from v by a (1) .Applying Lemma 2.7 with the above parameters (and m instead of n), we conclude that for every i ∈ [s], with probability at least 1 − O(α −1 log(1/τ)e −λ ) > 1 − 1/2s, |B i | ≥ n/3.But then there exist partitions U 1 , . . .,U s and Q 1 , . . ., Q s such that |B i | ≥ m/3 for every i.Fix such partitions.
Say that a vertex w ∈ V (H) is good if w is contained in at least s/6 of the sets B 1 , . . ., B s .Then the number of good vertices is at least m/6.Indeed, consider the multiset B 1 ∪ • • • ∪ B s .It has at least sm/3 elements, and vertices that are not good contribute at most sm/6 elements.As each good vertex contributes at most s elements, we must have at least m/6 good vertices.Note that if w is good, then there are at least s/6 internally vertex disjoint paths of length at most α −1 (log n) o (1) between v and w such that no color appears twice on the union of the paths.
Define the graph J on V (H) in which two vertices x, y are joined by an edge if there are at least s/6 internally vertex disjoint paths between x and y such that no color appears twice on the union of the paths.By the preceding argument, every vertex of J has degree at least n/6 (note that we do not claim that the same partitions work for every vertex of J).Hence, J contains a 1-subdivision of K t by Lemma 2.10, noting that t ≤ v(J) 1/2 /100 if n is sufficiently large.As long as s ≥ t 2 (log n) 1+o (1) , we can greedily substitute a rainbow path for each edge of this subdivision, such that these paths are internally vertex disjoint, and no color appears twice.This gives the desired rainbow subdivision of K t .
Next, we prove Theorem 1.4, which we restate as follows.
Theorem 2.12.There exist constants c 1 , c 2 > 0 such that the following holds.Let α > 0, ℓ > c 1 α log 1 α even.Let G be a properly edge colored graph on n vertices with d(G) ≥ n α .If n is sufficiently large with respect to α, ℓ, then G contains a rainbow (ℓ − 1)-subdivision of K t , where t = n c 2 α .
Proof.Let α ′ = α/4, s = n α/6 , and let p = p c = 1/s.Let H be the subgraph of G maximizing the quantity . Furthermore, let τ = α/15, and assume that ℓ/2 ≥ Cα ′−1 log(1/τ), where C is given by Lemma 2.8.Let U 1 , . . .,U s be a random partition of V (G) such that each vertex appears in each part independently with probability p = 1/s.Similarly, let Q 1 , . . ., Q s be a random partition of R such that each color appears in each part independently with probability p c = 1/s.As d(H) > (p • p 2 c ) −1 m α ′ , we can apply Lemma 2.8 to conclude the following.For every i ∈ [s], with probability at least 1 − e −m Ω(α 2 ) , for every v ∈ V (G) at least m 1−τ of the vertices can be reached from v by a (U i , Q i )-path of length ℓ/2.But then there exist partitions U 1 , . . .,U s and Q 1 , . . ., Q s such that this is simultaneously true for every i ∈ [s].Let us fix such partitions.
Define the edge colored multigraph K on V (G) in which for every i ∈ [s], we add an edge of color i between x, y if there exists a (U i , Q i )-path of length ℓ/2 with endpoints x and y.Then K has at least sm 2−τ edges, and there are at most s edges between any pair of vertices.Let L be the graph on V (G) in which x, y are joined by an edge if there are at least sm −τ /2 ≥ n α/12 edges between x and y in K.Note that the nonedges of L contribute at most sm 2−τ /2 edges to K, and each edge of L contributes at most s edges, so L has at least m 2−τ /2 edges.Therefore, by Lemma 2.10, L contains a 1-subdivision of K t for every t ≤ m 1/2−τ /8.Here m 1/2−τ /8 ≥ m 1/4 > n α/24 , so we can choose t = n α/24 .Let S denote this subdivision.Then e(S) < t 2 = n α/12 , so we can assign a color r xy to each edge xy ∈ E(S) among the colors of the edges connecting x and y in K such that no two edges of S receive the same color.But then choosing a (U r xy , Q r xy )-path P xy for every xy ∈ E(S), the union of these paths is an (ℓ − 1)-subdivision of K t .
Finally, let us address the claim we made after Theorem 1.1.As the proof of this is essentially the same as the previous proof, only with some parameters changed, we give only a sketch.Theorem 2.13.Let α > ε > 0, then there exists ℓ 0 = ℓ 0 (ε, α) such that the following holds.If ℓ ≥ ℓ 0 is odd and G is a graph on n vertices with d(G) > n α , then G contains an ℓ-subdivision of K t for t = d(G) 1/2 n −ε , if n is sufficiently large.Sketch proof.Repeat the previous proof with the following changes.We only sample vertices, so one can take p c = 1.Moreover, set α ′ = ε/10, s = d(G)n −ε/10 , p = 1/s, τ = α ′ /10.Then ℓ 0 ≥ 2Cα ′−1 log(1/τ) suffices.
3 Cycles in simplicial complexes

Simplicial complexes and higher order walks
In this section, we introduce our notation concerning hypergraphs and simplicial complexes.An r-graph G naturally corresponds to the (r − 1)-dimensional pure simplicial complex given by the downward closure of the edge set, that is, the simplicial complex where S G (r) = E(G) is the edge set of G, and S G (i) is the family of i element subsets of the edges for i = 0, . . ., r − 1.We call the elements of S G (i) the i-faces of S G .When talking about edges, we always mean the r-faces of G. Let P(G) = S G (r − 1) denote the set of (r − 1)-faces, and let V (G) = S G (1) denote the vertices.Also, we set e(G) We will use r-graphs and simplicial complexes interchangeably, as in certain situations one is more natural than the other; also, we might identify a family of r-elements sets E with the r-graph G satisfying E(G) = E.
Given X ⊂ P(G), that is, a set of (r − 1)-faces, we define its neighborhood as Also, the subhypergraph induced by X is that is, the set of edges whose every (r − 1)-element subset appear in X.Finally, for f ∈ S G , define the degree of f as deg In this paper, we are interested in r-graphs in which the (r − 1)-faces have large average degree.Therefore, given an r-graph G, define its average degree as d(G) := r • e(G)/p(G).We will use the following technical lemmas repeatedly.Lemma 3.1.Let G be an r-graph.Then G contains a subhypergraph H such that deg H ( f ) ≥ d(G)/r for every f ∈ P(H).
Proof.Let H be a minimal subhypergraph of G with d(H) ≥ d(G).Suppose that there exists f ∈ P(H) such that deg H ( f ) < d(G)/r ≤ d(H)/r.Remove all the edges containing f from H, and let H ′ be the resulting subhypergraph.Then p(H ′ ) ≤ p(H) − 1 and e(H ′ ) > e(H) − d(H)/r, so contradicting the minimality of H. Therefore, H suffices.
Higher order walks, paths, and cycles.A higher order walk is a generalization of a graph walk for simplicial complexes.Recall that a walk in a graph moves on vertices via edges.This can be extended for simplicial complexes at any level k ∈ [r − 1]: a higher order walk traverses k-faces via (k + 1)-faces.
Here, we are mostly interested in the case k = r − 1, so let us define this formally.
Definition 2. (Higher order walks) A walk of length ℓ in an r-graph G is a sequence of (r − 1)-faces f 0 , . . ., f ℓ such that Say that the walk is closed if f 0 = f ℓ .The simplicial complex associated with the walk is the r-graph with edges e i := With slight abuse of notation, when talking about a walk as a topological space, we always mean the simplicial complex associated with it.
We would also like to extend the notion of paths in graphs for simplicial complexes.A natural way to do this is to consider walks with no repeated vertices.In other words, as we traverse the (r − 1)-faces f 0 , . . ., f ℓ , we uncover one new vertex at each step.This can be encoded in the following short definition.

Definition 3. (Higher order paths)
The endpoints of the path are f 0 and f ℓ , and the path is proper if its endpoints are disjoint.

Indeed, as
In case the path is proper, we can also define the order of the vertices.First, order the vertices of f 0 according to the order they disappear, that is, v is before w if the largest index i such that v ∈ f i is smaller than the largest index j such that w ∈ f j .Next, order the vertices not in f 0 according to the order they appear, that is, v is before w if the smallest index i such that v ∈ f i is smaller than the smallest index j such that w ∈ f j .Finally, every vertex in f 0 is before every vertex not in f 0 .This defines a total ordering of the vertices in case the path is proper, see Figure 2.
From a topological perspective, if f 0 , . . ., f ℓ is a path, then the pure simplicial complex associated with it is homeomorphic to the ball B r−1 .Finally, let us define cycles.

Definition 4. (Higher order cycles)
Let us accompany this definition with some explanation.If f 0 , . . ., f ℓ is a cycle and f i ∩ f j = / 0 for some i < j, then the walks P = ( f i , f i+1 , . . ., f j ) and P ′ = ( f j , f j+1 , . . ., f i ) are both proper paths (where indices are meant modulo ℓ).To see this, note that v(P) ≤ j − i + r − 1, and v(P ′ ) ≤ ℓ − j + i + r − 1, so Hence, as the left and right hand sides are equal, we must have v(P) = j − i + r − 1, and v(P ′ ) = ℓ − j + i + r − 1, so P and P ′ are paths.The inequality (3.1) also shows that P and P ′ do not share any internal vertices.Furthermore, consider the simplicial complex S associated with the cycle f 0 , . . ., f ℓ from a topological perspective.In the case r = 2, we get the usual notion of cycles, which are always homeomorphic to S 1 .However, in dimension 2, S is homeomorphic to either the cylinder S 1 × B 1 , or the Möbius strip M, see Figure 3 for an illustration.In general, for r ≥ 3, we always have two cases.
Roughly, this is true as we get a cycle by taking a proper path f 0 , . . ., f ℓ , and identifying f 0 and f ℓ .Depending on the identification, we get either an orientable simplicial complex, which is then S 1 × B r−2 , or a non-orientable one, which is then M × B r−3 .
We remark that in the case r = 3, our notion of cycle coincides with the notion of topological cycles introduced in [33].In the same paper, it is proved that if a cycle in a 3-graph is also 3-partite, then the parity of its length determines whether it is a cylinder or a Möbius strip.Lemma 3.4.( [33]) Let C be a cycle of length ℓ in a 3-graph, which is also 3-partite.Then C is homeomorphic to the cylinder if ℓ is even, and C is homeomorphic to the Möbius strip if ℓ is odd.Finding long higher order paths.A simple result in extremal graph theory states that if G is a graph with minimum degree d, then G contains a path of length d.This can be easily generalized to show that if G is an r-graph such that p(G) = n and deg( f ) ≥ d for every f ∈ P(G), then G contains a tight path of length d.Here, a tight path of length d is a sequence of vertices x 1 , . . ., x d+r−1 such that any r consecutive vertices form an edge.Clearly, setting f i = {x i+1 , . . ., x i+r−1 } for i ∈ {0, . . ., d}, the sequence f 0 , . . ., f d is a path of length d.In what comes, we present a variation of this result for r ≥ 3 in which we restrict the endpoints of the path.This result will be used later.
3-graphs without short cycles.Finally, we present an argument showing that there are 3-graphs with n vertices and more than n 2+α edges avoiding small homeomorphic copies of the cylinder and the Möbius strip, as promised in the Introduction.
Lemma 3.6.Let α > 0. For every sufficiently large n, there exists a 3-graph G with n vertices and more than n 2+α edges such that G avoids homeomorphic copies of the cylinder and the Möbius strip on at most 1/α vertices.
Let h k denote the total number of homeomorphic copies of the cylinder and the Möbius strip on a fixed k element vertex set.Then by earlier discussion, assuming n is sufficiently large with respect to α.Hence, there exists G satisfying e(G) − N > n 2+α .Fixing such a G and deleting an edge from every homeomorphic copy of the cylinder and Möbius strip on at most 1/α vertices, we get a 3-graph with the desired properties.

α-maximal simplicial complexes
In this section, we extend the notion of α-maximality to simplicial complexes, and study its properties.
Here and later, we only focus on the case when α is viewed as a constant, unlike in the graph setting.
By a well known lemma of Lovász [38], which is a relaxation of the celebrated Kruskal-Katona theorem [26,32], we have the following inequality between e(G) and d(G): if e(G) = x r for some real number x ≥ r, then p(G) showing that there are only finitely many α-maximal r-graphs.For this reason, we only consider α ∈ (0, 1 r−1 ).Next, we extend our results about α-maximal graphs to α-maximal r-graphs.That is, we show that if G is an α-maximal r-graph, then the (r − 1)-faces of G have large degrees, and sets of (r − 1)-faces have strong expansion properties.
contradicting that G is α-maximal.
(iii) By (ii), each f ∈ X is contained in at least d(G)/r = e(G)/n edges, so we have Comparing the lower and upper bounds on e(X ∪ N(X)), we get , where the last inequality holds by the assumption |X| ≤ (1/2r) (1+α)/α n.

Expansion in simplicial complexes
Our goal is to prove the following theorem, which then easily implies Theorem 1.6.
In this section, we prepare the main tools needed to prove this theorem.To give some motivation, let us outline its proof.
Outline of the proof of Theorem 3.8.We follow a similar train of thoughts as in the proof of our rainbow theorems.Let G be an r-graph with p(G) = n and e(G) ≥ n 1+α .We can immediately pass to an α ′ = α/2-maximal subhypergraph H with average degree at least n α ′ .First, we study a random sample of V (H).Similarly as in Lemma 2.8, we show that if U is a random subset of the vertices of H, where each vertex is sampled with some not too small probability, then from every (r − 1)-face, we can reach at least p(H) 1−τ (r − 1)-faces by a proper path of length ℓ 0 = O( 1 α log 1 τ ), whose internal vertices are in U.This is presented as Lemma 3.9.From this, we deduce in Lemma 3.16 that for every f 0 ∈ P(H), there is a set F of at least p(H) 1−τ (r − 1)-faces f ′ such that there exist a large number of internally vertex disjoint proper paths of length ℓ 0 from f 0 to f ′ .If ℓ is even, then we are immediately done as taking ℓ 0 = ℓ/2, the union of two internally vertex disjoint paths between f 0 and f ′ gives a cycle of length ℓ.The case of odd ℓ is more difficult.We set ℓ 0 = ⌊(ℓ − r − 1)/2⌋, and find a path P 0 of length ℓ − 2ℓ 0 , whose both endpoints f ′ , f ′′ are in F, and P 0 is disjoint from f 0 .If τ is sufficiently small, this exists by Lemma 3.5.But then we can find two paths P ′ and P ′′ of length ℓ 0 , such that the endpoints of P ′ are f 0 and f ′ , the endpoints of P ′′ are f 0 and f ′′ , and the three paths P 0 , P ′ , P ′′ are internally vertex disjoint.The union of P 0 , P ′ , P ′′ is a cycle of length ℓ.This argument can be found in Lemma 3.17, and finishes the proof.
Most of the work needed to prove Theorem 3.8 is put into the following lemma, which is a generalization of Lemma 2.8.Let us introduce some notation.
If G is an r-graph and U ⊂ V (G), a U-path in G is a path whose internal vertices are contained in U. Also, to simplify notation, we write w.e.h.p. (with exponentially high probability) if some event holds with probability at least 1 − exp(−n z(α) ), where z(α) > 0 is some function depending only on α.Lemma 3.9.Let r ≥ 3, α ∈ (0, 1 r−1 ), τ ∈ (0, 1/2), ℓ ≥ 20 α log 1 τ , then the following holds if n > n 0 (r, α, τ, ℓ).Let G be an α-maximal r-graph with p(G) = n, and let p be a real number such that d(G) −α 2 /10 ≤ p < 1.Let U be a random sample of the vertices, each vertex chosen independently with probability p. Then w.e.h.p., for every f ∈ V (G), there are at least n 1−τ (r − 1)-faces of G that can be reached from f by a proper U-path of length ℓ.
The proof of this theorem follows similar ideas as the proof of Lemma 2.7.Therefore, we first prove a variant of Lemma 2.6.Let us recall that in Lemma 2.6, we showed that if G is an α-maximal graph, then a random sample of a set B ⊂ V (G) expands almost as well as any set of size |B|.The right way to generalize this is as follows.First, we have to define a somewhat unusual notion of neighborhood of (r − 1)-faces.
Figure 4: An illustration for the definition of N(X,U) in 4-graphs.
Definition 6.Let G be an r-graph, X ⊂ P(G) and U ⊂ V (G).Let N G (X,U) = N(X,U) denote the set of (r − 1)-faces f ∈ P(G) \ X such that there exists f ′ ∈ X satisfying f ∪ f ′ ∈ E(G) and f ′ \ f ⊂ U. See Figure 4 for an illustration.
Let us provide some explanation for the motivation of this definition.Let X ⊂ P(G) be the set of faces we can reach by a proper path of length ℓ ′ ≥ r − 1 from a given face f , such that the internal vertices of this path are from the random sample U. Then the set of faces we can reach by such a path of length ℓ ′ + 1 is a subset of N(X,U).It is not necessarily equal to N(X,U), as we are not allowed to repeat vertices of the path, so for this purpose, we also introduce its restricted version.Definition 7. Let G be an r-graph, X ⊂ P(G) and U ⊂ V (G).Suppose we are given a function φ : P(G) → 2 V (G) , which assigns each (r − 1)-face a set of forbidden vertices.Then define N φ (X,U) to be the set of those f ∈ N(X,U) for which there exists some f ′ satisfying the conditions in Definition 6, and In what follows, if G is an r-graph, we want to show that if B ⊂ P(G) and U is a random sample of V (G), then N(B,U) (or more generally N φ (B,U)) is large with high probability.Unfortunately, this is not true if the degree of some vertex of B is too large.Therefore, we have to bound the maximum degree of B, and we also want to ensure that N(B,U) has no large degrees either.More precisely, we find a large subset X ⊂ N(B,U) with small maximum degree.Controlling the degrees introduces a lot of additional difficulties.Let us define a restricted version of N(X,U) as well.
To further simplify our notation, we write a ≫ b if a/b > n z(α) , where z(α) > 0 is some function of α.Also, we view r as a constant, so the constants hidden in the O(.) and Ω(.) notation might depend on r.
• Let G be an α-maximal r-graph with p(G) = n; • let φ : P(G) → 2 V (G) such that |φ ( f )| ≤ ℓ for every f ∈ P(G); • deg B (v) ≤ ε|B| for every v ∈ V (B); • suppose that q ≫ ε and q > d(G) −1/4 .Let U be a random sample of V (G), each vertex chosen independently with probability q.Then w.e.h.p, there exists X ⊂ N φ (B,U) such that , and As G is α-maximal, the average degree of (r − 1)-faces in G[B] is at most c|B| α .Therefore, at least half of the (r − 1)-faces in B have degree at most 2c|B| α in G[B], let C be the set of such (r − 1)-faces.For f ∈ C, let E ′ f be the set of edges e ∈ E(G) for which e (r−1) ∩ B = { f } and e \ f is disjoint from φ ( f ).As the minimum degree of G is at least cn α /r by Lemma 3.7, we have Define the bipartite graph H as follows.Let the vertex classes of H be V (C) and D, and v ∈ V (C) and f ∈ D are joined by an edge if there exists f ′ ∈ C such that {v} = f ′ \ f and f ′ ∪ f ∈ E f ′ .Note that each edge {v, f } of H corresponds to the edge {v} ∪ f ∈ E * , and in the converse, each e ∈ E * corresponds to r − 1 edges of H, one for each face of e other than the unique face in C. Recalling that U ⊂ V (G) is the random sample, we also have N H (U ∩V (C)) ⊂ N φ (B,U), so it is enough to find a suitable X ⊂ N H (U ∩ V (C)).More precisely, our goal is to find a set Y ⊂ N H (U ∩ V (C)) such that |Y | ≥ 2r|B|(n/|B|) α/3 , and deg Y (v) ≤ r|B| + O((log n)|Y |ε/q) for every v ∈ V (Y ).Then a standard concentration argument shows that a random |B|(n/|B|) α/3 sized subset X of Y suffices with positive probability.We omit this very last concentration argument since it is routine.
For every v ∈ V (C), we have deg x, and let S ⊂ D be the set of heavy (r − 1)-faces.Also, say that e ∈ E * is heavy if all (r − 1)-faces of e, except for the unique face in C, are heavy.Let E h ⊂ E * be the set of heavy edges.Now we break our analysis into two cases, depending on whether the majority of edges of E * are heavy.

Case 1. |E
Note that each edge e ∈ E * \ E h corresponds to at least one edge {v, f } of H such that f is not heavy.Note that m ≤ |C|d holds as well.For i = 0, . . ., log 2 x, let T i be the set of faces f ∈ T such that 2 i ≤ deg H ( f ) < 2 i+1 .Let I be the index i maximizing the quantity we have . Therefore, there exists an assignment such that |F(v)| < 4ε ′ m ′ /∆ for every v ∈ V (C), fix such an assignment.Note that Here, q|T I |∆/(48ε ′ m ′ ) = Ω(q/ε(log n)), so X ≥ q|T I |/2 w.e.h.p.
so Y satisfies the required maximum degree condition.Furthermore, , so Y has the required size as well.This concludes Case 1.

Case 2. |E
We have We show that some subset of S can be chosen to be Y .Proof.For a given f ∈ S, we have Therefore, the probability that there exists f ∈ S not contained in N H (U ∩V (C)) is at most |S|e −qx = e −n Ω(α) .
Therefore, it remains to get rid of high degree vertices of S. To this end, we execute the following simple procedure.Let z := 16r 2 ε log n, C 0 := C, E 0 = E h and S 0 := S. For i = 0, 1, . . ., if C i , E i and S i are already defined, we proceed as follows.If deg S i (w) ≤ r|B| + z|S i | for every vertex w ∈ V (S i ), we stop.Otherwise, we choose some w i for which deg S i (w i ) > r|B| + z|S i |, and set Clearly, this procedure stops in a finite number of steps, and we show that if it stops at index I, the choice Y := S I suffices.Note that for i = 0, 1, . . ., I, we have |C i+1 | ≥ |C i | − 2ε|C| by the maximum degree condition on B, which also implies Let us examine how the size of S i+1 changes.Note that if some f ∈ S i+1 contains w i , then w i must be the top-vertex of some edge e ∈ E i+1 .Therefore, less than r|B| elements of S i+1 can contain w i , which means that , which then implies the inequality • every f ∈ B i can be reached from f 0 by a proper path of length r − 1 + i, whose internal vertices are in U 1 , . . .,U i , in this order, Here, we make the observation that deg B i (v) ≤ deg P(G) (v) ≤ nr 2 /d holds automatically by Lemma 3.2.This observation is quite important, otherwise we would run into trouble when s i gets too close to n.Furthermore, note that Lemma 3.14 guarantees that E 0 happens.Our goal is to show that for i = 1, . . ., ℓ − r + 1, we have (E i |E i−1 , . . ., E 0 ) w.e.h.p.
3.4 Cycles in simplicial complexes -Proof of Theorem 3.8 In this section, we prove Theorem 3.8.First, we use Lemma 3.9 to show that if G is an α-maximal r-graph, then between many pairs of (r − 1)-faces, one can find d(G) Ω(α 2 ) internally vertex disjoint proper paths.We note that in order to prove the main theorem of this section, namely Theorem 3.8, it would be enough to find ℓ internally vertex disjoint paths between many pairs of (r − 1)-faces.Lemma 3.16.Let r ≥ 3, then there exist c 1 > 0 and 0 < c 2 < 1/4 such that the following holds.Let α ∈ (0, 1 r−1 ), τ ∈ (0, α 3 /30), ℓ ≥ c 1 α log 1 τ , and let n > n 0 (r, α, ℓ).Let G be an α-maximal r-graph with p(G) = n.Then at least n 2−τ pairs of faces f , f ′ ∈ P(G) satisfy that there are at least d(G) c 2 α 2 internally vertex disjoint proper paths of length ℓ with endpoints f and f ′ .
Consider the multigraph H on vertex set P(G) in which for every i ∈ [s], we add an edge between the (r − 1)-faces f and f ′ if there is a proper U i -path of length ℓ with endpoints f and f ′ .By Lemma 3.9, w.e.h.p., every i ∈ [s] contributes at least 1  2 n 2−τ/2 > 2n 2−τ edges, so H has at least 2sn 2−τ edges.Fix a partition U 1 , . . .,U s with this property.
Say that a pair of vertices {u, v} is good if there are at least sn −τ edges between u and v in H, otherwise say that it is bad.The bad pairs of vertices contribute at most n 2 • sn −τ edges to H, so at least sn 2−τ edges of H are between good pairs of vertices.As there are at most s edges between any pair of vertices, this implies that there are at least n 2−τ good pairs of vertices.Note that each good pair of vertices { f , f ′ } satisfies that there are at least sn −τ = d(G) α 2 /10 • n −τ > d(G) α 2 /20 internally vertex disjoint paths of length ℓ with endpoints f and f ′ , finishing the proof.
From this, we can easily deduce that sufficiently large α-maximal r-graphs contain short cycles.Lemma 3.17.Let r ≥ 3, then there is an absolute constant c > 0 such that the following holds.Let r ≥ 3, α ∈ (0, 1 r−1 ), and let ℓ ≥ c α log 1 α .If G is an α-maximal r-graph such that p(G) is sufficiently large with respect to the parameters r, α, ℓ, then G contains a cycle of length ℓ.
Proof.Let τ = α 3 /40, let ℓ 0 = ⌊(ℓ − r − 1)/2⌋, and let c 1 , c 2 , n 0 be the parameters given by Lemma 3.16.Choose c such that that ℓ 0 ≥ c 1 α log 1 τ holds.Let n = p(G), d = d(G) > n α /2, and assume that n > n 0 (r, α, ℓ 0 ) and n c 2 α 3 ≥ 2ℓ.Say that a pair of (r − 1)-faces { f , f ′ } is good if there are at least d c 2 α 2 > ℓ internally vertex disjoint proper paths of length ℓ 0 with endpoints f and f ′ .Then there are at least n 2−τ good pairs, so there exists f 0 ∈ P(G) which appears in at least n 1−τ good pairs.Let F ⊂ P(G) be the set of faces f such that { f 0 , f } is good.Let H be the subhypergraph of G we get after removing the vertices (and thus all edges containing some of those vertices) of f 0 .By Lemma 3.7, every f ∈ P(G) satisfies deg G ( f ) ≥ d/r, so every f ∈ P(H) satisfies deg H ( f ) ≥ d/r − (r − 1) > d/2r.Also, as f ∩ f 0 = / 0 for every f ∈ F, we have F ⊂ P(H).
Finally, we deduce Theorem 1.6.Let us repeat this theorem formally.Theorem 3.18.There exists a constant c > 0 such that the following holds.Let α ∈ (0, 1/2), let G be a 3-graph with p(G) = n and e(G) ≥ n 1+α .If n > n 0 (α), then G contains a homeomorphic copy of the cylinder and the Möbius strip on at most c α log 1 α vertices.Proof.By a standard probabilistic argument, G contains a 3-partite subhypergraph G ′ with at least 2e(G)/9 edges.Applying, Theorem 3.8 to G ′ , we get that G ′ contains an ℓ-cycle for every ℓ > c ′ α log 1 α for some constant c ′ > 0. Recall from Lemma 3.4 that a 3-partite ℓ-cycle is homeomorphic to the cylinder if ℓ is even, and to the Möbius strip if ℓ is odd.This finishes the proof.Given a graph H, let ex(Q n , H) denote the maximum number of edges of a subgraph of Q n containing no copy of H.The study of the function ex(Q n ,C 2ℓ ) was initiated by Erdős [11,12]; we refer the reader to [7] for the extensive history of this problem.In case ℓ ∈ {2, 3}, one has ex(Q n ,C 2ℓ ) = Ω(n • 2 n ), while for ℓ ≥ 4 the Lovász local lemma implies that ex(Q n ,C 2ℓ ) = Ω(n 1 2 + 1 2ℓ • 2 n ), see [7].For an upper bound, Chung [6] proved that if ℓ ≥ 4 is even, then ex(Q n ,C 2ℓ ) = O(n The case of odd ℓ is more mysterious.It was proved only later by Füredi and Özkahya [15,16] that for ℓ ≥ 7, there exists ε(ℓ) > 0 such that ex(Q n ,C 2ℓ ) = O(n 1−ε(ℓ) • 2 n ), where ε(ℓ) tends to 1/16 as ℓ tends to infinity.Pursuing a remark of Conlon [7], who also gave a short proof of this (with slightly weaker bounds on ε(ℓ)), we improve this for large ℓ.Furthermore, we use the following terminology and results from [7].We say that an r-graph G with vertex set [m] is a representation of a graph H if the following holds: H has a copy in Q m such that each edge {a 1 , . . ., a m } ∈ {0, 1, * } m has exactly r nonzero entries (r − 1 ones and one flip-bit), and if i 1 , . . ., i r are the indices of the nonzero entries, then {i 1 , . . ., i r } ∈ E(G).Theorem 4.2.[7] Let H be a graph and G be an r-graph representing H. Suppose that ex(n, G) ≤ εn r .Then ex(Q n , H) = O(ε 1/r n • 2 n ).
Moreover, the following slightly more general result is also true and follows from the same proof.

Open problems
In this paper, we managed to improve the best known upper bounds on the extremal numbers of rainbow cycles and subdivisions, but there are still some gaps to overcome.
• Show that if a properly edge colored graph with n vertices contains no rainbow cycles, then its average degree is O(log n).
• Let t ≥ 3 be an integer.Show that if a properly edge colored graph with n vertices contains no rainbow subdivision of K t , then its average degree is O t (log n).
Furthermore, we believe the following strengthening of Theorem 1.1 should be also true.
• Let G be a graph with n vertices and n 1+α edges.Show that G contains an ℓ-subdivision of K t , where t = n Θ(α) and ℓ = O(1/α).
Updates.After the submission of this paper, there have been several developments regarding the problems above.O. Janzer and Sudakov [21], and independently Kim, Lee, Liu, and Tran [28] proved that the extremal number of rainbow cycles is O(n(log n) 2 ), both proofs relying on a clever counting argument.Also, by slightly modifying the argument of our paper, Wang [45] proved that the extremal number of rainbow subdivisions of K t for every fixed t is at most n(log n) 2+o (1) .

Figure 1 :
Figure 1: A 3-uniform tight cycle of length 20 (left) and a tight cycle of length 21 (right).

Lemma 3 . 2 .
Let G be an r-graph such that p(G) = n and deg( f ) ≥ d for every f ∈ P(G).Then for every v ∈ V (G), we have degP(G) (v) ≤ rn/d.Proof.Let E v ⊂ E(G)be the set of edges containing v, and let P v ⊂ P(G) be the set of (r − 1)-faces containing v. Note that |E v | ≤ n, as each e ∈ E v contributes the face e \ {v} ∈ P(G), and any two of these faces are different.On the other hand, each f ∈ P v appears in at least d edges in E v .Therefore,

Figure 2 :
Figure 2: An illustration of a path in a 3-graph, where the numbers denote the order of the vertices, and the red edges denote f 0 , . . ., f ℓ .

Figure 3 :
Figure 3: Two cycles in 3-graphs.The left is homeomorphic to the cylinder, while the right is homeomorphic to the Möbius strip.

Lemma 3 . 5 .
Let r, ℓ, d be positive integers such that r ≥ 3 and ℓ > r, and let G be an r-graph such that deg( f ) ≥ d for every f ∈ P(G).Let F ⊂ P(G) such that |F| ≥ 2rℓ • p(G)/d.Then G contains a proper path of length ℓ, whose both endpoints are in F. Proof.Let E 0 ⊂ E(G) be the set of edges e which have an (r − 1)-face contained in F. As deg( f ) ≥ d for every f ∈ P(G), we have |E 0 | ≥ |F|d/r.Let E 1 ⊂ E 0 be the set of edges with exactly one face contained in F, and let

Proof.
Let p = 12n −1+α , and consider the 3-graph G on n vertices, in which each of the n 3 triples is present as an edge independently, with probability p.Let N k denote the number of homeomorphic copies of the cylinder and Möbius strip on k vertices in G, and let N = ∑ k≤1/α N k Suppose that C is a homeomorphic copy of the cylinder or the Möbius strip.Then the Euler characteristic of C is 0, which means that e(C) − p(C) + v(C) = 0. Let a be the number of vertices on the boundary of C, and b be the number of 2-faces on the boundary.As the boundary is homeomorphic to either S 1 ∪ S 1 or S 1 , we have a = b.Furthermore, counting 2-faces by edges, we have 3e(C) = 2p(C) − b.By this, we get e(C) − (3e(C) + b

Lemma 3 . 7 .
(Properties of α-maximal simplicial complexes) Let α ∈ (0, 1 r−1 ), and let G be an α-maximal r-graph.Let p(G) = n, and let d(G) = cn α .Then Let H be the r-graph we get after removing the edges containing f .Then p(H) ≤ p(G) − 1 and e(H) = e(G) − deg( f ) > e(G) − d(G)/r = d(G)p(G)/r − d(G)/r.Therefore, that is, D is the set of (r − 1)-faces appearing on the edges of E f for f ∈ C, which are not in C. Let us note that |E * | = |C|d/2r.For each e ∈ E * , the top-vertex of e is the unique vertex v ∈ e such that e \ {v} ∈ C. Note that each v ∈ V (G) is the top-vertex of at most |C| edges.

FromClaim 3 . 11 .
this, |T I | ≥ |C|d/8rx(log 2 n) > |C|.For every w ∈ V (T I ), deg T I (w) ≤ r|B| + 8rε|T I | log 2 n.Proof.Let T I (w) ⊂ T I be the set of (r − 1)-faces containing w.Let us count the edges in the bipartite graphH[V (C) ∪ T I (w)] in two ways.If {v, f } is an edge of H with v ∈ V (C) and f ∈ T I (w), then there exists f ′ ∈ C such that e := f ∪ f ′ ∈ E f and {v} = f \ f ′ .As w ∈ f , either w is a top-vertex of the edge e, or w ∈ f ′ .As each vertex of G is a top-vertex of at most |B| edges, we get e(H[V (C) ∪ T I (w)]) ≤ r|B| + ∑ f ′ ∈C,w∈ f ′ (r − 1)|E f ′ | ≤ r|B| + deg C (w)d 2 ≤ r|B| + ε|C|d.On the other hand, recalling that 2 I ≥ |C|d/(8r|T I | log 2 n), we have e(H[V (C) ∪ T I (w)]) ≥ |T I (w)|2 I ≥ |T I (w)| max 1, |C|d 8r|T I | log 2 n .Comparing the lower and upper bound on e(H[V (C) ∪ T I (w)]), we get |T I (w)| ≤ r|B| + 8rt|T I | log 2 n.Let H ′ := H[V (C) ∪ T I ] and recall that U ⊂ V (G) is the random sample.Claim 3.12.|N H ′ (U ∩V (C))| ≥ q|T I | 2 w.e.h.p.Proof.We have m ′ := e(H ′ ) ≥ |T I |2 I ≥ |C|d/8r log 2 n.Also, in the graph H ′ the degree of each face in T I is between ∆ := 2 I+1 and ∆/2, and the degree ofeach vertex v ∈ V (C) is at most deg C (v)d/2r ≤ ε|C|d/r ≤ 8εm ′ log 2 n.That is, writing ε ′ = 8ε log 2 n, we have deg H ′ (v) ≤ ε ′ m ′ .In order to lower bound |N H ′ (U ∩V (C))|, we consider a subgraph H ′′ of H ′ , in which each vertex of T I has degree 1.Then |N H ′ (U ∩V (C))| ≥ |N H ′′ (U ∩V (C))|, and |N H ′′ (U ∩V (C))| is the sum of independent random variables.We find suitable H ′′ by assigning each face f ∈ T I to one of its neighbours v f randomly with uniform distribution.For each

4 Concluding remarks 4 . 1
Cycles in the hypercubeTheorem 3.8 has an interesting application about the extremal numbers of cycles in the hypercube.As a reminder, Q n denotes the graph of the n-dimensional hypercube, that is, V (Q n ) = {0, 1} n , and two vertices are joined by an edge if they differ in exactly one coordinate.In other words, each edge of Q n corresponds to a sequence {0, 1, * } n containing exactly one * , called the flip-bit.

Theorem 4 . 1 . 2 3
ex(Q n ,C 2ℓ ) = O(n +δ • 2 n ) for some δ = O( log ℓ ℓ ).If G is a family of r-graphs, let ex(n, G) denote the maximum number of edges in an r-graph on n vertices containing no member of G, and if G = {G}, write ex(n, G) instead of ex(n, G).

Theorem 4 . 3 .
Let H be a graph and let G be a family of r-graphs, each of which is a representation of H. Suppose that ex(n, G) ≤ εn r .Thenex(Q n , H) = O(ε 1/r n • 2 n ).Proof of Theorem 4.1.Let C be the family of 3-graphs associated with cycles of length ℓ.Note that each member of C is a representation of C 2ℓ .By Theorem 3.8, we have ex(n, C) = n 2+O(log ℓ/ℓ) .But then Theorem 4.3 gives ex(Q n ,C 2ℓ ) = O(n 2/3+O(log ℓ/ℓ) • 2 n ). 20/αn;