                                                               THE EXACT RANK OF SPARSE RANDOM GRAPHS

                                                       MARGALIT GLASGOW, MATTHEW KWAN, ASHWIN SAH, AND MEHTAAB SAWHNEY


                                                   Abstract. Two landmark results in combinatorial random matrix theory, due to Komlós and Costello–
                                                   Tao–Vu, show that discrete random matrices and symmetric discrete random matrices are typically
                                                   nonsingular. In particular, in the language of graph theory, when p is a ﬁxed constant, the biadjacency
                                                   matrix of a random Erdős–Rényi bipartite graph G(n, n, p) and the adjacency matrix of an Erdős–Rényi
                                                   random graph G(n, p) are both nonsingular with high probability. However, very sparse random graphs
                                                   (i.e., where p is allowed to decay rapidly with n) are typically singular, due to the presence of “local”
                                                   dependencies such as isolated vertices and pairs of degree-1 vertices with the same neighbour.
arXiv:2303.05435v1 [math.CO] 9 Mar 2023




                                                       In this paper we give a combinatorial description of the rank of a sparse random graph G(n, n, c/n)
                                                   or G(n, c/n) in terms of such local dependencies, for all constants c 6= e (and we present some evidence
                                                   that the situation is very diﬀerent for c = e). This gives an essentially complete answer to a question
                                                   raised by Vu at the 2014 International Congress of Mathematicians.
                                                       As applications of our main theorem and its proof, we also determine the asymptotic singularity
                                                   probability of the 2-core of a sparse random graph, we show that the rank of a sparse random graph
                                                   is extremely well-approximated by its matching number, and we deduce a central limit theorem for the
                                                   rank of G(n, c/n).




                                                                                            1. Introduction
                                             A foundational theorem in combinatorial random matrix theory, due to Komlós [47, 48], says that
                                          discrete random matrices with i.i.d. entries are typically nonsingular (over R). In particular, let B be an
                                          n×n random matrix with i.i.d. Bernoulli(p) entries (meaning that each entry Bij satisﬁes Pr[Bij = 1] = p
                                          and Pr[Bij = 0] = 1 − p). For any constant p ∈ (0, 1), if we take n → ∞ then such a random matrix is
                                          nonsingular with high probability (“whp” for short): that is, limn→∞ Pr[B is singular] = 0.
                                             A huge number of strengthenings and variations of Komlós’ theorem have been considered over the
                                          years. Two particular highlights include a result of Tikhomirov [62] that for constant 0 < p ≤ 1/2,
                                          the singularity probability is (1 − p + o(1))n , and a result of Costello, Tao, and Vu [26] that symmetric
                                          discrete random matrices are also nonsingular whp. A symmetric binary matrix can be interpreted as
                                          the adjacency matrix of a graph, so the Costello–Tao–Vu theorem has an interpretation in terms of
                                          random graphs: for constant p ∈ (0, 1), an Erdős–Rényi random graph G ∼ G(n, p) has nonsingular
                                          adjacency matrix whp1. Actually, Komlós’ theorem can be interpreted in graph-theoretic terms as well:
                                          the random matrix B described above can be interpreted as the biadjacency matrix of a bipartite Erdős–
                                          Rényi random graph G ∼ G(n, n, p) (where one of the parts corresponds to the rows of the matrix, and
                                          the other part corresponds to the columns).
                                             If p decays too rapidly with n (in particular, if p ≤ (1 − ε) log n/n for some constant ε > 0), then for
                                          reasons related to the coupon collector problem, a typical outcome of G ∼ G(n, p) (respectively, G ∼
                                          G(n, n, p)) has isolated vertices, meaning that its adjacency matrix (respectively, biadjacency matrix)
                                          has all-zero rows and is therefore singular. In fact, log n/n is a sharp threshold for singularity, in the
                                          sense that if p ≥ (1 + ε) log n/n (and p is bounded away from 1) then a typical G ∼ G(n, p) (respectively,
                                          G ∼ G(n, n, p)) has nonsingular adjacency matrix (respectively, nonsingular biadjacency matrix). This
                                          seems to have been ﬁrst observed by Costello and Vu [28]2, and reﬁnements and generalisations were
                                          proved by Basak and Rudelson [7] and Addario-Berry and Eslava [2]. In particular, the latter authors
                                          proved a sharp hitting time type result: if we consider the random graph process where we start with
                                          the empty graph on n vertices (or the empty bipartite graph with n + n vertices) and add random edges
                                          one-by-one (respecting our bipartition, in the bipartite case), then whp at the very same moment where
                                          the last isolated vertex disappears our graph becomes nonsingular.

                                              1There is a slight diﬀerence between a random symmetric Bernoulli matrix and the adjacency matrix of a random graph:
                                          namely, the adjacency matrix of any graph has zeroes on the diagonal. However, the same techniques usually apply to
                                          both settings, and we will not further concern ourselves with this detail.
                                              2The Costello–Vu proof was only written for G(n, p), but it can be easily adapted to G(n, n, p); alternatively, see [34]
                                          for a very simple proof in the G(n, n, p) case.
                                                                                                       1
    Naïvely, it is quite surprising that the property of being singular (which is intrinsically an algebraic
property of a matrix) can be predicted so eﬀectively by the simple combinatorial property of having an
isolated vertex. It is natural to ask whether this theme continues below the singularity threshold log n/n:
even when a random matrix is likely to be singular, can we describe the rank via “local combinatorial
dependencies” such as isolated vertices? In their aforementioned paper, Costello and Vu [28] actually
proved the ﬁrst result along these lines: for p ≥ (1/2 + ε) log n/n, whp the rank of G(n, p) is precisely
n minus the number of isolated vertices. In follow-up work, Costello and Vu [27] considered the more
general regime where p ≥ c log n/n for a constant c > 0. They found that in this regime it is still possible
to give a combinatorial description of the rank, though one must consider more sophisticated types of
“local dependencies” than isolated vertices. For example, the next simplest type of dependency is a
cherry: a pair of degree-1 vertices with the same neighbour. More recently, DeMichele, the ﬁrst author,
and Moreira [30] gave a combinatorial description of the rank of G ∼ G(n, p) and G ∼ G(n, n, p), in terms
of a procedure that iteratively deletes local dependencies, which holds whp whenever limn→∞ np = ∞
(i.e., when p asymptotically dominates 1/n).
    The most challenging regime is where p = c/n for constant c. An asymptotic for the typical rank of
G(n, c/n) was conjectured by Bauer and Golinelli [9] (motivated by statistical physics considerations),
and this asymptotic was later proved by Bordenave, Lelarge, and Salez [18] via analytic techniques. In
his lecture at the 2014 International Congress of Mathematicians [67] (also in [66]), Vu asked whether
one can also give a precise combinatorial characterisation of the rank in this regime.
    The main purpose of this paper is to provide an answer to Vu’s question, and the analogous question
for G(n, n, c/n), exactly characterising the rank of sparse random graphs (and in the process, providing
a linear-time algorithm to compute the rank).
    At a high level, we show that whp all linear dependencies arise from two diﬀerent types of combina-
torial structures. First, we need to account for “tree-like” structures generalising isolated vertices and
cherries (previously identiﬁed in the work of Costello and Vu [27] and DeMichele, the ﬁrst author, and
Moreira [30]), which can be “peeled oﬀ” by an iterative process called Karp–Sipser leaf removal (deﬁned
in Deﬁnition 1.4). Second, we need to account for certain short cycles (which we call “special cycles”,
deﬁned in Deﬁnition 1.5), which cause linear dependencies for a diﬀerent reason.
    Our proof of this characterisation involves a wide range of tools and ideas, both original and adapted
from existing work. This includes analysis of degree-constrained random graphs and of the Karp–Sipser
leaf-removal algorithm, robust analysis of random walks, spectral convergence machinery for locally con-
vergent graphs, a “rank-boosting” technique, and some special-purpose notions of matrix pseudoinverses
and “minimal kernel vectors” (all of which we describe further in Section 2). To try to give a rough
impression of the most fundamental diﬃculty compared to previous work: note that the rank of a matrix
can be interpreted as the size of its largest nonsingular submatrix. In the setting of most previous work,
maximum nonsingular submatrices are in some sense “robustly” nonsingular (in particular, the corre-
sponding subgraphs have good expansion properties), which makes it possible to rule out certain types
of kernel vectors via lossy union bounds. However, in our situation the largest nonsingular submatrices
are in some sense “only barely nonsingular”, with essentially the weakest possible expansion a nonsingular
submatrix can have, and there is almost no room to make any kind of lossy approximation.
    In any case, once one has a characterisation of the rank in terms of explicit combinatorial structures,
it becomes possible to prove further results about the rank via combinatorial tools. Indeed, as corollaries
of our main theorem and its proof, we are able to show a number of additional theorems: we compute the
asymptotic singularity probability of the 2-core, we obtain a very strong bound on the diﬀerence between
the matching number and the rank, and we prove a central limit theorem for the rank of G(n, c/n). Since
the statement of our main result (Theorem 1.7) is somewhat technical, we take a moment to discuss these
corollaries before presenting the precise statement of our main result.


1.1. Nonsingularity of the 2-core. The k-core corek (G) of a graph G is the subgraph obtained by
iteratively deleting vertices with degree less than k (in any order). Equivalently, it is the largest induced
subgraph with minimum degree at least k. This notion was ﬁrst introduced in 1984 by Bollobás [16],
and k-cores have since become fundamental objects of study in random graph theory.
   In the context of combinatorial random matrix theory, an important reason to study k-cores is that
all of the most obvious types of “local dependencies” involve vertices of low degree. For example, recall
that isolated vertices and cherries are abundant types of local dependencies, and it turns out that all
of the “tree-like” local dependencies mentioned earlier in this introduction contain a vertex of degree 1.
Another example of a local dependency, which has non-negligible probability of appearing in the regime
                                                      2
p = c/n, is a pair of vertices of degree 2 with the same neighbourhood (i.e., a cycle of length 4, in which
a pair of opposite vertices have degree exactly 2).
   Resolving a conjecture of Vu, it was recently proved by Ferber and the last three authors [33] (see
also [30]) that for constants k ≥ 3 and c > 0, the k-core of G(n, c/n) is nonsingular whp. That is to say,
trimming low-degree vertices typically removes any singularity present in the graph (foreshadowing the
main result of this paper, that whp the only dependencies are “tree-like” or “cycle-like”).
   While the assumption k ≥ 3 is necessary for a “whp” result due to the possibility of “cycle-like”
dependencies, these types of dependencies seem to be rare (e.g., the expected number of 4-cycles is
only O(1), and with non-negligible probability there are no 4-cycles at all). So, it is natural to ask
whether one can still prove meaningful theorems about nonsingularity in the case k = 2. We prove such
a theorem: roughly speaking, the 2-core is “right on the edge of singularity”, being neither singular whp
nor nonsingular whp. (In retrospect, one can see that in the case k ≥ 3, the k-core is actually “quite far
from being singular” with respect to natural local dependencies, and this “wiggle room” played a crucial
role in the proofs in [30, 33]).
Theorem 1.1. Fix a constant c > 1, let G ∼ G(n, c/n), and let A be the adjacency matrix of the 2-core
of the largest component of G (which is unique whp). Then
                                                                     4 1/4
                                                              λ2
                                                1 −
                                                       eλ2 /2 − e−λ2 /2 
                                                                          
                     lim Pr[A is nonsingular] =                               > 0,
                                                
                    n→∞
                                                                   4    
                                                             λ2          
                                                     1−
                                                            eλ2 − 1
where λ2 = λ2 (c) > 0 is the unique solution to λ2 /(1 − e−λ2 ) = c. Moreover, the corank3 of A has an
asymptotic Poisson(µ) distribution, where µ is chosen such that the above probability is asymptotic to
e−µ (and in particular, the corank is bounded in probability4).
   Note that the assumption c > 1 corresponds to the celebrated phase transition of the Erdős–Rényi
random graph. Indeed, if c < 1 (the “subcritical” regime), whp all the connected components of G(n, c/n)
have size O(log n) (and each of them is a tree or is unicyclic, having exactly one cycle); thus, in this
regime the 2-core is rather trivial, consisting only of a very small number of isolated cycles. On the other
hand, if c > 1 (the “supercritical” regime), then whp G(n, c/n) has a unique “giant component” with
nontrivial structure (whose number of vertices is of order n), in addition to some trees and unicyclic
components of size O(log n). See for example the monographs [17, 36, 44] for more details about the
component phase transition of the Erdős–Rényi random graph, and see [31] for a precise description of
the “anatomy” of a supercritical random graph in terms of its 2-core.
Remark. The statement of Theorem 1.1 is only about the giant component in the supercritical regime,
but one may also wish to consider the entire 2-core (including any small-cycle components), in which
case it makes sense to consider all c > 0 (not just c > 1). With the methods in this paper (and
some results about critical random graphs [1]) it is possible to show that for G ∼ G(n, c/n) we have
limn→∞ Pr[the 2-core of G is nonsingular] > 0 if and only if c 6= 1 (when c = 1 there are too many
nontrivial components, each of which is reasonably likely to be singular). We omit the details. (Also,
note that the asymptotic nonsingularity probability in Theorem 1.1 tends to zero as c → 1.)
1.2. Comparing the rank and the matching number. In a graph G, a matching is a collection of
disjoint edges. The matching number ν(G) is the maximum number of edges in a matching in G. If G
is bipartite, then ν(G) can be interpreted as the size of the largest permutation matrix “contained” in
the biadjacency matrix B(G) of G, where our notion of matrix containment allows deleting rows and
columns, and changing 1-entries to 0-entries. Recalling the permutation deﬁnition of the determinant,
ν(G) is a trivial upper bound for rank B(G). Conﬁrming a conjecture of Lelarge [50] motivated by
statistical physics considerations, it was proved by Coja-Oghlan, Ergür, Gao, Hetterich, and Rolvien [24]
that this trivial bound is nearly best-possible5 for sparse random bipartite graphs: for G ∼ G(n, n, c/n)
we have ν(G) − rank B(G) = o(n) whp.
   In the non-bipartite case, there is no general inequality relating the rank of the adjacency matrix
rank A(G) of a graph G with its matching number ν(G), but a theorem of Bordenave, Lelarge, and
   3The corank of a matrix is the dimension of its kernel.
   4A sequence of random variables (X )∞ is said to be bounded in probability if for all ε > 0, there are N, M such that
                                     n n=1
Pr[Xn ≥ M ] ≤ ε for all n ≥ N .
   5Actually, they proved this for a much more general class of random matrices and for rank over any ﬁeld.

                                                             3
Salez [18] (mentioned earlier in the introduction) shows that nonetheless for a sparse random graph G
we have rank A(G) = 2ν(G) + o(n) whp (see also [19]). It is also natural to consider an alternative
parameter σ(G), deﬁned to be the size of the largest permutation matrix “contained” in A(G). This
parameter σ(G) has a combinatorial interpretation as the maximum number of vertices in a union of
vertex-disjoint cycles and edges in G. Note that 2ν(G) and rank A(G) are both at most σ(G).
   As our second result (a corollary of our main result Theorem 1.7, to come), we dramatically improve
the o(n) error terms in the results described above, showing that ν(G) is an extremely good approximation
for rank B(G), and 2ν(G) and σ(G) are extremely good approximations for rank A(G), away from a
“critical point” p = e/n. (The signiﬁcance of this rather mysterious-sounding critical point will be
explained later in this introduction; for now we just remark that this point also happens to be critical
for several other spectral phenomena in Erdős–Rényi random graphs [22, 25]).
Theorem 1.2. Fix a constant c 6= e.
   (A) Let G ∼ G(n, c/n).
       (1) | rank A(G) − 2ν(G)| is bounded in probability.
       (2) | rank A(G) − σ(G)| is bounded in probability.
   (B) For G ∼ G(n, n, c/n), | rank B(G) − ν(G)| is bounded in probability.
Remark. Given Theorem 1.2, one may wonder whether ν(G) (in the setting of (B), and 2ν(G), σ(G) in
the setting of (A)) in fact perfectly describe the rank. For example, could it be true that in the setting of
(B) we have rank B(G) = ν(G) whp? As will become clear when we discuss our main theorem, this is too
much to hope for. We believe that in the setting of (B), the asymptotic distribution of ν(G) − rank B(G)
is Poisson (with a certain explicit parameter), and in the setting of (A), both 2ν(G) − rank A(G) and
σ(G) − rank A(G) have somewhat more complicated “Poisson-like” distributions. However, rigorous
proofs of these facts would require adaptations of certain highly nontrivial graph-theoretic results (to
characterise ν(G) and σ(G)). We believe that these adaptations are possible, but pursuing this direction
would be outside the scope of the present paper. See Section 13 for details.
1.3. The asymptotic distribution of the rank. Aronson, Frieze, and Pittel [5] conjectured that for
a constant c, the matching number ν(G) of a random graph G ∼ G(n, c/n) satisﬁes a central limit
theorem. This was proved for c < 1 by Pittel [60], and for c > e by Kreačić [49, Theorem 19]. Since
Theorem 1.2(A1) tells us that rank A(G) is extremely well approximated by 2ν(G), it is easy to deduce
a corresponding central limit theorem for the rank.
Corollary 1.3. Let G ∼ G(n, c/n) for a constant c < 1 or c > e, let G ∼ G(n, c/n), and let X be the
                                                  √        d
rank of the adjacency matrix of G. Then (X − EX)/ Var X → N (0, 1).
   Actually, in an upcoming paper together with Goldschmidt and Kreačić [38], we are able to close the
gap between 1 and e in Corollary 1.3. Speciﬁcally, the regime c ≤ e is rather diﬀerent in nature than the
regime c > e, and when G ∼ G(n, c/n) for c ≤ e, we are able to give a uniﬁed proof that the rank and
matching number of G both satisfy a central limit theorem (without going through Theorem 1.2(A1)).
Remark. [60] and [49] provide explicit formulas for the asymptotic values of EX and Var X, though
these are a bit too complicated to describe here. It is worth remarking that the asymptotic formula for
Var X is the single place in this paper where there is a material diﬀerence between the “binomial” model
of Erdős–Rényi random graphs (where each edge is present with probability p independently) and the
“uniform” model of Erdős–Rényi random graphs (where we choose a random subset of exactly m edges,
for say m = ⌊p n2 ⌋). Indeed, the variance of the matching number (and therefore the variance of the
rank) diﬀers by a constant factor between these two settings; see [49, 60] for details. For all the other
results in the paper (which are all stated for the binomial model), one can make trivial changes to the
proofs to obtain exactly the same result in the uniform model.
Remark. We believe that a central limit theorem does not hold for the rank of G(n, n, c/n); see Section 1.6.
1.4. Exactly characterising the rank. In this subsection we ﬁnally state our main theorem, giving an
exact combinatorial characterisation of the rank of a sparse random matrix. First, we need to introduce
the Karp–Sipser leaf removal algorithm, which was introduced in 1981 by Karp and Sipser [46] as a tool
to study matchings in random graphs (in a paper which kickstarted the diﬀerential equations method for
random graph processes; see [70]), but is now also of great importance in statistical physics, theoretical
computer science, and random matrix theory (see for example [8, 9, 18, 22, 57]).
                                                     4
                               −1
                                                                    −1                   0                0
                      0                   0


                                                                                                          0
                  1                            1


                                                                     0                   1
                      0                   0
                               −1

                                                                  Non-isolated special cy-
                      Isolated special cycle
                                                                      cle

        Figure 1. On the left is an isolated special cycle with 8 vertices. On the right is a
        non-isolated special cycle with 4 vertices. In both pictures, we depict the entries of a
        kernel vector of the corresponding adjacency matrix. Note that for the isolated cycle,
        one can obtain an additional linearly independent kernel vector by shifting each entry
        one edge clockwise around the cycle.

Definition 1.4 (Karp–Sipser leaf removal). Starting from a graph G, choose an arbitrary degree-1 vertex
and delete it together with its neighbour. Repeat this “leaf-deletion” until no further degree-1 vertices
remain. Let i(G) be the number of isolated vertices in the resulting graph. If G is bipartite, let i1 (G)
and i2 (G) be the number of isolated vertices on the two sides of the bipartition V1 ∪ V2 . Let coreKS (G)
be the graph of remaining non-isolated vertices (the Karp–Sipser core). One can check that i(G) and
coreKS (G) (and i1 (G), i2 (G), if G is bipartite) do not depend on the order that the leaf-deletions are
performed (see for example the appendix of [8]).
   It is easy to check (see Lemma 5.1) that a single step of leaf-removal decreases rank A(G) by exactly
2, and if G is bipartite, decreases rank B(G) by exactly 1. It is then easy to deduce (see Corollary 5.2)
that rank A(G) ≤ n − i(G) for any n-vertex graph G (i.e., corank A(G) ≥ i(G)), and rank B(G) ≤
n − max(i1 (G), i2 (G)) for any (n + n)-vertex bipartite graph G (i.e., corank B(G) ≥ max(i1 (G), i2 (G))).
We will refer to these two bounds as the Karp–Sipser bounds for the rank of A(G) and B(G), respectively.
We remark that there is a one-sided version of the Karp–Sipser bound for B(G) (where leaves are only
removed from one of the two sides of our bipartite graph), sometimes called the 2-core bound in the
computer science and statistical physics literature [3, 24, 29] (here “2-core” refers to a certain hypergraph
notion of a 2-core, not to be confused with the notion in Theorem 1.1).
   The Karp–Sipser process takes care of “tree-like” local dependencies. In random graphs G(n, p) or
G(n, n, p) with np → ∞, these are whp the only types of dependencies that exist (see [27,30]); that is, the
Karp–Sipser core is nonsingular, so the Karp–Sipser bound is sharp. However, in the case p = O(1/n),
there may be “cycle-like” local dependencies in the Karp–Sipser core, such as pairs of degree-2 vertices
with the same neighbourhood. We capture dependencies of this type in the following deﬁnition, depicted
in Figure 1.
Definition 1.5 (Special cycles). Say an induced cycle in a graph G is special if its length is divisible
by 4, and if every second vertex has degree 2 in G. In particular, an isolated cycle is a cycle in which
every vertex has degree exactly 2 (i.e., it is its own connected component), so isolated cycles with length
divisible by 4 are special “in two diﬀerent ways”. Let s(G) be the number of special cycles in G, where
we count each isolated cycle twice.
   If G is bipartite, say an induced cycle in G is 1-special (respectively, 2-special) if its length is divisible
by 4, and every vertex in V1 (respectively, every vertex in V2 ) has degree 2. Let s1 (G) and s2 (G) be the
numbers of 1-special and 2-special cycles in G, respectively.
  To see that a special cycle indeed constitutes a dependency, note that we can construct a kernel vector
by “alternating ±1 entries around a special cycle”, as follows.
Fact 1.6. Let G be a graph on the vertex set V . Let u1 , . . . , u4k (in order) be the vertices of a special
cycle, where u2 , u4 , . . . , u4k have degree 2. Deﬁne v ∈ {−1, 0, 1}V by setting the entries indexed by
                                                        5
u2 , u6 , . . . , u4k−2 to 1 and setting the entries indexed by u4 , u8 , . . . , u4k to −1, and setting all other
entries to zero. (That is to say, we go around the cycle, alternating 1 and −1 on our degree-2 vertices).
Then, v is a kernel vector of A(G).
    When G is a bipartite graph with bipartition V1 ∪ V2 , an analogous construction gives a left kernel
vector of B(G) if u2 , u4 , . . . , u4k ∈ V1 , and a right kernel vector of B(G) if u2 , u4 , . . . , u4k ∈ V2 .
  Our main theorem says that for c 6= e, the rank of a sparse random graph G(n, c/n) or G(n, n, c/n)
can be described in terms of the Karp–Sipser bound and the special cycles within the Karp–Sipser core.
Theorem 1.7. Fix a constant c 6= e.
  (A) Let G ∼ G(n, c/n). Then whp corank A(G) = i(G) + s(coreKS (G)).
  (B) Let G ∼ G(n, n, c/n). Then whp
                                                                                       
                   corank B(G) = max i1 (G) + s1 (coreKS (G)), i2 (G) + s2 (coreKS (G)) .
Remark. If we ﬁx a vertex and consider an exploration process to ﬁnd a special cycle containing that
vertex, it is not hard to show that this process is subcritical and explores only O(1) vertices in expectation.
Via a standard concentration inequality, it follows that whp we can ﬁnd all the special cycles in the
Karp–Sipser core in time O(n). The Karp–Sipser leaf removal process also completes in time O(n), so
Theorem 1.7 actually gives a linear-time algorithm for computing the rank of a sparse random graph6.
  We can also describe the asymptotic distribution of the “defect” in the Karp–Sipser bound; for this
we need to deﬁne some Poisson parameters.
Definition 1.8 (Poisson parameters). For 0 ≤ c < e, let η = η(c) ∈ [0, 1] be the unique solution to the
equation c = ηeη . For c ≥ 0, deﬁne Φc : [0, 1] → [0, 1] by α 7→ 1 − exp(−c exp(−c(1 − α))). If c > e then
Φc has multiple ﬁxed points (see for example [22]); let α∗ = α∗ (c) and α∗ = α∗ (c) be the smallest and
largest of these ﬁxed points, respectively, and let λKS (c) = c(α∗ − α∗ ). For λ ≥ 0 let
                                                 4 !                                  4 !
                        1                  λ                 †        1             λ
              γ(λ) = − log 1 −                          , γ (λ) = − log 1 −
                        4            eλ/2 − e−λ/2                     8           eλ − 1
