On the number of orientations of random graphs with no directed cycles of a given length ∗

Let ~ H be an orientation of a graph H. Alon and Yuster proposed the problem of determining or estimating D(n,m, ~ H), the maximum number of ~ H-free orientations a graph with n vertices and m edges may have. We consider the maximum number of ~ H-free orientations of typical graphs G(n,m) with n vertices and m edges. Suppose ~ H = C ` is the directed cycle of length ` > 3. We show that if m n 1+1/(`−1), then this maximum is 2o(m), while if m n1+1/(`−1), then it is 2(1−o(1))m. ∗An extended abstract of this work appeared in the Proc. of LAGOS ’11, Latin-American Algorithms, Graphs and Optimization Symposium [A note on counting orientations, Electron. Notes in Discrete Math. 37 (2011), 3–8]. The authors gratefully acknowledge the support of NUMEC/USP, Project MaCLinC/USP, and a CAPES/DAAD PROBRAL project (415/ppp-probral/po/D08/11629, Proj. no. 333/09). †Supported by FAPESP (2010/09555-7). ‡Partially supported by FAPESP (2013/03447-6, 2013/07699-0), CNPq (308509/2007-2, 477203/20124) and the NSF (DMS 1102086). §Supported by FAPESP (2009/06294-0, 2012/00036-2, 2013/20733-2) and CNPq (140882/2009-0, 477203/2012-4). ¶Supported by CNPq (131973/2009-6, 140987/2012-6). the electronic journal of combinatorics 21(1) (2014), #P1.52 1


Introduction
Given a simple graph H, an orientation H of H is obtained by assigning an 'orientation' or 'direction' to each of its edges.Such an H is called oriented graph.Given a simple graph G and an oriented graph H, let D(G, H) be the number of orientations of G with no copy of H and let D(n, H) = max{D(G, H) : |V (G)| = n}.The problem of estimating D(n, H) was posed by Paul Erdős [5, p. 45] in 1974.We investigate a similar problem, where we consider 'typical' graphs G(n, m) with n vertices and m edges.Our terminology and notation are standard (see, e.g., [3,8]).In particular, we use the notation a b as shorthand for the statement a/b → 0 as n → ∞.
Alon and Yuster [2] proved that, if n is sufficiently large, then D(n, T k ) = 2 ex(n,K k ) for any tournament T k with k vertices, i.e., any orientation of the complete graph K k .
Here we work with directed cycles C of length as opposed to tournaments and we consider random graphs.Let us state our main theorem in terms of the binomial random graph G(n, p) (one may derive corresponding results for the G(n, m) model from the G(n, p) results below by standard means; the reader is referred to [8,Section 1.4] for this 'equivalence' of the models G(n, p) and G(n, m)).
Theorem 1.1.Fix 3.For every 0 < γ < 1, there exist c and C for which the following hold for G = G(n, p) with probability tending to 1 as n → ∞.
We refer to cases (i) and (ii) above, respectively, as the supercritical and the subcritical cases.
Since our results are mostly asymptotic, in the next sections, when convenient, we freely and tacitly suppose that n is larger than a suitably large constant.

