Triangles and subgraph probabilities in random regular graphs

We improve the estimates of the subgraph probabilities in a random regular graph. Using the improved results, we further improve the limiting distribution of the number of triangles in random regular graphs.


Introduction
Research in random graph theory started from the study of subgraphs [2].The distributional results for small subgraphs and for large subgraphs are very different in nature.The distributions of small subgraphs in G(n, p) are well understood [18,19].Under some mild conditions, the number of subgraphs isomorphic to a fixed graph H, denoted by Z H , is asymptotically normally distributed when p exceeds some critical value p H . Similar results hold for G(n, m) as well [18].In particular, if H is a balanced graph and p is not too close to 1, then Z H is asymptotically normally distributed in G(n, p), and is thus highly concentrated around its expectation EZ H , when EZ H → ∞ as n → ∞.The picture for large subgraphs is very different.Take Z M , the number of perfect matchings (assuming n is even) for an example.The threshold of its appearance is at p = log n/n.However, EZ M → ∞ already when p = C/n for C > e.This implies no concentration of Z M around its expectation for p = O(1/n), and indeed no such concentration for larger p either.It has been proved that Z M is asymptotically log-normally distributed for p n −1/2 [13].For smaller values of p its distribution is unknown.Similar results have been proved for the number of spanning trees and the number of Hamilton cycles [13], the number of d-factors [4], and the number of triangle factors [5].What happens to the number of subgraphs whose size is between constant size and size of order Ω(n)?For the number of matchings of size , it turns out that its limiting distribution transitions from normal to log-normal at some critical point of p [9], and this distributional transition may be a general phenomenon for other subgraphs as well.
Another extensively studied random graph model is the model of random regular graphs.Let G(n, d) denote a graph chosen uniformly at random from the set of all d-regular graph on vertex set [n].Much less is known about the distribution of Z H in G(n, d) where H is of fixed size, or of size Ω(n).For d = O(1), G(n, d) is locally tree like and thus, the only nontrivial connected subgraphs of fixed sizes are cycles (see [21] for more discussions of properties of G(n, d) for fixed d).
In G(n, d) the joint distribution of the number of cycles of any fixed length tends asymptotically to the distribution of independent Poisson random variables [1,20].This continues to hold for slowly growing d [17].For instance, the Poisson like distribution for the number of triangles is proved to hold for all d = o(n 1/5 ).Z. Gao and Wormald [11] proved normal distribution for strictly balanced graphs, which, in cases of short cycles, permits slightly larger d than in [17].For the number of triangles, their result holds for d = o(n 2/7 ).For large subgraphs, Janson [12] determined the limiting distribution of the number of perfect matchings and the number of Hamilton cycles in G(n, d) for constant d.For growing d, we are not aware of any results when the size of H is beyond log n.The recent development on the sandwich conjecture [6,3] allows to translate properties and graph parameters from G(n, p) to G(n, d), but in general the distributional results do not translate.
There are two main obstacles in proving the limiting distribution of Z H , even for H of fixed size.The first obstacle lies in the computation of the moments of Z H .To prove normality, one can compute its central j-th moment for each fixed j.However, due to the appearance of both positive and negative terms in the central moments computation, the leading terms cancel each other, and the errors in the subgraph probabilities quickly become the dominating terms when d grows.(Take the triangle H = C 3 for an example.We only manage to compute the variance of Z C 3 for d = o(n 2/5 ), and computing higher moments requires even smaller d.)The other standard method is computing the k-th raw moment for k around EZ H /σ(Z H ), where σ(Z H ) is the standard deviation of Z H .For such large k (which typically grows quickly with d), it is difficult to bound the number of k-tuples of copies of H sharing a specific number of edges.The second obstacle is to estimate the probabilities of subgraphs in G(n, d).Specifying a set of edges H ⊆ [n]  2 , what is the probability that H ⊆ G(n, d) (i.e.G(n, d) contains all edges in H)? McKay [14,15] gave an estimate of this probability which has a relative error O(|H|d/n), and to our knowledge, this has been the best estimate to date.This immediately limits the study of Z H for large H, or the computation of high moments of Z H even for H of constant size, which is required when proving the limiting distribution of Z H . Take H = C 3 as an example.To determine the limiting distribution of Z C 3 , we need to estimate the k-th moment of Z C 3 where k ≈ d 3/2 .This requires an asymptotic joint probability estimate of Θ(d 3/2 ) edges.With errors in [14,15], d is required to be o(n 2/5 ).
For the second obstacle, we manage to improve the error in the subgraph probabilities in [14,15].See Theorem 6 in Section 2 for the precise statement.This new result allows us to estimate, for instance, the asymptotic probability that G(n, d) contains a specific perfect matching for d up to n 1/2 .As we only study small subgraphs in this paper, it turns out that a less precise form would be sufficient, which is stated in Theorem 2 as a corollary of Theorem 6.
For the first obstacle, Z. Gao and Wormald bypassed it by smartly considering a new variable Z H , which counts isolated copies of H, i.e. copies of H that do not share edges with other copies of H.In the range of d where the number of non-isolated copies of H is so small that it does not affect the standard deviation of Z H , the distribution of Z H will immediately yield the distribution of Z H . Working on Z H avoids having to deal with tuples of heavily intersecting copies of H.However, it also limits the range of d for which the proof method can apply.For the case ) is required in [11], which did not even reach the natural stopping point d = o(n 2/5 ) (explained above).To relax the condition on d, it is possible to modify the definition of Z H . Instead of counting isolated triangles, we may, for instance, count triangles that intersect only a bounded number of other triangles.With the new definition and with the new subgraph probabilities in Theorem 2, it is possible to get beyond d = o(n 2/7 ).However it is not sufficient to reach d = n 1/2−o (1) .In this paper, we handle Z H directly, and prove the normality of the number of triangles for all d = O(n 1/2 ) where d → ∞.
We also computed the variance of Z H when H is a fixed strictly balanced graph.Surprisingly, although the variance seemingly carries less information than the limiting distribution and thus computing it should be easier than determining the limiting distribution, we are not able to determine the variance of the number of triangles for d up to n 1/2 .In fact, we can only compute the variance for d = o(n 2/5 ).Note that the limiting distribution does not imply the variance, as it is not sensitive to a lottery effect (events affecting Z H that occur with a tiny probability), whereas the variance is, although we do not expect such a lottery effect for the variance either.Another surprising discovery is that the number of triangles seems to behave more like the sum of a set of independent variables in G(n, d) than in G(n, p), whereas the intuition is the other way around.Let X ijk be the indicator variable that the three vertices i, j, k induce a triangle.Then the number of triangles is X ijk where the sum is over all 3-subsets of [n].In G(n, p), X ijk is independent of all but those X uvw such that |{i, j, k} ∩ {u, v, w}| = 2.In G(n, d), due to the dependency between edges, all these indicator variables are correlated.However, surprising cancellations of leading terms appear in the calculations for the variance of the number of triangles (see Section 4.2 for details).The variance of the number of triangles turns out smaller in G(n, d) than in G(n, d/n).
One of the challenges in computing the moments of the number of triangles is to bound the number of k-tuples of triangles where k ≈ d 3/2 , such that these k triangles induce a large number of "holes" (see Definition 16 in Section 5.2).The bound and the arguments in this paper do not easily extend to other strictly balanced graphs in general.Extending the distributional result for the number of triangles to other strictly balanced graphs requires a smarter treatment for the holes.

