One-sided sharp thresholds for homology of random flag complexes

We prove that the random flag complex has a probability regime where the probability of nonvanishing homology is asymptotically bounded away from zero and away from one. Related to this main result we also establish new bounds on a sharp threshold for the fundamental group of a random flag complex to be a free group. In doing so we show that there is an intermediate probability regime in which the random flag complex has fundamental group which is neither free nor has Kazhdan's property (T).


Introduction
One of the most well known and important phase transitions in the Erdős-Rényi random graph model G(n, p) is the phase transition for the giant component and emergence of cycles at p = 1/n first proved in [10].While sharper versions examining the behavior of random graphs in the critical window exist, to motivate the results here we state the Erdős-Rényi phase transition theorem as follows.
Theorem 1.1 ((Erdős-Rényi [10])).For G ∼ G(n, c/n) with c ∈ (0, ∞) constant, one has the following: 1.If c < 1 then with high probability G ∼ G(n, c/n) has all connected components of order O(log n) and the probability that G contains cycles is 2. If c > 1 then with high probability G ∼ G(n, c/n) has a unique giant component of order Θ(n) and the rest of the components are of order O(log n) and with high probability G has cycles.
Because there are almost always cycles above the threshold but below threshold there is a positive probability that cycles are present and a positive probability they are not, the cycle threshold in G(n, p) is described as a one-sided sharp threshold.Here we study a higher-dimensional analogue of this one-sided sharp threshold for the emergence of cycles in the random clique complex model first introduced by Kahle [13].For any graph G the clique complex of G, also call the flag complex of G, is the simplicial complex X whose faces are the cliques of G.In other words the clique complex of G is the maximal simplicial complex X so that the 1-skeleton of X, denoted X (1) , is G.The random clique complex model X(n, p) is sampled as the clique complex of the Erdős-Rényi random graph G(n, p).
Cycles in G(n, p) generalize to higher dimensions as nonvanishing homology groups in X(n, p).A short argument using classic results about inclusion of cliques in G(n, p) can be used to show that X ∼ X(n, c/ d √ n) for c > d √ d + 1 with high probability has nonvanishing dth homology group (for any choice of coefficients).The details of such an argument can be found in [14].
On the other hand, a result of [13] establishes that if p = n −1/d+ε for any fixed ε > 0, then with high probability X ∼ X(n, p) has vanishing dth homology group.As the main result here we improve on this lower bound by showing a probability regime where the probability of that the dth homology group vanishes is bounded away from zero and away from one.
The Poisson distribution comes from counting particular subcomplexes in X ∼ X(n, c/ d √ n).
The boundary of the (d + 1)-dimensional cross-polytope is the clique complex of the complete (d + 1)-partite graph with two vertices in each part, and standard results about random graphs tell us that X ∼ X(n, c/ d √ n) for c constant will contain Poisson distributed copies of the boundary of the (d + 1)-dimensional cross-polytope.For c a small enough constant we show that these crosspolytope boundaries are the only subcomplexes of X(n, c/ d √ n) that can carry homology in degree d.
In fact we actually prove something stronger.The proof of Theorem 1.2 builds on a result of Malen [17] about d-collapsibility of random clique complexes.We show that in the studied regime X ∼ X(n, c/ d √ n) asymptotically almost surely can be collapsed to a complex whose pure d-dimensional part is a face-disjoint union of (d + 1)-cross-polytope boundaries.We explain this in more detail in Section 2.
Because we show a collapsibility result, the proof of Theorem 1.2 implies that for c sufficiently small X ∼ X(n, c/ √ n) asymptotically almost surely has free fundamental group.This improves on a result of Costa, Farber, and Horak [8] that X(n, n −α ) has free fundamental group if α > 1/2, but nonfree fundamental group if 1/3 < α < 1/2.Here the assumption of α > 1/3 comes from the threshold for simply connectivity of X(n, p), due to [8] and [13].In Section 6 we adapt some of the methods for the proof of Theorem 1.2 combined with results of [8] to also improve on the upper bound for the threshold for the fundamental group to be nonfree.Our result regarding the fundamental group is the following theorem: Theorem 1.3.For c < 1 64 and p < c/ √ n, asymptotically almost surely X ∼ X(n, p) has that π 1 (X) is free.For C > √ 3, α > 1/3, and C/ √ n < p < n −α , asymptotically almost surely X ∼ X(n, p) has that π 1 (X) is not free.
To establish the upper bound in Theorem 1.3 we study "almost asphericity" of random flag complexes.This is a natural analogue of a notion previously studied in the Linial-Meshulam model by Costa and Farber [6].Theorem 1.3 together with a result of Kahle [14] implies the following theorem which settles a conjecture of Costa, Farber, and Horak that there is an intermediate regime where π 1 (X) for X ∼ X(n, p) is not free and does not have Kazhdan's property (T).
Theorem 1.4.For any fixed ε > 0 if , then with high probability X ∼ X(n, p) has that π 1 (X) is not free and does not have property (T).
We then close with some discussion about what the true sharp thresholds for the discussed properties might be.