Then, for c ∈ [0, e) ∪ (e, ∞) let
                                                    (
                                                        − 41 log 1 − η 4
                                                                           
                                                                               if c < e,
                                    γB = γB (c) =
                                                        γ(λKS (c))             if c > e,
                            (                                                           (
            †    †           γB /2           if c < e,                                      0          if c < e,
           γA = γA (c) =                               ,              γA = γA (c) =                †
                             γ † (λKS (c))   if c > e,                                      γB − 2γA   if c > e.
Theorem 1.9. Fix a constant c 6= e.
  (A) Let G ∼ G(n, c/n). Then
                                                                  d
                                        corank A(G) − i(G) → Y + 2Y † ,
                                                                                    †
       where Y, Y † are independent Poisson random variables with means γA (c) and γA (c), respectively.
   (B) Let G ∼ G(n, n, c/n). Then
                                                                                 d
                                     corank B(G) − max(i1 (G), i2 (G)) → Y,
        where Y is Poisson with mean γB (c).
Remark. As written, our proof is not strong enough to estimate the expected defect in the Karp–Sipser
bound, but it does seem to be possible to prove such estimates by taking more care with quantitative
aspects (which we do not pursue in this paper, in the interests of keeping our proofs as simple as
                                                                                †
possible). Speciﬁcally, one expects limn→∞ E[corank A(G) − i(G)] = γA (c) + 2γA   (c) in the setting of (A)
and limn→∞ E[corank B(G) − max(i1 (G), i2 (G))] = γB (c) in the setting of (B).
   The reader is overdue an explanation for the signiﬁcance of the “critical point” c = e. It turns out
that this point amounts to a “phase transition” for the Karp–Sipser process. Namely (in the settings
of both G(n, n, c/n) and G(n, c/n)), for c < e, the Karp–Sipser core whp consists of a tiny number of
vertex-disjoint cycles, whereas for c > e the Karp–Sipser core whp has a single giant component with
nontrivial structure, in addition to a tiny number of vertex-disjoint cycles. This situation parallels the
   6To be precise, we obtain a linear-time algorithm to compute a quantity that agrees with the rank whp.

                                                            6
phase transition (at c = 1) of the components of a random graph, and suggests that when c = e, the Karp–
Sipser core may have similar structure to the 2-core of a critical random graph G(n, 1/n) or G(n, n, 1/n).
Unfortunately, it is very challenging to study the Karp–Sipser core in this critical regime, and essentially
nothing has been rigorously proved (though see the very recent work of Budzinski, Contat, and Curien [20]
on a simpler model of random graphs, and the numerical simulations of Bauer and Golinelli [8]).
   Although our understanding of the critical Karp–Sipser process is not suﬃcient to prove or disprove
Theorem 1.7 at the critical point c = e, we are at least able to show (as a consequence of Theorem 1.9)
that the defect in the Karp–Sipser bound is unbounded in probability for p near e/n, strongly suggesting
that the situation is rather diﬀerent at the critical point.
Theorem 1.10. There is a sequence (pn )∞
                                       n=1 with npn → e, such that:
                                                              p
   (A) For G ∼ G(n, pn ), we have corank A(G) − i(G) → ∞.
                                                                       p
   (B) For G ∼ G(n, n, pn ), we have corank B(G) − max(i1 (G), i2 (G)) → ∞.
Remark. With some more work, it seems that it would be possible to prove that for pn = e/n (or any
(pn )∞
     n=1 for which npn converges suﬃciently rapidly to e), in the settings of both (A) and (B), the defect
in the Karp–Sipser bound is whp at least of order log n. See Remark 5.4.
   We discuss the critical regime c = e further in Section 1.6.
1.5. Degree-constrained random graphs. Both the Karp–Sipser core and the 2-core have minimum
degree at least 2. In fact, more is true: for each of these types of cores, if we condition on the vertex set
of the core, and its number of edges, then it is a uniformly random graph on the conditioned vertex set,
with the conditioned number of edges, subject to the constraint of having minimum degree at least 2 (as
we will see in Section 4).
Definition 1.11. For a set V and a positive integer m ≥ |V |, let K(V, m, 2) be the uniform distribution
on graphs with vertex set V , exactly m edges, and minimum degree at least 2. For a pair of sets
V1 , V2 and a positive integer m ≥ 2 max(|V1 |, |V2 |), let K(V1 , V2 , m, 2) be the uniform distribution on
bipartite graphs with vertex set V1 ∪ V2 , exactly m edges, and minimum degree at least 2. We write
K(n, m, 2) = K({1, . . . , n}, m, 2) and K(n1 , n2 , m, 2) = K({1, . . . , n1 }, {n1 + 1, . . . , n1 + n2 }, m, 2).
  The main engine driving the proofs of Theorems 1.1 and 1.7 is the following theorem on the rank of
K(n, m, 2) and K(n1 , n2 , m, 2), which may be of independent interest.
Theorem 1.12. Fix ε > 0. Recall the deﬁnitions of γ(λ), γ † (λ) from Deﬁnition 1.8.
  (A) Suppose (1 + ε)n ≤ m ≤ n/ε and let G ∼ K(n, m, 2).
      (1) Whp rank A(G) = n − s(G).
      (2) Suppose 2m/n converges to a constant α > 2. Choose λ > 0 such that if Z ∼ Poisson(λ),
                                                     d
           then α = E[Z|Z ≥ 2]. Then s(G) → Y + 2Y † , where Y, Y † are independent Poisson with
           means γ(λ)−2γ † (λ) and γ † (λ) respectively. (Here Y † captures the isolated cycles with length
           divisible by 4, and Y captures the other special cycles.)
   (B) Suppose n1 − n2 → ∞, n1 /n2 → 1 and (1 + ε)(n1 + n2 ) ≤ m ≤ (n1 + n2 )/ε, and let G ∼
       K(n1 , n2 , m, 2).
       (1) Whp rank B(G) = n2 − s2 (G).
       (2) Suppose 2m/(n1 + n2 ) converges to a constant α > 2. Choose λ > 0 such that if Z ∼
                                                                    d                 d
              Poisson(λ), then α = E[Z|Z ≥ 2]. Then s1 (G) → Y and s2 (G) → Y , where Y is Poisson
              with mean γ(λ).
1.6. Further directions. The theory of random Bernoulli matrices (i.e., adjacency matrices of G(n, p),
biadjacency matrices of G(n, n, p), and closely related random matrix models) is very rich, and there
are a large number of conjectures and open problems. See for example the surveys of Guionnet [40] and
Vu [64, 65]. Below we mention some directions which are especially closely related to the present paper.
1.6.1. The critical regime. Perhaps the most obvious direction for further research is to improve our
understanding in the critical case c = e. Unfortunately, our understanding of the critical Karp–Sipser
core is very poor; even its typical number of vertices is unknown (though conjectures motivated by
numerical simulations have been made by Bauer and Golinelli [8], and a rigorous result was recently
obtained by Budzinski, Contat, and Curien [20] for a simpler model of random graphs). Also, we suspect
that in the critical case, the Karp–Sipser core typically has nearly as many vertices as edges (i.e., the
average degree is very close to 2), so Theorem 1.12 does not apply, motivating the following question.
                                                         7
Question 1.13. What can we say about the typical rank of the adjacency matrix of G ∼ K(n, n+t, 2), for
t = o(n)? What can we say about the typical rank of the biadjacency matrix of G ∼ K(n1 , n2 , 2n1 + t, 2),
for n1 ≥ n2 with n1 = (1 + o(1))n2 and t = o(n1 )?
   We remark that if t = O(1) then the special cycles may intersect each other, and the combinatorial
description of the rank in Theorem 1.12(1) no longer holds whp. In this case there may simply not exist
a description of the rank that holds whp and which can be reasonably described as “combinatorial”.
1.6.2. The asymptotic distribution of the rank. In Corollary 1.3 we proved a central limit theorem for the
rank of G(n, c/n) for c < 1 or c > e, complemented by upcoming work with Goldschmidt and Kreačić [38]
in which we handle the regime c ≤ e. We wonder whether it may also be possible to prove a local central
limit theorem for the rank. Indeed, it seems plausible that (at least in the regime c > e) the techniques
in [23] might be helpful to prove a local central limit theorem for the Karp–Sipser bound n − i(G); we
suspect that it would then be possible to adapt the methods in this paper to deduce a local central limit
theorem for the rank of G(n, c/n).
   However, we do not believe that even a coarse central limit theorem holds for the rank of G ∼
G(n, n, c/n). Recall that corank B(G) is approximately max(i1 (G), i2 (G)); we believe that the asymp-
totic joint distribution of i1 (G) and i2 (G) is a nontrivial bivariate Gaussian, in which case the limiting
distribution of rank B(G) would be expressible in terms of the maximum of two Gaussians.
1.6.3. Other sparse random matrix distributions. One may wish to study more general types of sparse
random matrices than G(n, p) and G(n, n, p). For example, we could ﬁx a distribution L for the nonzero
entries (instead of having every nonzero entry be exactly 1). The methods in this paper are quite
robust, and we believe it should be possible to handle random matrices of this type, though the notion
of “special cycle” would have to be adapted accordingly (the defect in the Karp–Sipser bound would still
be controlled by short cycles, but it would be more complicated to describe exactly which short cycles
are relevant).
   However, the methods in this paper do have some limitations: they are only suitable when an ap-
proximate rank result is available (e.g., recall that Bordenave, Lelarge and Salez [18] found a formula for
the rank of G(n, p) up to o(n) additive error). Our methods also do not apply to graphs with bounded
degree (e.g. random regular graphs, which were recently shown to have full rank whp by Huang [41] and
Mészáros [56], in breakthrough works using completely diﬀerent methods to the present paper).
1.6.4. Rank over other ﬁelds. One may wish to study rank over ﬁelds other than R (e.g., rank over F2 ).
We do not believe that an exact combinatorial characterisation of the rank is actually possible over ﬁnite
ﬁelds, because in general dependencies need not be “local” (even a dense random matrix has a nontrivial
probability of being singular over F2 ). However, we do believe that there are typically very few “non-local
dependencies”, and in particular it should still be true that the defect in the Karp–Sipser bound (for
both G(n, n, c/n) and G(n, c/n), with c 6= e) is bounded in probability.
    To prove this would require a number of modiﬁcations to our proof (for example, one should incorpo-
rate some of the techniques in [32], which build on ideas introduced in [53]). The most signiﬁcant obstacle
is that our proof uses spectral convergence machinery due to Bordenave, Lelarge and Salez [18] which is
fundamentally only suitable for real rank. In the bipartite setting (i.e., for G(n, n, p)) one can substitute
machinery due to Coja-Oghlan, Ergür, Gao, Hetterich, and Rolvien [24], which provides asymptotic for-
mulas for the rank of a broad class of random matrices over arbitrary ﬁelds. In the non-bipartite setting,
such machinery is not yet available in appropriate generality, but an exciting ﬁrst step in this direction
was very recently made by van der Hofstad, Müller, and Zhu [63].
1.7. Notation. We use the notation δ ≪ ε to indicate that δ is suﬃciently small in terms of ε (so
1/M ≪ ε means that M is suﬃciently large in terms of ε, and ε ≪ 1 means that ε is suﬃciently small
in absolute terms).
   We use standard asymptotic notation throughout, as follows. For functions f = f (n) and g = g(n),
we write f = O(g) or f . g to mean that there is a constant C such that |f (n)| ≤ C|g(n)| for suﬃciently
large n. Similarly, we write f = Ω(g) or f & g to mean that there is a constant c > 0 such that
f (n) ≥ c|g(n)| for suﬃciently large n. Finally, we write f ≍ g or f = Θ(g) to mean that f . g and
g . f , and we write f = o(g) or g = ω(f ) to mean that f (n)/g(n) → 0 as n → ∞. Subscripts on
asymptotic notation indicate quantities that should be treated as constants.
   We also use standard graph-theoretic notation. In particular, V (G) and E(G) denote the vertex set
of a graph G, and v(G) = |E(G)| and e(G) = |E(G)| denote the numbers of vertices and edges. We
write G[U ] to denote the subgraph induced by a set of vertices U ⊆ V (G). For a vertex v ∈ V (G),
                                                      8
its neighborhood (i.e., the set of vertices adjacent to v) is denoted by NG (v), and its degree is denoted
degG (v) = |NG (v)| (the subscript G will be omitted when it is clear from context). We also write
NU (v) = U ∩ N (v) and degU (v) = |NU (v)| to denote the degree of v into a vertex set U .
   Somewhat less standardly, in this paper all bipartite graphs will have parts indexed by 1 and 2. We
write V1 (G), V2 (G) for the two parts of a bipartite graph G, and write v1 (G), v2 (G) for the number of
vertices in each part. For a set of vectors S, we write dim S for the dimension of the span of S, and we
write supp(S) for the union of supports of vectors in S.
   We deﬁne the double factorial n!! to be the product of all integers from 1 to n which have the same
parity as n, and we deﬁne the falling factorial (n)k = n!/(n − k)!. For a real number x, the ﬂoor and
ceiling functions are denoted ⌊x⌋ = max(i ∈ Z : i ≤ x) and ⌈x⌉ = min(i ∈ Z : i ≥ x). We will however
sometimes omit ﬂoor and ceiling symbols and assume large numbers are integers, wherever divisibility
considerations are not important. All logarithms in this paper without an explicit base are to base e,
and the set of natural numbers N includes zero.
1.8. Acknowledgments. We would like to thank Noga Alon for suggesting that our main result gives
a linear-time algorithm for computing the rank.

                               2. Overview of the paper and proofs
   Most of the paper (all of Sections 7 to 12) is devoted to Theorem 1.12(1), characterising the corank
of a degree-constrained random graph. Before discussing its proof, we brieﬂy outline the reductions for
the other theorems:
      • For the asymptotic distribution of the corank (Theorem 1.12(2)): we simply need to understand
        the asymptotic distribution of the number of special cycles in a degree-constrained random graph
        (K(n, m, 2) or K(n1 , n2 , m, 2)). This can be done with standard techniques (namely, we perform
        a method-of-moments calculation in the so-called conﬁguration model for random graphs with
        a given degree sequence, after using standard Poisson approximation techniques to study the
        typical degree sequence of K(n, m, 2) and K(n1 , n2 , m, 2)). The details appear in Section 13.
      • Regarding the 2-core (Theorem 1.1): for G ∼ G(n, c/n) with c > 1, it is easy to estimate the
        typical number of vertices and edges in the 2-core of G (in particular, there are whp Ω(n) vertices
        and the average degree is 2 + Ω(1)). So, Theorem 1.1 follows directly from Theorem 1.12. The
        details appear in Section 4.
      • Regarding our main rank characterisation theorems (Theorems 1.7 and 1.9): for G ∼ G(n, c/n)
        with c > e, the typical number of vertices and edges in the Karp–Sipser core of G were already
        studied in the seminal work of Karp and Sipser (again, there are whp Ω(n) vertices and the aver-
        age degree is 2 + Ω(1)). So, in this case the conclusions of Theorem 1.7(A) and Theorem 1.9(A)
        again follow directly from Theorem 1.12. The case c < e is actually much simpler, and does not
        require Theorem 1.12: it was shown by Aronson, Frieze and Pittel [5] that for G ∼ G(n, c/n)
        with c < e, the Karp–Sipser core of G whp consists purely of vertex-disjoint cycles (Lemma 4.4),
        so the conclusions of Theorem 1.7(A) and Theorem 1.9(A) then follow simply by reasoning about
        the rank of adjacency matrices of cycles. In all cases, the bipartite setting (for Theorem 1.7(B)
        and Theorem 1.9(B)) can be handled similarly.
      • Theorem 1.10 (regarding the critical regime npn → e) follows from Theorem 1.9, and the obser-
        vation that the Poisson parameters deﬁned in Deﬁnition 1.8 blow up as c → e.
      • For the comparison between rank and matching number (Theorem 1.2): It turns out that
        Theorem 1.2(A2) and (B) follow directly from Theorem 1.7, via certain trivial inequalities con-
        cerning ν(G) and σ(G). For Theorem 1.2(A1), we combine Theorem 1.7 with an exact description
        of the matching number of K(n, m, 2) due to Frieze and Pittel [37].
      • Corollary 1.3 (the central limit theorem for the rank) is an essentially immediate deduction from
        central limit theorems for the matching number due to Pittel [60] and Kreačić [49]. The details
        appear in Section 13.
The deductions of Theorems 1.2, 1.7, 1.9, and 1.10 all appear in Section 5, together with various facts
about the Karp–Sipser process. We also remark that Section 3 contains a few basic preliminary facts that
will be used throughout the paper, Section 4 contains some basic facts about 2-cores and Karp–Sipser
cores, and Section 6 contains some general facts about degree-constrained random graphs.
   Now we discuss the tools and ideas in the proof of Theorem 1.12(1) (restricting our attention to (A1),
which is the slightly more diﬃcult of the two settings; (B1) is proved in essentially the same way, but
certain minor simpliﬁcations are possible, sketched in Section 12).
                                                     9
2.1. Spectral convergence. Qualitatively, Theorem 1.12(1) says that degree-constrained random graphs
are very nearly nonsingular (the only obstructions to singularity are a small number of special cycles).
One can obtain a much weaker result in a similar spirit using spectral convergence machinery of Borde-
nave, Lelarge, and Salez [18]. Speciﬁcally, there is a notion of local weak convergence of graphs, introduced
independently by Benjamini and Schramm [12] and by Aldous and Steele [4]. In [18], it is shown that
when a sequence of graphs locally weakly converges to a Galton–Watson tree, then the spectrum also
converges, and one can estimate the limiting rank via a generating function associated with the Galton–
Watson tree. (The fact that spectral information can be deduced from a local limit is not surprising,
in light of the fact that the t-th moment of the empirical spectral distribution is precisely equal to the
number of closed walks of length t.) It can be shown that if limn→∞ nmn converges to a limit, then
the local weak limit of K(n, mn , 2) is a Galton–Watson tree whose oﬀspring distribution has an explicit
(“truncated Poisson”) distribution. With a simple calculation concerning generating functions associated
with truncated Poisson distributions, and a compactness argument, one can use the machinery of [18] to
show that in the setting of Theorem 1.12(A1), we have corank(G) = o(n) whp.
   Of course, the above result is far weaker than the statement of Theorem 1.12 (we hope to prove that
corank(G) is bounded in probability, not just that corank(G) = o(n)). We will make up the diﬀerence
using a “rank-boosting” strategy, using tools that are traditionally used to study singularity of random
matrices (in particular, tools related to the Littlewood–Oﬀord problem).

2.2. The evolving rank, and the Littlewood–Offord problem. In this subsection we very brieﬂy
explain the techniques in the seminal paper of Costello, Tao, and Vu [26] (building on the original
ideas of Komlós [47, 48]), who proved that dense random graphs are nonsingular. Roughly speaking,
their approach was to reveal a random graph (say G(n, 1/2)) in a vertex-by-vertex fashion, at each step
studying how the addition of a new vertex aﬀects the rank. They proved that if, at a given step, the
corank is nonzero, then at the next step the corank will typically decrease by one. On the other hand, if
the corank is already zero, then at the next step the corank will typically stay at zero. In this way, they
could view the evolution of the corank as a random walk that heavily trends towards zero, and show
that such random walks almost always end at zero.
    In order to implement this strategy, it is necessary to understand how the rank changes when we add
a new vertex. For example, if we add a new vertex v to a graph H to obtain a graph H + v (and let x
be a random zero-one vector describing the presence of edges between v and the vertices of H), then the
determinant of A(H + v) can be expressed as a quadratic polynomial in x (with coeﬃcients depending on
H). So, showing that H + v is full-rank is tantamount to showing that a certain quadratic polynomial is
nonzero. Correspondingly, an important ingredient in [26] was the fact that certain quadratic polynomials
of independent random variables are unlikely to be zero.
    The Littlewood–Oﬀord problem studies the point probabilities of sums of independent discrete random
variables. In particular, the fundamental theorem in this ﬁeld is the Erdős–Littlewood–Oﬀord theorem,
which was used in Komlós’ foundational papers [47, 48] on discrete random matrices. To study the
evolving rank of a random graph, Costello, Tao, and Vu initiated the study of the quadratic Littlewood–
Oﬀord problem: speciﬁcally, they proved that if an N -variable real quadratic polynomial f has Ω(N 2 )
nonzero coeﬃcients, and x ∈ {0, 1}N is a uniform random binary vector, then Pr[f (x) = 0] ≤ N −1/8 . It
turns out that in order to fully understand the evolution of the rank one needs Littlewood–Oﬀord-type
theorems of both linear and quadratic type: in order to show that the corank typically decreases when
it is nonzero, one considers a linear Littlewood–Oﬀord problem, and in order to show that the corank
typically stays zero when it is zero, one considers a quadratic Littlewood–Oﬀord problem.
    A key reason for the diﬃculty of studying sparse random matrices is that Littlewood–Oﬀord theorems
break down in very sparse settings: if x ∈ {0, 1}N is a random binary vector in which every entry is 1 with
probability only c/N , it is simply not in general true that the event f (x) = 0 is unlikely. For example,
if f (x) = x1 + · · · + xN or f (x) = (x1 + · · · + xN )2 (in the linear and quadratic cases, respectively),
then the asymptotic distribution of f (x) is Poisson(c), or the square of a Poisson(c) distribution, and
the point probabilities of f (x) are of the form Ω(1). Roughly speaking, the problem is that in this very
sparse regime there is “not enough randomness” in x.

2.3. Rank-boosting. The key insight to overcome this issue is as follows. In the setting of Theorem 1.12,
while the average degree of G is typically only O(1), whp there are at least a few vertices with much
higher degree. Indeed, the maximum of n independent Poisson random variables is typically about
log n/ log log n, and correspondingly it turns out that G typically has at least a few vertices of that
degree. More qualitatively, for any β = o(1), the βn highest-degree vertices all have degree ω(1).
                                                     10
   In [33], Ferber and the last three authors leveraged this observation together with the techniques
discussed in the last two subsections, to prove that the k-core of a random graph (for k ≥ 3) is nonsingular
whp. Speciﬁcally, for a random n-vertex graph constrained to have minimum degree at least k, they
designed a procedure to identify βn vertices of high degree without actually revealing the neighbours of
these vertices. They then showed that the graph induced by the remaining (1 − β)n vertices locally
weakly converges to a Galton–Watson tree, and used the machinery in [18] to prove that the corank of
this graph is at most say βn/2 whp. Now, adding back the βn high-degree vertices one-by-one, and
studying the evolution of the rank, at each step there is quite a lot of randomness, because each of
these vertices has high degree and its neighbourhood has not yet been revealed. So, with a random walk
argument together with a quadratic Littlewood–Oﬀord theorem, they could show that at the end of this
vertex-adding process the corank has decreased from βn/2 to zero whp.
   At a high level, the approach in this paper is to apply the same rank-boosting strategy to K(n, m, 2) to
prove Theorem 1.12. However, the situation is far more delicate, for reasons we discuss in the following
subsections.
2.4. The small-support kernel, minimal kernel vectors, and stalks. The above rank-boosting
strategy cannot succeed as written, because it is simply not true that K(n, m, 2) is nonsingular whp (due
to the possible existence of special cycles). This is due to an issue we have so far neglected to mention:
for any Littlewood–Oﬀord-type approach (in which we study the rank via events of the form f (x) = 0),
it is necessary to establish “non-degeneracy” conditions for f . For instance, we need to ensure that f
has many nonzero coeﬃcients (to see that something like this is necessary, note that if f were the zero
polynomial, we would have f (x) = 0 with probability 1, no matter how dense of a random vector x is).
    The polynomials f that we need to consider are deﬁned in terms of the evolving random graph G
(as we add vertices one-by-one). It turns out that if, at some point in the process, f has few nonzero
coeﬃcients, this essentially corresponds to A(G) having a kernel vector with small support (i.e., with
few nonzero entries)7. Therefore, an essential part of the Littlewood–Oﬀord-based proofs mentioned so
far [26, 33, 47, 48] is to prove that A(G) has no small-support kernel vectors.
    Crucially, this can be accomplished by purely combinatorial means: for example, if v is a kernel
vector of an adjacency matrix A(G) (such that the nonzero entries of v correspond to a set of vertices
R, say), then when a vertex has a neighbour in R, it must in fact have at least two neighbours in
R (in order for there to be a cancellation yielding zero in the corresponding entry of A(G)v). In the
settings of [26,33,47,48], one can simply use a crude combinatorial union bound calculation to show that
whp there are no small sets R with this property (for example, in [33], one can simply use that R and
its neighbours would comprise an atypically dense set, which is unlikely to appear in a sparse random
graph). Speciﬁcally, union bounds of this type can be made to work as long as R ≤ ηn for some small
constant η. We remark that when studying the k-core (for k ≥ 3) in [33], it was possible to engineer the
high-degree-vertex extraction in such a way that (crude union bounds show that) whp no short kernel
vectors ever appear during the entire vertex-adding process.
    Unfortunately, in the setting of Theorem 1.12, small-support kernel vectors seem to be unavoidable:
special cycles may exist in K(n, m, 2) itself, and since we are no longer assuming k ≥ 3 it seems to be
impossible to engineer our high-degree vertex extraction to avoid the emergence of many small-support
kernel vectors during our vertex-adding process. Instead, we need to perform a very delicate calculation
to upper-bound the numbers of various types of small-support kernel vectors (and in particular to show
that at the end of the vertex-adding process, whp the only short kernel vectors are those corresponding
to special cycles, and linear combinations thereof). It turns out that a naïve union bound does not
suﬃce here, and we need to consider a notion of minimal kernel vectors (essentially, kernel vectors which
cannot be broken down into kernel vectors with smaller support). This notion was ﬁrst considered by
DeMichele, the ﬁrst author, and Moreira in [30]. A large part of the paper (Section 11) is spent very
carefully studying the expected number of combinatorial conﬁgurations corresponding to minimal kernel
vectors (called stalks), with support size at most ηn, in degree-constrained random graphs. (Unlike in
[33], we cannot merely consider the density of a stalk; we need to very carefully consider its structure.)
2.5. Boosting the large-support kernel, and a special-purpose pseudoinverse. Due to the ex-
istence of small-support kernel vectors, the evolution of the rank no longer has such a simple description
    7To be precise, recall that we may need to consider either linear or quadratic f , depending on the situation. In the
linear case, the coeﬃcients of f correspond precisely to a kernel vector, and in the quadratic case there is a correspondence
between coeﬃcients of f and “almost kernel vectors” of A(G) (i.e., vectors v such that A(G)v has only two nonzero entries).
So, in much of what follows, we really need to consider almost kernel vectors as well as kernel vectors.
                                                             11
as in [26, 33]. Instead of showing that the corank drifts towards zero, we show that the corank “drifts
towards the dimension of the small-support kernel”. Speciﬁcally, we prove that if there is a kernel vector
with large support, then the corank decreases whp, and in any case the corank whp does not increase.
It turns out that it is still possible to control the probabilities of these events via events of the form
f (x) = 0 for some linear or quadratic polynomials f , but unlike in [26, 33], we cannot deﬁne f in terms
of a determinant (because if there is any kernel vector the determinant is always zero). Instead, our
polynomial f is deﬁned in terms of a special-purpose “pseudoinverse”, ﬁrst (implicitly) considered in [30].
We state and prove a general purpose rank-boosting lemma, summarising a one-step application of a
linear and quadratic Littlewood–Oﬀord theorem, in Section 8.
2.6. Robust analysis of a random walk. Summing up, our approach is as follows. After extracting
high-degree vertices and showing that the resulting graph has small corank (executed in Section 9), we
add back the high-degree vertices one-by-one, and consider the evolution of the rank of this random
                               (η)
graph process. Letting dim Kt be the dimension of the span of small-support kernel vectors at time t
                                                                                           (η)
(which is a lower bound for the corank at time t), we prove an upper bound on E dim Kt (in terms of
t) via direct combinatorial means, and prove using Littlewood–Oﬀord theorems that the corank trends
                (η)
towards dim Kt . We wish to combine all these ingredients to prove that at the end of the process, whp
                                      (η)
the corank is exactly equal to dim Kt (which we then show is equal to s(G)).
   In order to execute this plan, we need a more robust random walk analysis than in [26, 33]. The main
issue is that because we no longer have the “wiggle room” aﬀorded by the assumption k ≥ 3, it is much
                                                                                       (η)
harder to prove bounds that hold whp for all steps t (e.g., our bounds on E dim Kt , together with
Markov’s inequality, do not provide strong enough probabilistic bounds for a union bound over all t).
Instead, we have estimates that hold for most steps t, and we need a more robust analysis of random
walks that can tolerate a small number of “bad steps” (as long as they are not clustered near the end of
the process). We present a general lemma along these lines in Section 7, which we hope will be useful for
other applications. In Section 10 we put everything together, completing the proof of Theorem 1.12(A1).

                                           3. Preliminaries
   In this section we collect some basic facts that will be used throughout the paper. First, to unify
the proofs for the bipartite and nonbipartite cases to the greatest extent possible, we observe that for a
bipartite graph G, the rank of its biadjacency matrix is related to the rank of its adjacency matrix.
Fact 3.1. If G is bipartite, then rank A(G) = 2 rank B(G)
Proof. This follows immediately from the fact that (given an appropriate ordering of the vertices) A(G)
has the block representation                             
                                              0     B(G)⊺
                                                            .                                         
                                           B(G)        0
   We will also need a Chernoﬀ bound for binomial and hypergeometric distributions (see for example
[44, Theorems 2.1 and 2.10]). Recall that the hypergeometric distribution Hyp(N, K, n) is the distribution
of |Z ∩ U |, for ﬁxed sets U ⊆ S with |S| = N and |U | = K and a uniformly random size-n subset Z ⊆ S.
Lemma 3.2 (Chernoﬀ bound). Let X be either:
     • a sum of independent random variables, each of which take values in {0, 1}, or
     • hypergeometrically distributed (with any parameters).
Then for any δ > 0 we have
        Pr[X ≤ (1 − δ)EX] ≤ exp(−δ 2 EX/2),          Pr[X ≥ (1 + δ)EX] ≤ exp(−δ 2 EX/(2 + δ)).
  Finally, we will need a consequence of the Azuma–Hoeﬀding inequality (see [44, Theorem 2.25]).
Lemma 3.3. Let Z be a random variable deﬁned in terms of a sequence of random variables X0 , . . . , Xn ,
such that modifying any individual Xk changes Z by at most ck . Then
                                                               t2
                                                                  
                                P[|Z − EZ| ≥ t] ≤ 2 exp − P 2 .
                                                           2 k ck
                                        4. Structure of cores
   In this section we collect some standard results on the 2-core and the Karp–Sipser core of a sparse
random graph.
                                                    12
4.1. The 2-core. First, the following description of the component structure of the supercritical 2-core
follows immediately from, e.g., [44, Theorem 5.12] and the main result of [31].
Lemma 4.1. Fix a constant c > 1 and let G ∼ G(n, c/n). Then whp the following holds. The giant
component of G has a 2-core which is connected, has Ω(n) vertices, and has average degree 2 + Ω(1).
Also, all components outside the giant either have empty 2-core or their 2-core is a cycle.
   Second, the following lemma concerns the edge and vertex statistics of the supercritical 2-core (there
are whp Ω(n) vertices, and the average degree is whp 2 + Ω(1)). It follows from, e.g., [36, Lemma 2.16].
Lemma 4.2. Fix c > 1, and let λ2 = λ2 (c) > 0 be the unique solution to λ2 /(1 − e−λ2 ) = c. There is
β = β(c) > 0 such that the following holds. Let Z be a Poisson random variable with mean λ2 , and let
G ∼ G(n, c/n). Then
                          v(core2 (G)) p        2e(core2 (G)) p
                                       → β,                   → E[Z|Z ≥ 2] > 2.
                               n                     βn
  Note that Theorem 1.1 directly follows from Theorem 1.12(A) given Lemmas 4.1 and 4.2, as follows.
Proof of Theorem 1.1. For G ∼ G(n, c/n), it is well-known (see for example [33, Lemma 6.1]) that given
the vertex set W of the 2-core and its number of edges m, we have core2 (G) ∼ K(W, m, 2). So, by
Theorem 1.12(A) and Lemma 4.2, after deleting isolated special cycles, the asymptotic distribution of
the corank is Poisson with mean γ(λ2 )−2γ † (λ2 ). Considering the probability that such a Poisson random
variable is equal to zero, and recalling the structural description in Lemma 4.1 (whp the giant component
is obtained precisely by deleting isolated cycles), the desired result follows.                         
4.2. The Karp–Sipser core. For the Karp–Sipser core, we need some results for both the supercritical
(c > e) and subcritical (c < e) cases. First, for the supercritical Karp–Sipser core, we need a counterpart
of Lemma 4.2, and in the bipartite setting, we need the fact that the two sides of the Karp–Sipser core
have quite diﬀerent sizes.
Lemma 4.3. Fix a constant c > e. Let λKS = λKS (c) be as in Deﬁnition 1.8, and let Z be a Poisson
random variable with mean λKS . There is β = β(c) > 0 such that the following holds.
   (A) If G ∼ G(n, c/n) then
                      v(coreKS (G)) p           2e(coreKS (G)) p
                                    → β,                       → E[Z|Z ≥ 2] > 2.
                             n                       βn
   (B) Let G ∼ G(n, n, c/n).
       (1) For each i ∈ {1, 2},
                         vi (coreKS (G)) p      e(coreKS (G)) p
                                         → β,                 → E[Z|Z ≥ 2] > 2.
                                n                    βn
                                                p
        (2) |v1 (coreKS (G)) − v2 (coreKS (G))| → ∞.
   Lemma 4.3(B2) appears as [22, Lemma 7.1]. There are multiple ways to prove Lemma 4.3(A) and
Lemma 4.3(B1). One classical way is to use the so-called diﬀerential equations method to study the likely
trajectories of certain statistics associated with the Karp–Sipser process. In the setting of (A), this was
done by Karp and Sipser [46] in one of the ﬁrst applications of the diﬀerential equations method. Their
analysis was later reﬁned by Aronson, Frieze, and Pittel [5] (see also the discussion in [49]). A more
modern approach (which arguably yields simpler proofs, though often with worse quantitative aspects) is
to express the relevant statistics in terms of ﬁxed points of a certain warning propagation operator. This
was done by Coja–Oghlan, Cooley, Kang, Lee, and Ravelomanana [22] in the setting of (B) (speciﬁcally,
Lemma 4.3(B1) appears as [22, Proposition 2.6]). Both approaches work equally well in the settings of
(A) and (B), with very minor alterations to the proofs.
   Second, in the subcritical case (c < e), we need the fact that the Karp–Sipser core consists only
of vertex-disjoint cycles, and the numbers of cycles of each length are asymptotically jointly Poisson
distributed.
Lemma 4.4. Fix a constant c < e. Let η ∈ [0, 1] be the unique solution to c = ηeη .
  (A) If G ∼ G(n, c/n) then whp coreKS (G) is a collection of vertex-disjoint cycles. Let Nℓ be the
      number of such cycles of length ℓ, and let (Zℓ )∞
                                                      ℓ=3 be a sequence of independent Poisson random
      variables with EZℓ = η ℓ /(2ℓ). Then v(coreKS (G)) is bounded in probability and
                                                    d
                                           (Nℓ )∞          ∞
                                                ℓ=3 → (Zℓ )ℓ=3 .
                                                    13
   (B) If G ∼ G(n, n, c/n) then whp coreKS (G) is a collection of vertex-disjoint cycles. Let Nℓ be the
       number of such cycles of length ℓ, and let (Z2k )∞
                                                        k=2 be a sequence of independent Poisson random
       variables with EZ2k = η 2k /(2k). Then v(coreKS (G)) is bounded in probability and
                                                      d
                                         (N2k )∞           ∞
                                               k=2 → (Z2k )k=2 .
   Lemma 4.4(A) is implicit in the proof of [5, Theorem 2], and Lemma 4.4(B) can be proved in essentially
the same way (as the bipartite case of Lemma 4.4 has not explicitly appeared in the literature before,
we provide a brief sketch in Appendix A).
   It turns out that the Karp–Sipser core enjoys the same symmetry property as the 2-core: if we
condition on the vertex set W of the Karp–Sipser core, and its number of edges m, then coreKS (G) is
distributed as K(W, m, 2) (or K(W1 , W2 , m, 2), in the bipartite case, where W = W1 ∪ W2 ).
Lemma 4.5. Consider any 0 ≤ p ≤ 1.
  (A) Let G ∼ G(n, p), let W be the vertex set of coreKS (G) and let m be the number of edges in
      coreKS (G). Then the conditional distribution of coreKS (G) is K(W, m, 2).
  (B) Let G ∼ G(n1 , n2 , p), let W1 ∪ W2 be the vertex set of coreKS (G) and let m be the number of
      edges in coreKS (G). Then the conditional distribution of coreKS (G) is K(W1 , W2 , m, 2).
Proof. We prove (A); the proof of (B) is similar. Consider any two graphs H, H ′ on the vertex set W with
m edges and minimum degree at least 2. For any outcome of G yielding coreKS (G) = G[W ] = H, we can
simply replace G[W ] with H ′ to obtain an outcome of G yielding coreKS (G) = H ′ (iterated leaf removal
yields G[W ] in both cases). This implies that H and H ′ are equally likely to occur as coreKS (G).    
   In much the same way that we were able to deduce Theorem 1.1 (on the 2-core) from the lemmas in
Section 4.1 together with Theorem 1.12, we will be able to deduce Theorems 1.2 and 5.3 from the lemmas
in this subsection together with Theorem 1.12. However, the deductions are not quite as immediate, so
we save them for the next section.

                                   5. Karp–Sipser leaf removal
   In this section we make some basic observations about the Karp–Sipser leaf-removal process, and show
how to deduce Theorems 1.2, 1.7, 1.9, and 1.10 from these observations together with Theorem 1.12.
   It is a simple fact (ﬁrst observed by Karp and Sipser [46]) that in any graph G, removing a degree-
1 vertex and its neighbour reduces the matching number by exactly 1. This leaf removal also has a
predictable eﬀect on rank A(G) and σ(G), and on rank B(G), if G is bipartite. (Recall that σ(G) is the
size of the largest permutation matrix “contained” in A(G), where our notion of matrix containment
allows deleting rows and columns, and changing 1-entries to 0-entries.)
Lemma 5.1. Fix any graph G, and delete a leaf v and its neighbour w to obtain a graph G′ .
  (A) rank A(G′ ) = rank A(G) − 2 and σ(G′ ) = σ(G) − 2.
  (B) If G is bipartite then rank B(G′ ) = rank B(G) − 1.
Proof. For (B), without loss of generality we can assume that v corresponds to the ﬁrst row and w
corresponds to the ﬁrst column. Then, observe that
                                                           
                                                1 0 ··· 0
                                              x2           
                                     B(G) =  .
                                                           
                                              ..
                                                            
                                                         ′
                                                      B(G ) 
                                                 xn
for some x2 , . . . , xn ∈ {0, 1}. Since B(G) comes from adding a zero row to the top of B(G′ ) and then
adding a column, clearly rank B(G) ≤ rank B(G′ ) + 1. Furthermore, for every full-rank submatrix
of B(G′ ), we can add the ﬁrst row and column of B(G) to obtain a full-rank submatrix of B(G), so
rank B(G) ≥ rank B(G′ ) + 1. The result follows.
   Similarly, for (A), without loss of generality we can assume that v corresponds to the ﬁrst row and
column, and w corresponds to the second row and column. Then,
                                                                   
                                                 0 1 0 ··· 0
                                               1 0 y3 · · · yn 
                                                                   
                                        A(G) = 0 y3
                                                                   
                                                .. ..
                                                                    
                                                                    
                                               . .            ′
                                                           A(G ) 
                                                 0 yn
                                                   14
for some y3 , . . . , yn ∈ {0, 1}. For every full-rank submatrix of A(G′ ), we can add the ﬁrst two rows
and columns of A(G) to obtain a full-rank submatrix of A(G), and we similarly deduce rank A(G) =
rank A(G′ ) + 2. For σ, any permutation submatrix contained in A(G′ ) gives rise to a permutation
submatrix in A(G) with two more rows and columns, so we deduce σ(G) = σ(G′ ) + 2.                     
   Now we formally state the Karp–Sipser bounds on rank and matching number that were mentioned
in the introduction.
Corollary 5.2. Fix any graph G.
  (A) max(rank A(G), 2ν(G)) ≤ σ(G) ≤ v(G) − i(G).
  (B) If G bipartite with vertex set V1 ∪ V2 then
                         rank B(G) ≤ ν(G) ≤ min(v1 (G) − i1 (G), v2 (G) − i2 (G)).
Proof. First we prove (A). Recall from the introduction (Section 1.2) that rank A(G) ≤ σ(G) and
2ν(G) ≤ σ(G). So, it suﬃces to prove σ(G) ≤ n − i(G). Let v c = v(coreKS (G)). The number of
leaf-removal steps in the Karp–Sipser process is (v(G) − v c − i(G))/2, so by Lemma 5.1(A), we have
σ(G) = v(G)−v c −i(G)+σ(coreKS (G)). The desired result follows from the fact that σ(coreKS (G)) ≤ v c .
   Now we prove (B). Recall from the introduction that rank B(G) ≤ ν(G), so it suﬃces to prove that
ν(G) ≤ min(v1 (G) − i1 (G), v2 (G) − i2 (G)). For i ∈ {1, 2}, let vic = vi (coreKS (G)). The number of leaf-
removal steps is v1 (G) − v1c − i1 (G) = v2 (G) − v2c − i2 (G); since each leaf-removal reduces the matching
number by exactly 1 we have
           ν(G) = v1 (G) − v1c − i1 (G) + ν(coreKS (G)) = v2 (G) − v2c − i2 (G) + ν(coreKS (G)).
The desired result then follows from the fact that ν(coreKS (G)) ≤ min(v1c , v2c ).                       
5.1. Deductions. We now show how to deduce Theorems 1.2, 1.7, 1.9, and 1.10.
Proof of Theorems 1.7 and 1.9. First we prove (A). Let v = v(coreKS (G)) and m = e(coreKS (G)). The
number of leaf-removal steps is (n − v − i(G))/2, so
                             rank A(G) = n − v − i(G) + rank A(coreKS (G))
by Lemma 5.1(A). For Theorem 1.7 we need to prove that rank A(coreKS (G)) = v − s(coreKS (G)) whp.
     • If c < e then by Lemma 4.4(A), whp coreKS (G) is a vertex-disjoint union of cycles (and the
       number of cycles of length ℓ is asymptotically Poisson, with parameter η ℓ /(2ℓ), where η is the
       unique solution to the equation c = ηeη ). It is easy to compute (see for example [59, Example 7.8])
       that for a length-ℓ cycle Cℓ we have
                                            (
                                              ℓ − 2 if ℓ is divisible by 4,
                              rank A(Cℓ ) =
                                              ℓ         otherwise.
        So, whp rank A(coreKS (G)) = v − s(coreKS (G)), proving Theorem 1.7(A). For Theorem 1.9(A),
        note
        P∞ that the defect in the Karp–Sipser bound is exactly twice the number of 4-divisible cycles
          k=1 N4k (with notation as in Lemma 4.4). Recall that any P sum of independent Poisson random
                                                                       ∞
        variables is itself Poisson, and that v is bounded whp. Hence k=1 N4k is Poisson with parameter
                                         ∞
                                         X η 4k        1
                                                    = − log(1 − η 4 ),
                                               8k      8
                                         k=1
        and the result follows.
      • If c > e then by Lemma 4.3(A) we have v = Ω(n) and m/v = 1 + Ω(1) and m/v = O(1)
        whp. Conditioning on such an outcome of v, m, by Lemma 4.5 and Theorem 1.12(A) we have
        rank A(coreKS (G)) = v − s(coreKS (G)) whp, and the defect s(coreKS (G)) in the Karp–Sipser
        bound has the required asymptotic distribution.
   Next we prove (B). For i ∈ {1, 2}, let vi = vi (coreKS (G)) and let m = v(coreKS (G)). The number of
leaf-removal steps is n − v1 − i1 (G) = n − v2 − i2 (G), so
        rank B(G) = n − v1 − i1 (G) + rank B(coreKS (G)) = n − v2 − i2 (G) + rank B(coreKS (G))
by Lemma 5.1(B). For Theorem 1.7 we need to prove that
                   rank B(coreKS (G)) = min(v1 − s1 (coreKS (G)), v2 − s2 (coreKS (G)))
whp.
                                                       15
     • If c < e then by Lemma 4.4(B), whp coreKS (G) is a vertex-disjoint union of even cycles (and
       therefore v1 = v2 ). Using Fact 3.1 for G = C2ℓ we see that
                                             (
                                               ℓ − 1 if ℓ is divisible by 2,
                              rank B(C2ℓ ) =
                                               ℓ     otherwise.
       So, whp rank B(coreKS (G)) = v1 − s1 (coreKS (G)) = v2 − s2 (coreKS (G)), as desired. Then,
       Theorem 1.9(B) follows in essentially the same way as for Theorem 1.9(A), using Lemma 4.4(B)
       for the joint cycle count distribution.
     • If c > e then by Lemma 4.3(B) we have v1 , v2 = Ω(n) and v1 = v2 + o(n) and |v1 − v2 | = ω(1)
       and 1 + Ω(1) ≤ m/(v1 + v2 ) ≤ O(1) whp. Conditioning on such an outcome of v1 , v2 , m, the
       desired result follows from Lemma 4.5 and Theorem 1.12(B) (for the i minimising vi , the defect
       in the Karp–Sipser bound is exactly si (coreKS (G))).                                        

   For Theorem 1.2(A1) we also need a counterpart of Theorem 1.7 for the matching number. Specif-
ically, we need to know that n − i(G) − 2ν(G) is bounded in probability; this follows from an exact
characterisation of ν(G) essentially due to Frieze and Pittel [37], as follows. For a graph G, let q(G) be
its number of isolated odd cycles.
Theorem 5.3. Fix a constant c 6= e. For G ∼ G(n, c/n), whp
                                                                 
                                         n − i(G) − q(coreKS (G))
                               ν(G) =                              .
                                                    2
Moreover, q(coreKS (G)) is bounded in probability.
Proof. Let v = v(coreKS (G)) and m = e(coreKS (G)). The number of leaf-removal steps is (n−v−i(G))/2,
so
                               ν(G) = (n − v − i(G))/2 + ν(coreKS (G)).
We need to prove that ν(coreKS (G)) = ⌊(v − q(coreKS (G)))/2⌋ whp.
     • If c < e then by Lemma 4.4(A), whp coreKS (G) is a vertex-disjoint union of cycles; let Nℓ be the
       number of such cycles of length ℓ. Note that ν(Cℓ ) = ⌊ℓ/2⌋ so whp
                                                          ∞
                                                          X
                                      ν(coreKS (G)) =           Nℓ ⌊ℓ/2⌋,
                                                          ℓ=3

       from which the desired result follows.
     • If c > e then by Lemma 4.3(A) we have v = Ω(n) and m/v = 1 + Ω(1) and m/v = O(1)
       whp. Condition on such an outcome of v, m, and note that by Lemma 4.5 we have coreKS (G) ∼
       K(v, m, 2). A result of Frieze and Pittel [37, Theorem 2], which characterises the matching
       number of such random graphs whp, then implies the desired result.                        

Proof of Theorem 1.2. Theorem 1.2(B) and (A2) follow directly from Theorem 1.9, given Corollary 5.2.
For (A1), we simply compare the formulas in Theorems 1.7 and 5.3.                                 

   Finally, we deduce Theorem 1.10 from Theorem 1.9 (more or less, we just need to observe that
γB (c), γA (c) → ∞ as c → e).

Proof of Theorem 1.10. A direct computation shows that γB (c), γA (c) → ∞ as c → e (speciﬁcally, η → 1
as c → e from below, and λKS (c) → 0 as c → e from above). Also, by Chebyshev’s inequality, for
Z ∼ Poisson(γ) we have Pr[Z ≤ γ/2] ≤ 4/γ. So, for each c, if n is suﬃciently large (say n ≥ nc ), in the
setting of (A) we have
                                                                      5
                            Pr[n − i(G) − rank A(G) < γA (c)/2] <
                                                                    γA (c)
and in the setting of (B) we have
                                                                               5
                      Pr[n − max(i1 (G), i2 (G)) − rank B(G) < γB (c)/2] <          ,
                                                                             γB (c)
by Theorem 1.9. Letting ck = c + 1/k for k ≥ 1 and kn = max(k : n ≥ nck ) for all n ≥ nc1 , the desired
result follows by taking pn = ckn /n for n ≥ nc1 (and say pn = 0 for n < nc1 ).                      
                                                     16
Remark 5.4. With more work, it seems to be possible to give an alternative (and more direct) proof of
Theorem 1.10 with stronger quantitative aspects. Indeed, if the leaf-removals in the Karp–Sipser process
are performed one-by-one in a random order, then we obtain a randomly evolving “partial Karp–Sipser
core” (which gradually shrinks over time until the ﬁnal Karp–Sipser core is reached). If npn converges
suﬃciently rapidly to e, then using the diﬀerential equations method as in [5], we believe that one can
track the evolution of the partial Karp–Sipser core until a point where almost all vertices in the partial
core have degree 2 (in the strong sense that the sum of degrees diﬀerent from 2 is an n−Ω(1) -fraction of
the total degree sum). Then, it is not hard to see that the partial core is uniform over all graphs with
its degree sequence, and it should follow from a standard conﬁguration-model calculation that there are
Ω(log n) isolated special cycles (which will end up as isolated special cycles in the ﬁnal Karp–Sipser core,
and will therefore each contribute to the defect in the Karp–Sipser bound).

                              6. Degree-constrained random graphs
   Most of the rest of the paper will be spent proving Theorem 1.12, on the rank of degree-constrained
random graphs of the form K(V, m, 2) and K(V1 , V2 , m, 2). In this section we ﬁrst prove some basic
properties about the degree sequence and edge distribution of such graphs.
   First, a key observation is that both K(V, m, 2) and K(V1 , V2 , m, 2) are uniform given their degree
sequence.
Lemma 6.1.
  (A) Consider G ∼ K(V, m, 2) for any V, m. If we condition on an outcome of (degG (v))v∈V , then
      conditionally G is a uniformly random graph with this degree sequence.
  (B) Consider G ∼ K(V1 , V2 , m, 2) for any V1 , V2 , m. If we condition on outcomes of (degG (v1 ))v1 ∈V1
      and (degG (v2 ))v2 ∈V2 , then conditionally G is a uniformly random bipartite graph with this pair
      of degree sequences.
Proof. For (A), recall that K(V, m, 2) is a uniform distribution on graphs satisfying certain constraints
on their degrees. So, if we condition on a particular degree sequence, the resulting distribution is uniform
over all graphs with that degree sequence. Similar reasoning yields (B).                                   
   With Lemma 6.1 in hand, we can prove certain properties about K(V, m, 2) and K(V1 , V2 , m, 2) by
ﬁrst studying their degree sequence, then studying random graphs with given degree sequences. First,
we can obtain a precise statistical understanding of the degree sequence using methods due to Cain and
Wormald [21]: roughly speaking, the degree statistics can be approximated in terms of truncated Poisson
random variables, where we take a Poisson random variable Z and condition on the event Z ≥ 2.
Lemma 6.2. Fix a constant ε > 0.
  (A) For some m, n satisfying 1 + ε ≤ m/n ≤ 1/ε, let G ∼ K(n, m, 2), and choose λ > 0 such that
      if Z ∼ Poisson(λ), then 2m/n = E[Z|Z ≥ 2]. Then the following hold with probability at least
      1 − n−ω(1) .                                                                       √
       (1) For all t ≥ 2, the number of vertices v with deg(v) = t is ρt n + Oε ( n log n), where
            ρt = Pr[Z = t|Z ≥ 2].
            X deg(v)                                      h            i
       (2)                 = (E2 + oε (1))n, where E2 = E Z2 Z ≥ 2 for Z ∼ Poisson(λ).
              v
                     2
                            X deg(v)
       (3) For any j ≥ 3,                 ≤ eOε (j) n.
                             v
                                     j
                                                 P
       (4) For any set S of s vertices we have v∈S deg(v) .ε s log(2n/s).
  (B) For some m, n1 , n2 satisfying 2 + ε ≤ m/n1 , m/n2 ≤ 1/ε, let G ∼ K(n1 , n2 , m, 2) (with parts
      V1 , V2 ), and choose λ1 , λ2 > 0 such that, for i ∈ {1, 2}, if Zi ∼ Poisson(λi ), then m/ni =
      E[Zi |Zi ≥ 2]. Then, writing n = n1 + n2 , the following hold with probability at least 1 − n−ω(1) .
                                                                                                  (i)
       (1) For all i ∈ {1, 2} and t ≥ 2, the number of vertices v ∈ Vi with deg(v) = t is ρt ni +
                 √                 (i)
            Oε ( n log n), where ρt = Pr[Z  i = t|Zi ≥ 2].
                                     X deg(v)                                          h          i
       (2) For i ∈ {1, 2} we have                    = (E2;i + oε (1))ni , where E2;i = E Z2i Zi ≥ 2 for
                                             2
                                     v∈Vi
            Zi ∼ Poisson(λi ).
                           X deg(v)
        (3) For any j ≥ 3,            ≤ eOε (j) n.
                             v
                                j
                                                     17
                                                         P
         (4) For any set S of s vertices we have             v∈S deg(v) .ε s log(2n/s).

   To prove Lemma 6.2 we need the following observation (due to Bollobás, Cooper, Fenner, and Frieze [14]
in the non-bipartite case), that the degree sequences in the setting of Lemma 6.2 can be eﬀectively ap-
proximated by a sequence of independent truncated Poisson random variables. (We write Poisson≥2 (λ)
for the conditional distribution of Z ∼ Poisson(λ) given Z ≥ 2.)
Lemma 6.3. Fix ε > 0.
  (A) Consider m, n satisfying 1 + ε ≤ m/n ≤ 1/ε, and choose λ > 0 such that if Z ∼ Poisson(λ) then
      2m/n = E[Z|Z ≥ 2]. For V = {1, . . . , n}, let G = K(V, m, 2) and let (Tv )v∈V be a sequence of
      independent Poisson≥2 (λ) random variables. Then for any t ∈ NV we have
                                                     √
                           Pr[(degG (v))v∈V = t] .ε n Pr[(Tv )v∈V = t].
   (B) Consider m, n1 , n2 satisfying 2 + ε ≤ m/n1 , m/n2 ≤ 1/ε, and choose λ1 , λ2 > 0 such that, for
       i ∈ {1, 2}, if Zi ∼ Poisson(λi ) then m/ni = E[Zi |Zi ≥ 2]. For a partition V = V1 ∪ V2 into
       two parts of sizes n1 , n2 , let G ∼ K(V1 , V2 , m, 2), and let (Tv )v∈V be a sequence of independent
       truncated Poisson random variables with Tv ∈ Poisson≥2 (λi ) whenever v ∈ Vi . Then for any
       t ∈ NV we have
                               Pr[(degG (v))v∈V = t] .ε n Pr[(Tv )v∈V = t].
Proof sketch. Part (A) appears as [14, Lemma 1]. It is proved by considering a random multigraph
distribution (called M(n, 2m, 2) in [14]; the edges are just a sequence of m independent random pairs of
vertices sampled with replacement, conditioned on all degrees being at least 2) and observing that the
following hold.
      • If one conditions on the event that this random multigraph is simple (which occurs with proba-
         bility Ωε (1)), then one obtains the graph distribution K(V, m, 2).
      • The degree sequence (degGP     (v))v∈V of this random multigraph has precisely the conditional dis-
         tribution of (Tv )v∈V given v Tv = 2m (in [14] this conditional distribution P   is called O(n, λ, 2),
         and the unconditional distribution
                                  √            is called P(n, λ, 2)). Moreover,
                                                                              P the event   v Tv = 2m occurs
         with√probability Ωε (1/ n). (Roughly speaking, this is because v Tv has standard deviation
         Oε ( n), and is more-or-less uniform over integers within standard-deviation-range of the mean.)
   For part (B), we can consider an analogous bipartite random multigraph distribution on the vertex
set V1 ∪ V2 : consider m independent random edges between V1 and V2 , conditioned on all degrees being
at least 2. Then, we analogously observe that the following hold.
      • If one conditions on the event that this random multigraph is simple (which occurs with proba-
         bility Ωε (1)), then one obtains the graph distribution K(V1 , V2 , m, 2).
      • The degree sequence (degG (v))v∈VP                  random multigraph has precisely theP
                                              1 ∪V2 of this P                                      conditional
         distribution of (Tv )v∈V1 ∪V2 given v∈V1 Tv = v∈V2 Tv = m. Moreover, the event v∈V1 Tv =
         P                                                 √          √
            v∈V2 Tv = m occurs with probability Ωε ((1/ n) · (1/ n)) = Ωε (1/n).                             
  Now we prove Lemma 6.2.
Proof of Lemma 6.2. We just prove (A); the proof of (B) is essentially identical. Let V = {1, . . . , n} and
let (Tv )v∈V be a sequence of independent Poisson≥2 (λ) random variables. By Lemma 6.3, to prove that
a property of the degree sequence (degG (v))v∈V holds with probability 1 − n−ω(1) , it suﬃces to prove
that (Tv )v∈V satisﬁes this property with probability 1 − n−ω(1) . So, we work only with (Tv )v∈V .
   First, for each t, we have Pr[Tv = t] = ρt for each v independently. So, (1) holds with the desired prob-
ability, by a Chernoﬀ bound and a union bound. Also, by a Chernoﬀ bound for the Poisson distribution
(see for example [58, Theorem 5.4]), for each v and t ≥ λ we have
                                                Pr[Tv ≥ t] ≤ (Ωε (t))−t .                                (6.1)
                                                                                   −ω(1)
This (together with the union bound) implies that with probability 1 − n                   we have say
                                                Tv ≤ log n for all v ∈ V.                                (6.2)
  If (1) and (6.2) hold, then trivially (4) holds whenever say s ≤ n0.9 . For the case s > n0.9 , note that
(when (1) and (6.2) hold) for any t ≥ λ we have
                               Xn
                               log
                X                                                 √                  √
                        dv ≤         j (Ωε (j))−j n + log n · Oε ( n) ≤ (Ωε (t))−t n + n(log n)4 .
                dv ≥t          j=t
                                                           18
Taking t = C log(2n/s) for 1/C ≪ ε, we have that
                  X            X                     √
                     dv ≤ ts +     dv ≤ ts + (s/n)n + n(log n)4 ≤ Oε (s log(n/s))
                    v∈S           dv ≥t

so (4) holds in this case too. Next, note that
                                            "       #
                                             X Tv 
                                          E           = nE2 ,
                                              v
                                                2

but (2) does not immediately follow from an oﬀ-the-shelf concentration inequality, since Poisson≥2 (λ) is
a distribution with unbounded support. Let
                                          X min(log n, Tv )
                                      P =                       .
                                           v
                                                      2

Recalling (6.2), it suﬃces to prove that (with probability 1 − n−ω(1) ) P satisﬁes the estimate in (2). To
this end, note that
                                                   ∞
                         Tv       min(log n, Tv )       X
                     E        −                     ≤           O(t2 ) Pr[Tv ≥ t]
                         2              2
                                                      t=⌈log n⌉
                                                        X
                                                    ≤           O(t2 )(Ωε (t))−t = oε (1),
                                                              t=⌈log n⌉

by (6.1), so EP = (E2 + o(1))n. Also, note that changing some Tv changes P by at most (log n)2 , so
by the Azuma–Hoeﬀding inequality (see Lemma 3.3), we have |P − EP | ≤ n1/2+o(1) with probability
1 − n−ω(1) , from which (2) follows.
   Finally, we prove (3). By (6.2), it suﬃces to consider the case 3 ≤ j ≤ log n. Then, when (1) and
(6.2) hold, using (6.1), we have
        X         Z ∞                     Z ∞
               j              j
             Tv =      |{v : Tv ≥ t}|dt =     |{v : Tv ≥ s}|jsj−1 ds
         v         0                           0
                                              Z log n
                                                                          √
                                                        (Ωε (s))−s n +     n(log n)3 jsj−1 ds + Oε (n)
                                                                                    
                                          =
                                               0
                                                Z ∞
                                                                                       √
                                                        jsj−1 (Ωε (s))−s ds + Oε n +    n(log n)3 · (log n)j .
                                                                                                            
                                          =n
                                                   0

Now, for any c > 0 we have
                                      Z ∞
                                               jsj−1 (cs)−s ds = (Oc (j))j .
                                          0
Also note that for any x > 0 we P    have (x/j)j ≤ exp(x/e). Taking x = log n/100, it follows that
(log n) ≤ n (O(j)) . We deduce v Tvj ≤ n(Oε (j))j . Since j! ≥ (Ω(j))j by Stirling’s approximation,
       j   1/3      j

we then deduce v Tvj /j! ≤ eOε (j) n, from which (3) follows.
               P
                                                                                                 

   For disjoint sets V1 , V2 and sequences d1 ∈ NV1 , d2 ∈ NV2 , write G(d1 , d2 ) to denote the uniform
distribution on bipartite graphs with degree sequence speciﬁed by (d1 , d2 ). For a set V and a sequence
d ∈ NV , write G(d) to denote the uniform distribution on graphs with degree sequence d. Now, to work
with random graphs of the form G(d), G(d1 , d2 ), we use an auxiliary random graph model called the
conﬁguration model. This model was ﬁrst explicitly considered in 1980 by Bollobás [15] (though similar
ideas were considered earlier by various authors [10, 11, 68]), and has since become an indispensable tool
in random graph theory.
Definition 6.4. For a degree sequence d = (d1 , . . . , dn ), consider a set of r = d1 + · · · + dn “stubs”,
grouped into n labelled “buckets” of sizes d1 , . . . , dn . A conﬁguration is a perfect matching on the r
stubs, consisting of r/2 disjoint edges. Given a conﬁguration, contracting each of the buckets to a single
vertex gives rise to a multigraph with degree sequence d1 , . . . , dn (where we use the convention that loops
contribute 2 to the degree of a vertex).
   (A) For a set V and a degree sequence d ∈ NV , let G∗ (d) be the random multigraph distribution
       obtained by contracting a uniformly random conﬁguration.
                                                            19
   (B) For disjoint sets V1 , V2 and a pair of sequences d1 ∈ NV1 , d2 ∈ NV2 , let G∗ (d1 , d2 ) be the random
       bipartite multigraph distribution obtained by contracting a uniformly random conﬁguration in
       which we only allow edges between the buckets corresponding to V1 and the buckets corresponding
       to V2 .
   The uniform models G(d), G(d1 , d2 ) can be closely compared with their conﬁguration models, as
follows.
Lemma 6.5. Fix C > 0.
  (A) (1) For any set V and sequence d ∈ NV , if we consider G∗ ∈ G∗ (d) and condition on G∗ being
          a simple graph, then we recover the distribution G(d).
      (2) If the sum of squares of entries of d is at most Cn, then the probability that G∗ is simple is
          ΩC (1).
  (B) (1) For any disjoint sets V1 , V2 and sequences d1 ∈ NV1 , d2 ∈ NV2 , if we consider G∗ ∈
          G∗ (d1 , d2 ) and condition on G∗ being a simple graph, then we recover the distribution
          G(d1 , d2 ).
      (2) If the sum of squares of entries of d is at most Cn, then the probability that G∗ is simple is
          ΩC (1).
   Parts (A1) and (B1) follow from the (easy) fact that each simple graph corresponds to the same
number of conﬁgurations. Parts (A2) and (B2) of Lemma 6.5 were ﬁrst proved by Janson [42] and
Blanchet and Stauﬀer [13], respectively. We remark that Janson [43] later gave a simpliﬁed proof for
both (A2) and (B2), and that many authors previously proved various special cases (see for example
[10,11,15,17,39,54,54,55]). Several of these special cases are suﬃcient for the applications in this paper.
   The advantage of the conﬁguration model is that it has much more independence than a uniformly
random graph with a given degree sequence, and is therefore much easier to study.
   We ﬁnish this section with a simple expansion estimate for random graphs with given degree sequences.
Lemma 6.6. Fix ε > 0, and consider one of the following two situations.
   (A) Suppose m, n satisfy 1 + ε ≤ m/n ≤ 1/ε, and let G ∼ K(n, m, 2).
   (B) Suppose m, n, n1 , n2 satisfy 2 + ε ≤ m/n1 , m/n2 ≤ 1/ε, let G ∼ K(n1 , n2 , m, 2), and let n =
        n1 + n2 .
In both situations, the following properties hold for n large.
    (1) There exists C = C6.6 (ε) √   > 0 such that the following holds (for large enough n). With
        probability
                  p at least 1 − O(1/   n): for all s, every subgraph of G with s vertices has at most
        s + ⌊Cs/ log(2n/s)⌋ edges.
    (2) Whp, the number of cycles of length less than log log n is at most exp((log log n)3 ).
   We did not attempt to prove the absolute best bounds possible; for example, with more care, in the
setting of (1) it seems one can prove an upper bound of roughly s + s/ log(n/s) when s is not too large.
Remark p 6.7. In practice, we will apply (1) in the case where s/n is small with respect to ε. So,
⌊Cs/ log(n/s)⌋ can be thought  p of as a “lower order term” relative to s. In particular, when (say)
      √
s < log n/(2C), we have ⌊Cs/ log(n/s)⌋ = 0, meaning that no set of s vertices has more than s edges
(i.e., we cannot have anything denser than a cycle).
Proof. We only prove (A); the proof of (B) is essentially identical. We handle (1) and (2) together,
considering what happens more generally for a set of size s with at least s + t edges.
   Let d = (d1 , . . . , dn ) be the degree sequence of G, and condition on any outcome of d satisfying the
conclusion of Lemma 6.2(A). By Lemmas 6.1 and 6.5, it suﬃces to prove the desired result for G ∼ G∗ (d)
(note that Lemma 6.2(A2) implies that d21 + · · · + d2n = Oε (n)).
   Consider any t ≤ 2s with say s ≤ n/6. For a set S of s vertices, the probability that G[S] contains at
least s + t edges is at most
                                               P         s+t
                                                  v∈S dv    6s
                                                                  .
                                                 2s + 2t    n
Indeed, we are considering the probability of the event that there is some set of 2s + 2t stubs from the
buckets corresponding to vertices in S, which all pair among themselves (in our random conﬁguration).
For any set of 2s + 2t stubs from S, the probability that they all pair among themselves is at most
(6s/n)s+t , since 2s + 2t ≤ 6s and 2m − (2s + 2t) ≥ 2n − 6s ≥ n.
                                                     20
  So, the expected number of sets of s vertices with at least s + t edges is at most
                       P           s+t  s                     2s+2t  s+t
                            v∈S dv     6s          n     s log(2n/s)          s
                  X
                                              ≤                                    eOε (s)
                          2s + 2t      n           s         s+t              n
                 S⊆{1,...,n}:
                   |S|=s
                                                                 n O(s)  s t
                                                  ≤ Oε log                             ,                  (6.3)
                                                                   s           n
where in the ﬁrst inequality we used that ns ≤ (en/s)s and we used Lemma 6.2(A4) (which says that
                                                    
P
   v∈S dv .ε s log(2n/s)).  p
                               We immediately deduce (2), taking t = 0 and summing over s < log log n.
   For (1), let t = ⌊s/ log(2n/s)⌋ + 1; we will prove that for suﬃciently small c = c(ε) > 0, every
subgraph with s ≤ cn vertices has fewer than s + t edges. The desired result will then follow, noting that
(1) trivially holds for subgraphs with s > cn vertices (taking C large in terms of c).
   So, we sum the estimate in (6.3) over all s ≤ cn. √The contribution from say s ≤ (log n)2/3 is
  −1+oε (1)
                   √
n           ≤ 1/(2 n), and the contribution from s > 2C log n is at most
                    ⌊cn⌋
                    X             n s  s Ω(s/√log(n/s))
                                Oε log
                                            s       n
              s=⌊(log n)2/3 ⌋+1
                                                                       n     r  
                                                                                       n
                         ≤n       max          exp s Oε (1) + O log log        −Ω   log
                              cn≥s≥(log n) 2/3                            s             s
                                                        p                 1
                         ≤n       max          exp −Ωε (s log(n/s)) ≤ √
                              cn≥s≥(log n)2/3                             2 n
for small enough c.                                                                                           

                                        7. Random walk analysis
   The following lemma is a slight adaptation of [33, Lemma 5.2] (which is itself a variation on [26,
Lemma 2.9]). Roughly speaking, it says that certain negatively biased random walks typically end up at
a nonpositive value.
Lemma 7.1. Fix C, δ, ε > 0. Let XN , . . . , X0 be a sequence of real random variables satisfying the
following conditions for some p ∈ (0, 1).
  W1’ XN ≤ (1 − ε)δN (with probability 1)
  W2’ Xt ≤ Xt+1 + C for all t ≤ N (with probability 1).
  W3’ For any t ≤ N − 1 and any xN , . . . , xt+1 :
         (a) if xt+1 > 0 then Pr[Xt ≤ xt+1 − δ | XN = xN , . . . , Xt+1 = xt+1 ] ≥ 1 − p.
         (b) if xt+1 ≤ 0 then Pr[Xt ≤ 0 | XN = xN , . . . , Xt+1 = xt+1 ] ≥ 1 − p.
Then
                                          Pr[X0 > 0] ≤ OC,δ,ε (p).
  Informally, condition W3’ says that our random walk “wants to be nonpositive”: when we are positive
we tend to go down at the next step, and when we are nonpositive we tend to stay nonpositive at the
next step.
Proof. First, note that the statement is trivial if say N ≤ 10. Then, note that we can reduce to the
case where δ = 1 and each Xt is a nonnegative integer. Indeed, deﬁne Xt′ = max(0, ⌈Xt /δ⌉). Note that
                                                  ′
conditions W1’ to W3’ are still satisﬁed for XN     , . . . , X0′ (with “1” in place of “δ”, with “⌈C/δ + 1⌉” in
place of “C”, and with say ε/2 in place of ε), and note that X0 > 0 implies X0′ > 0. After this reduction,
the lemma statement is a slight variant of [33, Lemma 5.2] (and can be proved in the same way).               
  We will need a generalisation of Lemma 7.1 permitting a small number of “bad steps” in which we have
no control over the behaviour of our random walk. Crucially, the set of bad steps is allowed to depend
on the trajectory of the random walk; we only assume that the bad steps are unlikely to concentrate
near the end of the walk.
Theorem 7.2. Fix C, δ, ε > 0 with C/δ ≥ 1. Let XN , . . . , X0 be a sequence of real random variables, and
let R ⊆ {0, . . . , N } be a random set of “bad steps”, satisfying the following conditions for some p ∈ (0, 1).
    W0 There is an underlying sequence of random elements GN , . . . , G0 , such that Xt and the event
        {t ∈ R} are both determined by Gt (for all t ≤ N ).
                                                         21
   W1 XN ≤ (1 − ε)δN (with probability 1)
   W2 Xt ≤ Xt+1 + C for all t ≤ N (with probability 1).
   W3 For any t ≤ N − 1 and any xt+1 ∈ R, and any outcomes gN , . . . , gt+1 of GN , . . . , Gt+1 satisfying
      Xt+1 = xt+1 :
      (a) if xt+1 > 0 then Pr[Xt ≤ xt+1 − δ or t ∈ R | GN = gN , . . . , Gt+1 = gt+1 ] ≥ 1 − p.
       (b) if xt+1 ≤ 0 then Pr[Xt ≤ 0 or t ∈ R | GN = gN , . . . , Gt+1 = gt+1 ] ≥ 1 − p.
   W4 With probability at least 1 − p, for each t ≤ N we have |R ∩ {0, . . . , t}| ≤ δt/(32C).
Then
                                             Pr[X0 > 0] ≤ OC,δ,ε (p).
Proof. As with Lemma 7.1, we can assume that δ = 1, each Xt is a nonnegative integer, and C is a
nonnegative integer, if we prove the result under a slight weakening of condition W4 that |R∩{0, . . . , t}| ≤
δt/(8C) = t/(8C). To see this, take Xt′ = max(0, ⌈Xt /δ)⌉) and then note that conditions W0 to W3
                                                        ′
and the weaker version of W4 are still satisﬁed for XN    , . . . , X0′ (with “1” in place of “δ”, with “⌈C/δ + 1⌉”
in place of “C”, and with say ε/2 in place of ε). We will deduce Theorem 7.2 from Lemma 7.1.
   Inductively deﬁne a sequence YN , . . . , Y0 by taking YN = 0 and
                                    Yt = Yt+1 − (C + 1)1t∈R + (1/2)1Yt+1 <0
for t < N . The reader may wish to imagine a “cost” of C + 1 being incurred at every bad step, and
that this is repaid over the future of the process (speciﬁcally, 1/2 is repaid per step, until all debts are
                                               ′
repaid). Deﬁne a modiﬁed sequence XN             , . . . , X1′ by Xt′ = Xt + Yt . The idea is that Yt “compensates” if
t is a bad step. Notice that Y is half-integral, and non-positive.
                  ′
    Note that XN    = XN and Xt′ ≤ Xt+1      ′
                                                 + C + 1/2 for all t ≤ N (so our modiﬁed sequence still satisﬁes
a version of properties W1 and W2 in Lemma 7.1). We now verify that Xt′ satisﬁes W3 in Lemma 7.1
with δ = 1/2. Note that if t ∈ R, this is immediate, since Yt ≤ Yt+1 − C − 1/2 and Xt ≤ Xt+1 + C. If
t∈ / R and Xt+1 > 0, then with probability at least 1 − p, we have Xt ≤ Xt+1 − 1, and deterministically,
                                                                                                   ′
Yt ≤ Yt+1 + 1/2. Finally, if t ∈  / R and Xt+1 = 0, then it must be the case that Xt+1                 ≤ 0, since Y is
                                                                                         ′
non-positive. Then with probability at least 1 − p, Xt stays 0, and thus Xt ≤ 0.
    Applying Lemma 7.1, we see that Pr[X0′ > 0] ≤ OC,δ,ε (p), and it suﬃces to prove that Y0 = 0 (i.e.,
that X0 = X0′ ) with probability at least 1 − p.
    To see this, for each i = 0, 1, . . . , ⌊log2 (N + 2)⌋ let Qi be the number of bad steps t ∈ R in the range
[2i − 1, 2i+1 − 1). Note that if the inequality (C + 1)Qi < (1/2)2i−1 holds for all i, then Y0 ≥ 0: for each
i ≥ 1, the “cost” incurred in the interval [2i − 1, 2i+1 − 1) is “repaid” in the 2i−1 steps in the interval
[2i−1 − 1, 2i − 1). The above is guaranteed by our weaker version of W4, taking t = 2i+1 − 2 for each
i.                                                                                                                  

                                            8. Boosting the rank
   In this section we prove some general lemmas studying how the rank of a matrix changes when a
random row/column is added to it. The lemmas in this section represent the main diﬀerence between
parts (A) and (B) of Theorem 1.12: there are certain additional dependencies involved when dealing
with symmetric random matrices.
   First, the following simple lemma will be used for Theorem 1.12(B).
Definition 8.1. The λ-level set of a vector is the set of all entries equal to λ. Say that a vector v ∈ Rn
is η-balanced if all of the level sets of v have size at most n(1 − η).
Lemma 8.2. Fix 0 < η < 1/2, let d ≥ 1, and consider a matrix B ∈ Rn1 ×n2 . Consider a subset
E ⊆ {1, . . . , n1 } with size at least n1 (1 − η/3), and let x = (x1 , . . . , xn1 ) be a random zero-one vector,
such that the restriction xE to the entries indexed by E is a uniformly random zero-one vector with
exactly d ones (and the restriction xE to entries not indexed by E is deterministic). Add x as a new
column of B to obtain a new matrix B ′ .                                                                   √
   If B ⊺ has an η-balanced kernel vector, then rank(B ′ ) ≥ rank(B) + 1 with probability 1 − Oη (1/ d).
   Lemma 8.2 concerns the addition of a new random column, but of course it symmetrically applies to
the addition of a new random row (we can simply consider the transpose of B). In fact, in our proof
of Theorem 1.12(B) we will use Lemma 8.2 to show that when a random row and a random column are
independently added, the rank increases by 2.
   The following more sophisticated lemma will be used for Theorem 1.12(A).
                                                         22
Definition 8.3. Say that a symmetric matrix A ∈ Rn×n is η-unstructured if there are at least ηn2 pairs
of distinct entries (i, i′ ) ∈ {1, . . . , n}2 such that if supp(Av) = {i, i′ } then v is η-balanced.
Lemma 8.4. Fix 0 < η < 1/2 and let d ≥ 1. Consider a symmetric matrix A ∈ Rn×n and a subset
E ⊆ {1, . . . , n} of size at least n(1 − η/3). Let x = (x1 , . . . , xn ) be a random zero-one vector, such that
the restriction xE to the entries indexed by E is a uniformly random zero-one vector with exactly d ones
(and the restriction xE to entries not indexed by E is deterministic). Add x as a new row and column
of A (and put a zero in the new diagonal entry) to obtain a new symmetric matrix A′ .
                                                                                                            √
    (a) If A has a η-balanced kernel vector, then rank(A′ ) = rank(A) + 2 with probability 1 − Oη (1/ d).
    (b) Let S = supp(ker A). If A is η-unstructured and |S| ≤ η 2 n/32 and S√∩ E = ∅ and xS = 0 then
         rank(A′ ) ≥ rank(A) + 1 with probability at least 1 − Oη ((log 2d)O(1) / d).
   First, Lemma 8.2 and Lemma 8.4(a) will be simple consequences of an anti-concentration inequality
for linear polynomials on the “Boolean slice” (i.e., for linear polynomials of uniformly random binary
vectors with a prescribed number of 1s). The following lemma is a direct consequence of [34, Lemma 4.2]
(a similar inequality also appears in [52]), and is proved using the Erdős–Littlewood–Oﬀord theorem (see
for example [61, Chapter 7]).
Lemma 8.5. Let 1 ≤ d ≤ n/2, κ > 0 and let v = (v1 , . . . , vn ) ∈ Rn be a κ-balanced vector. Let
x = (x1 , . . . , xn ) ∈ {0, 1}n be a random vector, uniformly selected from the zero-one vectors with exactly
d ones, and consider any y ∈ R. Then
                                            Pr[v⊺ x = y] = O((κd)−1/2 ).
   Now we prove Lemma 8.2 and Lemma 8.4(a).
Proof of Lemma 8.2. Let v ∈ Rn1 be an η-balanced kernel vector of B ⊺ (note that this means that v lies
in the orthogonal complement of the column space of B). Since v is η-balanced and E ≥ (1 − η/3)n1 ,
                                                                         vE is Ω(η)-balanced. Therefore
every level set of vE has size at most ((1−η)/(1−η/3))|E|, implying that √
it follows by Lemma 8.5 that P[v⊺ x = 0] = P[vE ⊺
                                                  xE = −vE⊺
                                                            xE ] = Oη (1/ d). But note that if v⊺ x 6= 0,
then x does not lie in the column space of A, and its addition as a new column increases the rank. 
Proof of Lemma 8.4(a). Let v be an η-balanced kernel vector of A (or equivalently, of A⊺ ), so v lies in
the orthogonal complement of the row space of A (or equivalently, the orthogonal complement√of the
column space). As above, vE is Ω(η)-balanced, so by Lemma 8.5 we have P[v⊺ x = 0] = Oη (1/ d). If
v⊺ x 6= 0, then x does not lie in the row space or column space of A, so adding x as a new row and
column increases the rank twice. The desired result follows.                                          
   For Lemma 8.4(b) we need an anti-concentration inequality for quadratic polynomials of random
vectors (x1 , . . . , xn ) ∈ {0, 1}n on the Boolean slice. The following lemma appears as [33, Proposition 3.4],
and is proved using an inequality of Kane [45].
Lemma 8.6. Let M = (mij )i,j be an n×n symmetric matrix for which there are Ω(n4 ) diﬀerent 4-tuples
(i, i′ , j, j ′ ) with mij −mi′ j −mij ′ +mi′ j ′ 6= 0. Let x = (x1 , . . . , xn ) be a random zero-one vector, uniformly
selected from the zero-one vectors with exactly d ≤ n/2 ones. Then for any vector v ∈ Rn and any x ∈ R
we have                                                                                 √
                                     Pr[x⊺ M x + v⊺ x = x] ≤ O((log 2d)O(1) / d).
  We also need the following lemma implicit in the work of DeMichele, the ﬁrst author, and Moreira [30],
on the existence of a certain kind of “pseudoinverse”.
Lemma 8.7. Consider a symmetric matrix A ∈ Rn×n , let S = supp(ker(A)) and let S = {1, . . . , n} \ S.
Let P ∈ Rn×n be the projection matrix that projects onto the coordinates indexed by S (that is, P is
a diagonal matrix with “1” in the diagonal entries indexed by S, and “0” in the entries indexed by S).
Then there is a matrix B ∈ Rn×n such that AB = P . Further, P BP is symmetric.
Proof. If i ∈
            / S, then there is no kernel vector of A with nonzero i-coordinate, which means that the ith
row of A cannot be expressed as a linear combination of the other rows of A. This means there is some
vector bi which is orthogonal to every row of A except the ith (and by rescaling we can assume that the
inner product of bi with the ith row of A is exactly 1). Let B be the matrix whose ith column is bi ,
for i ∈
      / S, and whose columns indexed by S are all-zero. Writing ei for the ith standard basis vector, we
                       / S, and e⊺i AB = 0 for i ∈ S, from which it follows that AB = P .
have e⊺i AB = ei for i ∈
   Finally, since A is symmetric, transposition yields B ⊺ A = P . We then have P B = (B ⊺ A)B =
B (AB) = B ⊺ P = (P B)⊺ , so P B = P BP is symmetric.
  ⊺
                                                                                                       
                                                           23
   A key property of this notion of pseudoinverse is that it provides a suﬃcient condition for the rank
to increase when we add a row and column to a matrix, as follows.
Lemma 8.8. Consider a matrix A ∈ Rn×n , and let S = supp(ker(A)), let S = supp(ker(A)), and let
B be a “pseudoinverse” as guaranteed in Lemma 8.7. For x, y ∈ Rn and c ∈ R, let A′ be the matrix
obtained from A by appending the new column x, the new row y and the new diagonal entry c. If xS = 0
and y⊺ Bx 6= c then rank A′ ≥ rank A + 1.
Proof. Let A′′ be the matrix obtained by appending the column x (but not appending a new row), and
let y′ be the last row of A′ (obtained by appending the entry “c” to the end of the vector y). Also, let
w ∈ Rn+1 be the vector obtained by appending the entry “−1” to the end of the vector Bx.
   Since xS = 0, we have ABx = x by the deﬁning property of B, which implies that w is a kernel
vector of A′′ (i.e., it lies in the orthogonal complement of the row space of A′′ ). So, if w · y′ 6= 0, then
y′ does not lie in the row space of A′′ , meaning that rank A′ ≥ rank A′′ + 1 ≥ rank A + 1. The desired
result follows, noting that w · y′ = x⊺ B ⊺ y − c.                                                          

   Now we are ready to prove Lemma 8.4(b).

Proof of Lemma 8.4(b). Let B, P be as in Lemma 8.7, and consider the symmetrisation B ′ = (B +B ⊺ )/2
of B. Since P BP is symmetric, B and B ′ have the same entries in positions indexed by S × S. Recall
that xS = 0, so x⊺ Bx = x⊺ B ′ x.
   We claim that there are at least η 2 n4 /4 diﬀerent tuples (i, i′ , j, j ′ ) with Bi,j − Bi,j ′ + Bi′ ,j − Bi′ ,j ′ 6= 0.
Since the symmetrisation of B to B ′ only aﬀects at most 4|S|n3 ≤ η 2 n4 /8 of these tuples,√it will follow
from Lemma 8.6 that x⊺ B ′ x = x⊺ B ′ x 6= 0 with probability at least 1 − O((log 2d)Oη (1) / d), in which
case rank A′ ≥ rank A + 1 by Lemma 8.8, as desired.
   To prove the claim, let bi be the ith row of B and let ei be the ith standard unit vector. For i, i′ ∈ S,
let wi,i′ = bi − bi′ , so Awi,i′ = ei − ei′ . Recall that A being η-unstructured means that there are
ηn2 pairs of indices (i, i′ ) for which all w satisfying supp(Aw) = {i, i′ } are η-balanced. So, there are at
                                              2
least ηn2 − 2|S|n ≥ ηn2 /2 pairs (i, i′ ) ∈ S for which wi,i′ is η-balanced. For each such (i, i′ ), there are
at least η(1 − η)n2 ≥ ηn2 /2 pairs (j, j ′ ) for which the jth and j ′ th entry of wi,i′ diﬀer, in which case
Bi,j − Bi,j ′ + Bi′ ,j − Bi′ ,j ′ 6= 0.                                                                                   

                                     9. Extracting high-degree vertices
   As outlined, for the proof of Theorem 1.12 we need to “extract” high degree vertices from our random
graph with minimum degree at least 2, without revealing too much about the neighbourhoods of the
extracted vertices. We will need certain information about the graph that remains after this extraction;
most notably we need control over its corank, and we need to know that most of its vertices still have
degree at least 2.
Lemma 9.1. Fix ε, α, ∆ > 0 such that 1/∆ ≪ α ≪ ε.
   (A) Consider sets S ⊆ V and an integer m such that
          • |V | = n,
          • εn ≤ m   −n ≤ n/ε, and
          • |S| = αn .
       Let G ∼ K(V, m, 2), and let T = {v ∈ S : degG (v) ≥ ∆} be the set of vertices in S with degree at
       least ∆. Then, whp:
        (1) corank A(G[V \ T ]) ≤ |T |/8,
        (2) Let W be the set of vertices in G[V \T ] which have degree at least 2 (with respect to G[V \T ]).
             Then |(V \ T ) \ W | = Oε (αn).
        (3) |T | ≤ α exp(−Ωε (∆))n,                                 √
        (4) Whp all but |T |/∆ vertices v ∈ T satisfy degW (v) ≥ ∆.
   (B) Consider disjoint sets S1 ⊆ V1 and S2 ⊆ V2 , and an integer m, such that
          • |V1 |, |V2 | = n + o(n),
          • εn ≤ m − |V1 |− |V   2 | ≤ n/ε, and
          • |S1 | = |S2 | = αn .
       Let G ∼ K(V1 , V2 , m, 2), and for i ∈ {1, 2} let Ti = {v ∈ Si : degG (v) ≥ ∆} be the set of vertices
       in Si with degree at least ∆. Let V = V1 ∪ V2 and T = T1 ∪ T2 . Then, whp:
        (1) corank B(G[V \ T ]) ≤ |T |/16,
                                                            24
        (2) Let W be the set of vertices in G[V \T ] which have degree at least 2 (with respect to G[V \T ]).
            Then |(V \ T ) \ W | = Oε (αn).
        (3) |T1 | = |T2 | + oε,α,∆ (n) ≤ α exp(−Ωε (∆))n,          √
        (4) Whp all but |T |/∆ vertices v ∈ T satisfy degW (v) ≥ ∆.
   All parts of Lemma 9.1 follow from similar calculations to those that were performed in [33]. In
particular, in the setting of (A), [33, Lemma 6.6] gives asymptotic formulas (in terms of m/n, α and ∆)
for |T | and the number of vertices in G[V \ T ] with a given degree8, from which (A2) and (A3) follow.
Then, (A4) may be proved with a simple conﬁguration-model calculation; such a calculation appears in
the proof9 of [33, Lemma 8.1(3)] (recalling E from the notation of that lemma, we have E ⊆ W when
k = 2.
   Essentially the same calculations can be performed in the bipartite setting to prove (B2–4) (in fact,
the relevant asymptotic formulas are nearly identical, though one needs to consider separate parameters
for each side of our random bipartite graph).
   (A1) and (B1) warrant a bit more explanation. Lemma 9.1(A1) is basically the same as [33, Lemma 7.3]
(which concerned random graphs constrained to have minimum degree at least k ≥ 3, while we need
to handle random graphs constrained to have minimum degree at least 2). Roughly speaking, the idea
is to show that our random graph G locally weakly converges (in the sense of Aldous–Steele [4] and
Benjamini–Schramm [12]) to a certain Galton–Watson tree. Spectral convergence machinery of Bor-
denave, Lelarge, and Salez [18] then can be used to bound the corank of A(G) in terms of a certain
probability generating function associated with that Galton–Watson tree. The proof of [33, Lemma 7.3]
does use the assumption k ≥ 3, but it was written in a slightly ineﬃcient way; it is possible to slightly
modify the proof to overcome this assumption (as we sketch momentarily).
   It turns out that essentially the same proof can also be used for Lemma 9.1(B1), because local weak
convergence does not “see” whether a graph is bipartite or not.

Proof sketch of Lemma 9.1(A1) and (B1). First, for the reader’s convenience, we outline the proof of
[33, Lemma 7.3]. We then discuss the minor changes that are necessary to prove Lemma 9.1(A1).
   We may assume that 2m/|V | converges to some g ∈ [2 + 2ε, 2/ε]. Indeed, if the desired property did
not hold whp, then for some τ > 0 there would be an inﬁnite sequence of integers n (and accompanying
sets V (n) ) along which for each n the corresponding property fails to hold with probability at least τ .
By compactness there would then be an inﬁnite violating subsequence along which 2m/|V (n) | converges
to a limit.
   As proved in [33, Lemma 6.10], G locally converges to a Galton–Watson tree with a certain oﬀspring
distribution µ, and by [33, Lemma 6.6], whp |T | = βn + o(n) for some explicit β > 0 depending on g
(and the other parameters). As discussed in [33, Section 7], by results of Bordenave, Lelarge, and Salez
(speciﬁcally [18, Theorem 13 and Eq. (19)]), we have corank A(G) ≤ maxx∈[0,1] Mµ (x)+o(n) for a certain
function Mµ : [0, 1] → R depending on µ, so it suﬃces to prove that maxx∈[0,1] Mµ (x) ≤ β/16. This is
essentially what is proved in [33, Lemma 7.5], but there was one point where the assumption k ≥ 3 was
used: namely, for certain γ, λ > 0 (which depend only on g and α) and a function φ : [0, (1 − γ)λ] → R
deﬁned by
                                ∞
                                     xt
                                        ((1t≥k − α1t≥∆ ) + γλ(1t+1≥k − α1t+1≥∆ )),
                                X
                       φ(x) =
                                     t!
                                    t=k−1

it is necessary to prove that φ′′ is log-concave, and the proof in [33, Lemma 7.5] uses the assumption
k ≥ 3. We give an alternative proof for the log-concavity of φ′′ in the case k = 2, as follows.
    In the case k = 2, one can compute
                           ∞
                             xt
                                    ((1 + γλ) − α(1t≥∆−2 + γλ1t≥∆−3 )) = (1 + γλ)(ex − h(x)),
                           X
               φ′′ (x) =
                           t=0
                               t!

where
                                            ∞
                                              xt
                                                     (1 + γλ)−1 α(1t≥∆−2 + γλ1t≥∆−3 ).
                                            X
                               h(x) =
                                            t=0
                                                t!


  8The lemmas in [33, Section 6] are stated with an assumption k ≥ 3, but this is completely unnecessary.
  9
   Again, [33, Lemma 8.1] is stated with an assumption k ≥ 3, but this is unnecessary.
                                                              25
To verify that φ′′ (x) is log-concave it suﬃces to verify that
                  d2       x             ex (h(x) + h′′ (x) − 2h′ (x)) + (h′ (x)2 − h(x)h′′ (x))
                     log(e   − h(x)) = −
                 dx2                                          (ex − h(x))2
is non-positive. First we compute
                                    ∞  t
                                                  2xt−1     xt−2
                                                                   
                                       x
                                                                    (1 + γλ)−1 α(1t≥∆−2 + γλ1t≥∆−3 )
                                    X
                 ′′         ′
       h(x) + h (x) − 2h (x) =                 −         +
                                    t=0
                                            t!   (t − 1)! (t − 2)!
                                    ∞
                                      xt−2 (x2 − 2tx + t(t − 1))
                                                                    (1 + γλ)−1 α(1t≥∆−2 + γλ1t≥∆−3 ).
                                    X
                                =
                                    t=0
                                                     t!
For suﬃciently large ∆ in terms of λ and γ, and √    x ∈ [0, (1 − γ)λ], each term in this expression is
nonnegative, because x2 −2tx+t(t−1) ≥ 0 for x ≤ t− t. So, it suﬃces to verify that h′ (x)2 −h(x)h′′ (x) ≥
0, which is equivalent to h being log-concave.
    To prove that h is log-concave, we use the well-known fact (see for example [6, LemmaR x 3]) that if a
nonnegative function f is log-concave on an interval [a, b], then its antiderivative x 7→ a f (y)dy is also
log-concave on that same interval. Given this, it suﬃces to prove that the (∆ − 3)-fold derivative h(∆−3)
is log-concave. We compute
                                 h(∆−3) (x) = (1 + γλ)−1 α((1 + γλ)ex − γλ)),
                                                                                                         2
                                                                                               d        x
so we may now ﬁnish the proof by direct diﬀerentiation. Indeed, for any r ∈ [0, 1] we compute dx 2 log(e −

r) = −rex /(ex − r)2 ≤ 0, which implies the desired result.
   For (B1), essentially the same proofs as in [33, Section 6] show that G still locally converges to a
Galton–Watson tree with oﬀspring distribution µ, and whp |T | = β(|V1 |+|V2 |)+o(n), so the same proof as
above shows that corank A(G[V \ T ]) ≤ |T |/8. So, by Fact 3.1 we have corank B(G[V \ T ]) ≤ |T |/16. 

                                          10. Analysing a corank-walk
   In this section we explain how to prove Theorem 1.12(A1) using the tools from Sections 7 to 9. The
proof of Theorem 1.12(B1) is very similar (actually, it is slightly easier), and we brieﬂy sketch the
necessary changes for that proof in Section 12.
   Fix ε > 0, let 1 + ε ≤ m/n ≤ n/ε, let G ∼ K(n, m, 2) and write V = {1, . . . , n} for its vertex set. Our
objective is to prove that whp corank A(G) = s(G).
   Fix α, η, ∆ > 0 such that 1/∆ ≪ α ≪ η ≪ ε. At the end of the proof we will take ∆ → ∞ as n → ∞,
but for now we view ∆ as a constant. (In particular, we assume n is large in terms of α, η, ∆.)
   As in Lemma 9.1, consider a set S of ⌊αn⌋ vertices (say S = {1, . . . , ⌊αn⌋}), and let T = {v ∈
S : degG (v) ≥ ∆} be the set of vertices with degree at least ∆. When we take ∆ → ∞ at the end of the
proof, we will have |T | = o(n) whp, but until then the reader should think of |T | as having order n.
   Given the information in Lemma 9.1 about G[V \T ], our strategy is to study the evolution of the corank
as we add back the vertices in T (in a random order), using Theorem 7.2 and Lemma 8.4. Let N = |T |,
consider a uniform random ordering vN −1 , . . . , v0 of the elements of T , and let Gt = G[V \ {vt−1 , . . . , v0 }]
(so GN = G[V \ T ] and G0 = G).
   Let W be the set of vertices in GN which have degree at least 2 (with respect to GN ). The idea is
that the vertices in W already satisfy their degree constraints, so all the vertices in W are equally likely
to be neighbours of vertices in T . The following lemma makes this precise.
Claim 10.1. Reveal an outcome of T , reveal all the edges of G not between T and W , and reveal degW (v)
for each v ∈ T . Then, conditionally, the neighbourhoods (NW (v))v∈T are independent uniformly random
subsets of W with sizes (degW (v))v∈T .
Proof. Let G[T, W ] be the bipartite graph of edges between T and W . Let H1 , H2 be bipartite graphs
with the same bipartition X ∪ Y , such that every vertex in X has the same degree in H1 as it does
in H2 . Then, for any outcome of G such that G[T, W ] = H1 , we can swap G[T, W ] with H2 to obtain
an outcome of G such that G[T, W ] = H2 . So, H1 and H2 are equally likely to occur as G[T, W ]. (It
is important that this swap can never change the sets W or T , and can never cause the degree of any
vertex to drop below 2.)                                                                                    
                                                                                           √
    Recall that, by Lemma 9.1(A4), almost all vertices v1 , . . . , vN have degree at least ∆ into W . So, the
upshot of Claim 10.1 is that when we add the vertices v1 , . . . , vN back to GN , at most of these steps we
                                                          26
are essentially adding a new random row and column with many “1”-entries, which puts us in a position
to apply Lemma 8.4.
   Recall that Lemma 8.4(a) has an assumption that the matrix under consideration has a balanced
kernel vector: a kernel vector which is not dominated by a single level set. We therefore need some
estimates about kernel vectors of the adjacency matrices A(Gt ).
   First, say that a level set of a vector v is a nonzero level set if it is the λ-level set of v for some λ 6= 0.
With some crude estimates it is not hard to show that there are unlikely to ever be kernel vectors which
are dominated by a nonzero level set.
Claim 10.2. With probability 1 − n−ω(1) , no A(Gt ) has a kernel vector with a nonzero level set larger
than (1 − η)(n − t) (provided η ≪ ε and α ≤ η).
   We defer the simple proof of Claim 10.2 to Section 11. It is much more delicate to deal with kernel
vectors which are dominated by their zero level set, i.e., kernel vectors with small support. Indeed, the
special cycles counted by s(G) each give rise to a kernel vector with small support, so we certainly cannot
rule these out entirely. For each t ≤ N , deﬁne the set of “small-support” kernel vectors
                                        (η)
                                    Kt        = {v ∈ ker A(Gt ) : | supp(v)| ≤ η(n − t)}.
                                                                                      (η)
The following lemma shows that while there may be some vectors in Kt , typically these vectors are
collectively supported on a small subset of indices.
Claim 10.3. For each t,
                                                                                  1/4
                                                           (η)          1         t
                                  Pr[t ≤ N and        dim(Kt ) ≥ t/4] .η +              .
                                                                            t     n
Remark. Note that N is random, and we are not conditioning on it at this stage.
   We also need much more precise control for the last few steps of our random walk, essentially char-
                   (η)
acterising each Kt in terms of the special cycles of Gt . For an h-vertex graph H, let s(η) (H) be the
                                                                                                      spec(η)
number of special cycles of length at most 2ηh in H, counting isolated special cycles twice. Let Ct
                                                                   spec(η)
be the set of special cycles of length at most 2ηn in Gt and let Vt        be the set of degree-2 vertices in
these special cycles.
Claim 10.4. The following hold together with probability at least 1 − 1/∆.
                   (η)        spec(η)
    (a) supp(Kt ) = Vt                for each t ≤ ∆.
                 (η)       (η)
    (b) dim(Kt ) = s (Gt ) for each t ≤ ∆.
            spec(η)    spec(η)                  spec(η)     spec(η)
    (c) (C∆         , V∆       ) = · · · = (C0          , V0        ).
           spec(η)       2
    (d) |Vt        | ≤ η n/50 for each t ≤ ∆.
                                        spec(η)
    (e) vt has no neighbor in Vt+1              , for each t < ∆.
   (At the end of the proof we will take ∆ → ∞, meaning that Claim 10.4 will become a with-high-
probability statement.)
   The proofs of Claims 10.3 and 10.4 are very delicate; they proceed by considering a linear-algebraic
notion of minimal kernel vectors, and studying the combinatorial consequences of this notion. We defer
the proofs to Section 11.
   For the last few steps of our random walk (for t < ∆) we need to use Lemma 8.4(b), so we also need
to know that A(Gt ) is likely to be η-unstructured for such t, in the sense of Deﬁnition 8.3.
Claim 10.5. For t ∈ {0, . . . , ∆}, A(Gt ) is η-unstructured with probability 1 − (log n)−ω(1) .
   It turns out that Claim 10.5 can be proved within the same general framework as Claims 10.3 and 10.4.
We defer this proof of Claim 10.5 to Section 11.
   We are now ready to deﬁne our random walk XN , . . . , X0 . Say an index t ≤ N is good if all of the
following hold.
                      √
    G1 degW (vt ) ≥ ∆, and
                                 (η)
    G2 if t ≥ ∆/2, then dim(Kt+1 ) < t/4, and
    G3 A(Gt+1 ) has no kernel vector with a nonzero level set larger than (1 − η)(n − t − 1), and
                                                       (η)
    G4 if t < ∆, then vt has no neighbour in supp(Kt+1 ), and
                              (η)           (η)
    G5 if t < ∆, then dim(Kt+1 ) = dim(K∆ ), and
                                                                 27
   G6 if t < ∆, then A(Gt+1 ) is η-unstructured, and
                             (η)
   G7 if t < ∆, then | supp(Kt+1 )| < η 2 (n − t − 1)/32.
Let R be the set of indices that are not good (i.e., bad). Then, we have the following consequence of
Claims 10.2 to 10.5 (and the properties in Lemma 9.1).
Claim 10.6. With probability 1 − o∆→∞ (1), for all t ≤ N we have |R ∩ {1, . . . , t}| ≤ t/100.
Remark. Here we use notation of the form f = o∆→∞ (n) to mean that f /n can be made arbitrarily
small by taking suﬃciently large ∆. Recall that for the moment we are viewing ∆ as a constant, but
later on we will take ∆ → ∞ as n → ∞.
Proof. By Lemma 9.1(A3), whp N ≤ βn for some β = o∆→∞ (n). For each i = 0, 1, . . . , ⌊log2 (βn + 2)⌋,
let Qi be the number of bad steps t ∈ R with t ≤ βn in the range [2i − 1, 2i+1 − 1). It suﬃces to show
that with probability 1 − o∆→∞ (1), for each i we have Qi ≤ 2i /800.
   Let QG1             G7
          i , . . . , Qi  be the contribution to Qi from failure of each of G1 to G7 (so Qi ≤ QG1i + ···+
  G7                                                                 j    i
Qi ). We will show that with probability 1−o∆→∞ (1) we have Qi ≤ 2 /5600 for each j ∈ {G1, . . . , G7}.
   First, the cases j ∈ {G3, . . . , G7} are easy to handle with Claims 10.2, 10.4,
                                                                                  √ and 10.5 and the union
bound. For j = G1, say that a vertex v ∈ T is “degree-bad” if degW (v) < ∆. By Lemma 9.1(A4),
whp the fraction of degree-bad vertices in T is at most 1/∆. We can condition on such an outcome
of these degree-bad vertices without revealing any information about the ordering v1 , . . . , vN of the
vertices in T . So, by a Chernoﬀ bound for the hypergeometric distribution (Lemma 3.2), we have
                               i
Pr[QG1i  > 2i /5600] ≤ e−Ω(2 ) , and by Markov’s inequality we have Pr[QG1  i  > 2i /5600] ≤ O(1/∆). Using
the former inequality for say i ≥ log ∆ and the latter inequality for i < log ∆, the desired result follows
by a union bound.
   It remains to consider the case j = G2. By Markov’s inequality and Claim 10.3, we have
⌊log 2 (βn+2)⌋                        ⌊log2 (βn+2)⌋             ∞                                        (η)
    X                        2i           X           EQG2
                                                        i
                                                               X            X        Pr[t ≤ N and dim(Kt+1 ) ≥ t/4]
                 Pr[QG2
                     i  >        ]≤                          =
     i=0
                            5600          i=0
                                                      Ω(2i )   i=0
                                                                                                 Ω(2i )
                                                                     t∈[2i −1,2i+1 −1)
                                                                        ∆/2≤t≤βn
                                                                   βn
                                                                   X        1/t + (t/n)1/4    1
                                                            .η                             .η   + β 1/4 = o∆→∞ (1). 
                                                                                   t          ∆
                                                                  t=⌈∆/2⌉

   Now, we are ready to complete the proof of Theorem 1.12(A1) (using the notation and claims from
throughout this section).

Proof of Theorem 1.12(A1). Let I = (GN , (degW (v))v∈T ). That is to say, I speciﬁes GN (which deter-
mines T and W ), and the degrees from T into W . Let E be the event that |R ∩ {1, . . . , t}| > t/100 for
some t ≤ N , so Pr[E] ≤ h(∆) ﬁr sine h satisfying h(∆) → 0 as ∆ → ∞ by Claim 10.6.
   Note that Pr[E] = E[Pr[E | I]], so applying Markov’s inequality to Pr[E | I], and applying Lemma 9.1
for α ≪ ε, we see that I satisﬁes
     (i) corank A(GN ) ≤ |T |/8,
    (ii) G[VN ] has at most ηn/10 vertices with degree less than 2,
   (iii) Pr[E | I] ≥ 1 − h(∆)1/2 .
with probability at least 1 − 2h(∆)1/2 . For the rest of the proof, we condition on such an outcome of I
(so, for example, we treat T , N , and GN as deterministic objects).
   Now, for t ≤ N , let
                                  Xt = corank A(Gt ) − 1t<∆ dim K∆ − t/4.
                                                                              (η)


We claim that the sequence XN , . . . , X0 and the “bad set” R satisfy the conditions of Theorem 7.2 (with
ε = 1/2, C = 5/4, δ = 3/4 and p = o∆→∞ (1)). Conditions W0 and W2 are immediate, condition W1
follows from (i) above, and condition W4 follows from (iii). So, we just need to verify W3.
   To this end, condition on any outcome of Gt+1 (which determines Xt+1 ). We will study how Xt diﬀers
from Xt+1 , in this conditional probability space.
   In addition to information revealed so far, reveal vt and its degree degW (vt ) into W . If t < ∆, also
                                            (η)
reveal the neighbourhood of vt in supp(Kt+1 ) (this is enough information to see whether step t is bad).
Condition on an outcome of the revealed information; we need to show that if step t is not bad, then
with probability at least 1 − o∆→∞ (1): if Xt+1 > 0 then Xt ≤ Xt+1 − 3/4, and if Xt+1 ≤ 0 then Xt ≤ 0.
                                                             28
We assume that the revealed information is such that step t is not bad (otherwise there is nothing to
prove).
                       √                                                                     (η)
   Let d = degW (vt ) ≥ ∆ (by G1). If t ≥ ∆ let E = W and if t < ∆ let E = W \ supp(Kt+1 ). In
either case, we have E ≥ (1 − α)n − ηn/10 − ∆ ≥ (1 − η/3)n (using (ii) above and G2 and G5). By
Claim 10.1 and G4, the neighbourhood NE (vt ) of vt in E is a uniformly random size-d subset of E.
Now, we use one of the two parts of Lemma 8.4, as follows.
                                             (η)
      • Case 1: corank(A(Gt+1 )) > dim(Kt+1 ). In this case, there is some kernel vector v of A(Gt+1 )
         with | supp(v)| ≥ η(n − t − 1). By G3, this kernel vector is η-balanced, so Lemma 8.4(a) yields
         that rank(A(Gt )) ≥ rank(A(Gt+1 )) + 2 (and hence Xt ≤ Xt+1 − 3/4) with probability at least
         1 − Oη (∆−1/4 ) ≥ 1 − ∆−1/8 .
                                             (η)
      • Case 2: corank(A(Gt+1 )) = dim(Kt+1 ). By G2 and G5, this case can only happen if Xt+1 < 0.
         Thus if corank(A(Gt )) = corank(A(Gt+1 )), we have Xt ≤ 0 since the walk is quarter-integral and
         increases by at most 1/4. By G6 and G7, the conditions for Lemma 8.4(b) are met, and thus
         with probability at least 1 − ∆−1/8 , we have corank(A(Gt )) = corank(A(Gt+1 )). The desired
         result follows.
   Now, having veriﬁed conditions W0 to W4, the conclusion of Theorem 7.2 is that X0 = corank A(G0 )−
       (η)
dim K∆ ≤ 0 with probability at least 1 − O(min(h(∆)1/2 , ∆−1/8 )). By Claim 10.4, it follows that
                         (η)
corank A(G0 ) = dim K0 = s(η) (G) with probability at least 1 − O(min(h(∆)1/2 , ∆−1/8 )). We deduce
                             (η)
that corank A(G0 ) = dim K0 = s(η) (G) whp, taking ∆ → ∞ suﬃciently slowly. It now just suﬃces to
                                           (η)
observe that when corank A(G0 ) = dim K0 there are no special cycles longer than 2ηn. Indeed, such a
special cycle would give rise to a kernel vector with support larger than ηn, by Fact 1.6.              

                                   11. Kernel vectors and stalks
    In this section we prove Claims 10.2 to 10.5, which are the remaining ingredients in our proof of
Theorem 1.12(A1).
    Claims 10.2 to 10.4 concern kernel vectors; note that Claim 10.5 can be interpreted as a claim about
almost kernel vectors. Indeed, say that a vector v ∈ Rn is an ℓ-almost kernel vector of a matrix A ∈ Rn×n
if | supp(Av)| = ℓ (so a kernel vector is a 0-almost kernel vector, and the deﬁnition of η-unstructuredness
in Deﬁnition 8.3 concerns 2-almost kernel vectors). We will therefore be able to prove each of Claims 10.2
to 10.5 by carefully studying almost-kernel vectors in degree-constrained random graphs.
    First, it is easy to show that kernel vectors which are dominated by a nonzero level set are unlikely:
the following lemma immediately implies Claim 10.2, and is a simple consequence of Lemma 6.2(A4).
Lemma 11.1. Let G = G0 , . . . , GN be as in Section 10. Suppose η ≪ ε and α ≤ η. Then with probability
1 − n−ω(1) no A(Gt ) has an ℓ-almost kernel vector with a nonzero level set larger than (1 − η)(n − t), for
any ℓ ∈ {0, 1, 2}.
Proof. We show that the desired result follows whenever G satisﬁes the conclusion of Lemma 6.2(A4).
   Consider any vector x ∈ RV (Gt ) with λ-level set U ⊆ V (Gt ) ⊆ V (G) larger than (1 − η)(n − t) ≥
(1 − η)(n − αn) ≥ (1 − 2η)n, for some λ 6= 0, and suppose without loss of generality that λ > 0. We will
show that x cannot be an ℓ-almost kernel vector of A(Gt ), for any ℓ ≤ 2.
   Let U be the complement of U in V (G), and recall that we deﬁned G = G0 , . . . , GN by deleting some
vertices from a special vertex subset S with |S| = ⌊αn⌋. Note that U ∪S has at most Oε ((ηn) log(1/η)) ≤
n − t − 3 neighbors in G. This implies that there are at least 3 vertices v ∈ V (Gt ) which have at least
2 neighbours in Gt , all of which are in U . So, the v-coordinate of A(Gt )x is degGt (v)λ ≥ 2λ > 0. The
desired result follows.                                                                                
   The above lemma handles almost-kernel vectors that are dominated by a nonzero level set, but we
also need to handle almost-kernel vectors that are dominated by their zero level set (i.e., almost-kernel
vectors with small support). To this end we need the notion of a minimal vector (previously appearing
in work of DeMichele, the ﬁrst author, and Moreira [30]).
Definition 11.2. Say that a vector v is minimal if for any w ∈ Rn \ {0} with supp(w) ( supp(v), we
have supp(Aw) * supp(Av).
   It is clear from the above deﬁnition that for any vector v, there is a minimal vector whose support
is contained in v. In fact more is true: every ℓ-almost kernel vector can be written as a sum of such
minimal almost kernel vectors.
                                                    29
Lemma 11.3. For any matrix A ∈ Rn×n and vector v ∈ Rn , we can write v as a sum of minimal
vectors w satisfying supp(Aw) ⊆ supp(Av).
Proof. Suppose for the purpose of contradiction that the lemma statement is false, and let v = (v1 , . . . , vn )
be a minimal-support counterexample (i.e., with | supp(v)| as small as possible). We are assuming there
is no way to represent v as a sum of minimal vectors w which satisfy supp(Aw) ⊆ supp(Av). We say a
vector w is properly contained in v if supp(w) ( supp(v) and supp(Aw) ⊆ supp(Av).
    By assumption, v is not itself minimal, meaning that there is a vector w = (w1 , . . . , wn ) ∈ Rn \ {0}
that is properly contained in v. Fix any i ∈ supp(w), let λ = vi /wi and let w′ = v − λw. Then w′ is
                                             / supp(w′ )).
properly contained in v as well (note that i ∈
    Since v is a minimal-support counterexample, we can write λw (respectively w′ ) as a sum of vectors
that are properly contained in λw (respectively, properly contained in w′ ). Note that proper containment
is transitive; since v = w′ + λw, we can now write v as a sum of vectors that are properly contained in
v, which is a contradiction.                                                                                  

   Minimal almost-kernel vectors enjoy certain combinatorial properties, which we capture in the notion
of a stalk. For a graph G and a vertex set R, write N (R) for the union of neighbourhoods of vertices in
R (so N (R) may intersect R).
Definition 11.4. Given a graph G, call a set of vertices R ⊆ V (G) an (r, s, ℓ)-stalk for G if:
    S0 |R| = r and |N (R)| = s,
    S1 s ≥ r − 1 + ℓ,
    S2 R cannot be split into two nonempty sets with disjoint neighborhoods, and
    S3 All but exactly ℓ vertices v ∈ N (R) have at least two neighbours in R.
The ℓ vertices v ∈ N (R) with |N ({v}) ∩ R| ≤ 1 are called the exceptional vertices for the stalk R. Also,
we use the shorthand “(r, ℓ)-stalk” to describe an (r, s, ℓ) stalk for any s ≥ r − 1 + ℓ, and the shorthand
“(≤ q, ℓ)-stalk” to describe an (r, ℓ)-stalk for any r ≤ q.
Lemma 11.5. Consider an n-vertex graph G and a minimal ℓ-almost kernel vector v of its adjacency
matrix A(G). Then R = supp(v) is a (|R|, ℓ′ )-stalk, for some ℓ′ ≤ ℓ.
Proof. Let Q = supp(A(Gt )v) (so |Q| = ℓ). For S1, suppose for the purpose of contradiction that
|N (R)| < |R| + ℓ − 1. Let R′ be obtained by removing an arbitrary vertex of R, and let A′ be the
R′ × (N (R) \ Q) submatrix of A(G). Then A′ has |R| − 1 rows and |N (R)| − ℓ < |R| − 1 columns, so has
a nonzero left kernel vector w. Padding this vector with zeroes gives a nonzero vector w′ ∈ ker(A(G))
with supp(w′ ) ( supp(v) and supp(A(G)w′ ) ⊆ supp(A(G)v), contradicting the minimality of v.
   For S2, suppose for the purpose of contradiction that R can be split into two nonempty sets R1 , R2
with distinct neighbourhoods. Let v1 ∈ Rn be the vector obtained from v1 by setting all entries not
indexed by R1 to zero. Then v1 contradicts the minimality of v.
   For S3, suppose for the purpose of contradiction that some u ∈ N (R) \ Q has exactly one neighbour
in R (call that neighbour w). But then the u-entry of A(G)v is the same as the w-entry of v, which is
impossible (recall that w ∈ R = supp(v) while u ∈/ Q = supp(A(G)v)).                                 

   We also need the following lemma deducing the precise corank of the adjacency matrix from informa-
tion about its stalks and special cycles. Recall that a special cycle in G is an induced cycle with length
divisible by 4, such that every second vertex has degree 2 in G. Recall that s(G) is the number of special
cycles, counting isolated special cycles twice.
Lemma 11.6. Let G be an n-vertex graph, and let
                                  K (η) = {v ∈ ker A(G) : | supp(x)| ≤ ηn.}
Suppose that every (≤ ηn, 0)-stalk R is an (|R|, |R|, 0)-stalk which satisﬁes e(R ∪ NG (R)) ≤ 2|R| and
degG (v) ≥ 2 for all v ∈ R. Also, suppose that all special cycles in G have length at most ηn and are
vertex-disjoint from each other.
    (1) supp K (η) is precisely the set of degree-2 vertices in special cycles of G.
    (2) dim K (η) = s(G).
   We emphasise that Lemma 11.6 is a non-probabilistic statement about general graphs G (though we
will eventually apply it to the random graphs Gt deﬁned in Section 10).
                                                       30
Proof. Let V spec be the set of degree-2 vertices in special cycles of G, and suppose the vertex set of G
is {1, . . . , n}. Recall from Fact 1.6 that special cycles give rise to kernel vectors, so supp K (η) ⊇ V spec .
Also, since the special cycles in G are vertex-disjoint, each of the s(G) kernel vectors obtained in this
way have disjoint supports, so are linearly independent. This shows that dim K (η) ≥ s(G).
   Recalling Lemma 11.3, to prove that dim K (η) = s(G) it now suﬃces to show that every nonzero
minimal kernel vector of A(G) whose support size is at most ηn is a multiple of one of the explicit kernel
vectors arising from special cycles via Fact 1.6. To this end, consider a nonzero minimal kernel vector
v = (v1 , . . . , vn ), let R = supp(v), and suppose |R| ≤ ηn. Then, by Lemma 11.5 and the assumption in
the lemma, R = supp(v) is an (|R|, |R|, 0)-stalk consisting of vertices with degree at least 2, such that
e(R∪NG (R)) ≤ 2|R|. This is only possible if R∪NG (R) is an induced cycle in which the vertices in R have
degree exactly 2. Write u2 , u4 , . . . , u2q (in order) for the vertices of this cycle, where u2 , u4 , . . . , u2q ∈ R.
   For each ui ∈ NG (R) (with i odd), the ui -coordinate of Av is precisely vui−1 + vui+1 . Since v is a
kernel vector, each of u2 , u4 , . . . , u2q must have the same absolute value, and cyclically alternate their
signs. This is only possible if q is even (i.e., if R ∪ NG (R) induces a special cycle), and implies that v is
a multiple of one of the explicit kernel vectors arising from Fact 1.6.                                                
   Next, the following lemma shows how to establish the η-unstructuredness property in Deﬁnition 8.3
using information about stalks.
Lemma 11.7. For 0 < η < 1/2, consider a graph G with at most n/10 diﬀerent (≤ ηn, 1)-stalks and
at most n2 /10 diﬀerent (≤ ηn, 2)-stalks, where additionally, A(G) has no 2-almost kernel vector with a
nonzero level set of size at least (1 − η)n. Then the adjacency matrix A(G) is η-unstructured.
Proof. Since we have assumed A(G) has no 2-almost kernel vector with a nonzero level set of size at
least (1 − η)n, we only need to consider unbalanced almost-kernel vectors with a large zero level set.
   We ﬁrst claim that whenever there is a vector v ∈ Rn with supp(Av) = {i, i′ }, there is a minimal vector
w ∈ Rn with supp(Aw) ∈ {{i}, {i′}, {i, i′}} and supp(w) ⊆ supp(v). Indeed, consider the decomposition
into minimal vectors given by Lemma 11.3. For all of these vectors w we have supp(Aw) ⊆ {i, i′ }, and
it cannot be the case that all of these vectors are kernel vectors of A (otherwise v would be a kernel
vector as well). Since supp(w) ⊆ supp(v), if v is non-η-balanced with a large zero level set, then w is
also non-η-balanced.
   Then, using Lemma 11.5, the assumptions in the lemma imply that there are at most n/10 diﬀerent
i for which there is a non-η-balanced vector v ∈ Rn with supp(Av) = {i}, and there are at most n2 /10
diﬀerent pairs {i, i′ } for which there is a non-η-balanced vector v ∈ Rn with supp(Av) = {i, i′ }. It
follows that there are at least n(n − 1) − 2n(n/10) − 2(n2 /10) ≥ ηn2 pairs of distinct indices (i, i′ ) for
which every v with supp(Av) = {i, i′} is η-balanced, meaning that A(G) is η-unstructured.                 
  Essentially all that remains is to carefully analyse the stalks that exist in the random graphs GN , . . . , G0
deﬁned in Section 10.
11.1. Estimates on stalks. Recall the deﬁnitions of the random graphs GN , . . . , G0 from Section 10:
to obtain GN we looked at the degrees of the ﬁrst ⌊αn⌋ vertices of a random graph G ∼ K(n, m, 2) and
deleted the vertices with degree at least ∆, then we added back these vertices in a random order to
obtain GN −1 , . . . , G0 .
   Crucially, a similar proof as for Lemma 6.1 shows that for each t ≤ αn, if we condition on the degree
sequence of Gt (more precisely, we condition on the event t ≤ N and then further condition on the
degree sequence), then Gt is distributed like a uniformly random graph with that degree sequence. So,
we perform various calculations after conditioning on properties of the degree sequence of Gt . Speciﬁcally,
the properties we need are as follows.
Definition 11.8. Consider integers m > n, t and some κ > 0. Choose λ > 0 such that if Z ∼ Poisson(λ),
then 2m/n = E[Z|Z ≥ 2]. A sequence d = (d1 , . . . , dn−t ) ∈ Rn−t is (n, m, t, κ)-typical if it satisﬁes the
following properties.
    T1 dv = 0 for at most (t/n)3/2 n diﬀerent v.
    T2 dv = 1 for at most κ−1 t log(n/t) diﬀerent v. (Here we use the convention 0 log ∞ = 0 for the
        case t = 0.)
    T3 dv = 2 for at most (Pr[Z = 2|Z ≥ 2] + κ)n diﬀerent v.
    T4 2(1 − κ)m ≤ d1 + · · · + dn−t ≤ 2m.
                                              |U | = u, we have v∈U dv ≤ κ−1 u log(2n/u).
                                                               P
    T5 For any U ⊆   {1,
                       h  . . . , n − t}
                                       i with
                                            
        P dv             Z
                                                    P dv      −j
    T6     v 2 ≤ E        2 Z ≥ 2 + κ n, and            v j ≤κ     n for j ≥ 3.
                                                           31
   We remark that most of these bounds are essentially sharp, for a typical outcome of the degree
sequence of Gt . The exception is T1: the number of isolated vertices is typically about (t log(n/t)/n)2 n
(but we will not need such a strong estimate).
Lemma 11.9. Fix ε, α, ∆, κ > 0 such that 1/∆ ≪ α ≪ κ ≪ ε. Recall the deﬁnitions of GN , . . . , G0 (in
terms of α, ∆) from Section 10. Then, for each t ≤ αn: with probability at least 1 − (t/n)1/4 , if t ≤ N
then the degree sequence of Gt is (n, m, t, κ)-typical.
    Recall that N = o∆→∞ (n) whp, so when we take ∆ → ∞, Lemma 11.9 becomes a with-high-
probability statement.

Proof. First, note that by Lemma 6.2(A4), with probability at least 1 − n−ω(1) we have v∈S degG (v) =
                                                                                              P
Oε (s log(2n/s)) for each size-s subset S ⊆ V (G). This directly yields T5 since the degrees in Gt are at
most those in G. Further, Lemma 6.2(A4) yields that the sum of degrees of the vertices in V (G) \ V (Gt )
(i.e., the vertices vt−1 , . . . , v0 ) is Oκ (t log(2n/t)) ≤ κn ≤ κm for α ≪ κ (recalling that t ≤ αn). This
yields T4 and additionally T2, since the number of degree 1 vertices is at most the number of edges from
V (G) \ V (Gt ). Similarly T3 and T6 hold with probability 1 − n−ω(1) , by Lemma 6.2(A1) and (A2,A3)
respectively.
    For T1, we need a simple calculation in the conﬁguration model. Condition on an outcome of the
degree sequence d of G, satisfying the conclusions of Lemma 6.2. This determines T ; also condition
on an outcome of V (G) \ V (Gt ) = {vt−1 , . . . , v0 }, and let Tt = T ∩ (V (G) \ V (Gt )) (so |Tt | = t). By
Lemma 6.1, after our conditioning, we have G ∼ G(d). By Lemma 6.5(A), it suﬃces to prove the desired
result for G ∼ G∗ (d) (i.e., we may work in the conﬁguration model).
    A vertex v can only be isolated in Gt if it has at least two neighbours in Tt . The number of
stubs corresponding to the vertices in Tt is Oκ (t log(2n/t)), so the probability that this happens is
Oκ (t log(2n/t)/n)2 ≤ (t/n)1.9 for α ≪ κ. That is to say, the expected number of isolated vertices is at
most (t/n)1.9 n, so T1 holds with probability at least 1 − (t/n)1/4 by Markov’s inequality.                  

  Now, the following deﬁnition captures the stalks which are not handled by Lemma 6.6.
Definition 11.10. Say a stalk R is ε-sparse
                                     p      if there is no subset of vertices in R ∪ N (R) of any size u
which spans more than u + ⌊C6.6 (ε)u/ log(2n/u)⌋ edges.
   The following lemma encapsulates a careful analysis of small sparse stalks in random graphs with a
given typical degree sequence.
Lemma 11.11. Fix η, ε, κ, α such that α ≪ η ≪ κ ≪ ε ≪ 1. Choose n, m, t with 1 + ε ≤ m/n ≤ 1/ε
and t ≤ αn, let d ∈ Rn−t be a (n, m, t, κ)-typical sequence, and let Gt ∼ G(d).
    For s ≥ r − 1 + ℓ and 1 ≤ r ≤ ηn, let Xr,s,ℓ be the number of ε-sparse (r, s, ℓ)-stalks in Gt , and let
  ′
Xr,s,ℓ be the number of such stalks R for which there is a vertex v ∈ R with dv = 1. Then we have the
following estimates.
    (1) If s ≥ r + 1, then EXr,s,0 .κ e−Ωε (r) /n.
    (2) EXr,r,0 .κ e−Ωε (r) .
                              ′
    (3) If t ≤ n1/8 then EXr,r,0 .κ e−Ωε (r) n−3/4 .
    (4) If s = r − 1, then EXr,s,0 .κ e−Ωε (r) (t/n)3/2 n.
    (5) For any ℓ ≤ 2, we have EXr,s,ℓ .κ e−Ωε (r) n.
    (6) If t ≤ log n, then EXr,s,1 .κ e−Ωε (r) (log n)2 .
   We emphasise that the above estimates are only for r ≤ ηn (i.e., for those stalks that correspond to
small-support kernel vectors of A(Gt )).
   We remark that our notion of a stalk has some resemblance to the notion of a ﬂipper in [22, Section 8],
and [22, Lemma 8.1] plays a similar role to Lemma 11.11. However, in our setting we need much more
precision, and the details are much more involved.
   For our proof of Lemma 11.11 we collect some elementary estimates. First, we will need to estimate
products of factorials.
                                                                    Pr                Pr
Lemma 11.12. If (ki )ri=1 is a sequence of nonnegative integers with i=1 ki = a and i=1 iki = b then
                                               r
                                               Y
                                                     ki ! ≥ e−b a!.
                                               i=1
                                                        32
Proof. By the multinomial theorem we have
                                          
                                   a
                                            k k1 · · · krkr ≤ (k1 + · · · + kr )a = aa .
                            k1 , . . . , kr 1
So,
                         a!
                                      
                                              a
                                                                Y  a kj         X
                                                                                       kj
                                                                                               
                                                                                               a
                    Qr            =                          ≤               = exp a      log     .
                       j=1 kj !        k1 , . . . , kr           j
                                                                     kj              j
                                                                                       a       kj

We can interpret the right-hand side as eaH(Y ) , where H(Y ) is the (base-e) entropy of a random variable
Y satisfying Pr[Y = i] = ki /a for each i ∈ {1, . . . , r}. Note that EY = b/a; among positive integer
random variables with this mean, the maximum possible entropy is attained by a geometric random
variable with parameter p := a/b (see for example [51]). The entropy of such a geometric random
variable is (−p log p − (1 − p) log(1 − p))/p ≤ 1 − log p. So,
                                          a!
                                  Qr             ≤ eaH(Y ) ≤ ea(1−log p) = (e/p)pb ≤ eb ,
                                      j=1 kj !

using the inequality (e/p)p ≤ e (which holds for all 0 ≤ p ≤ 1).                                           

   We also need the following general-purpose inequality to bound various binomial coeﬃcients.
Lemma 11.13. For any z > 0, and any a, b ∈ N, we have ab ≤ (1 + z)a eOz (b) .
                                                             

Proof. If 4b ≥ z 2 a, we have ab ≤ (ae/b)b ≤ (4e/z 2)b = eOz (b) . Otherwise, if 4b < z 2 a, writing
                                 
                                                       √
x = b/a, we have ab ≤ (ae/b)b = ((e/x)x )a ≤ (1 + 2 x)a ≤ (1 + z)a . (Here we used the inequality
              √
(e/x)x ≤ 1 + 2 x, which holds for all x ≥ 0.)                                                      

   We are now ready to prove Lemma 11.11.

Proof of Lemma 11.11. In this proof we think of ε as being a constant (without explicitly writing ε as a
subscript on asymptotic notation), p  and we simply write “sparse” instead of “ε-sparse”. Also, throughout
this proof we let f (s) = ⌊C6.6 (ε)s/ log(2n/s)⌋. Note that f is essentially sub-linear, in the sense that
f (a + b) ≤ f (a) + f (b) + 1.
   First, we brieﬂy note that isolated vertices are (1, 0, 0)-stalks (and by S2, isolated vertices are not
contained in any other types of stalks). By T1, the number of isolated vertices is at most (t/n)3/2 n . n,
which handles the (r, s) = (1, 0) cases of (4) and (5). For the rest of the proof we can restrict our
attention to (r, s, ℓ)-stalks which do not contain any isolated vertices.
   The reader may ﬁnd it helpful to think of two basic examples of sparse stalks that may occur in graphs
with minimum degree at least 2. First, for any even cycle in which every second vertex has degree 2, we
can take those degree-2 vertices as a (r, r, 0)-stalk. Second, for any odd cycle in which every vertex has
degree 2, we can take the entire vertex set of the cycle as an (r, r, 0)-stalk. It is not hard to estimate the
expected number of these types of cycles using the conﬁguration model.
   Roughly speaking, the proof strategy is as follows. First, we prove a sequence of inequalities (Claim 11.14)
showing that every stalk approximately resembles a union of copies of these two examples. Then, we do
an explicit conﬁguration-model calculation that parallels the cycle calculation mentioned above.
   For this entire proof we will work with the conﬁguration model Gt ∼ G∗ (d), taking Xr,s,ℓ = Xr,s,ℓ   ′
                                                                                                            =0
whenever Gt is not simple.    (By Lemma  6.5, it suﬃces to prove the  desired estimates  in this setting, noting
that T6 implies that v d2v = O(n).)
                         P

Step 1: Parameters of stalks. Fix r, s, ℓ with s ≥ r − 1 + ℓ and ℓ ≤ 2. We deﬁne a number of
                                                                                                       ′
parameters of a sparse (r, s, ℓ)-stalk R in Gt . We will later study the contribution to EXr,s,ℓ and EXr,s,ℓ
from each choice of these parameters.
      • Let S = N (R), let S1 = R1 = S ∩ R, let S2 = S \ R and let R2 = R \ S. For each i ∈ {1, 2}, let
        ri = |Ri | and si = |Si |. (So, s = s1 + s2 and r = r1 + r2 and r1 = s1 .)
      • For each i ∈ {1, 2}, let ℓi be the number of exceptional vertices in Si . (So, ℓ = ℓ1 + ℓ2 .)
      • Let x be the number of v ∈ R2 which have degGt (v) = 1.
      • Let m1 be the number of edges in R1 , let m1,2 be the number of edges between R1 and S2 , and
        let m2,2 be the number of edges between R2 and S2 .
      • For i ≥ 1, let ki be the number of vertices in S2 which have exactly i neighbours in R (so in
        particular k1 = ℓ2 ).
                                                                     33
There are a number of simple inequalities that must hold between our parameters. First, by S1, we have
                                               s2 − r2 = s − r ≥ ℓ − 1.                                            (11.1)
Second, by ε-sparsity, we have
 m1 ≤ r1 + f (r1 ),   m2,2 ≤ r2 + s2 + f (r2 + s2 ),        m1 + m1,2 + m2,2 ≤ r1 + r2 + s2 + f (r1 + r2 + s2 ) (11.2)
Third, recall from S3 that all non-exceptional vertices in S have at least two neighbours in R. By the
considerations at the start of the proof, we are assuming R contains no isolated vertices, and by deﬁnition
R has exactly x vertices with degree 1 into S. So, summing over degrees in R1 , R2 , S2 , we obtain
             m1 ≥ ⌈(2r1 − ℓ1 )/2⌉ = r1 − ⌊ℓ1 /2⌋,           m1,2 + m2,2 ≥ 2s2 − ℓ2 ,             m2,2 ≥ 2r2 − x.   (11.3)
Finally, using T5, we have
                                             m1,2 ≤ Oκ (s2 log(2n/s2 )).                                           (11.4)
(Other similar inequalities can also be obtained via T5, but we will not need them.)
Step 2: The structure of sparse stalks. We now combine the above inequalities, to prove the
following claim about the parameters of a sparse (r, s, ℓ)-stalk R. Roughly speaking, the claim says that
if we consider two disjoint copies of R and S and a bipartite graph of the edges between the two, then
almost all vertices have degree 2, and almost all edges are inside R1 = S1 or between R2 and S2 . (Note
that there are no edges between R2 and S1 = R1 , by the deﬁnition of R1 .)
Claim 11.14. Consider a sparse (r, s, ℓ)-stalk R, with parameters as deﬁned as in Step 1.
   (1) s2 = r2 + O(1 + f (r)) (i.e., S and R have roughly the same size).
   (2) All but O(1 + x + f (r)) vertices in R have degree exactly 2.
   (3) k2 = s2 + O(1 + x + f (r)) (i.e., almost all vertices in S2 have degree exactly 2 into R).
   (4) m1,2 = O(1 + x + f (r)) (i.e., there are few edges between R1 and S2 ).
   (5) 2s2 + O(1 + x + f (r)) ≤ m2,2 ≤ 2s2 + O(1 + f (s2 )) (i.e., the number of edges between S2 and R2
       is not much more than 2s2 , which by (1) is roughly the same as 2r2 ).
   (6) m1 = s1 + O(1 + f (r1 )) (i.e., the number of edges inside S1 = R1 , which is half its degree sum,
       is not much more than s1 = (2s1 )/2).
   In light of Remark 6.7 and since r/n ≤ η, if η ≪ κ we have f (q) ≤ κq for q ∈ {s1 , s2 , r} (we are also
using Claim 11.14(1) here to show s/n is small). In particular, throughout the rest of the proof, terms
of the form f (q) can be viewed as being “lower order” than q.
Proof. First, (6) follows from the ﬁrst inequalities in (11.2) and (11.3).
   Next, by combining (6), the last inequality in (11.2), and the second inequality in (11.3), we obtain
s2 ≤ r2 + O(1 + f (r + s2 )). Together with (11.1), this nearly gives us (1), but we need to do a little
more work to replace the error term “O(1 + f (r + s2 ))” with the desired error term “O(1 + f (r))”.
                                                                                     pr. By T5 we have
Speciﬁcally, to show that these error terms are equivalent, we need to prove that s2 .
s ≤ v∈R dv ≤ κ−1 r log(2n/r) . η 1/2 n (assuming η ≪ κ), so f (r + s2 ) . (r + s2 )/ log(1/η) and thus
     P
our initial inequality implies s2 . r, as desired.
   Then, (5) follows from (11.1), the second inequality in (11.2), (1), and the last inequality in (11.3).
After this, we can deduce (4) from (1), (5), (6), and the last inequality in (11.2).
   Finally, by (1,4,5,6), note that
X                                                         X
    (deg(v)−2) = 2m1 +m1,2 +m2,2 −2r . 1+x+f (r),             (degR (v)−2) = m1,2 +m2,2 −2s2 . 1+x+f (r).
v∈R                                                                 v∈S2

Recall that at most x . 1 + x + f (r) vertices in R have degree less than 2, and at most ℓ . 1 + x + f (r)
vertices in S have fewer than 2 neighbours in R. So, (2) and (3) follow.                                

Step 3: Breaking down the expectation. For a vector of parameters
                             p = (r1 , r2 , s1 , s2 , ℓ1 , ℓ2 , x, m1 , m1,2 , m2,2 , (ki )ri=1 ),
we now consider the contribution to EXr,s,ℓ from sparse stalks with these parameters. We will eventually
                                       ′
sum over all possible p. (For EXr,r,0     , we simply sum over all p with x > 0.)
   Recall that we are working in the conﬁguration model G∗ (d), for a particular (n, m, t, κ)-typical degree
sequence d = (d1 , . . . , dn−t ) (so we have n − t buckets corresponding to vertices, and within the bucket
corresponding to a vertex v, there are dv stubs).
                                                              34
   First, we deﬁne Np to be “the number of possible places that a stalk may appear”. Speciﬁcally, Np is
the number of ways to choose disjoint vertex sets R1 , R2 , S2 , and to colour all the stubs from R1 blue and
yellow, and to colour some stubs from S2 red, and all the stubs from R2 green, such that the following
hold.
      • |R1 | = r1 , |R2 | = r2 , |S2 | = s.
      • There are 2m1 + m1,2 stubs coming from R1 . Exactly 2m1 are blue and exactly m1,2 are yellow.
      • There are exactly m2,2 stubs coming from R2 , all coloured green.
      • Among the stubs from S2 , exactly m1,2 + m2,2 are red.
      • Each vertex in S2 has at least two red stubs, except exactly ℓ2 which have one red stub.
      • Exactly x of the vertices in R2 have degree 1.
      • Exactly ℓ1 of the vertices in R1 have degree 1, and none have degree 0.
   Then, for each of the choices of R1 , R2 , S2 and red/blue/yellow colourings as above, we consider the
probability that
      • the 2m1 blue stubs (from R1 ) pair with each other, and
      • the m1,2 yellow stubs (from R1 ) pair with red stubs (from S2 ), and
      • the m2,2 stubs from R2 pair with red stubs (from S2 ).
                                                                                    P
This probability only depends on p; denote it by Pp . Observe that EXr,s,ℓ ≤ p Np Pp .
Step 4: Estimating combinatorial quantities. Let Q be the number of possibilities for p. We
now give upper bounds for Q, Np , and Pp . We will very often want to use the expression “(1 +
O(κ))r eOκ (1+x+f (r)) ” as a multiplicative error term, so we introduce the shorthand “O∗ (1)” for a term
of this form.
Claim 11.15. Q = O∗ (1).
Proof. Recall the deﬁnitions of the various parameters from Step 1, and recall from Claim 11.14 that
s, m1 , m1,2 , m2,2 . r. It is easy to see that there are at most (ℓ + 1)(r + 1)2 (s + 1) . r3 choices for
       , s1 , s2 , ℓ1 , ℓ2 , at most O(r3 ) choices for m1 , m1,2 , m2,2 , and at most r + 1 choices for x. Then, note
r1 , r2P
          r
that i=1 iki = m1,2 + m2,2 , so (ki )ri=1 encodes an integer partition of m√           1,2 + m2,2 (ki is the number of
                                                                                                         √
parts of size i). For each m1,2 , m2,2 , the number of such partitions is eO(        m1,2 +m2,2 )
                                                                                                    = eO( r) .     
Claim 11.16. For any p we have
                                                              m    +m
                                                     rm1 s 1,2 2,2
                                    Pp ≤ O∗ (1) r1 +2r12 2m1 +m1,2 +m2,2 .
                                                  e      m
Proof. Let dΣ = d1 + · · · + dn−t = (2 + O(κ))m. First note that
                                                               
                          (2m1 )!!(dΣ − 2m1 )!!     m1,2 + m2,2          m1,2 !m2,2 !
                  Pp ≤                          ·                 ·                       .
                                   dΣ !!               m1,2         (dΣ − 2m1 )m1,2 +m2,2
Indeed, the ﬁrst term accounts for the probability that the 2m1 blue stubs pair with each other, the
second term is the number of ways to choose which of the m1,2 + m2,2 red stubs will pair with yellow
stubs and which will pair with green stubs, and the last two terms bound the probability that the red
stubs do indeed pair with the yellow and green stubs in this way.
   We now just need to manipulate the above expression using the inequalities in Claim 11.14. Through-
out, we will use the crude bounds       that m1 , m1,2 , m2,2 . r without further remark.
   First, we have m1,2m+m                 κ)m1,2 +m2,2 eOκ (m1,2 ) by Lemma 11.13, and
                                 
                        1,2
                             2,2
                                   ≤ (1 +
                                           dΣ /2                       m                    m1
                                                                                     
              (2m1 )!!(dΣ − 2m1 )!!         m1                    m1 m1               r m1
                                        = dΣ  ≤ (1 + O(κ))           2m ≤ (1 + O(κ))
                                                                                               ,
                       dΣ !!               2m                         2m
                                                                                         em
                                              1                          1

provided η ≪ κ (recall that m1 . r ≤ ηn, while m ≥ n). Then (again with η ≪ κ) we have (dΣ −
2m1 )m1,2 = (dΣ − O(r))m1,2 +m2,2 = (1 + O(κ))O(r) (dΣ )m1,2 +m2,2 . Using Stirling’s formula, we therefore
have                                                        m1         m1,2       m2,2
                                             √            m1         m1,2         m2,2
              Pp ≤ (1 + O(κ))O(r) eOκ (m1,2 ) m1,2 m2,2                                      .
                                                          em         2em          2em
Next, using Claim 11.14(4,5,6), we have m1 = r1 + O(1 + f (r1 )) = (1 + O(κ))r1 + O(1), m1,2 =
O(1 + x + f (r)), and m2,2 ≤ 2s2 + O(1 + f (s2 )) = (1 + O(κ))2s2 + O(1). So, we deduce
                                                               m     m
                                                       r1m1 m1,21,2 s2 2,2
                                       Pp ≤ O∗ (1) r1 +2r2 m1 +m1,2 +m2,2 .
                                                  e        m
                                                         35
Now, to ﬁnish the proof of the claim it suﬃces to show that (m1,2 /s2 )m1,2 ≤ O∗ (1). We distinguish
cases.
       • Case 1: f (r) + x ≤ 1. We have m1,2 . 1 by Claim 11.14(4), so (m1,2 /s2 )m1,2 . 1.
       • Case 2: x ≥ f (r) + 2. Recall that x counts degree-1 vertices in R2 , so x ≤ r2 , and recall from
         (11.1) that s2 ≥ r2 − 1. Also, Claim 11.14(4) implies that m1,2 . x. So, s2 ≥ r2 − 1 ≥ x − 1 ≥
         x/2 & m1,2 , meaning that (m1,2 /s2 )m1,2 ≤ eO(x) .
       • Case 3: f (r) + x ≥ 2 and x ≤ f (r) + 1. In this remaining case, note that f (r) & 1 + x. Since
         s2 /n ≤ 1/2, from (11.4) we have m1,2 ≤ Oκ (s2 log(n/s2 )), which implies that
               m1,2           Oκ (s2 log(n/s2 ))               Oκ (log(n/s2 ))
                        ≤                           = s2                              ≤ Oκ (s2 ).
           log(n/m1,2 )   log(n/Oκ (s2 log(n/s2 )))      log((n/s2 )/Oκ (log(n/s2 )))
        Here in the last inequality we have used the fact that s2 /n . r/n ≤ η is small relative to κ
        (meaning that the denominator log((n/s2 )/Oκ (log(n/s2 ))) is at least say log(n/s2 )/2). Now
                       m1,2                                                     
                    m1,2                                                         n
             log                 = m1,2 log(Oκ (log(n/m1,2 ))) . m1,2 log log
                     s2                                                         m1,2
                                                                         !
                                                     n        log log(n/r)
                                 . f (r) log log           .r p              ≤ r log(1 + κ),
                                                   f (r)         log(n/r)
        provided η ≪ κ. Exponentiating yields the desired result.                                             
Claim 11.17. For any p we have
                                                                          x
                                nr1 +r2 +s2
                                                               
                                                                 log(n/t)
                     Np ≤ O∗ (1) r1 r2 +s2 · er1 +2r2 ρ2r1 +r2               E2r2 ,
                                r1 s2                               n/t
                                           h            i
where ρ2 = Pr[Z = t|Z ≥ 2] and E2 = E Z2 Z ≥ 2 for Z ∼ Poisson(λ), where λ is such that
2m/n = E[Z|Z ≥ 2].
Proof. Recall that our degree sequence is (n, m, t, κ)-typical. First, we bound the number of choices of
R1 . Recall from Claim 11.14(2) that there is some i = O(1 + x + f (r)) such that at least r1 − i vertices
in R1 have degree exactly 2. The number of ways to choose a sequence of r1 vertices, for which the ﬁrst
                                                                                                        1 +m1,2
r1 − i have degree exactly 2, is at most (ρ2 + κ)r1 −i nr1 = (ρ2 + κ)r1 (O(1))i nr1 . Also, there are 2mm 1,2
ways to choose a blue/yellow colouring of the stubs from R1 . In total, the number of choices of R1 and
a suitable blue/yellow colouring of its stubs is at most
                                                                                        r
                             (ρ2 + κ)r1 (O(1))i nr1
                                                                            
                      r1                                 2m1 + m1,2        ∗      enρ2 1
                           ·                         ·                 ≤ O (1)                            (11.5)
                       i              r1 !                  m1,2                     r1
where we used Lemma 11.13 twice (with z = κ) and Stirling’s inequality.
   Second, we bound the number of choices for R2 . Recall that x of the vertices in R2 have degree
exactly 1, and there is some j = O(1 + x + f (r)) such that at least r2 − x − j of the other vertices
in R2 have degree exactly 2. By T2 and T3, the number of ways to choose a sequence of r2 vertices,
of which the ﬁrst x have degree exactly 1, and the next r2 − x − j have degree exactly 2, is at most
O∗ (1)((t log(n/t)/n)x (ρ2 + κ)r2 −x−j nr2 . The number of choices of R2 is therefore at most
                                                                              r           x
                    ((t log(n/t)/n)x (ρ2 + κ)r2 −x (O(1))j nr2
                                                                   
        r2    r2                                                         eρ2 n 2 t log(n/t)
                  ·                                            = O∗ (1)                        , (11.6)
        x      j                       r2 !                               r2          n
where we used Lemma 11.13 twice and Stirling’s inequality.
  Third, the number of ways to choose S2 , and to choose which of its stubs are red, is at most
                         ki
                           
         r
       Y    1    X     dv         1              em1,2 +m2,2 −2k2 −ℓ2
                                 ≤      (E2 + κ)k2                      (1/κ)m1,2 +m2,2 −2k2 −ℓ2 ns2 .
       i=1
           ki !          i         k2 !             (s 2 − k2  − ℓ 2 )!
                  v∈V (Gt )

Here we used that v d1v ≤ m . n by T4, we used T6, and we used Lemma 11.12 applied to (ki )i≥2 ,
                  P      

noting that i=1 ki = s2 , ri=1 iki = m1,2 + m2,2 and k1 = ℓ2 .
           Pr             P
   Now, by Claim 11.14(1,2,5), we have m1,2 + m2,2 − 2k2 − ℓ2 = O(1 + x + f (r)), so the above expression
is bounded by
                                                                                   s
                             (E2 n)s2               s2 (E2 n)s2
                                                                       
                   ∗                           ∗                     ∗      eE2 n 2
                 O (1)                      = O (1)              ≤ O (1)              .            (11.7)
                       k2 !(s2 − k2 − ℓ2 )!         k2     s2 !               s2
                                                      36
(we have used the fact that s2 = k2 + O(1 + x + r), Lemma 11.13, and Stirling’s inequality).
  Multiplying the expressions in (11.5) to (11.7) (counting the number of ways to choose R1 , R2 , S2 ,
and their stub-colourings) shows that
                                                                       x
                                     nr1 +r2 +s2 s2
                                                             
                                                       r1 +r2 log(n/t)
                                ∗
                         Np ≤ O (1) r1 r2 s2 · e (eρ2 )                   E2s2 .
                                     r1 r2 s2                   n/t
The desired result follows, noting that s2 = r2 + O(1 + x + f (r)) by Claim 11.14(1) and hence (s2 /r2 )r2 =
(1 + O(1 + x + f (r))/r2 )r2 = eO(1+x+f (r)) = O∗ (1).                                                     

Step 5: Putting everything together. Let Ep = QNp Pp , so
                                                              ′
                                  EXr,s,ℓ ≤ max Ep ,        EXr,s,ℓ ≤ max Ep .
                                               p                     p:x>0

Combining Claims 11.15 to 11.17, we have
                                     x                                       m +m −r −s
                                                        nr1 +r2 +s2 r1m1 −r1 s2 1,2 2,2 2 2
                          
                            log(n/t)
              Ep ≤ O∗ (1)               ρr21 (ρ2 E2 )r2                                     .
                               n/t                                 mm1 +m1,2 +m2,2
Now, r1 , s1 ≤ 2r, and m1 − r1 , m1,2 + m2,2 − r2 − s2 . 1 + x + f (r), by Claim 11.14(1,4,5,6). So,
                                                                                  m1 −r1
if m1 − r1 (respectively, m1,2 + m2,2 − r2 − s2 ) is nonnegative, then rr1                = O∗ (1) (respectively,
  s2 m1,2 +m2,2 −r2 −s2        ∗
     
   r                        = O (1)). By (11.1) and (11.3), m1 − r1 and m1,2 + m2,2 − r2 − s2 can only be very
                                                                                               m1 −r1
slightly negative (i.e., if either is negative, it is O(1)). In such a case, we again have rr1         = O∗ (1) or
  s2  m     +m     −r   −s
                            = O∗ (1), respectively. Also, (m/n)s2 −r2 = eO(1+x+f (r)) . Putting all this together,
       1,2    2,2    2   2
   r
we further bound
                                            x                   r
                                   log(n/t)  ρ2 n r1 ρ2 E2 n2 2  r m1 +m1,2 +m2,2 −r1 −r2 −s2
                                                      
                             ∗
                    Ep ≤ O (1)                                                                    .
                                      n/t        m          m2         m
Recalling the deﬁnitions of ρ2 and E2 in terms of a Poisson random variable Z, and recalling the choice
of the Poisson parameter λ, we compute
             ρ2 n   2 Pr[Z = 2|Z ≥ 2]   2 Pr[Z = 2]   2(λ2 e−λ /2)    λe−λ
                  =                   =             =              =         = 1 − Ωε (1),
              m        E[Z|Z ≥ 2]        E[Z 1Z≥2 ]    λ − λe−λ      1 − e−λ
and similarly
                           4 Pr[Z = 2] E Z2
                                            
                ρ2 E2 n2                        4(λ2 e−λ /2)(λ2 /2)     λ2 e−λ
                         =                    =                     =             = 1 − Ωε (1).
                  m 2         E[Z 1Z≥2 ] 2                 −λ
                                                   (λ − λe )  2       (1 − e−λ )2
Also, combining the inequalities in (11.3) in diﬀerent ways, we can obtain m1 +m1,2 +m2,2 ≥ s1 +2s2 −ℓ =
r1 + r2 + s2 − ℓ + (s − r) and m1 + m1,2 + m2,2 ≥ r1 + 2r2 − ⌊ℓ1 /2⌋ − x = r1 + r2 + s2 − ⌊ℓ1 /2⌋ − x + (r − s).
We deduce                                              x
                                −Ωε (r)         log(n/t)  r max(s−r−ℓ, r−s−⌊ℓ1 /2⌋−x)
                       Ep .κ e           Oκ (1)
                                                  n/t       m
for κ ≪ ε, recalling the deﬁnition O∗ (1) := (1 + O(κ))r eOκ (1+x+f (r)) ≤ eO(κr) Oκ (1)Oκ (1)x (for the
inequality, we are using that η ≪ κ, so the “f (r)” in the exponent is suﬃciently small compared to r).
   We ﬁnally break into cases to prove the six diﬀerent parts of Lemma
                                                                    x       11.11. Observe that since we are
assuming t ≤ αn for α ≪ κ, we have that Oκ (1) log(n/t)/(n/t) ≤ 1.
    (1) If s ≥ r + 1 and ℓ = 0, then taking the ﬁrst term in the “max” in the exponent yields EXr,s,0 .κ
         e−Ωε (r) (r/m) = e−Ωε (r) /n.
    (2) If s = r and ℓ = 0, taking the ﬁrst term in the “max”, we see EXr,r,0 .κ e−Ωε (r) .
    (3) When s = r, ℓ = 0, x > 0, and t ≤ n1/8 , notice that we have Oκ (1)t log(n/t)/n ≤ n−3/4 . Thus
                                                         ′
         taking the ﬁrst term in the “max” yields EXr,r,0     .κ e−Ωε (r) n−3/4 .
    (4) Suppose s = r − 1 and ℓ = 0. If x ≥ 2 then take the ﬁrst term in the “max”, and if x < 2 take
         the second term. Thus for x ≥ 2, we have Ep .κ e−Ωε (r) (t log(n/t)/n)2 · n .κ e−Ωε (r) (t/n)3/2 n.
         For x = 1, we have Ep .κ e−Ωε (r) (t log(n/t)/n) .κ e−Ωε (r) (t/n)3/2 n and for x = 0, we have
                          r
         Ep .κ e−Ωε (r) m   .κ e−Ωε (r) /m . e−Ωε (r) (t/n)3/2 n.
    (5) For any ℓ, by S1 we have s − r − ℓ ≥ −1, so (taking the ﬁrst term in the “max”) we have
         EXr,s,ℓ .κ e−Ωε (r) n.
    (6) If ℓ = 1 and t ≤ log n, notice that t log(n/t)/n ≤ (log n)2 /n. If x > 0 then take the ﬁrst term in
         the “max”, which is at most −1 by S1. If x = 0, then ⌊ℓ1 /2⌋ = 0 means the “max” term must
         evaluate to at least 0. Together these two cases yield EXr,s,1 .κ e−Ωε (r) (log n)2 .                
                                                       37
11.2. Deductions. We now deduce Claims 10.3 to 10.5.

Proof of Claim 10.5. By Lemma 11.7 and Lemma 11.1, for t ≤ ∆ ≤ log n it suﬃces to prove that Gt has
at most (n − t)/10 diﬀerent (≤ η(n − t), 1)-stalks and at most (n − t)2 /10 diﬀerent (≤ η(n − t), 2)-stalks,
with probability 1 − (log n)−ω(1) . By Lemma 6.6, we only need to consider ε-sparse stalks. Also, by
Lemma 11.9, with probability 1 − (t/n)1/4 ≥ 1 − (log n)−ω(1) , the degree sequence of Gt is (n, m, t, κ)-
typical. Thus it suﬃces to prove the result conditional on a particular such degree sequence.
   Conditioning on a typical degree sequence, by Lemma 11.11(6) and (5) respectively, we have the
expected numbers of ε-sparse (≤ η(n − t), 1)-stalks and (≤ η(n − t), 2)-stalks are at most
                    ∞
                    X                                                   ∞
                                                                        X
                          re−Ω(r) Oκ (log n)2 .κ (log n)2         and         re−Ω(r) Oκ (n) .κ n,
                    r=1                                                 r=1

respectively. The desired result follows from Markov’s inequality.                                             

Proof of Claim 10.3. Fix t. We would like to prove that with probability at least 1 − Oκ(1/t + (n/t)1/4),
                                                                              (η)
we either have t > N (i.e., t is outside our range of consideration), or dim(Kt ) < t/4.
                                              (η)             (η)
   Notice that (if t ≤ N ) we have dim(Kt ) ≤ | supp(Kt )|, which by Lemma 11.5 is at most the
number of vertices in (≤ η(n − t), 0)-stalks. By Lemma 6.6 we only need to worry about ε-sparse stalks,
and by Lemma 11.9, it suﬃces to prove the result conditioned on a particular (n, m, t, κ)-typical degree
sequence for Gt (note that the degree sequence of Gt determines whether t ≤ N ).
   Conditioning on a typical degree sequence, by Lemma 11.11(1,2,4), the expected number of vertices
in ε-sparse (≤ η(n − t), 0)-stalks is at most
                          ∞
                          X
                                Oκ (re−Ω(r) + re−Ω(r) (t/n)3/2 n) = Oκ (1 + (t/n)3/2 n).
                          r=1

By Markov’s inequality, the probability this number is greater than t/4 is Oκ ((t/n)1/2 + 1/t).                

Proof of Claim 10.4. In this proof we only consider t ≤ ∆ (so, for example, “all t” should be read as “all
t ≤ ∆”). We prove that each of (a,b,c,d,e) hold with probability at least 1 − 1/(5∆). Say a “special stalk”
is an (r, r, 0)-stalk for some r ≤ η(n − t).
   Let Vt∗ be the set of vertices contained in an ε-sparse special stalk. By Lemma 11.11(2), in the setting
of Lemma 11.11 (conditioning on a particular typical degree sequence for Gt ), we have
                                                       ∞
                                                       X
                                          E|Vt∗ | .κ         re−Ω(r) = Oκ (1).
                                                       r=1

By Markov’s inequality and Lemma 11.9, and a union bound over t, with probability at least say 1 −
1/(10∆) each |Vt∗ | ≤ Oκ,∆ (1). So, by Lemma 6.6, with probability at least say 1 − 1/(9∆), for each t
there are at most Oκ,∆ (1) vertices in special stalks. For any special cycle of length 4k ≤ 2ε(n − t), there
is a (2k, 2k, 0)-stalk containing half its vertices (i.e., a special stalk), so this takes care of (d).
   Similarly, by Lemma 11.11(1,2,3,4) together with Markov’s inequality and Lemma 11.9, with proba-
bility 1/(10∆) the only 0-stalks in any Gt are (r, r, 0)-stalks which do not contain any degree-1 vertices,
for some |R| = Oκ,∆ (1). The union of any two non-disjoint cycles has strictly more edges than vertices
(since in such a union every vertex has degree at least 2, and some vertex has degree strictly greater
than 2). So, given the above event,√ if two of the special cycles in Gt were not vertex disjoint, they would
provide a set of Oκ,∆ (1) = oκ,∆ ( log n) vertices contradicting Lemma 6.6 (which holds with probability
1 − n−ω(1) ). So, Lemma 11.6 takes care of (a,b).
   For (c,e), note that by Lemma 6.6(A2) and Lemma 6.2(A4), there are at most say exp((log log n)4 )
edges (and thus, vertices) in G which are in a cycle of length at most log log n or adjacent to such a
cycle. We can reveal these “dangerous” vertices in G without revealing the random ordering vN −1 , . . . , v0
of the vertices in T (recall that the vertices of T are deleted then added back in some random order to
form our sequence of graphs GN , . . . , G0 ). With probability 1 − 1/(10∆), none of the vertices v∆ , . . . , v0
is dangerous (indeed, the expected number of such dangerous vertices is ∆n−1+o(1) ≤ 1/(10∆2 ), so
Markov’s inequality yields this). This handles (e). If (e) holds, the special cycles of length at most
log log n are completely unaﬀected by the vertex additions deﬁning the sequence G∆ , . . . , G0 ; this takes
care of (c), recalling that with probability at least 1 − 1/(10∆) each |Vtspec | ≤ Oκ,∆ (1) ≤ log log n.       
                                                             38
                                          12. The bipartite case
   Having just proved Theorem 1.12(A1), we now sketch the changes that must be made for a proof of
(B1). The proof strategy is extremely similar, but there are some minor simpliﬁcations and complica-
tions. The most notable simpliﬁcation is that we can use Lemma 8.2 instead of the more sophisticated
Lemma 8.4, and the primary complication is that a small amount of extra notation and bookkeeping
becomes necessary, due to the fact that we need to pay attention to both right and left kernels (i.e., the
kernels of our matrix B and its transpose B ⊺ ).
   Recall that in the setting of Theorem 1.12(A1), we had a set T of high-degree vertices (coming from
Lemma 9.1(A)). We “extracted” this set (and used Lemma 9.1(A1) to control the rank of the resulting
matrix), then added back these vertices one-by-one in a random order (each such addition corresponds
to the addition of a new row and column), studying how the rank changes during this process.
   In the setting of Theorem 1.12(B1), after sampling G ∼ K(n1 , n2 , m, 2) and using the setup of
Lemma 9.1(B) we will now have two sets T1 , T2 of high-degree vertices (whose sizes are almost the
same). We let T ⊆ T1 × T2 be a set of min(|T1 |, |T2 |) disjoint pairs of vertices from T1 × T2 , which will
play the role of T above. Indeed, let G[V \ T] be the (balanced) bipartite graph obtained from G by
removing the vertices in the pairs in T, so by Lemma 9.1(B1,B3) we have corank G[V \ T] ≤ |T |/15. The
plan is then to add back the pairs in T pair-by-pair in a random order (each such addition corresponds
to the addition of a new row for the T1 -vertex and the addition of a new column for the T2 -vertex).
   Similarly to Section 10, we deﬁne N = |T|, and let Gt be the graph that results after t of the pairs in
                                                                                    (η)
T have been added back. Instead of just deﬁning the “small-support kernel” Kt , we now need both a
right and left version:
    (η)                                                       (η)
  Kt      = {v ∈ ker B(Gt ) : | supp(x)| ≤ η(n2 − t)},    Qt        = {v ∈ ker B(Gt )⊺ : | supp(x)| ≤ η(n1 − t)}.
   Then, it is straightforward to prove bipartite analogues to Claims 10.1 to 10.4 (we have no need for
an analogue of Claim 10.5, because the corank-boosting part is now simpler). Speciﬁcally, our analogue
of Claim 10.1 should say that after appropriate revelations the neighbourhoods of vertices in T1 are
uniformly random subsets of W ∩ V2 , and the neighbourhoods of the vertices in T2 are uniformly random
subsets of W ∩ V1 (of the appropriate sizes), all independent of each other. Our analogue of Claim 10.2
should hold for both B(Gt ) and B(Gt )⊺ , and our analogues of Claims 10.3 and 10.4 should hold for both
  (η)       (η)                    (η)                                                        (η)
Kt and Qt (for Claim 10.4, Kt should be described in terms of 2-special cycles, and Qt should
be described in terms of 1-special cycles). There are no additional diﬃculties in the proofs of any of
these claims. Actually, things are slightly simpler: we remark that the bipartite analogue of a stalk in
Section 11 should be deﬁned to be a set of vertices S contained on just one side of our bipartite graph,
so there can be no intersection between S and its neighbourhood N (S); this simpliﬁes the calculations
in Claim 11.14.
   Now, recall that in the proof of Theorem 1.12(A1) we considered a random walk deﬁned by random
variables of the form dim ker A(Gt ) − 1t≤∆ dim K∆ − t/4. For Theorem 1.12(B1) we need a similar
                                                     (η)

deﬁnition that takes both sides of our bipartite graph into account: let
                                                                                       
          Xt = min dim ker B(Gt ) − 1t≤∆ dim K∆ , dim ker B(Gt )⊺ − 1t≤∆ dim Q∆ − t/4.
                                                   (η)                              (η)


Actually, it turns out that only the ﬁrst term of the “min” is really necessary: recall that we are assuming
n1 −n2 → ∞, and note that n2 −dim ker B(Gt ) = rank B(Gt ) = n1 −dim ker B(Gt )⊺ . Also, by (a bipartite
                                       (η)            (η)
analogue of) Claim 10.3, whp dim K∆ and dim Q∆ are of the form o(n1 − n2 ). So whp we actually
have
                                Xt = dim ker B(Gt ) − 1t≤∆ dim K∆ − t/4.
                                                                    (η)

                                                                                                           (η)
for all t. The above reasoning also shows that whp for all t ≤ ∆, we have dim ker B(Gt )⊺ − dim Q∆ > 0,
i.e., B(Gt )⊺ has a kernel vector v ∈ Rn2 with | supp(v)| ≥ ηn1 .
    Now, we apply Theorem 7.2 in basically the same way as for the proof of Theorem 1.12(A1). We say
an index is good if it satisﬁes the natural analogues of G1, G2, G3, G4, G5, G7 (where G3 needs to
                                                                                           (η)      (η)
hold for both B(Gt ) and B(Gt )⊺ , and G2, G4, G5 and G7 need to hold for both Kt and Qt ), and
if the following property holds (c.f., the discussion in the previous paragraph):
     G8 If t ≤ ∆, then B(Gt )⊺ has a kernel vector v ∈ Rn2 with | supp(v)| ≥ ηn1 .
    Now, the rest of the proof of Theorem 1.12(A1) basically translates directly into a proof of Theorem 1.12(A1),
with the exception that we need to replace the applications of Lemma 8.4 with applications of Lemma 8.2.
Speciﬁcally:
                                                         39
     • In “Case 1”: instead of Lemma 8.4(a) we apply Lemma 8.2 twice to increase the rank by 2 (ﬁrst
       we add our new column to obtain a matrix B ′ , then we view our new-row-addition as adding a
       column to (B ′ )⊺ ).
     • In “Case 2”: instead of Lemma 8.4(b) we add our new column and apply Lemma 8.2 (using G8),
       then note that adding an additional row cannot decrease the rank.


                                    13. Asymptotic distributions
   In this section we prove the central limit theorem in Corollary 1.3, and discuss the (Poisson-type)
asymptotic distributions of various quantities in Theorems 1.2 and 1.12.
   First, we prove Corollary 1.3.

Proof of Corollary 1.3. For p = c/n with c < 1 or c > e, the matching number ν(G) of a random graph
G ∼ G(n, c/n) is known to satisfy a central limit theorem: there are µ = µ(c, n) and σ = σ(c, n) (where
                                                                     d
µ and σ 2 both have order of magnitude n) such that (ν(G) − µ)/σ → N (0, 1). For c < 1 this is due to
                                                            √ 19].
Pittel [60], and for c > e this is due to Kreačić [49, Theorem
   By Theorem 1.2(A1), we have 2ν(G) − rank A(G) = o( n) whp, which implies that X = rank A(G)
satisﬁes the same central limit theorem as ν(G).                           √
   Strictly speaking, it remains to show that we also have (rank A(G)− EX)/ Var X → N (0, 1). Indeed,
a priori, there may be no connection between µ and EX or between σ 2 and Var X, if the mean or variance
of X is dominated by the eﬀect of outliers. To rule out such pathological behaviour, we need the well-
known observation (easily proved with the Azuma–Hoeﬀding martingale concentration inequality; see
for example the appendix of [18]) that the rank of a random matrix is subgaussian with “variance proxy”
O(n) (and thus the tails have negligible contribution to the mean and variance).                     

   Next we prove Theorem 1.12(A2). We omit the proof of Theorem 1.12(B2), as it follows from an
easier version of the same argument.
   First, we need expressionsPfor certain inﬁnite sums, which can both be obtained by manipulating the
                                ∞
Taylor series log(1 − x) = − k=1 xk /k.
Lemma 13.1. Let Z ∼ Poisson(λ).
   (A) If Q ∈ R satisﬁes |Q|λ < eλ/2 − e−λ/2 then
        ∞                                                                                         4 !
                   (2Q2 Pr[Z = 2|Z ≥ 2]E[Z(Z − 1)|Z ≥ 2])2k
                                                                               
        X 1                                                    1                        Qλ
                 ·                                          = − log 1 −                                  .
              4k                 E[Z|Z ≥ 2]4k                  4                   eλ/2 − e−λ/2
        k=1

       Also, for all λ > 0 we have λ < eλ/2 − e−λ/2 (i.e., the above holds for Q suﬃciently close to 1).
   (B) If Q ∈ R satisﬁes |Q|λ < eλ − 1 then
                      ∞                         4k                         4 !
                     X   1 2Q Pr[Z = 2|Z ≥ 2])             1             Qλ
                                                     = − log 1 −                   .
                        8k       E[Z|Z ≥ 2]                8           eλ − 1
                     k=1

        Also, for all λ > 0 we have λ < eλ − 1.
Lemma 13.2. In the setting of Theorem 1.12(A), for any M → ∞, whp there are no special cycles of
length at least 4M .

Proof. First, we need to separately rule out extremely long special cycles. One could perform a conﬁg-
uration model calculation, but it is convenient to borrow from the proof of Theorem 1.12: right at the
end of Section 10 (at the end of the proof of Theorem 1.12(A1)): we proved that, for an arbitrarily small
constant η, whp there is no special cycle longer than 2ηn (in the notation of that section, s(G) = s(η) (G)).
Taking η → 0 suﬃciently slowly, it now suﬃces to consider special cycles of length o(n).
   The remaining long cycles of length o(n) can actually also be handled by borrowing from the proof of
Theorem 1.12 (speciﬁcally, from Lemmas 11.9 and 11.11(2)). However, as a warm-up to more involved
calculations that will appear later in the proof of Theorem 1.12(A2), we perform an explicit conﬁguration
model calculation.
   Condition on a degree sequence satisfying the properties in Lemma 6.2(A). We compute with the
conﬁguration model (which suﬃces, by Lemma 6.5). Let n′ = Pr[Z = 2|Z ≥ 2]n + o(n) be the number
                                                     40
of degree-2 vertices (using Lemma 6.2(A1)). Using Lemma 6.2(A2), the number of conﬁgurations of 4k
pairs that correspond to a special cycle of length 4k is
                               2k
                                                                  !2k
       (n′ )2k 22k X Y                             1    ′
                                                          X dv 
                                  dvi (dvi − 1) ≤    4n
           4k     v1 ,...,v2k i=1                 4k      v
                                                             2
                  distinct
                                             1                                                 2k
                                               ≤(2 + o(1))n Pr[Z = 2|Z ≥ 2] E[Z(Z − 1)|Z ≥ 2]
                                            4k
(this counts isolated cycles twice). For k = o(n), the probability such a conﬁguration actually appears is
                                                                           4k
                                                (m)4k 24k
                                                            
                             (2m − 8k − 1)!!                     1 + o(1)
                                             =            =                    .
                                (2m − 1)!!       (2m)8k        E[Z|Z ≥ 2]
We compute that the expected number of special cycles with length at least 4M (and at most o(n)) is
at most
                      o(n)
                      X ((2 + o(1)) Pr[Z = 2|Z ≥ 2] E[Z(Z − 1)|Z ≥ 2])2k
                                                                            .
                                         4k(E[Z|Z ≥ 2])4k
                             k=M
By Lemma 13.1, this tends to zero as M → ∞, so the desired result follows from Markov’s inequality. 
  We are now ready to prove Theorem 1.12(A2).
Proof of Theorem 1.12(A2). Recall that an induced cycle is special if its length is divisible by 4 and
every second vertex has degree 2. Say that the cycle is weakly special if it is not isolated (i.e., if it has
at least one vertex whose degree is not 2).
   We work in the conﬁguration model, conditioning on a degree sequence satisfying the properties in
Lemma 6.2. Again, let n′ = Pr[Z = 2|Z ≥ 2]n + o(n) be the number of degree-2 vertices. Let Nk be
the number of weakly special cycles of length 4k, and let Nk† be the number of isolated cycles of length
4k. Let A1 and A2 be the numbers of loops and 2-cycles (so the random multigraph produced by the
conﬁguration model is simple if and only if A1 = A2 = 0). Also, let
                                  4k
            1 2 Pr[Z = 2|Z ≥ 2])                1 (2 Pr[Z = 2|Z ≥ 2]E[Z(Z − 1)|Z ≥ 2])2k
              
     γk† =                            , γk =      ·                                            − 2γk† ,
           8k       E[Z|Z ≥ 2]                 4k                E[Z|Z ≥ 2]4k
                                                                                 2
                          1 E[Z(Z − 1)|Z ≥ 2]            1 E[Z(Z − 1)|Z ≥ 2]
                                                           
                     η1 = ·                      , η2 =                             .
                          2      E[Z|Z ≥ 2]              4      E[Z|Z ≥ 2]
                                † ∞
Let (W1 , W2 ), (Yk )∞
                     k=1 and (Yk )k=1 be independent sequences of independent Poisson random variables
with EWi = ηi , EYk = γk , and EYk† = γk† .
   Abusing notation, we write ∪ for concatenation of sequences. We claim that for any M , we have
                                               † M           d                     † M
                     (A1 , A2 ) ∪ (Nk )M                                  M
                                       k=1 ∪ (Nk )k=1 → (W1 , W2 ) ∪ (Yk )k=1 ∪ (Yk )k=1 .

(where here n goes to inﬁnity while M is ﬁxed). In combination with Lemma 13.2 and Lemma 6.5, this
suﬃces to prove Theorem 1.12(A2). Indeed, Lemma 13.1 then shows that the number of weakly special
cycles converges in distribution to a Poisson random variable with parameter γ(c), and the number of
isolated cycles converges to a Poisson random variable with parameter γ † (c).
   To this end, by the method of moments (see for example [69, Lemma 2.8]) it suﬃces to prove that for
                               † M
any (s1 , s2 ) ∪ (rk )M
                      k=1 ∪ (rk )k=1 (which we treat as ﬁxed, while n → ∞), we have
                                             M                              M
                             "                                 #
                                                                                          †
                                               (Nk )rk (Nk† )r† → η1s1 η2s2   γkrk (γk† )rk .
                                             Y                              Y
                           E (A1 )s1 (A2 )s2
                                                                  k
                                              k=1                            k=1
                              QM                 †
  Note that (A1 )s1 (A2 )s2        k=1 (Nk )rk (Nk )rk
                                                     †   is the number of (ordered) collections of distinct cycles,
containing s1 loops, s2 2-cycles, rk weakly special cycles of each length 4k and rk† , isolated cycles of each
length 4k.
   If such a collection does not consist of vertex-disjoint cycles, then the union of this collection has
strictly more edges than vertices (because every vertex has degree at least 2, and some vertex has degree
strictly greater than 2). The expected number of such collections is therefore O(1/n). So, it suﬃces to
consider the contribution from collections of vertex-disjoint cycles.
   In such a collection of disjoint cycles, let x = s1 + 2s2 be the number of vertices that should be in
                                                            PM
loops and 2-cycles (which can have any degree), let y = k=1 (2krk + 4krk† ) be the number of vertices
                                                             41
                                                                       PM
that should have degree 2 in special cycles, and let t = x + y + k=1 2krk be the total number of vertices
(recall that in weakly special cycles, not all vertices have degree 2, so there is a mild restriction on the
degrees of the vertices not counted by x and y). The number of ways to choose conﬁgurations forming
an appropriate collection of disjoint cycles is
                                                                                      
                                      ′     y                         t−y
                                    (n )y 2                  X     ∗  Y
                                  QM                  †
                                                                         dvi (dvi − 1)
                            s
                          2 41 s2       (4k)  rk (8k)rk
                                    k=1                  v1 ,...,vt−y i=1

where we ﬁx a set V ∗ of y degree-2 vertices, and the sum with a “∗” is over all tuples of distinct vertices
v1 , . . . , vt−y ∈/ V ∗ , satisfying the following condition. After the ﬁrst x vertices, if we group the vertices
into consecutive blocks of lengths 2, . . . , 2, 4, . . . , 4, 6, . . . , 6, . . . , 2M, . . . , 2M (where there are rk blocks
of each length 2k), then each block has at least one non-degree-2 vertex (and therefore its corresponding
special cycle is only weakly special). Using Lemma 6.2(A4) with s = 1, we see that the distinctness
restriction on the v1 , . . . , vt−y makes essentially no diﬀerence (and similarly with the condition that they
do not lie in V ∗ ). Thus, observe that
                                                     x                                       2k            rk
   X∗ t−y     Y                       X                   YM            X
                  dv (dv − 1) =           dv (dv − 1)                           dv (dv − 1) − (n′ )2k 22k  + o(nt−y ).
                                                                                                             
                                                               
v1 ,...,vt−y i=1                 v∈V (G)                  k=1      v∈V (G)


We may estimate the above sum using the property in Lemma 6.2(A2). Now, for any of our conﬁgurations
of disjoint cycles, the probability such a conﬁguration actually appears is
                                      (2m − t)!!        1 + o(1)
                                                 =                 .
                                        (2m)!!      (nE[Z|Z ≥ 2])t
The desired result follows, using our expressions for n′ and v∈V (G) dv (dv − 1) and simplifying.
                                                             P
                                                                                                                           

13.1. Further comments on asymptotic distributions. We ﬁnish this section with some discussion
of the asymptotic distributions of ν(G) − rank B(G) in the setting of Theorem 1.2(B), and 2ν(G) −
rank A(G), σ(G) − rank A(G) in the setting of Theorem 1.2(A).
   First, we believe that in the setting of Theorem 1.2(B), whp ν(G) attains the Karp–Sipser bound in
Corollary 5.2(B) exactly (meaning that ν(G) = n − max(i1 (G), i2 (G))). To prove this in the same way
as Theorem 5.3, one needs to prove that in the setting of Theorem 1.12(B), we have ν(G) = n2 whp (i.e.,
there is a matching saturating the smaller side of the bipartite graph). A very similar statement was
proved in a diﬃcult paper of Frieze [35], and we believe that the ideas in his paper are also applicable to
our setting. If this were true, then the asymptotic distribution of ν(G) − rank B(G) would be precisely
as described in Theorem 1.9(B).
   Similarly, we believe that in the setting of Theorem 1.2(A), whp σ(G) attains the Karp–Sipser bound in
Corollary 5.2(A2) exactly (meaning that σ(G) = n−i(G)). To prove this in the same way as Theorem 5.3,
one needs to prove that in the setting of Theorem 1.12(A), we have σ(G) = n (i.e., there is a collection of
vertex-disjoint cycles and edges covering the entire graph). We believe that such a collection can almost
entirely consist of edges (i.e., it is essentially a matching), but odd cycles must be included if G has
isolated odd cycles, and an additional odd cycle may be necessary for parity reasons. We believe that
the ideas by Frieze and Pittel [37] on matchings in degree-constrained random graphs should be suitable
to prove this (in fact, it may be possible to deduce the desired statement from the main result of [37] in
a black-box manner). If this were true, then the asymptotic distribution of σ(G) − rank A(G) would be
precisely as described in Theorem 1.9(A).
   In the setting of Theorem 1.2(A), we already have a characterisation of ν(G) from Theorem 5.3. A
routine calculation in the conﬁguration model (similar to the one used to prove Theorem 1.12(A2) earlier
in this section) shows that the number of isolated odd cycles in coreKS (G) is asymptotically independent
from s(G). If c > e, it is not hard to see that the parity of the size of the giant component of coreKS (G)
is asymptotically independent from these two quantities. We believe that the ideas in [22, Section 7]
can be used to prove that this parity is asymptotically equidistributed, in which case the asymptotic
distribution of 2ν(G)−rank A(G) would be Y +2Y † −W − 1c>e U , where Y, Y † are as in Theorem 1.9(A),
and, independently, U is uniform on {0, 1} and W is Poisson with mean
          ∞                                    2k−1                                      
         X        1         2 Pr[Z = 2|Z ≥ 2])          1               λ                  λ
                        ·                             =     log 1 + λ         − log 1 − λ         .
             2(2k − 1)          E[Z|Z ≥ 2]              4            e −1               e −1
           k=1
                                                             42
                                                     References
 [1] L. Addario-Berry, N. Broutin, and C. Goldschmidt, Critical random graphs: limiting constructions and distributional
     properties, Electron. J. Probab. 15 (2010), no. 25, 741–775. ↑3
 [2] Louigi Addario-Berry and Laura Eslava, Hitting time theorems for random matrices, Combin. Probab. Comput. 23
     (2014), 635–669. ↑1
 [3] R. C. Alamino and D. Saad, Typical kernel size and number of sparse random matrices over Galois fields: a statistical
     physics approach, Phys. Rev. E (3) 77 (2008), 061123, 12. ↑5
 [4] David Aldous and J. Michael Steele, The objective method: probabilistic combinatorial optimization and local weak
     convergence, Probability on discrete structures, Encyclopaedia Math. Sci., vol. 110, Springer, Berlin, 2004, pp. 1–72.
     ↑10, ↑25
 [5] Jonathan Aronson, Alan Frieze, and Boris G. Pittel, Maximum matchings in sparse random graphs: Karp-Sipser
     revisited, Random Structures Algorithms 12 (1998), 111–177. ↑4, ↑9, ↑13, ↑14, ↑17, ↑45
 [6] Mark Bagnoli and Ted Bergstrom, Log-concave probability and its applications, Economic theory 26 (2005), 445–469.
     ↑26
 [7] Anirban Basak and Mark Rudelson, Sharp transition of the invertibility of the adjacency matrices of sparse random
     graphs, arXiv:1809.08454. ↑1
 [8] M. Bauer and O. Golinelli, Core percolation in random graphs: a critical phenomena analysis, The European Physical
     Journal B 24 (2001), 339–352. ↑4, ↑5, ↑7
 [9] M. Bauer and O. Golinelli, Exactly solvable model with two conductor-insulator transitions driven by impurities,
     Physical Review Letters 86 (2001), 2621–2624. ↑2, ↑4
[10] A. Békéssy, P. Békéssy, and J. Komlós, Asymptotic enumeration of regular matrices, Studia Sci. Math. Hungar. 7
     (1972), 343–353. ↑19, ↑20
[11] Edward A. Bender and E. Rodney Canﬁeld, The asymptotic number of labeled graphs with given degree sequences, J.
     Combinatorial Theory Ser. A 24 (1978), 296–307. ↑19, ↑20
[12] Itai Benjamini and Oded Schramm, Recurrence of distributional limits of finite planar graphs, Electron. J. Probab. 6
     (2001), no. 23, 13. ↑10, ↑25
[13] Jose Blanchet and Alexandre Stauﬀer, Characterizing optimal sampling of binary contingency tables via the configu-
     ration model, Random Structures Algorithms 42 (2013), 159–184. ↑20
[14] B. Bollobás, C. Cooper, T. I. Fenner, and A. M. Frieze, Edge disjoint Hamilton cycles in sparse random graphs of
     minimum degree at least k, J. Graph Theory 34 (2000), 42–59. ↑18
[15] Béla Bollobás, A probabilistic proof of an asymptotic formula for the number of labelled regular graphs, European J.
     Combin. 1 (1980), 311–316. ↑19, ↑20
[16] Béla Bollobás, The evolution of sparse graphs, Graph theory and combinatorics (Cambridge, 1983), Academic Press,
     London, 1984, pp. 35–57. ↑2
[17] Béla Bollobás, Random graphs, second ed., Cambridge Studies in Advanced Mathematics, vol. 73, Cambridge Univer-
     sity Press, Cambridge, 2001. ↑3, ↑20
[18] Charles Bordenave, Marc Lelarge, and Justin Salez, The rank of diluted random graphs, Ann. Probab. 39 (2011),
     1097–1121. ↑2, ↑4, ↑8, ↑10, ↑11, ↑25, ↑40
[19] Charles Bordenave, Marc Lelarge, and Justin Salez, Matchings on infinite graphs, Probab. Theory Related Fields 157
     (2013), 183–208. ↑4
[20] Thomas Budzinski, Alice Contat, and Nicolas Curien, The critical Karp–Sipser core of random graphs,
     arXiv:2212.02463. ↑7
[21] Julie Cain and Nicholas Wormald, Encores on cores, Electron. J. Combin. 13 (2006), Research Paper 81, 13. ↑17
[22] Amin Coja-Oghlan, Oliver Cooley, Mihyun Kang, Joon Lee, and Jean Bernoulli Ravelomanana, The sparse parity
     matrix, arXiv:2107.06123. ↑4, ↑6, ↑13, ↑32, ↑42
[23] Amin Coja-Oghlan, Oliver Cooley, Mihyun Kang, and Kathrin Skubch, Core forging and local limit theorems for the
     k-core of random graphs, J. Combin. Theory Ser. B 137 (2019), 178–231. ↑8
[24] Amin Coja-Oghlan, Alperen A. Ergür, Pu Gao, Samuel Hetterich, and Maurice Rolvien, The rank of sparse random
     matrices, Proceedings of the 2020 ACM-SIAM Symposium on Discrete Algorithms, SIAM, Philadelphia, PA, 2020,
     pp. 579–591. ↑3, ↑5, ↑8
[25] Simon Coste and Justin Salez, Emergence of extended states at zero in the spectrum of sparse random graphs, Ann.
     Probab. 49 (2021), 2012–2030. ↑4
[26] Kevin P. Costello, Terence Tao, and Van Vu, Random symmetric matrices are almost surely nonsingular, Duke Math.
     J. 135 (2006), 395–413. ↑1, ↑10, ↑11, ↑12, ↑21
[27] Kevin P. Costello and Van Vu, On the rank of random sparse matrices, Combin. Probab. Comput. 19 (2010), 321–342.
     ↑2, ↑5
[28] Kevin P. Costello and Van H. Vu, The rank of random graphs, Random Structures Algorithms 33 (2008), 269–285.
     ↑1, ↑2
[29] Amir Dembo and Andrea Montanari, Finite size scaling for the core of large random hypergraphs, Ann. Appl. Probab.
     18 (2008), 1993–2040. ↑5
[30] Patrick DeMichele, Margalit Glasgow, and Alexander Moreira, On the rank, kernel, and core of sparse random graphs,
     arXiv:2105.11718. ↑2, ↑3, ↑5, ↑11, ↑12, ↑23, ↑29
[31] Jian Ding, Eyal Lubetzky, and Yuval Peres, Anatomy of the giant component: the strictly supercritical regime,
     European J. Combin. 35 (2014), 155–168. ↑3, ↑13
[32] Asaf Ferber, Vishesh Jain, Ashwin Sah, and Mehtaab Sawhney, Random symmetric matrices: rank distribution and
     irreducibility of the characteristic polynomial, arXiv:2106.04049. ↑8
[33] Asaf Ferber, Matthew Kwan, Ashwin Sah, and Mehtaab Sawhney, Singularity of the k-core of a random graph,
     arXiv:2106.05719. ↑3, ↑11, ↑12, ↑13, ↑21, ↑23, ↑25, ↑26
                                                            43
[34] Asaf Ferber, Matthew Kwan, and Lisa Sauermann, Singularity of sparse random matrices: simple proofs,
     arXiv:2011.01291. ↑1, ↑23
[35] Alan Frieze, Perfect matchings in random bipartite graphs with minimal degree at least 2, Random Structures Algo-
     rithms 26 (2005), 319–358. ↑42
[36] Alan Frieze and Michał Karoński, Introduction to random graphs, Cambridge University Press, Cambridge, 2016. ↑3,
     ↑13
[37] Alan Frieze and Boris Pittel, Perfect matchings in random graphs with prescribed minimal degree, Mathematics and
     computer science. III, Trends Math., Birkhäuser, Basel, 2004, pp. 95–132. ↑9, ↑16, ↑42
[38] Margalit Glasgow, Christina Goldschmidt, Eleonora Kreačić, Matthew Kwan, Ashwin Sah, and Mehtaab Sawhney, A
     central limit theorem for the matching number of a sparse random graph, in preparation. ↑4, ↑8
[39] Catherine Greenhill, Brendan D. McKay, and Xiaoji Wang, Asymptotic enumeration of sparse 0-1 matrices with
     irregular row and column sums, J. Combin. Theory Ser. A 113 (2006), 291–324. ↑20
[40] Alice Guionnet, Bernoulli random matrices, Proceedings of the 8th European Congress in Mathematics, to appear,
     arXiv:2112.05506. ↑7
[41] Jiaoyang Huang, Invertibility of adjacency matrices for random d-regular graphs, arXiv:1807.06465. ↑8
[42] Svante Janson, The probability that a random multigraph is simple, Combin. Probab. Comput. 18 (2009), 205–225.
     ↑20
[43] Svante Janson, The probability that a random multigraph is simple. II, J. Appl. Probab. 51A (2014), 123–137. ↑20
[44] Svante Janson, Tomasz Łuczak, and Andrzej Rucinski, Random graphs, Wiley-Interscience Series in Discrete Mathe-
     matics and Optimization, Wiley-Interscience, New York, 2000. ↑3, ↑12, ↑13
[45] Daniel M. Kane, The correct exponent for the Gotsman-Linial conjecture, Comput. Complexity 23 (2014), 151–175.
     ↑23
[46] R. M. Karp and M. Sipser, Maximum matching in sparse random graphs, 22nd Annual Symposium on Foundations
     of Computer Science (sfcs 1981), IEEE, October 1981. ↑4, ↑13, ↑14
[47] J. Komlós, On the determinant of (0, 1) matrices, Studia Sci. Math. Hungar. 2 (1967), 7–21. ↑1, ↑10, ↑11
[48] J. Komlós, On the determinant of random matrices, Studia Sci. Math. Hungar. 3 (1968), 387–399. ↑1, ↑10, ↑11
[49] Eleonora Kreačić, Some problems related to the Karp-Sipser algorithm on random graphs, Ph.D. thesis, University of
     Oxford, 2017. ↑4, ↑9, ↑13, ↑40
[50] Marc Lelarge, Bypassing correlation decay for matchings with an application to XORSAT, 2013 IEEE Information
     Theory Workshop (ITW), IEEE, sep 2013. ↑3
[51] JHC Lisman and MCA Van Zuylen, Note on the generation of most probable frequency distributions, Statistica
     Neerlandica 26 (1972), 19–23. ↑33
[52] Alexander E. Litvak, Anna Lytova, Konstantin Tikhomirov, Nicole Tomczak-Jaegermann, and Pierre Youssef, Adja-
     cency matrices of random digraphs: singularity and anti-concentration, J. Math. Anal. Appl. 445 (2017), 1447–1491.
     ↑23
[53] Kenneth Maples, Symmetric random matrices over finite fields announcement, unpublished note,
     http://user.math.uzh.ch/maples/maples.symma.pdf, 2009. ↑8
[54] Brendan D. McKay, Asymptotics for symmetric 0-1 matrices with prescribed row sums, Ars Combin. 19 (1985), 15–25.
     ↑20
[55] Brendan D. McKay and Nicholas C. Wormald, Asymptotic enumeration by degree sequence of graphs with degrees
     o(n1/2 ), Combinatorica 11 (1991), 369–382. ↑20
[56] András Mészáros, The distribution of sandpile groups of random regular graphs, Trans. Amer. Math. Soc. 373 (2020),
     6529–6594. ↑8
[57] M. Mézard, F. Ricci-Tersenghi, and R. Zecchina, Two solutions to diluted p-spin models and XORSAT problems, J.
     Statist. Phys. 111 (2003), 505–533. ↑4
[58] Michael Mitzenmacher and Eli Upfal, Probability and computing, second ed., Cambridge University Press, Cambridge,
     2017. ↑18
[59] Bogdan Nica, A brief introduction to spectral graph theory, EMS Textbooks in Mathematics, European Mathematical
     Society (EMS), Zürich, 2018. ↑15
[60] Boris Pittel, On tree census and the giant component in sparse random graphs, Random Structures Algorithms 1
     (1990), 311–342. ↑4, ↑9, ↑40
[61] T. Tao and V. H. Vu, Additive combinatorics, Cambridge Studies in Advanced Mathematics, vol. 105, Cambridge
     University Press, Cambridge, 2010. ↑23
[62] Konstantin Tikhomirov, Singularity of random Bernoulli matrices, Ann. of Math. (2) 191 (2020), 593–634. ↑1
[63] Remco van der Hofstad, Noela Müller, and Haodong Zhu, The rank of sparse symmetric matrices over arbitrary fields,
     arXiv:2301.12978. ↑8
[64] Van Vu, Recent progress in combinatorial random matrix theory, arXiv:2005.02797. ↑7
[65] Van Vu, Random discrete matrices, Horizons of combinatorics, Bolyai Soc. Math. Stud., vol. 17, Springer, Berlin,
     2008, pp. 257–280. ↑7
[66] Van Vu, Some recent results on random matrices, lecture at a workshop on Probabilistic Tech-
     niques and Applications,         hosted by the Institute for Pure & Applied Mathematics (IPAM),
     http://www.ipam.ucla.edu/abstract/?tid=8303&pcode=CMAWS1, 2009. ↑2
[67] Van Vu, Combinatorial problems in random matrix theory, invited lecture at the International Congress of Mathmati-
     cians (ICM) in Seoul, https://www.youtube.com/watch?v=9REUYqf8EWA, 2014. ↑2
[68] N C Wormald, Some problems in the enumeration of labelled graphs, 1978, PhD thesis, University of Newcastle. ↑19
[69] N. C. Wormald, Models of random regular graphs, Surveys in combinatorics, 1999 (Canterbury), London Math. Soc.
     Lecture Note Ser., vol. 267, Cambridge Univ. Press, Cambridge, 1999, pp. 239–298. ↑41


                                                          44
[70] N.C. Wormald, The differential equation method for random graph processes and greedy algorithms, Lectures on
     Approximation and Randomized Algorithms, PWN, Warsaw, 1999, pp. 73–155. ↑4


                  Appendix A. Analysing the subcritical Karp–Sipser process
    Here we brieﬂy sketch the analysis in [5] used to prove Lemma 4.4(A): if c < e, then the Karp–Sipser
core whp consists of a collection of vertex-disjoint cycles, and the numbers of cycles of each length are
asymptotically jointly Poisson distributed. As will become clear, one can prove Lemma 4.4(B) (i.e., the
bipartite case of the same fact) with essentially the same analysis.
    The main part of the proof is an analysis of the Karp–Sipser leaf-removal process. This analysis
is slightly simpler on a random multigraph than a random graph: instead of G(n, c/n), we consider a
random multigraph whose edges correspond to a sequence of exactly ⌊cn/2⌋ pairs of vertices, sampled
uniformly at random with replacement (results about such random multigraphs can be transferred to
random graphs, as observed in [5, Lemma 1]). At each step of the leaf-removal process, we consider the
number v0 of isolated vertices, the number v1 of degree-1 vertices, the number v of vertices of degree at
least 2, and the number m of edges remaining. These statistics (v0 , v1 , v, m) can be shown to evolve as
a Markov chain ([5, Lemma 3]).
    The authors study the typical trajectory of these statistics as the process evolves, using the diﬀerential
equations method. Namely, they ﬁrst study the expected change in each of v0 , v1 , v, m after a single step
of the leaf-removal process, in terms of the statistics v0 , v1 , v, m themselves ([5, Lemmas 6 and 7]). These
expected one-step changes approximately correspond to a system of diﬀerential equations (solved in
[5, Lemma 8]), and it can then be shown that whp the trajectories of the evolving statistics v0 , v1 , v, m
are well-approximated by the solution to this system of diﬀerential equations ([5, Lemma 11]).
    Speciﬁcally, to study the expected change after a single step of leaf-removal, the authors use the fact
that at any time t, the distribution of the remaining multigraph is uniform among all multigraphs with
statistics (v0 , v1 , v, m) ([5, Lemma 2]). Apart from the v0 +v1 vertices of degree 0 and 1, the degrees of the
remaining vertices are then shown to be well-approximated by a sequence of truncated Poisson random
variables (with a particular Poisson parameter z deﬁned in terms of v0 , v1 , v, m; see [5, Lemmas 4 and 5]),
and this degree information can be used to estimate the expected 1-step changes in the various statistics
(in the leaf-removal process, if we delete a leaf x with neighbour y, then the change to v0 , v1 , v2 , m can
be described in terms of the degrees of the neighbours of y).
    As the process continues, the Poisson parameter z evolves with v0 , v1 , v, m. Diﬀerential equation
heuristics suggest that if c < e then z converges to zero as the process reaches completion. Actually,
it is convenient to parameterise the process by z: [5, Lemma 11] allows one to control the trajectories
of v0 , v1 , v, m (showing that they are well-approximated by diﬀerential equation heuristics) until say
z < n−0.1 . At this point, almost all of the v vertices with degree at least 2 in fact have degree exactly 2.
The number of degree-1 vertices v1 is about n(1 − η)z 2 /c and the number of degree-2 vertices is about
nηz 2 /(2c), where η is the solution to the equation c = ηeη (see [5, Eqs. (79)–(90)]).
    Although we are still some way from the end of the process (there are still a lot of degree-1 vertices
remaining), the key observation is that it is already possible to see what the ﬁnal Karp–Sipser core will
end up looking like. Indeed, since there are so few vertices with degree 3 or greater, by a conﬁguration-
model calculation, it is easy to see that whp there are no “heavy cycles” containing a degree-3 vertex (see
[5, Eqs. (91)–(93)] and the following discussion). So, at this stage, the connected components are trees
and isolated cycles, meaning that the Karp–Sipser core will consist precisely of the (disjoint) cycles which
still exist at this stage. In the rest of [5, Section 5.1], the authors then use the method of moments (in a
similar way to the calculations in the proof of Theorem 1.12(A2) in Section 13) to show that the number
of cycles of length k is asymptotically Poisson with mean η k /(2k) (independently for each k). Roughly
speaking, given a typical outcome of the degree sequence (with N ≈ z 2 n/c stubs in the corresponding
conﬁguration model), the number of possible sets of k conﬁguration-edges corresponding to a k-cycle is
about (ηN )k /(2k), and the probability a given k-cycle is present is about 1/N k .
    In the bipartite case, we can perform essentially exactly the same diﬀerential-equations-method cal-
                                                                                                     (1) (2)
culation to track the evolution of the number of edges m, the numbers of isolated vertices v0 , v0 on
                                                 (1) (2)
each side, the numbers of degree-1 vertices v1 , v1 on each side, and the numbers v (1) , v (2) of vertices of
                                                                                                         (1) (2)
degree at least 2 on each side. Actually, the diﬀerential equations are exactly the same (where v0 , v0
                                                  (1) (2)
both take essentially the same value v0 , and v1 , v1 take essentially the same value v1 , and v (1) , v (2) take
essentially the same value v), because G(n, c/n) and G(n, n, c/n) locally “look the same” (locally, they
both look like a Poisson(c) Galton–Watson tree). Near the end of the process, the number of degree-1
                                                       45
vertices on each side is about n(1 − η)z 2 /c and the number of degree-2 vertices on each side is about
nηz 2 /(2c). Given such a degree sequence, for even k the number of possible k-cycles is about (ηN )k /k,
where N ≈ z 2 n/c is the approximate number of stubs on each side in the corresponding conﬁguration
model, and the probability a given k-cycle is present is about 1/N k . So, the expected number of k-cycles
is η k /k.
  Department of Computer Science, Stanford University, Stanford, CA.
  Email address: mglasgow@stanford.edu

  Institute of Science and Technology Austria (ISTA).
  Email address: matthew.kwan@ist.ac.at

  Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 02139, USA
  Email address: {asah,msawhney}@mit.edu




                                                    46