Improved subgraph probabilities
was first given by McKay [14,15], which immediately applies to give an asymptotic estimate of P(H ⊆ G(n, d)) when H is not too large.This result was recently extended by Ohapkin and the author [8] to more general degree sequences, with the same order of the error term O(∆(d)/n) as in [8] One of the main results of this paper is an estimate of the above conditional probability with a relative error ∆ 5 n/M 3 (See Theorem 6).Due to the technical statement of the theorem, we start our discussion from a special and simpler case where d = (d, . . ., d) and H 2 = ∅.Given graph H and u ∈ [n], let N H (u) denote the set of vertices that are adjacent to u in H.The theorem below gives an approximation of P(uv ∈ G(n, d) | H + ) with a less sharp error compared to Theorem 6 below.However, it is sufficient for studying Z H in G(n, d) when H is not too big. where Remark 3. By the definition of φ H (uv) it is immediate that if the maximum degree of and this bound is sufficiently accurate in many applications.Given H, φ H (uv) can be easily computed by examining the neighbourhood of u and v in H.In Figure 1 whereas by symmetry, we know that P(uv ∈ G(n, d)) = d/(n − 1).Hence the estimate from the theorem is accurate up to a relative error O(d 2 /n 2 ), as it is supposed to.
The following corollary on the upper bound of P uv ∈ G(n, d) | H + will be useful in the study of the distribution of the number of triangles.The proof of the corollary is given in Section 5.1.
Theorem 2 is a special and less precise version of the following more general result.Given d,