Background
A series of four papers [1][2][3]16] study the generalization of the Erdős-Rényi phase transition to the Linial-Meshulam model.Recall that for d ≥ 1 fixed, one samples Y ∼ Y d (n, p) in the Linial-Meshulam model by starting with the complete (d − 1)-complex on n vertices and including each d-dimensional face independently with probability p; the d = 1 case is then exactly the Erdős-Rényi random graph model.For d ≥ 2, there are (at least) two ways to generalize the existence of cycles in a graph to an analogous property in a d-complex: non-d-collapsibility and the nonvanishing of the dth homology group.
A face in a simplicial complex is said to be free if it is properly contained in only one other face.The removal of a free face and its unique coface is called an elementary collapse, and a complex is d-collapsible provided that there exists a sequence of elementary collapses which eliminates all faces of dimension at least d.For a graph, a free vertex is simply a leaf and so a graph is acyclic if and only if it is 1-collapsible.On the other hand an elementary collapse is a homotopy equivalence, so a d-collapsible complex will have no homology in degree d or larger, however it is well known that the reverse implication holds only for d = 1.
For Y d (n, p), d-collapsibility and nonvanishing of the dth homology group have different thresholds, the former is established by [3] and [1] and the latter by [2] and [16].For each value of d both thresholds are in the regime p = c/n.The critical constants γ d and c d for each thresholds are given explicitly by solutions to certain transcendental equations with γ d being of order log d for d → ∞ and c d being asymptotically very slightly smaller than d + 1.
Both of these thresholds in Y d (n, p) are one-sided sharp thresholds.For p = c/n, one can show that the expected number of copies of the boundary of the )simplex boundary is always a nontrivial homology class and an obstruction to d-collapsiblity.Thus the results of [1][2][3]16] can be summarized as follows: [1], but the dth homology group with real coefficients is generated by embedded copies of ∂∆ d+1 , in particular β d (Y ; R) is asymptotically Poisson distributed with mean c d+2 /(d + 2)! [16].
) has nonvanishing dth homology group for any choice of coefficients with high probablitiy [2].
The key to the arguments which establish both thresholds is the local behavior of Y ∼ Y d (n, p) at a (d − 1)-dimensional face and the possibility of large cores, complexes which are obstructions to d-collapsibility.It seems plausible that the "local behavior at a (d − 1)-dimensional face" part of the arguments for d-collapsibility and vanishing of dth homology could be adapted to work in the random flag complex setting.The larger challenge though is to adapt an argument counting d-dimensional cores in X ∼ X(n, p).The Linial-Meshulam model Y d (n, p) produces complexes that are d-dimensional and d-complexes are easier to d-collapse than complexes of larger dimension.
A d-dimensional complex is said to be a core provided that each (d − 1)-dimensional face is contained in at least two d-dimensional faces, so a d-complex is d-collapsible if and only if it does not contain a d-dimensional core.This means that a greedy approach to elementary collapses will tell us whether or not a given d-complex is d-collapsible.For d-collapsibility of a given k-complex with k > d the situation becomes more complicated.For example any simplex is collapsible in the usual sense to a vertex, so in particular it is d-collapsible for any d, however if the collapses are chosen in the wrong way it's possible to get stuck.An explicit example of this phenomenon is shown [4] where Benedetti and Lutz show a way to collapse the 7-simplex to a triangulation of the dunce hat on 8 vertices, which is not 2-collapsible.In Section 3 we describe how we work around this potential possibility of getting stuck to prove Theorem 1.2.
A paper of Malen [17] studies d-collapsibility in X(n, p).His main result shows that for α > 1/d, with high probability X ∼ X(n, n −α ) is d-collapsible.This result was applied recently by Dochtermann and the present author [9] to establish results on random coedge ideals.Some of the background for that article motivates the questions considered here, as the p = n 1/d regime for d an integer are related to boundary cases for theorems proved in [9].In [9] we consider a conjecture of Erman and Yang [11] about normal distribution of Betti numbers of random coedge ideals.Random coedge ideals correspond in a natural way to random flag complexes and in [11] Erman and Yang prove a normal distribution of the first row of the Betti table of the random coedge ideal for G ∼ G(n, c/n) and c < 1, i.e. for p close to, but below, the Erdős-Rényi phase transition.A challenge to generalizing their conjecture to other rows was that there was not an established one-sided sharp phase transition for homology in dimensions larger than one for X ∼ X(n, p).
As discussed in the introduction, the proof of Theorem 1.2 proceeds by proving something stronger related to d-collapsibility.Toward formally stating our d-collapsibility result, we recall that the pure d-dimensional part of a simplicial complex X is the subcomplex of X whose facets are the d-dimensional faces of X, and we say that a simplicial complex X is almost d-collapsible if there is a sequence of elementary collapses from X to a complex Y so that Y is at most d-dimensional and the pure d-dimensional part of Y is a face disjoint union of copies of the (d + 1)-dimensional cross-polytope boundary.For convenience, we let ♦ d denote the (d + 1)-dimensional cross-polytope boundary.Because we are dealing with flag complexes throughout, we typically won't distinguish between ♦ d as a d-complex and its 1-skeleton as a graph.The stronger version of Theorem 1.2 that we prove is the following.
If a complex is almost d-collapsible then its dth homology group is the free abelian group with one generator for each remaining copy of ♦ d after the collapsing sequence erases everything else of dimension d and higher.So then the Poisson distribution part of Theorem 1.2 comes from enumeration of copies of ♦ d that are not collapsed away by collapsing X.This part comes from classic random graph theory.
Recall that the essential density of a graph H is and that a graph is strictly balanced provided the essential density is attained by the graph itself and not by any proper subgraphs.A classic result of Bollobás [5] shows that for any finite strictly balanced graph H, the number of copies of H embedded in G(n, c/n 1/ρ(H) ) for c fixed is asymptotically Poisson distributed with mean: For more background on embedding subgraphs into random graphs see for example [ We have to be a bit careful though as not every copy of ♦ d necessarily survives the collapsing process.For example a non-induced copy of ♦ d could potentially be collapsed away, however in proving Theorem 1.2 from Theorem 2.1 we show that copies of ♦ d that do not contribute to dth homology are negligible in the limit.
Remark 2.2.Theorem 2.1 and a simple first moment argument enumerating copies of ♦ d in an Erdős-Rényi random graph imply that if p = o(n −1/d ) then X ∼ X(n, p) is asymptotically almost surely d-collapsible.This strengthens the result of Malen [17] that α > 1/d implies that X ∼ X(n, n −α ) is asymptotically almost surely d-collapsible and an earlier result of Kahle [13] that α > 1/d implies X ∼ (n, n −α ) asymptotically almost surely has no homology above dimension (d − 1).

Overview of the proof
The approach to proving Theorem 2.1 is to count obstructions to d-collapsibility.Typically a ddimensional core is defined to be a d-dimensional complex so that every (d − 1)-dimensional face belongs to at least two d-dimensional faces.Here though we drop the "d-dimensional complex" assumption.We say that a simplicial complex Z is a d-core provided that every (d − 1)-dimensional face of Z belongs to at least two d-dimensional faces.Note that usage of "d-core" here differs from the definition readers may be familiar with from hypergraph literature.
Naively we might try to show that the only d-cores are the embedded copies of ♦ d and that this implies that the complex collapses so that the only d-dimensional faces left are those in copies of ♦ d .This will not work however because, unlike Y d (n, c/n), X(n, c/ d √ n) in general has dimension larger than d.In particular for d ≥ 2 the expected number of (d + 1)-dimensional faces in And the boundary of a (d + 1)-simplex is a d-core.
To describe precisely how we will collapse X(n, c/ d √ n) we first introduce some terminology and notation that is fairly standard.For a d-complex Y , the dual graph of Y , denoted G(Y ), is defined to be the graph whose vertices are the d-dimensional faces of Y with edges between two vertices if and only if the corresponding faces meet at a (d − 1)-dimensional face.A d-dimensional strongly connected complex is a d-complex Y so that G(Y ) is connected.We will collapse X ∼ X(n, c/ d √ n) by collapsing each of it's d-dimensional strongly connected components separately, and showing that these collapsing moves may be applied in a coherent way to collapse all the faces of dimension d from X.This is similar to the approach taken in [17].The first step is a slight strengthening of Lemma 3.3 of [17], given here with proof as Lemma 3.2.
In order to state this lemma we introduce a definition and some notation.
Definition 3.1.For a simplicial complex Y the k-flag closure of Y denoted flag k (Y ) is the maximal simplicial complex whose k-skeleton is the same as the k-skelelton of Y .In otherwords flag k (Y ) is the simplicial complex obtained from Y by adding the requirement that the simplex σ is included if its k-skeleton belongs to Y .We say that a complex Y is a k-flag complex if Y = flag k (Y ).Outside of this section and Section 4 we will most often deal with the usual flag closure flag 1 (Y ), so we will use the notation Y for flag 1 (Y ).
Lemma 3.2.Let X be a clique complex and S 1 and S 2 be strongly connected components of X (d) .
Then dim(flag 1) , which is just ∂τ , belongs to S 1 and to S 2 .But the intersection of S 1 and S 2 is at most (d − 2)-dimensional as the strongly connected components of X (d) partition both d-faces and nonmaximal (d − 1)-dimensional faces.
Next suppose that σ is a (d − 1)-dimensional face in flag d−1 (S 1 ) and flag d−1 (S 2 ) with σ ⊆ τ 1 ∈ flag d−1 (S 1 ) and σ ⊆ τ 2 ∈ flag d−1 (S 2 ), τ 1 , τ 2 both d-dimensional.Then the (d − 1)-skeleton of τ 1 belongs to S 1 and the (d − 1)-skeleton of τ 2 belongs to S 2 .Moreover as X is a flag complex τ 1 belongs to S 1 and τ 2 belongs to S 2 .But then we can move from τ 1 to τ 2 in X (d) by passing through σ.This contradicts maximality of S 1 and S 2 .Lemma 3.2 easily implies the following.Lemma 3.3.Let X be a flag complex with S 1 , ..., S m the strongly connected components of X (d) .Having reduced the problem to collapsing each d-dimensional strongly connected component separately, we have two lemmas that will constitute the bulk of the work to prove Theorem 2.1.
√ n) has no strongly connected d-dimensional subcomplex on more than C log n edges for C large enough.
where the link of each (d − 2)-dimensional face is an induced subgraph of H (1) and H (1) has essential density Recall that the link of a face σ in a simplicial complex H is the subcomplex of H given by lk Of these two lemmas, Lemma 3.5 is the easier to prove, so we prove it in Section 4 and then prove Lemma 3.4 in Section 5. First we show how these two lemmas imply Theorem 2.1 and then how Theorem 2.1 implies Theorem 1.2. .
By taking a sum over 1 ≤ v ≤ 3C log n we have the probability that X ∼ X(n, c/ d √ n) contains a strongly connected component on at most 3C log n vertices with density larger than (d + ε) is at most