Preliminaries
Let 0 < p 1 be given and let G = (V, E) be an oriented graph.Let A and B be nonempty disjoint subsets of V .We write e G (A, B) for the number of edges of G oriented from A to B. Define the p-density of (A, B) as d G,p (A, B) = e G (A, B)/p|A||B|.For 0 < ε 1, the pair (A, B) is called (ε, G, p)-regular if, for all X⊂ A and Y ⊂ B such that |X| ε|A| and |Y | ε|B|, we have |d G,p (X, Y ) − d G,p (A, B)| ε.We consider analogous definitions for graphs.In particular, if G = (A, B; E) is a bipartite graph and (A, B) is an (ε, G, p)regular pair, then we say that G is (ε, G, p)-regular.If the bipartite graph G is (ε, G, d)regular, where d = e G (A, B)/|A||B|, then we say that G is (ε)-regular.More explicitly, in an (ε)-regular bipartite graph G = (A, B; E), for all X ⊂ A and Y ⊂ B such that |X| ε|A| and |Y | ε|B|, we have Given an oriented n-vertex graph G and a constant ε > 0, a partition we give a version of Szemerédi's Regularity Lemma for sparse oriented graphs (see, e.g., [10,12], where the non-oriented case is considered).
Theorem 2.1.For all ε > 0 and positive integer m, there exist η > 0 and M m, such that, for any 0 < p 1 and any orientation G of a sufficiently large (η, p)-upper uniform graph G, there exists an (ε, G, p)-regular partition of the vertex set of G into k + 1 classes, where m k M .
Let G be an oriented n-vertex graph and let W 1 , . . ., W ⊂ V ( G) be a family of pairwise disjoint sets with Naturally, here, we are thinking of the oriented subgraph and contains precisely the oriented edges of G starting in W i and ending in W i+1 .
A digraph D is a pair (V, E) where V is the vertex set of D and E is a set of arcs, or oriented edges, that is, ordered pairs (u, v), where u, v ∈ V and u = v.Let 0 < ε, δ, p = p(n) 1 be given and let G be an n-vertex oriented graph.Let P = {V 0 , V 1 , . . ., V k } be an (ε, k)-equitable partition of the vertex set of G.The coloured reduced digraph R = R( G, ε, δ, P) associated with P has vertex set [k] = {1, . . ., k} and, for every {i, j} ∈ [k]  2 , the pair (i, j) is an arc in R if and only if the pair (V i , V j ) is (ε, G, p)-regular; moreover, an arc (i, j) in R is coloured Given a graph H, a real number ε > 0, and positive integers n and m, we define G(H, n, m, ε) as the family of graphs G with vertex set V = x∈V (H) V x , where the sets V x have cardinality n each and are pairwise disjoint, and with edge set of the form E = {x,y}∈E(H) E xy , where each E xy is the edge set of an (ε)-regular graph with exactly m edges between V x and V y for all {x, y} ∈ E(H).We denote by F(H, n, m, ε) the set of graphs in G(H, n, m, ε) that do not contain transversal copies of H, i.e., copies of H with exactly one vertex in each V x .The following result is proved in [6] (for a weaker result, see [11]).Theorem 2.2.Let C be a cycle with 3.For any 0 < α < 1, there exists ε 0 > 0 such that, for all µ > 0, there exists C 1 such that, for all p Cn −1+1/( −1) and 0 < ε < ε 0 , the random graph G(n, p) contains a.a.s.no subgraphs in F(C , n, α n 2 p , ε) for any n µn.Now we give a definition and some results that are useful in the proof of Theorem 1.1(i).

Proof of Theorem 1.1
Let us briefly sketch the main idea of the proof of part (i).Given p Cn −1+1/( −1) and a graph G = G(n, p), we will consider the set of (ε, G, p)-regular partitions of its C -free orientations.Since these partitions are into a number of parts bounded by M = M (ε), there are at most M n of them, and the total number of coloured reduced digraphs is bounded by a constant.It follows that, if G has more than 2 γ n 2 p orientations that are the electronic journal of combinatorics 21(1) (2014), #P1.52 C -free, then there is one partition of V (G) and one coloured reduced digraph R that account for more than 2 γ 2 n 2 p of these orientations of G. Now we consider the number of ways we can orient the edges of G so that we obtain the reduced digraph R. We will see that if there are only few pairs of clusters with blue arcs in both directions, then there are at most 2 γ 2 n 2 p possible orientations.But if there are many pairs of clusters with blue arcs in both directions-which there must be for the total number of C -free orientations of G to be at least 2 γ n 2 p -then we can find a triple of clusters in R which contains a directed blue 3-cycle plus one extra blue arc.We will prove that, since p Cn −1+1/( −1) , the graph G has a.a.s. the property that the directed edges in G between the clusters of any such triple must contain a copy of C , and this contradiction will imply the result.
The only step at which we used the probability bound of part (i) was the final step of finding a copy of C given the triple with a directed blue 3-cycle plus a blue arc in R.That step fails if p cn −1+1/( −1) for some small constant c, and it does so for the simple reason that for such values of p, most edges of G are not contained in any copy of C .We can fix a C -free orientation of those edges of G that are contained in copies of C s, and then any orientation of the remaining edges is automatically C -free.Since almost all edges do not belong to C s, part (ii) follows.