Proof of Theorem 2
We prove that Theorem 2 follows as a corollary of Theorem 6. Apply Theorem 6 with M = dn, H 1 = H and H 2 = ∅, and note that , and thus, By letting φH = φH,∅ and using the approximation of M 2 / M above, it is straightforward to find that φH (uv Theorem 2 follows by noting further that

Expectation and variance of strictly balanced subgraphs
Let H be a fixed graph.Let t = |V (H)| and h = |H|.
Let Z H denote the number of subgraphs of G(n, d) that are isomorphic to H; each such subgraph is called a copy of H. Let µ H = EZ H , and See Example 10 below for values of ρ H where H is a cycle or a clique.Given a real number x and a nonnegative integer k, let (x Let aut(H) denote the size of the automorphism group of H. Theorem 9. Let H be a fixed graph with t vertices and h edges.Then, the expectation of Z H is and A H and B H are constants depending only on H. Suppose further that H is strictly balanced and Then, The assumptions of Theorem 9 are satisfied when d −1 = o(n) and d +2 = o(n 2 ).In particular, for H = K 3 , the assumptions of Theorem 9 are satisfied when d = o(n 2/5 ). ( for every s−1 2 < j ≤ s 2 .The assumptions of Theorem 9 are equivalent to 1) , which reduce to d n 1−2t/(t 2 −t+4) .(Trees) Theorem 9 does not cover trees, as d h−1 = o(n h−t+1 ) cannot be satisfied.Indeed the variance of Z H cannot be of order µ H when H is a tree.Consider H = P 3 to be a path of length three.Then Z H = d(d − 1) 2 n − 6Z C 3 , and therefore σ 2 We will prove Theorem 6 in Section 3. The variance of Z H for strictly balanced H will be estimated in Section 4. Finally, the limiting normal distribution of the number of triangles will be proved in Section 5.The proof for the case where

Proof of Theorem 6
The proof is obtained by expressing by a function involving such conditional probabilities for other pairs u v .Applying Theorem 1 for pairs u v yields a new estimate for with improved error.By repeatedly applying this argument it is possible to further improve the relative error and to relax conditions on H 1 and H 2 .However, the expression of the conditional probability would become more complicated after each iteration.We did not attempt this in the paper.
Let G be the class of graphs Let f (G) be the number of forward switchings that can be applied to G. The number of ways to choose (x, y) such that xy ∈ G \ H 1 is M .Among these, the number of choices where x ∈ {u, v} is d u + d v , and there are the same number of choices where y ∈ {u, v}.The number of choices where {x, y} = {u, v} is 2. Thus, by inclusion-exclusion, the number of choices for (x, y) satisfying (a) is To bound f (G) we will subtract the number of choices for (x, y) satisfying (a) but not (b).
Let X u be the number of choices of (x, y) satisfying (a) where ux is an edge in G ∪ H 2 , and let X v be the number of choices of (x, y) satisfying (a) where vy is an edge in G ∪ H 2 .Let X uv be the number of choices of (x, y) satisfying (a) where both ux and vy are edges in G ∪ H 2 and xy ∈ G \ H 1 .Then, By the claim, Next, we estimate b(G ), the number of backward switchings that can be applied to G .To perform a backward switching, we choose x and y such that xu ∈ G \ H 1 and yv ∈ G \ H 1 and xy / ∈ G ∪ H 2 .Then replace ux, yv by uv and xy.The number of ways to choose (x, y) By the claim and noting that ∆ Now we prove Claims 12 and 13.
Proof of Claim 12. First we estimate EX u .Let X u,1 be the number of (x, y) such that ux ∈ H 1 ∪ H 2 , xy ∈ G \ H 1 and y / ∈ {u, v}, X u,2 be the number of (x, y) such that ux ∈ G \ H 1 and xy ∈ G \ H 1 and y = u, and X u,3 be the number of (x, y) where X is the number of (x, y) Thus, On the other hand, Again by Theorem 1, Finally, by Theorem 1 Combining all together, we have as ∆ H 1 ≤ ∆ and ∆ H 2 = O(∆) by assumption.By symmetry, Finally ).There are at most O(∆ 2 ) such pairs of (x, y), as ∆ H 2 = O(∆).Thus, By Theorem 1, since |W| = O(∆n).Similarly, where the summation is over all pairs (x, y) where and , where the sum is over all pairs (x, y) such that y It follows now that With a similar but simpler argument, we have 4

Expectation
Given a graph H, let Let J be a copy of H in K n , and let By Theorem 2, where where aut(H) denotes the size of the automorphism group of H. Hence, Example 14.Let H = C , a cycle of length ≥ 3.By Theorem 2, where In particular,

Variance of Z C 3
In this section, we calculate σ 2 C 3 in detail.In the next section, we will briefly sketch how to extend the argument for C 3 to other strictly balanced graphs.Let N = n 3 , and let H 1 , . . ., H N be an enumeration of all copies of triangles in K n .Let X i = 1 {H i ⊆G(n,d)} .Then Z C 3 = N i=1 X i .Moreover, EX i = λ for every i where λ = λ C 3 has been estimated in (8).Hence, We split the above sum into four parts according to how H i and H j intersect.
(a) H i and H j are vertex disjoint.For such pairs (i, j), by Theorem 2 and (2), Thus, The number of vertex disjoint pairs (H i , H j ) is n (b) H i and H j share exactly one vertex.For such pairs, Thus, The number of pairs (H i , H j ) sharing exactly one vertex is n 3 3 n−3 2 = (n) 5 /4.Thus, the contribution to (9) (c) H i and H j share exactly two vertices.For such pairs, Thus, The number of such pairs (H i , H j ) is n 3 3(n − 3) = (n) 4 /2.Thus, the contribution to (9) from part (c) is Thus, There are (n) 3 /6 pairs (H i , H j ) where H i = H j .Thus, the contribution to (9) from part (d) is By ( 26)-( 12), the total contribution to (9) from parts (a)-(c) is Combining with (13) and by (9) we have Since d = o(n 2/5 ), we have It follows now that

Variance of Z H : proof of Theorem 9
Recall that and η H (j) is positive for every 1 ≤ j ≤ h − 1 as H is strictly balanced.
Recall λ H and µ H from ( 6) and (7).Let N = (n)t aut(H) , and let H 1 , . . ., H N be an enumeration of all copies of H in K n .Let X i = 1 {H i ⊆G(n,d)} .Then, Z H = N i=1 X i .Moreover, EX i = λ for every i where λ = λ H . Hence, Similarly to the case H = C 3 , we split the above sum into four parts according to the intersection of H i and H j .We will give only upper bounds for the contributions from the first three parts, and estimate asymptotically the contribution from the last part.Under the hypotheses of the theorem, we verify that the contribution from the last part dominates.The calculations are similar to the case where H = C 3 and thus we only briefly sketch the proof.
(a) H i and H j are vertex disjoint.There are O(n 2t ) such pairs.For each such pair, Hence the total contribution to (14) (b) H i and H j are edge disjoint but share at least one vertex.There are O(n 2t−1 ) such pairs.For each such pair, by Theorem 2 and (3), Thus, and the total contribution to (14) (c) H i and H j share x ≥ 2 vertices and 1 ≤ y ≤ h − 1 edges.There are O(n 2t−x ) such pairs.For each such pair, we know x ≥ t(y/h + ρ H (y)) by definition of ρ H . Thus, The total contribution to ( 14) from part (c) is ).
(d) H i = H j .The total contribution to ( 14) from this part is By the hypotheses of the theorem, the total contributions to (14) from parts (a)-(c) are o(µ H ), and the assertion of the theorem follows.