Thus with high probability each
is on at most 2C log n vertices and has essential density less than d + 1 4+4d .Lastly, in order to apply Lemma 3.5 we check that necessary link condition holds for each strongly connected connected component of X (d) ; we will see that this holds simply because X is a flag complex rather than for any reason having to do with the randomness.
As X is a flag complex, if S is a strongly connected component of X (d) then for any (d − 2)-face σ of S we just have to verify that its link within S is an induced subgraph of X. Suppose that v 1 , v 2 belong to lk S (σ) and that {v 1 , v 2 } is an edge of X.Then {v 1 }∪ σ and {v 2 }∪ σ both belong to S and the 1-skeleton of {v 1 , v 2 } ∪ σ belongs to X. Therefore {v 1 , v 2 } ∪ σ belongs to X (d) and in particular belongs to some strongly connected component of X (d) .As the strongly connected components also partition the non-maximal (d − 1)-faces, and at least two (d − 1)-faces of {v 1 , v 2 } ∪ σ belong to S, {v 1 , v 2 } ∪ σ also belongs to S and so {v 1 , v 2 } is an edge of lk S (σ).
Thus by Lemma 3.
If X is almost d-collapsible then after collapsing, the pure d-dimensional part of the remaining complex is a face disjoint union of copies of ♦ d .Thus β d (X; K) at most the number of copies of ♦ d in X.
Next we give a lower bound that β d (X; K) related to the number of copies of ♦ d .Each ♦ d is a triangulation of S d , so each is a d-cycle, so it suffices to bound the probability that each is a d-boundary.If K is a set of 2d + 2 vertices on which there is a copy of ♦ d in X then a sufficient condition for that copy of ♦ d to not be a d-boundary is that one of the d-faces of ♦ d is maximal in X.That is one of the d-faces of the flag complex induced on K is not contained in a (d+1)-dimensional face.
If a copy of ♦ d contains a d-face which is not maximal then either that copy of ♦ d is not induced or there exists a vertex v outside the 2d + 2 vertices of ♦ d that is adjacent exactly to the (d + 1)vertices of a d-face of ♦ d .A noninduced copy of ♦ d is a graph H with 2d + 2 vertices and at least 2d(d + 1) + 1 edges, so the expected number of copies of On the other hand the expected number of copies of So asymptotically β d (X; K) is equal to the number of copies of ♦ d .By the Bollobás result discussed earlier the number of copies of ♦ d in X is Poisson distributed with mean c 2d(d+1) /(2 d+1 (d+ 1)!).