Two auxiliary lemmas
We now give two lemmas that concern orientations G of n-vertex graphs G for which the following two conditions hold, for certain parameters σ, ε E , p = p(n), n, δ and ε F , to be specified later: In the first lemma (Lemma 3.1), we suppose that G contains an -tuple of sets (W 1 , . . ., W ) inducing an appropriate blow-up of C , and deduce that G itself contains a C .In the second lemma (Lemma 3.2), we suppose that the regularity lemma has been applied to G and that the associated coloured reduced digraph R contains a certain subdigraph D made up of blue arcs; we then conclude that G contains a C , finding first a suitable -tuple of sets (W 1 , . . ., W ) and then applying Lemma 3.1.Lemma 3.1.For every 0 < δ, ε F < 1/3 and 3, there exists ε E such that, for every 0 < σ < 1, the following holds.
Suppose G is an orientation of G, where G is an n-vertex graph that satisfies both (H1) and (H2) above for some σn n n and p = p(n) Proof.Fix 0 < δ, ε F < 1/3 and 3. Let ε E be given by an application of Lemma 2.4 with parameter δ.Fix 0 < σ < 1 and define C (F. 2.5) as the constant obtained by an application of Fact 2.5 with parameter ε F /2. Now suppose that G, G and (W 1 , . . ., W ) are as in the statement of the lemma and p = p(n) 1/n.For convenience, put ] be the subdigraph of G associated with the (ε R , δ, σ)-blow-up of C induced by the sets W i .Also, let G be the underlying graph of G , that is, the graph obtained from G by ignoring the orientation of its edges.
Let J ⊂ G be the graph with vertex set i=1 W i and edge and the proof is complete.
Let D 3 be obtained from the cycle C 3 of length 3 by the addition of an extra arc, forming a directed cycle of length 2 with some arc of C 3 .As in the previous lemma, we shall consider in our next lemma an orientation G of an n-vertex graph G that satisfies both (H1) and (H2).However, in Lemma 3.2 below, our hypothesis will be that G has been regularized with some suitably small parameter ε R and that the associated coloured reduced digraph R = R( G, ε R , δ, P) contains a blue D 3 .In the lemma below, we are interested in odd cycles C .(The case in which is even is similar and simpler.For even , it is enough that R should contain a blue directed 2-cycle C 2 ; we omit the details.) Lemma 3.2.Fix z 1 and set = 2z + 1.For every positive δ < 1/3 and ε F < 1/z and M 1, there exist ε E and σ such that the following holds.Suppose G is an n-vertex graph that satisfies (H1) and (H2) for some n and p = p(n) 1/n.Furthermore, suppose that G is an orientation of G and that Let ε R = min{ε R(L.3.1) /z, δ/2} and set σ = (1 − ε R )/zM (we shall apply Lemma 3.1 with this σ).We have now defined all the required constants.
We now suppose that G, G, P = {V 0 , . . ., V k }, and R = R( G, ε R , δ, P) are as in the statement of the lemma and p = p(n) 1/n.We prove that G must contain a C .Adjusting the notation suitably, assume that (v 1 , v 2 ), (v 2 , v 1 ), (v 2 , v 3 ) and (v 3 , v 1 ) are the arcs of a blue D 3 in R. Thus, we know that the corresponding pairs (V i , V j ) are (ε R , G, p)-regular with density at least δ in G.
For z = 1, the result follows directly from Lemma 3.1.Suppose z 2. For i = 1, 2 and 3, consider pairwise disjoint subsets Recalling that (H1) and (H2) hold for G, we see that G satisfies EDGE σ, ε E(L.3.1) , p and G contains no member of Thus, all conditions of Lemma 3.1 are satisfied and we conclude that G contains a copy of C .