Distribution of the number of triangles
We use the following result [10] by Z. Gao and Wormald to determine the limiting distribution of Z C 3 .
Theorem 15.Let s n > µ −1 n and σ n = µ n + µ 2 n s n , where 0 < µ n → ∞.Suppose that µ n = o(σ 3 n ), and a sequence (X n ) of nonnegative random variables satisfies uniformly for all integers k in the range cµ n /σ n ≤ k ≤ c µ n /σ n for some constants c > c > 0. Then,

Proof of Corollary 5
Let e 1 , . . ., e |F | be an enumeration of the edges in let u and v be the ends of e j and let d = d − d H j−1 .By ( 1) and ( 3), where the last step above holds since the errors d|H j−1 /n 3 | and |H j−1 | 2 /dn 3 are absorbed by It is easy to verify using elementary calculus that ) dn is a decreasing function of d , and thus the above product is at most .

It follows that
The assertion of the corollary follows by applying the above bound to and then comparing the resulting expression with (6).

Distribution of Z
).Then the distribution of Z follows by Theorem 15 with µ n = µ, σ n = √ µ and s n = 0. Let N = n 3 and let H 1 , . . ., H N be an enumeration of all copies of triangles in K n .Let F be the set of ordered k-tuples (j 1 , . . ., j k ) ∈ [N ] k that are pairwise distinct.Then, for any positive integer k, Definition 16.Given a k-tuple j, we say a triple of vertices {x, y, z} is a hole induced by j 1 , . . ., j k , if there exist j i 1 , j i 2 and j i 3 , such that H j i 1 contains xy, H j i 2 contains yz and H j i 3 contains xz, and none of H j i 1 , H j i 2 and H j i 3 is xyz.
We partition the summation into the following two parts.
We will prove the following.
(j 1 ,...,j k )∈F 2 Now Theorem 11 follows by the above two lemmas and Theorem 15.It only remains to prove Lemmas 17 and 18.
Proof of Lemma 17.We say H j i hits v if v is incident with an edge in H j i .Given a k-tuple H j 1 , . . ., H j k , let h(v) be the number of H j which hit v. Let h j be the number of vertices v with h(v) = j.Then, given any (j 1 , . . ., j k ) ∈ F 1 , the number of vertices in H ⊕ = ∪ k i=1 H i is equal to vk − j≥2 (j − 1)h j and the number of edges in H ⊕ is 3k.
Let B be the set of (j 1 , . . ., j k ) ∈ [N ] k satisfying the following property.
We further partition F 1 into two parts: Fix an arbitrary (j 1 , . . ., j k ) ∈ F 1 \ B. Let e 1 , . . ., e 3k be an enumeration of the edges in , where e 3 −2 , e 3 −1 , e 3 is the set of edges in H j .Let F i = ∪ j<i e j .By ( 1) and ( 3), for every u.Hence, by Theorem 2 (with where the error O((h 2 + h 3 )/d) accounts for the case that some H j lands on a vertex which has been occupied by some H j i where i < , and the last step of asymptotic relation above holds as On the other hand, by Corollary 5, for any (j 1 , . . ., j k ) ∈ F 1 ∩ B, we have and again by Claim 19 we have Now Lemma 17 follows by (17) and (19).Finally, we prove Claim 19.First, we prove For each j ≥ 1 let C j (i) be the set of k-tuples with There are exactly i ways to choose them.Then, we choose . The number of ways to perform a switching is at least i(n − 3k) j−1 .On the other hand, the number of inverse switchings is at most (k) j .Hence, as k = O(d 3/2 ), It follows that the number of k-tuples where Similarly, the number of k-tuples where . This confirms (20).Next, we prove Let F 1 ⊆ [N ] k be the set of (j 1 , . . ., j k ) where there exists j u < j v such that H ju and H jv share at least an edge.Then, ).This completes the proof for Claim 19.
Proof of Lemma 18.Given j = (j 1 , . . ., j k ) ∈ F 2 , let I j (j) be the set of i where H j i intersects exactly j edges with ∪ <i H j , for j ∈ {1, 2, 3}.By the definition of for any j ∈ F 2 .We will consider a set of parameters for j and count elements in F 2 according to these parameters.The first three parameters are Let u i , v i , w i be the three vertices occupied by the triangle H j i .We say that z i , z ∈ {u, v, w}, creates a collision, if z i has been occupied by some triangle H jc , c < i. H j i can create at most 3 collisions.Suppose i ∈ I 1 (j) and u i v i is an edge that has been occupied by some triangle H jc , c < i, then immediately u i and v i each creates a collision.These collisions are called inherent.Suppose i ∈ I 2 (j) then H j i creates 3 collisions all of which are called inherent.All other collisions are called noninherent.Let t denote the number of noninherent collisions.
Finally, let F 2 (i, j, , t) be the set of j satisfying the set of parameters; Fix j ∈ F 2 .We show that By Corollary 5, besides the relative error O(1/n + k/dn + d 2 /n 2 ), if i / ∈ (I 1 (j) ∪ I 2 (j) ∪ I 3 (j)) then the above conditional probability is at most λ; if i ∈ I 1 (j) then the conditional probability is at most (d/n) 2 ; if i ∈ I 2 (j) then the conditional probability is at most d/n; and if i ∈ I 3 (j) then the conditional probability is 1.Multiplying them together yields the main term in (22).There are O(k) terms in the product, and multiply the relative errors in each term gives the error as in (22).As k = O(d 3/2 ) and d = o( √ n) the error in ( 22) is o(1).Next, we prove that for some absolute constant C > 0: where There are at most k i+j+ /i!j! !ways to fix I 1 for I 1 (j), I 2 for I 2 (j), and I 3 for I 3 (j).For every h ∈ I 1 , there are at most 3k ways to choose the edge in H j h which intersect with ∪ c<h H jc , and then at most n ways to choose the other vertex in H j h .For every h ∈ I 2 , there are at most 3k ways to choose an edge x in ∪ c<h H jc , and then at most 2d ways to choose another edge incident with x in ∪ c<h H jc .The upper bound 2d follows as we may assume that every vertex is incident with at most d edges of ∪ k i=1 H j i -otherwise, P(∪ k i=1 H j i ⊆ G(n, d)) = 0. We claim the following bound on the number of holes.
Claim 20.The number of holes in F 2 (i, j, , t) is at most X.
Proof of Claim 20.First we prove that any graph with x edges has at most 3x 3/2 triangles.Let t 1 , . . .t n be the degree sequence of the graph, and we call a vertex big if its degree is at least √ x and small otherwise.Then the number of big vertices is at most 2x/ √ x = 2 √ x.A triangle in the graph either uses only big vertices, or occupies a small vertex.Hence, the number of triangles in the graph is at most where the maximum of the sum above appears when all non-zero degrees of small vertices are equal to √ x. Now, we bound the holes given parameters i, j and t.Let H = ∪ k h=1 H j h and we bound the largest possible number of holes that H may contain.If h ∈ I 1 ∪ I 2 then colour all three edges in H j h red.Then the number of red edges is at most 3(i + j).Let T 1 be the number of holes where all their three edges are red, and let T 2 be the number of other holes.Immediately, T 1 ≤ 3(i + 2j) 3/2 ≤ C(i 3/2 + j 3/2 ) and T 2 ≤ Ct 3/2 .The claim follows.
First consider F 2 (i, j, , t) for t ≥ log n • k 2 /n.By the above claim, there are at most X ways to fix all j h for h ∈ I 3 .Finally, there are at most ((n) 3 /6) k−i−j− ways to fix (j i ) i / ∈(I 1 ∪I 2 ∪I 3 ) .There are at most 3k t ways to choose the set of noninherent collisions, and each noninherent collision contributes an additional Ck/n factor because there are at most 3k instead of n choices to choose the vertex where a noninherent collision occurs.Multiplying all these upper bounds together yields (23).
For (24), the argument is similar except that we do not take union bound over all possible vertex collisions.Instead, we use the fact that X ≤ Y = C(i 3 + j 3 + (log n • k 2 /n) 3/2 ) when t < log n • k 2 /n.Thus the number of ways to choose j h where h ∈ I 3 is at most Y for all j ∈ F 2 (i, j, ), and (24) follows.