Simplicity of small components
In this section we prove Lemma 3.5.For this proof and elsewhere we need a few more definitions.We have already recalled the definition of a link.We also recall that a complex is pure if all of its maximal faces are of the same dimension.For a vertex v in a complex X, if lk X (v) is (d − 1)-collapsible with collapsing sequence (σ 1 , τ 1 ), ..., (σ t , τ t ) with each σ i a free face of τ i and all σ i , τ i ∈ lk X (v), to d-collapse around v means to apply the collapsing sequence (σ 1 ∪ {v}, τ 1 ∪ {v}), ..., (σ t ∪ {v}, τ t ∪ {v}) to X.By this collapsing strategy we see that if lk X (v) is (d − 1)-collapsible and X \ {v} is d-collapsible then X is d-collapsible.Indeed we can d-collapse X around v and then v is not contained in any faces of dimension larger than (d − 1), but nothing in X \ {v} has been changed, so we can freely attempt to d-collapse X \ {v} after d-collapsing around v.
Given the assumptions of Lemma 3.5, for brevity we say that a d-complex H satisfies the ⋆condition if the link of each of its (d − 2)-faces is an induced subgraph of H.We begin with a generalization of the well known fact that ♦ d is the only non-d-collapsible flag complex on fewer than 2d + 3 vertices.Lemma 4.1.For d ≥ 2, if H is a d-complex on at most 2d+2 vertices which satisfies the ⋆-condition then either The proof of this lemma will make use of the following for the induction: Lemma 4.2.For d ≥ 3, if H is a pure d-complex that satisfies the ⋆-condition then for any vertex v of H, lk(v) is a pure (d − 1)-complex that also satisfies the ⋆-condition.Moreover, Proof.Obviously since H is pure d-dimensional, lk H (v) is pure (d − 1)-dimensional.We show that it satisfies the ⋆-condition (for faces of codimension 2, i.e. dimension d − 3).Let σ be a (d − 3)-face of lk H (v), and suppose that {u 1 , u 2 } is an edge of lk H (v) with σ ∪ {u 1 } and σ ∪ {u 2 } in lk H (v). Then u 1 and u 2 are both in the link of the (d − 2)-face σ ∪ {v}, and {u 1 , u 2 } is an edge of H so by the ⋆-condition on H, σ ∪ {v, u 1 , u 2 } is a face of H, so σ ∪ {u 1 , u 2 } belongs to lk H (v) and so lk lk H (v) (σ) is an induced subgraph of the graph of lk H (v). Now we verify that lk Then the (d−2)-skeleton of τ belongs to lk H (v). Therefore every (d−1)-face of τ ∪{v} that contains v belongs to H. Now for any σ ⊆ τ of dimension (d − 1) we have that the (d − 2)-skeleton of σ belongs to lk H (v). Thus it will suffice to show that lk H (v) cannot contain an empty (d− 1)-simplex.This will imply that σ belongs to lk H (v) and hence to H which will allow us to conclude that the (d − 1)-skeleton of τ ∪ {v} belongs to H so τ ∈ lk flag d−1 (H) (v).
By the claim and the fact that lk H (v) satisfies the ⋆-condition we have that lk H (v) cannot contain an empty (d − 1)-simplex, and so we finish the proof.
Proof of Lemma 4.1.The proof is by induction on d.The d = 2 case follows from the well known fact that the octahedron ♦ 2 is the only flag complex on fewer than 7 vertices which is not 2collapsible.Now suppose that d > 2 and X is a vertex-minimal d-complex satisfying the ⋆-condition on at most 2d + 2 vertices so that it's (d − 1)-flag closure is not d-collapsible.By minimality we may assume that X is pure d-dimensional.If X has a vertex v so that deg(v) < 2d, then lk H (v) is a pure (d − 1)-complex which also satisfies the ⋆-condition by Lemma 4.2.Thus by induction lk H (v) must have (d − 1)-collapsible (d − 2)-flag closure.Therefore by the second part of Lemma 4.2 taking the (d − 1)-flag closure of H allows us to d-collapse around v and then use minimality to d-collapse flag d−1 (H).Thus every vertex of H has degree at least 2d, in particular H has at least 2d + 1 vertices.If H has exactly 2d + 1 vertices then the minimum degree condition implies that H has a complete graph as its 1-skeleton.If H (1) is a complete graph then the ⋆condition implies that every (d − 2)-face of H has link whose 1-skeleton is complete.Moreover we can apply the second part of Lemma 4.2 inductively to conclude that if σ is a k-face of H then lk . Indeed the k = 0 case is already part of Lemma 4.2.For the inductive step we note that if dim(σ) = k then σ = τ ∪ {w} for a vertex w and τ a (k − 1)-face with lk H (τ ) pure (d − k)-dimensional that satisfies the ⋆-condition.Therefore, In particular lk flag d−1 (H) (τ ) is an ordinary flag complex for τ a (d − 3)-dimensional face.Additionally, by the ⋆-condition every vertex in lk flag d−1 (H) (τ ) has that its link is a simplex.Thus lk flag d−1 (H) (τ ) is collapsible, and thus we may d-collapse around the (d − 3)-face τ .At that point τ does not belong to any d-faces of H so we can delete it from H and apply minimality to collapse H the rest of the way.This rules out the possibility that H (1) is a complete graph.
At this point we can apply induction to say that H contains two vertices w and w ′ so that lk H (w) is a copy of ♦ d−1 and lk H (w ′ ) is a copy of ♦ d−1 on the same vertex set.From here its suffices to show that they must both be the same copy of ♦ d−1 .This follows in a fairly straightforward way from the ⋆-condition.Suppose that u and u ′ are antipodal vertices in lk H (w) = ♦ d−1 but {u, u ′ } is an edge of H. Then taking some (d − 3)-face τ in lk H (w) ∩ lk H (u) ∩ lk H (u ′ ) (which must exist since this intersection is a copy of ♦ d−2 ) we have τ ∪ {w, u}, τ ∪ {w, u ′ }, and {u, u ′ } all present in H with τ ∪ {w} of dimension d − 2 so τ ∪ {w, u, u ′ } belongs to H which means that {u, u ′ } is an edge of lk(w), but this is a contradiction.It therefore follows that the graph of lk H (w) and lk H (w ′ ) are identical and both are graphs of the same flag complex  We want to show that some vertex in lk flag d−1 (H) (u) must have degree larger than 2d in H.For contradiction suppose that every vertex in lk flag d−1 (H) (u) has degree 2d in H. Within lk flag d−1 (H) (u) each vertex has degree 2d − 2 since lk flag d−1 (H) (u) is the graph of ♦ d−1 .Thus each vertex in lk flag d−1 (H) (u) can have exactly one neighbor other than u outside lk flag d−1 (H) (u) by our assumption that all have total degree 2d in H.
Let w 1 , w 2 be two vertices in lk flag d−1 (H) (u) so that w 1 is adjacent to u 1 , w 2 is adjacent to u 2 with u 1 and u 2 outside of lk This means that for every pair of adjacent vertices w 1 and w 2 their unique neighbor outside of lk flag d−1 (H) (u) other than u is the same vertex.But since d ≥ 2, lk flag d−1 (H) (u) is a connected graph so there is some single vertex u ′ outside of lk flag d−1 (H) (u) with u = u ′ so that u ′ is adjacent to all neighbors of u.Thus we have found a copy of ♦ d in H.This copy of ♦ d is attached to the complex induced by deleting u and all vertices in lk flag d−1 (H) (u), at u ′ .So H is a wedge sum of a smaller d-complex H ′ and a copy of ♦ d .Collapsing moves in flag d−1 (H ′ ) don't affect the attached ♦ d , and by minimality flag d−1 (H ′ ) is almost d-collapsible, so flag d−1 (H) is almost d-collapsible too.This contradicts our choice of H thus each vertex of degree 2d in H is adjacent to a vertex of degree larger than 2d.
Let t ≥ 1 denote the number of vertices of H of degree larger than 2d.By the claim each vertex of degree 2d has a neighbor of degree larger than 2d so there are at least V (H) − t edges from the set of vertices of degree 2d to the set of vertices of degree larger than 2d.Thus the degree sum Thus the number of edges of X is at least On the other hand the number of edges is also at least These two values are equal when t = |V (H)| 2+2d which means that for every value of t ≥ 1, the number of edges of H is at least But this contradicts the density assumption on H as a minimal counterexample.