Main lemma for the supercritical case
The next result (Lemma 3.3) is the main lemma in the proof of Theorem 1.1(i).As in Lemmas 3.1 and 3.2 in Section 3.1, in Lemma 3.3 below we consider an n-vertex graph G that satisfies (H1) and (H2) given at the beginning of Section 3.1, but suppose that (H2) holds for a range of values of n, namely, for all n cn for a certain constant c > 0. The conclusion in Lemma 3.3 is that, for any given γ > 0, with the constants in (H1) and (H2) chosen suitably, such a graph G has at most 2 γ( n 2 )p orientations avoiding C .
and n is large enough.Now let G be an n-vertex graph that satisfies (H1) and (H2) for all n n/ M .We shall show that D(G, C ) 2 γ( n 2 )p .For convenience, let us state our hypotheses on G explicitly here: we suppose that G satisfies EDGE(σ, ε E , p) and suppose that G contains no graph in F(C , ñ, (δ/2)ñ 2 p , zε F ) as a subgraph for any n n/ M .Denote by R the set of digraphs R = R( G, ε R , δ, P) whose arcs are coloured grey and blue such that there exists a C -free orientation G of G where R is the coloured reduced digraph of an (ε R , G, p)-regular partition By Theorem 2.1, for every orientation G of G, there exists an (ε R , G, p)-regular partition of G with k + 1 classes, where m k M .Note that, since there are 3 2 possible kinds of connections between two vertices in a coloured reduced digraph, there exist at most 9 ( i 2 ) different coloured reduced graphs with i vertices.Thus, We now make the following claim.
Claim 3.4.For any coloured reduced digraph R, we have Given that M is a constant and p 1/n, inequalities ( 6) and ( 7) imply ( 5) for all large enough n, and the proof of Lemma 3.3 is complete.It now remains to prove Claim 3.4.
Proof of Claim 3.4.Fix a coloured reduced digraph R. We first claim that R does not contain too many blue directed 2-cycles C 2 .More precisely, our claim is as follows.Let R 2 be the graph on [k] = V ( R) where {i, j} is an edge of R 2 if and only if both arcs (i, j) and (j, i) belong to R and are blue.We claim that the electronic journal of combinatorics 21(1) (2014), #P1.52 Suppose for a contradiction that (8) fails.Then there is a vertex a in R 2 with degree d R 2 (a) larger than 2ε and it follows from the fact that R is the coloured reduced digraph of an (ε R , G, p)-regular partition P = {V 0 , . . ., V k } that there is a pair (b, c) with both b and c adjacent to a in R 2 with both (V b , V c ) and (V c , V b ) (ε R , G, p)-regular pairs.By Lemma 2.4, we know that either d G (V b , V c ) δ or d G (V c , V b ) δ, and hence at least one of (b, c) and (c, b) is blue in R. It thus follows that R contains a blue copy of D 3 with vertex set {a, b, c}.It now suffices to apply Lemma 3.2 to conclude that G contains a copy C , contradicting that G is a C -free orientation of G.This completes the proof of (8).We now move on to the proof of (7).
The digraph R can be associated with at most (M + 1) n partitions of V (G) into at most M +1 parts.Let P = {V 0 , V 1 , . . ., V k } be one of those partitions, where m k M .To estimate D R (G, C ), we shall estimate the number of C -free orientations G of G that admit P as an (ε R , G, p)-regular partition and, furthermore, R is the coloured reduced digraph R( G, ε R , δ, P).We shall then have By property EDGE(σ, ε E , p), there exist at most edges of G with both endpoints in the same V i for some 1 i k.
Since σ η ε R /2 and |V 0 | ε R n, there is U 0 ⊂ V (G) that contains V 0 and with |U 0 | = ε R n ηn σn.Since G satisfies EDGE(σ, ε E , p), by Fact 2.7, we know that G is (η, p)-upper uniform.Thus, using (η, p)-upper uniformity, we know that the number of edges with only one endpoint in U 0 is at most (1 + η)ε R n 2 p.For the edges with both endpoints in U 0 , we use the fact G satisfies EDGE(σ, ε E , p).Recalling that |U 0 | σn, we may conclude that the number of edges inside U 0 is at most (1 + ε E )ε 2 R n 2 p/2.Therefore, the number of edges with at least one endpoint in Let G be a C -free orientation of G.Note that the orientation of the at most 5ε R n 2 p edges counted in (11) and (12) does not affect whether or not G should be counted in D(P, R) (recall the definition of D(P, R), given near ( 9)).Thus, the edges in (11) and ( 12) contribute 2 5ε R n 2 p (13) to our count.Now, the structure of R does impose restrictions on how the remaining edges of G may be oriented in any G that is counted in D(P, R).We proceed to analyse the electronic journal of combinatorics 21(1) (2014), #P1.52 those restrictions.By the (η, p)-upper uniformity of G and the fact that for all 1 i < j k.Let us now count the number of ways those edges between V i and V j may be oriented in the G counted in D(P, R).To do so, let us observe that, clearly, any given pair {i, j} with 1 i < j k satisfies one of the following: (i) At least one of (i, j) and (j, i) is not an arc of R.
(ii) Both (i, j) and (j, i) are arcs of R and one of them is grey and the other one is blue.
(iii) Both (i, j) and (j, i) are arcs of R and both of them are blue.
(iv) Both (i, j) and (j, i) are arcs of R and both of them are grey.
Note that, because of Lemma 2.4, possibility (iv) is excluded.We now estimate in how many ways the edges in (14) may be oriented, according to the 'type' of the pair {i, j}.Case 1.The pair {i, j} is of type (i).The number of orientations of the edges in such pairs {i, j} is at most 2 {i,j} e G (V i ,V j ) , where the sum ranges over all pairs {i, j} of this type.Note that the number of such {i, j} is at most ε R k 2 .Hence, recalling (14), we see that Case 2. The pair {i, j} is of type (ii).Recalling (14), we see that the number of possible orientations of the edges in such a pair (V i , V j ) is at most The first inequality follows from the fact that δ(1 + η) < 1/2, and the second follows from the estimate x βx < 2 H(β)x , valid for all 0 < β < 1 (see [9], Corollary 22.9).We now observe that the total contribution of the edges induced by pairs {V i , V j } with {i, j} of type (ii) is at most where we used that p 1/n to absorb n 2k 2 into the exponential term.Case 3. The pair {i, j} is of type (iii).Recall that in (8) we proved that the number of pairs {i, j} of type (iii) is at most ε Assume that X C < (γ/2 ) n 2 p.Consider the following procedure: fix the orientation of the edges that belong to cycles of length in G according to some total order of the vertices of G and orient the remaining edges in any way.An orientation generated by this procedure contains no copy of C .Therefore, with probability 1 − o(1), the number of such orientations is at least 2 e(G(n,p))−(γ/2)( n 2 )p 2 (1−γ)( n 2 )p .Case 2. n −1 p cn −1+1/( −1) .Since p n −1 , we know that X C < 2(np) holds with probability 1 − o(1) (see Theorem 4.4.4 in [1]).Furthermore, note that and hence P X C γ n 2 p/2 = o(1).It now suffices to proceed as in Case 1.

Concluding remarks
For simplicity, we restricted our attention to counting C -free orientations.Using versions of Theorem 2.2 that work for general graphs H (see, e.g., [4,13]), one may prove certain results on the number of H-free orientations of G(n, p) for orientations H of any given graph H.
We have obtained satisfactory results for the random variable D(G(n, p), C ) for p close to the 'threshold'.For p substantially below the threshold (the subcritical case), the value of D(G(n, p), C ) is a.a.s. 2 e(G(n,p))−Θ(p n ) .A simple analysis of our proof gives the lower bound part of this statement, while the upper bound part follows from the fact that Ω(p n ) edge-disjoint copies of C exist in G(n, p) in this range.
For p substantially above the threshold (the supercritical case) we expect that our results can be substantially improved.One may check that D(K n , C ) is approximately C n n!, where C 1 depends only on (and is equal to one if = 3).But this ceases to be true for D(G(n, p), C ) when p 1. It would be interesting to determine more accurately the asymptotic value of D(G(n, p), C ) as p varies from the threshold to 1.