Distribution of Z C 3 for d = Θ( √ n)
Again let N = n 3 and let H 1 , . . ., H N be an enumeration of all copies of triangles in K n .Let F be the set of ordered k-tuples (j 1 , . . ., j k ) ∈ [N ] k that are pairwise distinct.We want to estimate the following sum for k = O(d 3/2 ).
We partition the summation into parts F 1 and F 2 = F \ F 1 , where F 1 ⊆ F is the set of j satisfying one the following: (b) there exists H j i which intersects at least two edges with ∪ <i H j .
(c) there are more than log n i's such that H j i intersects exactly one edge with ∪ <i H j .
(d) there exists an edge contained in at least three triangles.
(e) there is some H j i such that at least two of its edges are each contained in some other triangles.
We will prove the following.Lemma 21.
Proof of Lemma 22.The structure of the union of the k triangles H j 1 , . . ., H j k are simple, for j ∈ F 2 .Except for at most log n pairs of triangles, each pair sharing exactly one edge, all the other triangles are edge disjoint.Moreover, every vertex is contained in at most log 2 n triangles.However, as we will show, there are Ω(d) vertices v with h(v) ≥ 2. This means that the joint probability of a set of k edge disjoint triangles will not be asymptotic to λ k any more, which was the case in the proof of Lemma 17.
We will partition F 2 according to two parameters.An edge is called a double edge, if it is contained in two triangles.For j ∈ F 2 , the number of double edges is exactly |I 1 (j)|.Recall that h i denote the number of vertices v with h(v) = i.Modify B to state the set of j where Next, fix j ∈ F 0 2 (i).We show that The proof is almost the same as for (16).The accumulative error, except for that from φ . The only two differences are listed below: (a) The term −2|F | in φ F (uv) in ( 3) is no longer negligible.Its accumulative contribution after taking the product of the conditional probabilities is (b) For each v where h(v) = 2, the joint probability of the two triangles hitting v cannot be approximated by λ 2 with negligible error because h 2 = Θ(d).Their accumulative contribution after taking the product of the conditional probabilities becomes It only remains to prove Claim 23.
Proof of Claim 23.The proof is basically the same as the proof for Claim 19, except that in the switching we avoid switch away the double edges -there are at most log n of them, and we estimate the number of switchings more carefully for h 2 .The argument for bounds on h j , j ≥ 3 is much simpler and we skip the details.Now consider h 2 , and assume that h 3 + h 4 = o(d) and h j = 0 for all j ≥ 5. Let C(i, j) be the set of j ∈ F 2 with i double edges with h 2 = j.Let C(i) = ∪ j≥0 C(i, j).Define a switching from C(i, j) to C(i, j − 1) as follows.Choose v and i 1 < i 2 such that h(v) = 2, v is not incident with a double edge, and H i 1 and H i 2 both hit v.There are exactly j − O(i) ways to choose them.Then, we choose a vertex u such that h(u) = 0. Modify H i 2 so that v is replaced by u.The resulting k-tuple is in C(i, j − 1).The number of ways to perform a switching is (j − O(i))(n − 3k + O( j h j )).On the other hand, the number of inverse switchings Proof of Lemma 21.Let I j (j) be as defined before.Let F 1 1 be the set of j ∈ F 1 where j induces a hole.With almost the same proof as in Lemma 18, we consider t: the number of noninherent collisions.For t ≥ log n • k 2 /n, we get (25), and thus (26).Note that the change of the range of d from o( √ n) to O( √ n) does not affect the analysis, as t ≥ log n • k 2 /n and thus the term (Ck 2 /tn) t dominates the rate the whole product vanishes.For t < log n • k 2 /n, we get (27).Summing over all (i, j, ) where ≥ 1 yields o(µ k ).
We use the bound (24) (with = 0) for |F 2 1 (i, j)|: k−i−j (3kn) i (6kd) j .Now we consider the latter case.If H ju has two edges each contained in some other triangles -call them H j and H jr .Obviously = r since otherwise H ju would be the same as H j , contradicting with them being distinct.There are two sub-cases: (a) < i and r > i; (b) r > > i.In either case, there are at most i 3 ways to choose u, and r.Then, similar to the above, summing over j in the second case yields Combining the two cases we have j∈F 5 1 P ∪ k i=1 H j i ⊆ G(n, d) = o(µ k ), completing the proof of the lemma.