Enumeration of large components
Here we prove Lemma 3.4.The argument splits into two parts.We first rule out graphs of large ddimensional strongly connected components that contain i-faces of large degree for some i < (d−1), where degree of an i-dimensional face is taken to be the number of (i + 1)-dimensional faces that contain it.Then we enumerate the number of possible d-dimensional strongly connected complexes which have all i-faces having small degree, and apply a first moment argument.For the first case, subcomplexes with faces of large degree may be ruled out by examining the global structure of X ∼ X(n, c/ d √ n).To motivate this let's first consider the case that d = 2.In this case the degree of a vertex in X ∼ X(n, c/ √ n) is distributed as a binomial with n − 1 trials and success probability c √ n and so by Chernoff bound we can conclude that with high probability every vertex has degree at most (1 + ε)c √ n for any ε > 0. Thus no vertex of X can have any vertex of degree larger than (1 + ε)c √ n and so in particular X cannot contain a 2-dimensional strongly connected subcomplex whose graph has a vertex of degree larger than (1 + ε)c √ n.Now we make this precise and prove the following for general d ≥ 2.
Lemma 5.1.For X ∼ X(n, c/ d √ n) with high probability for every 1 ≤ i < d and every ε > 0 the maximum degree of an (i − 1)-dimensional face is at most Proof.Given an (i−1)-dimensional face σ the degree of σ in X conditioned on σ being included in X in the first place is distributed as a binomial random variable with n−i trials and success probability . Therefore the expected degree of σ given that σ is included in X is asymptotically Thus by Chernoff bound the probability that deg(σ) where C is a constant that depends on c and ε.Thus taking a union bound over all n i possible (i − 1)-dimensional faces we have that with high probability there is no i-dimensional face of degree larger than (1 + ε)c i n 1−i/d , and then we take a further union bound over all 1 ≤ i < d.
It follows immediately from Lemma 5.1 that for any ε > 0, X ∼ X(n, c/ d √ n) has no strongly connected d-dimensional subcomplexes for which there exists 1 ≤ i < d so that some (i − 1)dimensional face of the subcomplex has degree larger than (1 + ε)c i n 1−i/d .We will say that Y a subcomplex of X is c-bounded if the degree of every (i − 1)-dimensional face for 1 ≤ i < d is at most c i n 1−i/d .We next count the number of c-bounded strongly connected d-complexes Y with Y (1) having r edges.
Lemma 5.2.For any 0 < c < 1 and d ≥ 2, the number of graphs H on [n] with r edges so that H is the graph of a c-bounded strongly connected d-dimensional complex is at most The approach we take to prove this lemma is inspired by the proof of Theorem 4.1 of [3] where the Linial-Meshulam model is considered rather than the random flag complex model.
Proof.We consider a procedure to construct a minimal d-dimensional strongly connected complex with r edges and at most n vertices by adding d-faces one at a time.As the complex we end up with is strongly connected we may construct it by starting with a single d-face and at each step adding a d-face which contains an already existing (d − 1)-face which itself belongs to an existing d-face.We will always add our d-faces in this way, but this isn't quite enough to get the bound we want because even if we add d-faces according to this rule there will be in general many different orderings of d-faces which produce the same complex.Additionally, we know that we want r edges at the end, but that doesn't tell us precisely how many steps we need since the number of steps is determined by the number of d-faces.To limit the amount of overcounting, we add a few more requirements to the procedure.First we order the (d − 1)-faces of the complete (d − 1)-complex on [n].Throughout the process (d − 1)-faces of the complex we have constructed so far will be marked as saturated or unsaturated.At each step the ordering and saturated/unsaturated markings tell us a well defined (d − 1)-face σ and we grow from σ by adding some new d-face σ ∪ {v} to our complex.
If a (d − 1)-face σ is unsaturated that means it is eligible to be selected later in the process when we will add σ ∪ {v} for some vertex v so that some edge of σ ∪ {v} is missing right we we add σ ∪ {v} to σ. Saturated means that σ is ineligible to grow from for the rest of the process, though new d-dimensional cofaces of σ may still be added in moves that add σ ∪ {v} but grow from some other (d − 1) face or moves that grow from σ, but simply fill in an existing d-simplex boundary.
At the first step we simply take an arbitrary d-face and mark each of its (d − 1)-faces as unsaturated or saturated.At each subsequent step we pick the minimum unsaturated (d − 1)-face σ according to the ordering on edges and add a new d-face σ ∪ {y} where y is a vertex, unless there is an empty d-simplex boundary in the complex (which we'll discuss later).Of course we also add any missing edges of σ ∪ {y} as well.Other than the first move which adds one d-face and d+1 2 edges this procedure partitions the remaining moves into d + 1 types: moves which add no edges (i.e.moves that simply fill in an empty d-simplex whose 1-skeleton is already present), moves that add a 1 edge, moves that add 2 edges, ..., and moves that add d edges.If we denote the number of these moves in a single instance of the procedure respectively as m 0 , m 1 , m 2 , ..., m d we observe that the number of edges in the complex we end up with is d+1 For a complex K constructed by this procedure we let Ξ i (K) for i ∈ {0, ..., d} denote the number of ways to extend K by adding a single d-face in a way that adds exactly i edges and by Ξ(K) the sum Ξ 0 Except for moves where we add no new edges, after we have grown from the minimal (d−1)-face σ to σ ∪ {y} we decide for each unsaturated edge of σ ∪ {y} whether or not to flip it to saturated.We additionally need one more rule for the procedure to avoid too large of an overcount and use the fact that we build flag complexes.We order the n d+1 d-faces on [n] and whenever we have a complex K which has an empty d-simplex we choose the smallest empty d-simplex in K according to the ordering and fill it in growing for its minimal (d − 1)-face, and we do nothing with flipping unsaturated (d − 1)-faces to saturated.So we can effectively skip over these moves.
Subject to these rules we choose a sequence (a 1 , ...., a t−1 ) were each a i is 1, 2, ..., or d with m k denoting the number of i so that a i = k so that d+1 We'll count the number of ways to run this procedure by steps K 1 ⊆ K 2 ⊆ • • • ⊆ K t where K 1 is an arbitrary d-face and K i+1 is obtained from K i by a move which adds a i edges and afterwards filling in all d-faces whose 1-skeleton is present, and t is such that K t will have r edges.
For a given sequence (a 1 , ..., a t−1 ) we let K 1 ⊆ K 2 ⊆ • • • ⊆ K t be a run of our procedure from a single triangle K 1 to a complex with r edges K r where add a i edges to go from K i to K i+1 .We wish to bound At each step the (d−1)-face we grow from is deterministic; it is the minimal unsaturated (d−1)-face in K i .By the c-bounded condition if a i = k < d then the number of ways to extend the selected . Indeed in order to add only k new edges we have to pick v to be a common neighbor of some d − k vertices of σ and add σ ∪ {v}.If a i = d then there are trivially at most n ways to extend K i .After adding the new d-face, we choose for each of its (d + 1) facets whether to flip from unsaturated to saturated.
Thus having selected (a 1 , ..., a m−1 ), As we have that Recall though that this is after choosing the sequence (a 1 , ..., a m−1 ) and the initial d-dimensional face and saturated/unsaturated markings on its (d − 1)-face, so the number c-bounded strongly connected d-complexes on r edges with [n] is at most Having proved Lemmas 5.1 and 5.2 we can prove Lemma 3.4.
Proof of Lemma 3.4.Take ε so that c + ε < 1 2 1+2d d .By Lemma 5.1, X ∼ X(n, c/ d √ n) does not contain a strongly connected d-dimensional subcomplex (of any size) which is not (c + ε)-balanced.By Lemma 5.2 for any r the expected number of (c + ε)-bounded strongly connected d-complexes in X on r edges is at most Thus by Markov's inequality the probability that there exists r ≥ C log n so that X ∼ X(n, c/ d √ n) has a (c + ε)-bounded strongly connected subcomplex on r edges is at most And this is o(1) for C large enough since 2 1+2d dc < 1.
With this we have now completed the proof of Theorem 1.2

Freeness of the fundamental group
A paper of Costa, Farber, and Horak [8] establishes coarse thresholds for the cohomological dimension of the fundamental group of a random clique complex.Namely they show that if p = n −α then the cohomological dimension of π 1 (X) for X ∼ X(n, p) asymptotically almost surely is: Combined with an earlier result of Kahle [13] that 1/3 > α implies X is simply connected with high probability, this gives the full behavior of the fundamental group of a random flag complex up to the right exponent for the phase transitions.Using Theorem 2.1, we can immediately improve on the lower bound for freeness of π 1 (X).Using existing results in the literature and a new result similar to Lemma 3.5 we can also improve on the upper bound, proving Theorem 1.3.
The subcritical case of Theorem 1.3 follows immediately from Theorem 2.1, via the following lemma which is easy to prove.Lemma 6.1.If X is an almost 2-collapsible flag complex then π 1 (X) is a free group.
Proof.Since X is almost 2-collapsible, X is homotopy equivalent to a complex of dimension at most 2 whose pure 2-dimensional part consists of face disjoint copies of ♦ 2 .If we remove a triangle from each of these copies of ♦ 2 we don't change the fundamental group, because the boundary of the triangle we remove is nullhomotopic.After removing a triangle from each copy of ♦ 2 we may collapse the complex to a graph.
The supercritical case of Theorem 1.3 is much more involved, but the necessary lemmas are mostly already in place.To state what we need precisely we say that a (not necessarily flag) complex X is almost aspherical if any complex X obtained from X by removing one and only one triangle from each embedded copy of ♦ 2 is aspherical i.e. π j ( X) = 0 for all j ≥ 2. This is similar to the notion of asphericable in [6] which establishes a result about the Linial-Meshulam model being aspherical for a particular range of p once a triangle is removed from each tetrahedron boundary.We use the term "almost aspherical" rather than "asphericable" here only for the analogy to "almost d-collapsible".Toward the supercritical part of Theorem 1.3 we prove the following.Theorem 6.2.If p < n −α for α > 12/25 then X ∼ X(n, p) is almost aspherical with high probability.Moreover the cohomological dimension of π 1 (X) is at most 2.
This theorem together with other results in the literature then implies the following theorem which is exactly the supercritical case of Theorem 1.3.Theorem 6.3.For c > √ 3 and α > 1/3, if c √ n < p < n −α then X ∼ X(n, p) asymptotically almost surely has that π 1 (X) is not a free group.
For this proof and the proof of Theorem 1.4 we recall the following result of Kahle.Theorem 6.4.[14, Theorem 1.2] Let ε > 0 be fixed and X ∼ X(n, p).
then with high probability π 1 (X) has property (T), and if then with high probability π 1 (X) does not have property (T).
Proof of Theorem 6.3.
almost aspherical and has cohomological dimension at most 2 with high probability by Theorem 6.2.To show the cohomological dimension is at least 2, it suffices to prove that X with a single triangle removed from each ♦ 2 has homology in degree 2 with high probability.If this holds then after removing a face from every copy of ♦ 2 the resulting complex X has π 1 ( X) = π 1 (X) with X a K(π 1 (X), 1).By uniquess of the homotopy type of a K(G, 1), if π 1 (X) is free then X is homotopy equivalent to a bouquet of circles, but this cannot the case if X has homology in dimension 2.
By the first moment method with high probability X contains at most O(n 6/25 log n) copies of ♦ 2 .On the other hand the expected number of triangles in X ∼ X(n, p) is and the expected number of tetrahedra in Moreover f i (X) simply counts (i + 1)-cliques in G ∼ G(n, p), and the number of (i + 1)-cliques in G(n, p) is known to be well concentrated around its mean when p is such that the mean tends to infinity.Therefore with high probablilty for some constant δ > 0 since c 2 > 3. Thus even after deleting a face from each copy of ♦ d , the remaining complex still has lots of homology in degree 2. Thus the cohomological dimension of π 1 (X) is at least 2.An argument of this type showing that c > has homology in degree d also appears in [14].
For n −α ′ ≤ p < n −α , where α ′ < 1/2 we have p > 2 log n n 1/2 which implies by Theorem 6.4 that π 1 (X) has property (T).A nontrivial group with property (T) cannot be a free group because property (T) implies finite abelianization.Moreover since p < n −α we know by the result of [8] discussed above that π 1 (X) is nontrivial.
It remains to prove Theorem 6.2.Key to the proof is Theorem 6.1 of [8].Lemma 6.5.[8, Theorem 6.1] Assume that p = o(n −α ) for α > 1/3 fixed.Then for X ∼ X(n, p) and L = L(α) a large enough constant the 2-skeleton of X (2) has the following property with high probability: Any subcomplex Y of X (2) is aspherical if and only if every subcomplex Z ⊆ Y having at most L edges is aspherical.
The proof of Theorem 6.2 requires showing that X ∼ X(n, p) satifies several more properties in addition to the necessary and sufficient condition property of Lemma 6.5.Lemma 6.6.For X ∼ X(n, p) with p < n −α , α > 12/25 with high probability X satisfies all of the following properties: 1. dim(X) ≤ 4.
2. Every embedded copy of ♦ 2 in X has all of its triangles maximal.In particular every embedded copy of ♦ d is induced.
3. X does not contain a tetrahedron and a 4-simplex that meet at a triangle.
5. There exists some constant L so that any subcomplex Y of X (2) is aspherical if and only if every subcomplex Z ⊆ Y having at most L vertices is aspherical.
In establishing that 11/30 < α < 1/2 X ∼ X(n, n −α ) has fundamental group of cohomological dimension 2 in [8], Costa, Farber, and Horak show that there is a subcomplex Y ⊆ X (2) so that every bounded subcomplex of Y collapses to a graph and so that π 1 (Y ) = π 1 (X).Our approach will be to show that for α > 12/25, p < n −α , the complex Y ⊆ X (2) obtained from X ∼ X(n, p) by collapsing away everything of dimension larger than 2 from X has π 1 (Y ) = π 1 ( X) = π 1 (X) and every finite subcomplex of Y is aspherical.While it may be possible to show that every bounded subcomplex of this complex Y collapses to a graph by adapting the approach in [8], since we only need that every bounded subcomplex is aspherical we take a different approach based on simple homotopy equivalence.
Simple homotopy equivalence was first described by Whitehead, and is based on elementary collapses and expansions.We've already defined an elementary collapse, and an elementary expansion is simply the reverse of an elementary collapse.That is, if X is a simplicial complex and σ is a simplex on a subset of the vertices of X so that exactly one facet τ of ∂σ does not belong to X then the elementary expansion of X at σ is adding τ and σ to X. Observe that an elementary expansion is a homotopy equivalence.Two simplicial complexes are simple homotopy equivalent provided that there is a sequence of collapses and expansions that transform one into the other.
To prove Theorem 6.2 we show that if X is a flag complex that satisfies the conditions of Lemma 6.6 we can remove a triangle from each copy of ♦ 2 in X and then collapse to a 2-complex Y with the property that any Z ⊆ Y on at most L vertices is simple homotopy equivalent to a graph, and is therefore aspherical.In order to prove this we first establish the following deterministic result that is similar to Lemma 3.5.Lemma 6.7.If Z is a simplicial complex with the property that the only triangulated 2-spheres contained in Z (2) are the boundaries of tetrahedra belonging to Z and if the essential density of the graph of Z satisfies ρ(Z (1) ) < 25/12, then Z is simple homotopy equivalent to a graph.
For brevity we say that a simplical complex whose only embedded 2-spheres are boundaries of included tetrahedra is essentially 2-sphere free.The fact that Z is essentially 2-sphere free will imply that, even though Z may not be a flag complex there is a sequence of expansions that transform any the link of any vertex v to a flag complex while maintaining the essentially 2-sphere free property and density property on Z \ {v}.So if Z has a vertex v with lk Z (v) 1-collapsible, then Z cannot be a minimal counterexample.From there we can basically follow the argument of the proof of Lemma 3.5 and afterwards immediately prove Theorem 6.2.
Proof of Lemma 6.7.Suppose that Z is essentially 2-sphere free with the density condition.Two immediate observations for the density condition are that Z does not contain the 1-skeleton of a 2-sphere on more that 6 vertices and that dim(Z) ≤ 4. By Euler characteristic a triangulated 2-sphere on v vertices has density 3 − 6/v, and 3 − 6v ≥ 25/12 for v ≥ 7. The dimension of Z is at most 4 because Z (1) cannot contain a 6-clique as a 6-clique has density 15/6 > 25/12.
Let v be a vertex of Z, we claim that there exists a sequence of expansions each adding a pair of faces (σ, σ ∪ {v}), so that the resulting complex Z ′ has lk Z ′ (v) is the flag closure lk Z (v) and Z ′ \ {v} still satisfies the essentially 2-sphere free and density assumptions of Z.
Since dim(Z) ≤ 4, dim(lk Z (v)) ≤ 3, thus if we can show that there is a sequence of expansions first filling in all the triangles of lk Z (v) and then from there filling in all empty tetrahedra, that will be sufficient for Z ′ so that lk Z ′ (v) = lk Z (v), and all that will remain is to check that Z ′ \ {v} still satisfies the assumptions from the statement.Suppose that ∂σ is an empty triangle in lk Z (v).If σ / ∈ Z then (σ, σ ∪ {v}) is a valid expansion filling in ∂σ in the link.However if ∂σ is an empty triangle in lk Z (v) and σ ∈ Z then we have the boundary of σ ∪ {v} in Z without σ ∪ {v} in Z.But this is a triangulated 2-sphere that isn't the boundary of a tetrahedron in Z, so this breaks elementary collapse and then have a smaller counterexample, or else Z contains a copy of ♦ 2 as in the proof of Claim 4.4 violating the essentially 2-sphere free condition.Thus each vertex of Z of degree 4 has a neighbor of degree larger than 4, and just as in the proof of Lemma 3.5, we have that Z has density at least 25/12.
Proof of Theorem 6.2.For p < n −α with α > 12/25, with high probability X satisfies all of the conditions of Lemma 6.6 with ℓ = L. Let Y be obtained from X by deleting a triangle from each copy of ♦ 2 and 3-collapsing.Clearly Y is 2-dimensional and π 1 (Y ) = π 1 (X), we prove that Y is aspherical.We first claim that Y (2) cannot contain a 2-sphere on at most 2L vertices.
The 1-skeleton of a a triangulated sphere on v ≥ 4 vertices has density 3− 6/v.By condition (6) then X cannot contain a triangulated sphere on more than 6 vertices and at most 2L vertices.Thus Y cannot contain triangulated sphere of v vertices for 7 ≤ v ≤ 2L, so it remains to check spheres on at most 6 vertices.The only triangulated spheres on at most 6 vertices are ♦ 2 and stacked polytopes, i.e. spheres that can be obtained from ∂∆ 3 by successively replacing a triangle by the cone over its boundary (commonly called a bistellar flip).By construction Y does not contain any copies of ♦ 2 .
If Y contains ∂∆ 3 then this means that the interior was removed by collapsing it into a 4dimensional simplex.Let σ be such a tetrahedron with σ ⊆ τ so that (σ, τ ) was an elementary collapse.By condition (3) however, we have that X does not contain two 4-simplices that meet at a tetrahedron.Thus after collapsing away all the 4-simplices every tetrahedron of τ other than σ still remains.So we have a triangulated 3-sphere with a single tetrahedron removed.Now when we collapse away triangle-tetrahedron pairs, the only way to get started on collapsing τ \ σ is to collapse away one of the triangles of σ, but then ∂σ does not belong to Y .
If Y contains a triangulated sphere on 5 vertices then X has two tetrahedra σ 1 , σ 2 meeting at a triangle so that after collapse the boundary of the ball with facets σ 1 and σ 2 remains.Thus one of σ 1 or σ 2 must be collapsed away by a tetrahedron-4-simplex collapse.If not then the only way to get started on collapsing σ 1 and σ 2 is to collapse at one of the triangles on the boundary which contradicts the boundary remaining in Y .By (3) though, in this case σ 1 ∪ σ 2 must form the vertices of a 4-simplex.Without loss of generality then σ 1 is collapsed with this 4-simplex and the sequence of triangle-tetrahedron collapses restricted to the remaining punctured 3-sphere leaves behind a 2-complex that contains a triangulated sphere.But this is a homotopy equivalence between a contractible space and a 2-complex with homology in degree 2, and that's impossible.
Lastly suppose that Y contains the boundary of three tetrahedra σ 1 , σ 2 , σ 3 so that σ 1 and σ 2 meet at a triangle and σ 2 and σ 3 meet at a triangle but σ 1 and σ 3 don't meet at a triangle.By (3) then none of the σ i belong to a 4-simplex, so they are all collapsed away by triangle-tetrahedron elementary collapses, and to get started we have to use a triangle on the boundary.So having exhausted all cases we've proved Y does not contain a sphere on at most 2L vertices.
To show that Y is aspherical it suffices by (5) to prove that for any Z ⊆ Y on at most L vertices, Z is aspherical.Suppose that Z is such a complex.By (6) then the graph of Z has essential density less than 25/12.Additionally since Y does not contain a triangulated 2-sphere, Z is essentially 2-sphere free, so by Lemma 6.7, Z is simple homotopy equivalent to a graph, and hence Z is aspherical, and this completes the proof.
Finally we prove Lemma 6.6.
Proof of Lemma 6.6.We observe that (3) implies (1).Let G 1 be the graph of a 5-clique together with a vertex v adjacent exactly to a triangle of the 5-clique.Then G 1 has 6 vertices and 13 edges, so the expected number of copies of G 1 in G ∼ G(n, p) is O(n 6−13(12/25) ) = o(1).
So by Markov's inequality (3) and therefore (1) occur with high probability.
For (2), let G 2 be the graph obtained from the graph of ♦ 2 by adding a new vertex v adjacent exactly to a triangle of ♦ 2 .Then G 2 has 7 vertices and 15 edges so the expected number of such complexes is O(n 7−15α ) which is o(1) since α > 12/25 > 7/15.So no copy of ♦ 2 has a triangle intersecting a tetrahedron with a vertex outside of that copy of ♦ 2 .The only other way a copy of ♦ 2 can contain a nonmaximal triangle is if it isn't induced.The expected number of noninduced copies of ♦ 2 is O(n 6−13α ) = o(1) since α > 12/25 > 6/13.
Condition ( 4) is by the main result of [17] that α > 1/d implies that X ∼ X(n, n −α ) is dcollapsible.It is also implied by the d = 3 case of Theorem 2.1.
Condition ( 5) is simply a restatement of Lemma 6.5 of [8].Condition ( 6) is by a standard first moment argument.A graph H with k vertices density at least 25/12 occurs in G(n, p) with probability O((n 1−α(25/12) ) k ) and as 1 − α(25/12) < 0 we can sum over all the finitely many graphs on at most ℓ vertices with density at least 25/12 to get a o(1) bound on the expected number of included subgraphs.

Concluding remarks
The natural remaining questions are what are the sharp thresholds, should they exist, for: • X ∼ X(n, p) to go from almost d-collapsible to not almost d-collapsible, • X ∼ X(n, p) to go from having all homology in degree d generated by copies of ♦ d to having homology not generated by copies of ♦ d , and • X ∼ X(n, p) to go from π 1 (X) free to π 1 (X) nonfree.
For the Linial-Meshulam model Y d (n, p) the "trivial d-cycles" are boundaries of a (d + 1)simplex.These are Poisson distributed and [3], [1] establish the constant γ d so that γ d n is the sharp threshold for Y ∼ Y d (n, p) to go from almost d-collapsible (replacing ♦ d in the definition here by ∂∆ d+1 ) to not almost d-collapsible.The threshold in Y ∼ Y d (n, p) to go from all homology generated by copies of ∂∆ d+1 to some homology coming from other subcomplexes is at c d /n for an explicit constant c d is established in [2], [16] • d √ c d < c then with high probability β d (X; K) = Θ(n (d+1)/2 ) for any coefficient field K.

Proof.
By Lemma 3.2, flag d−1 (S 1 ), ..., flag d−1 (S m ) partitions the faces of X of dimension at least d.Therefore any collapsing move that does not involve a face of dimension at most (d − 1) only affects one of the flag d−1 (S i )'s.A collapsing move (σ, τ ) in flag d−1 (S i ) collapsing a (d − 1)-face σ into a d-face τ means that σ is not maximal in flag d−1 (S i ) so by Lemma 3.2, σ is maximal in all the flag d−1 (S j ) other than flag d−1 (S i ) that contain it.Since we are only interested in almost d-collapsibility, maximal (d − 1)-dimensional faces in flag d−1 (S j ) do not affect the ability to dcollapse, so we don't need to use σ to almost d-collapse any of the other flag d−1 (S j )'s.Thus we may run a collapsing sequence on flag d−1 (S 1 ) that arrives a face disjoint union of copies of ♦ d .Such a collapsing sequence only changes the other flag d−1 (S i )'s by possibly removing maximal (d − 1)dimensional faces, which leaves all the necessary collapsing moves available to almost d-collapse each flag d−1 (S i ) separately.After separately collapsing each flag d−1 (S 1 ), ..., flag d−1 (S m ) all the dfaces remaining belong to copies of ♦ d .Moreover as flag d−1 (S 1 ), ..., flag d−1 (S m ) partition d-faces of X and copies of ♦ d remaining in each individual flag d−1 (S i ) are face disjoint from one another, the remaining copies ♦ d after collapsing X are also face disjoint from one another.
after taking the (d − 1)-flag closure.By Lemma 3.4, with high probability X ∼ X(n, c/ d √ n) has no d-dimensional strongly connected component S so that the graph of S has more than C log n edges for some C = C(d, c) sufficiently large.So there is no d-dimensional strongly connected component on more than 2C log n vertices.Next we use Lemma 3.5 to conclude that with high probability every d-dimensional strongly connected component on at most 3C log n vertices has essential density (of its graph) less than d+ 1 4+4d .The probability that X ∼ X(n, c/ d √ n) has a d-dimensional strongly connected component on at most 3C log n vertices of essential density at least d + 1 4+4d is at most the probability that G ∼ G(n, c/ d √ n) has a subgraph H on at most 3C log n vertices with |E(H)| ≥ (d + 1 4+4d )|V (H)|.By a standard first moment argument the expected number of subgraphs of G(n, c/ d √ n) with v vertices at least (d + ε)v edges for any ε > 0 is at most flag d−1 (H) (v) = flag d−2 (lk H (v)). Suppose that τ ∈ lk flag d−1 (H) (v), then τ ∪{v} belongs to flag d−1 (H) so the (d−1)-skeleton of τ ∪{v} belongs to H. Thus the (d−2)-skeleton of τ belongs to lk H (v), so τ ∈ flag d−2 (lk H (v)). On the other hand suppose that τ ∈ flag d−2 (lk H (v)).

Claim 4 . 3 .
For d ≥ 2, if H is a pure d-complex that satisfies the ⋆-condition then H cannot contain an empty d-simplex boundary.Proof of claim.Suppose that H is d-dimensional with the ⋆-condition and H contains all the -collapsible then we may d-collapse flag d−1 (H) around u.As this removes all d-faces containing u and the graph induced on H \ {u} also satisfies the density condition and H \ {u} satisfies the ⋆-condition so its (d − 1)-flag closure is almost d-collapsible by minimality.Therefore H is almost d-collapsible.By Lemma 4.1, it follows that deg(u) ≥ 2d must hold for any vertex u of H. Moreover the following claim holds for H too.

Claim 4 . 4 .
Every vertex of H of degree exactly 2d has a neighbor of degree larger than 2d.Proof of claim.Let u be a vertex of H of degree exactly 2d.Then for by minimality and Lemma 4.1, lk flag d−1 (H) (v) is ♦ d−1 (strictly speaking from what's proved here so far this only applies to d ≥ 3, but the d = 2 case is obvious; the only non 1-collapsible flag complex on 4 vertices is the 4-cycle ♦ 1 ).
flag d−1 (H) (u).If w 1 and w 2 are connected by an edge then the edge {w 1 , w 2 } must belong to a (d − 1)-dimensional face σ ∈ lk flag d−1 (H) (u), since lk flag d−1 (H) (u) = ♦ d−1 is pure (d − 1)-dimensional.Now σ is contained in at least two d-dimensional faces, one of which must be σ ∪ {u}.Otherwise if σ is only contained in σ ∪ {u} then (σ, σ ∪ {u}) is a permitted collapsing move which leaves lk flag d−1 (H)\σ (u) (d − 1)-collapsible.So we can d-collapse around u and then use minimality to d-collapse (flag d−1 (H) \ {u}) \ σ (which is still (d − 1)-flag since σ is a maximal (d − 1)-face in H \ {u}).Now the only neighbor of w 1 outside of lk flag d−1 (H) (u) is u 1 , so the only other possible d-face that contains σ is σ ∪ {u 1 }.But the same line of reasoning applied to w 2 implies that σ ∪ {u 2 } is the only possibility for a d-face different from σ ∪ {v} to contain σ.Thus u 1 = u 2 .

Conjecture 7 . 1 .
. The proofs rely on approximating the local behavior of Y d (n, p) by a Galton-Watson process and counting d-dimensional cores.Based on what's been established, and letting γ d and c d refer to the critical constants in Y d (n, p) we make the following conjecture.For X ∼ X(n, c/ d √ n) if • 0 < c < d √ γ d then with high probability X is almost d-collapsible.• d √ γ d < c < d √ c d then with high probability X is not almost d-collapsible, but β d (X; R) isgenerated by embedded copies of ♦ d .