Theorem 2 .
Let H be a graph on [n] where d H i ≤ d for every i.Suppose that d = o(n), dn − |H| = Ω(dn), and that uv / ∈ H. Let d = d − d H where d = (d, . . ., d).Then,

Figure 2 :
Figure 2: Forward switching 2 and the case where d = Θ( √ n) is treated in Section 5.3.The proof for Corollary 5 is presented in Section 5.1.
be the set of graphs containing edge uv and let G − = G \ G + .We will estimate |G + |/|G − | by defining switchings that relate graphs in G + to graphs in G − and counting the number of switchings that can be applied to a graph G ∈ G + , and the number of switchings that can produce a graph G ∈ G − .Define the switching as follows.Given G ∈ G + , a forward switching specifies an ordered pair of vertices (x, y) such that (a) xy in G \ H 1 and u, v, x and y are all vertex distinct; (b) none of ux and vy is in G ∪ H 2 .Then the forward switching replaces edges uv and xy by ux and vy.The resulting graph G is obviously in G − .The inverse operation which converts G to G is called a backward switching.See Figure 2 for an illustration.
Let d = (d 1 , . . ., d n ) be a degree sequence and let G(n, d) denote a uniformly random graph with degree sequence d.Let H 1 and H 2 be two disjoint graphs on [n], i.e.E(H 1 Let ∆ H denote the maximum degree of H. Given two degree sequences d and d , we say d d if d i ≤ d i for every 1 ≤ i ≤ n.Let d be such that ∆ 2 = o(M ).Let H 1 and H 2 be two disjoint graphs on [n] where d H 1 d.Suppose that ∆ H 2 = O(∆) and M − 2|H 1 | = Ω(M ).Suppose further that uv / ∈ H 1 ∪ H 2 .Then, we give a few examples of the value of φ H (uv). Edge uv is coloured red, and edges in H are coloured black.The value of φ H (uv) is given next to the edge uv.
any integer j ≥ 2. Theorem 6.Let d = (d 1 , ..., d n ) be such that M is even and ∆ 2 = o(M ), where ∆ = ∆(d).Let H 1 and H 2 be disjoint graphs with degree sequences d H 1 d and ∆ H 2 = O(∆).Let d = d − d H 1 Remark 7. To study Z H for large H, for instance, if H is a perfect matching, then the error O(|H| 2 /d 2 n 2 ) in Theorem 2 is too large, as the cumulative error becomes O(|H| 3 /d 2 n 2 ) = O(n/d 2 ) which is Ω(1) for d = O( √ n).In such cases Theorem 6 needs to be applied.
Remark 8.A result by McKay [16, Theorem 4.6] applies to find the probability P(H ⊆ G(n, d)) with a relative error d 3 /n.Theorem 6 applies to find this probability with a smaller relative error d 2 |H|/n 2 .
and Y 2 is the number of vertices x such that xu ∈ G \ H 1 and xv ∈ G \ H 1 .To obtain upper and lower bounds for Eb(G ) it is sufficient to estimate EY 1 and EY 2 .
, we bound EX uv by O(∆ 4 /M ).First we expose the neighbours of u and v in G. Next, for each x ∈ N G∪H 2 (u) and y ∈ N G∪H 2 (v), if x = y and xy / ∈ H 1 , the probability that xy ∈ G(n, d), conditional on H + 1 , H − 2 , and the presence of the exposed edges incident with u and v, is at most H and B H are constants that depend only on H.The values of A H and B H are given for H being a cycle in Example 14 below.By linearity of expectation,