Probab. Theory Relat. Fields 110, 277±285 (1998)




Some large deviation results for sparse random graphs
Neil O'Connell
BRIMS, Hewlett-Packard Labs, Filton Road, Stoke Giord, Bristol BS12 6QZ, UK

Received: 14 November 1996 / In revised form: 15 August 1997




Summary. We obtain a large deviation principle (LDP) for the relative size
of the largest connected component in a random graph with small edge
probability. The rate function, which is not convex in general, is determined
explicitly using a new technique. The proof yields an asymptotic formula for
the probability that the random graph is connected.
    We also present an LDP and related result for the number of isolated
vertices. Here we make use of a simple but apparently unknown character-
isation, which is obtained by embedding the random graph in a random
directed graph. The results demonstrate that, at this scaling, the properties
`connected' and `contains no isolated vertices' are not asymptotically
equivalent. (At the threshold probability they are asymptotically equivalent.)

Mathematics Subject Classi®cation (1991): 60F10, 05C80


1 Introduction

The central object of study in this paper is the random graph G n; p, with
p  O 1=n. The random graph G n; p is constructed on n vertices by in-
cluding each of the n n ÿ 1=2 potential edges independently with probability
p. Much is known about the ®rst order properties of such graphs. For ex-
ample, if p  c=n and c > 1, the size (in vertices) Xn of the largest connected
component is asymptotically an, where a > 0 satis®es a  1 ÿ eÿac . (The
precise statement is that the sequence Xn =n converges in probability to a.)
The other components are all of order log n in size. This is the so-called
`giant component', and it only appears when c > 1. As with many other ®rst
order results for random graphs, little is known about the nature of ¯uctu-


Keywords: Giant component ± Connectivity ± Isolated vertices.
278                                                                    N. O'Connell


ations from the mean, other than some crude probability estimates. The main
result of this paper is a large deviation principle for the sequence Xn =n. We
also obtain an explicit expression for the rate function using a new technique.
Some informal discussion and illustration of this technique is presented in [4].
    We also present an LDP for the number of isolated vertices in the random
graph G n; c=n. Here we use a seemingly unknown characterisation of the
distribution of the number of isolated vertices. As a kind of corollary (for-
mally it is, technically it isn't) we demonstrate that the properties `connected'
and `contains no isolated vertices' are not asymptotically equivalent at this
scaling. At the threshold probability ± that is, for the random graph G n; p
with
                                       log n c
                                  p        
                                         n    n
± the two properties are asymptotically equivalent, with probability ap-
               ÿc
proaching eÿe : This is a famous result due to Erdos and ReÂnyi (see, for
example, [5]).
    The standard reference on random graphs is the book of BollobaÂs [1]; the
lecture notes of Spencer [5] provide a useful introduction. For an overview of
the main results on sparse random graphs, see [2]. The giant component is
the subject of recent paper by Janson et al. [3], where some very sharp results
are presented.


2 Preliminaries

For completeness we will record here some de®nitions and basic facts. Let Zn
be a sequence of random variables taking values in f0; 1; . . . ; ng. A rate
function on 0; 1 is a lower semicontinuous mapping I: 0; 1 ! 0; 1 such
that for all y 2 0; 1 the level set fx: I x  yg is closed in 0; 1. We say the
sequence Zn =n satis®es the LDP in 0; 1 with rate function I if, for all Borel
sets B in 0; 1,

                     ÿ inf I x  lim inf 1n log P Zn =n 2 B
                       x2B            n
                                 lim sup 1n log P Zn =n 2 B
                                       n
                                 ÿ inf I x :
                                      x2B

An easy fact that we will make use of is the following: if I is continuous, and

                        lim 1n log P Zn  xn  ÿI x ;                       1
                          n

uniformly for x 2 0; 1, then Zn =n satis®es the LDP in 0; 1 with rate func-
tion I.
Some large deviation results for sparse random graphs                           279


3 The largest connected component

Write X n; p for the size (in vertices) of the largest connected component in
the random graph G n; p. It is well-known (see, for example, [5]) that, for
c > 1, the sequence X n; c=n=n converges in probability, as n ! 1, to the
unique positive solution to the equation a  1 ÿ eÿca , which we will denote
by ac . If c  1, then X n; c=n=n converges in probability to zero. For con-
venience we will set ac  0 for 0 < c  1.
   The main result of this section is the following. Set m y  log 1 ÿ eÿy .

Theorem 3.1 For c > 0, the sequence X n; c=n=n satis®es the LDP in 0; 1
with rate function given by
   Ic x  ÿkxm cx  kx log x  1 ÿ kx log 1 ÿ kx  cx ÿ k k  1cx2 =2
for xk  x  xkÿ1 , where x0  1 and
                               n      x              o
                      xk  sup x :          1 ÿ eÿcx :
                                    1 ÿ kx
    Note that if c  1, then x1  0 and
            Ic x  ÿxm cx  x log x  1 ÿ x log 1 ÿ x  cx 1 ÿ x
on 0; 1, and this is a convex rate function. If c > 1, the rate function Ic is not
convex. A plot of I3 is shown in Fig. 1.




Fig. 1. A plot of the rate function I3
280                                                                              N. O'Connell


    The interpretation here is that the most likely way for G n; c=n to have a
largest connected component of size xn, when xk  x  xkÿ1 , is for it to have
exactly k connected components of that size.

Proof of Theorem 3.1. Let q n; p denote the probability that G n; p is
connected. For 1  k  n we have
          
           n
               1 ÿ c=nk nÿk q k; c=nP X n ÿ k; c=n < k 
           k
              P X n; c=n  k 
                
                 n
                   1 ÿ c=nk nÿk q k; c=nP X n ÿ k; c=n  k  :                       2
                 k
The upper bound is just Boole's inequality; the lower bound is the probability
of having exactly one component of size k, and none exceeding that size.
   We will assume c > 1 until it is stated otherwise. Set
                               
                            n
              ln x; c           1 ÿ c=nxn nÿxn q xn; c=n :
                           xn
Since X n; c=n=n ! ac in probability we have that for any neighbourhood A
of ac ,
                  lim max 1n log P X n; c=n  xn  0 :              3
                        n   x2A

Combining this with the inequalities (2) we see that
                                lim sup 1n log ln ac ; c  0 ;
                                      n
and
                            lim inf max 1n log ln x; c  0 :
                                  n       x2A

To proceed we need a technical lemma.
Lemma 3.1 For x 2 0; 1 we have
                                                 1     q xn; c=n
                  lim lim sup sup                  log              0 :
                  &0       n         y: jxÿyj< n     q yn; c=n
Proof. If a graph on l vertices is connected then, for each k < l, there exists a
subset of k vertices such that the restriction of the graph to those vertices is
connected. (For example, one can choose the k vertices by performing a
random walk on the graph until its range is k.) It follows that
                                       
                                        l
                            q l; p        q k; p :
                                        k
Now let l  xn, k  yn and p  c=n, and consider the normalised loga-
rithmic limit to get that (for  suciently small)
                                          1         q xn; c=n
                lim sup sup                   log                 xh 1 ÿ =x
                    n       xÿ<y<x n               q yn; c=n
Some large deviation results for sparse random graphs                         281


for 0 < y < x < 1. For a lower bound we observe that, again for l > k,
                h           ih            i h               i
       q l; p  1 ÿ 1 ÿ pl 1 ÿ 1 ÿ plÿ1    1 ÿ 1 ÿ pk q k; p
                h            ilÿk
                1 ÿ 1 ÿ pk      q k; p
Here we are using, for the ®rst inequality, the natural embedding of
G j ÿ 1; p in G j; p: G j; p is obtained from G j ÿ 1; p by adding a vertex
and attaching it to each existing vertex independently with probability p; If
G j ÿ 1; p is connected and the new vertex is not isolated, then G j; p is
connected. Now let l  xn, k  yn and p  c=n as before, and consider the
normalised logarithmic limit to get that
                            1     q xn; c=n                    
             lim inf inf      log                log 1 ÿ eÿc xÿ :
                n   xÿ<y<x n     q yn; c=n
The result follows.                                                           (
   The above lemma allows us to conclude that
                                         lim 1n log ln ac ; c  0 ;
                                          n
and hence that
                            lim 1n log q ac n; c=n  ac m cac  ;
                             n

for some function m on 0; 1 satisfying
                           h ac   ac m cac  ÿ cac 1 ÿ ac   0 ;           4
where
                       h x  ÿx log x ÿ 1 ÿ x log 1 ÿ x :
Since c > 1 is arbitrary, and the range of c 7! cac is 0; 1, we can solve (4) to
deduce that m y  log 1 ÿ eÿy . We have thus shown that, for 0 < x < 1,
                              lim 1n log q xn; c=n  xm cx :              5
                                 n
Now for any d > 0, there exists 0 < x < 1 and c > 1 for which d  cx, so it
follows from (5) that
                       lim 1n log q n; d=n  m d :                    6
                                     n
In particular, the convergence (5) can be extended to the case x  1 and it
follows from Lemma 3.1 (the sequence has a kind of `approximate equi-
continuity') that the limit holds uniformly for 0 < x  1.
    The crux of the above argument, and hence the entire proof, is that it
reveals an explicit scaling property of the function q, namely that
                                     q xn; c=n  q ay k; y=k ;
for appropriately chosen y and k.
   It follows from (3) that for x > 1 ÿ xac 1ÿx (that is, for x > x1 ),
                     lim 1n log P X  1 ÿ xn; c=n  xn  0 ;
                       n
and so we have
282                                                                             N. O'Connell


      lim 1n log P X n; c=n  xn  h x  xm cx ÿ cx 1 ÿ x : A x; c              7
       n

uniformly on the interval x1 < x  1. (Here we are using the easy facts that
the limits
                                               
                                     1       n
                          h x  lim log
                                   n n     xn
and
                                             h                     i
                      ÿcx 1 ÿ x  lim 1n log 1 ÿ c=nxn nÿxn
                                       n

are uniform.) To determine the rate function on the entire interval we ®rst
need another lemma.
Lemma 3.2
                          lim 1n log P X n; c=n < xn  A x; c
                           n

uniformly on the interval x1 < x  ac .
Proof. By considering the respective component sizes we enumerate the
possibilities and apply the principle of the largest term to get that

           lim sup 1n log P X n; c=n < x1 n
              n
               supfÿy1 log y1 ÿ y2 log y2    ÿ yk1 log yk1
                       y1 m cy1       yk m cyk 
                      ÿ cy1 1 ÿ y1  ÿ cy2 1 ÿ y1 ÿ y2  ÿ    ÿ cyk yk1 :
                      k 2 Z ; 0 < yi < x1 ; 8i; x1 < y1      yk  1 ÿ yk1 g
It is easy to check, using convexity arguments, that this supremum is ache-
ived on the set y1  y2      yk  x1 =k. (The function y 7! ym cy ÿ y log y
is concave and the third line is amenable to an elementary inductive argu-
ment.) Hence,
                   1
           lim sup log P X n; c=n < x1 n
              n    n
                     
               sup ÿ x1 log x1 =k ÿ 1 ÿ x1  log 1 ÿ x1   x1 m cx1 =k
                  k
                                       
                              k1 2
                       ÿcx1        cx1 :
                                2k
It is now tedious but straightforward to check that this supremum is attained
at k  1, where it takes the value A x1 ; c. Applying the principle of the
largest term once again (using the uniform convergence in (7)), we have
                          lim 1n log P X n; c=n < xn  A x; c
                           n

for x1 < x  ac ; the uniformity of this convergence follows from the fact that
the argument is monotone (in x) and A is continuous.                         (
Some large deviation results for sparse random graphs                        283


    Using this lemma, we can now recursively apply (7) and (2) on successive
intervals xk ; xkÿ1 , k  2; 3; . . . to get that
                                      X
                                      kÿ1                             
            1                                         x
        lim log P X n; c=n  xn      1 ÿ jxA         ; c 1 ÿ jx
          n n                                       1 ÿ jx
                                      j0

uniformly on xk ; xkÿ1 . It is easily veri®ed that this agrees with the formula
for Ic in the statement of the theorem.
   If c  1 we can use (2), (3) and (6) to conclude that

                       lim 1n log P X n; c=n  xn  A x; c
                         n

uniformly on 0; 1. This completes the proof of the theorem.                 (
   We have also proved (6):

Theorem 3.2 For any c > 0,

               lim 1n log P G n; c=n is connected  log 1 ÿ eÿc  :
                n

    BollobaÂs [2] discusses some related results on connectedness. The closest
in spirit to this result is the work of Wright [6] on the enumeration of con-
nected graphs. For example, it is shown that C n; n  k, the number of
connected graphs on n vertices with n  k edges, is asymptotically
                                         n                o
                           fk nn 3kÿ1=2 1  O k 3=2 =n

for k  o n1=3 . (A recursion is given for the sequence fk .) This scaling has
been useful for studying the largest connected component for the critical
graph (c  1) ± see, for example, [2] ± but there is insucient information
here about higher values of k to determine the asymptotics in Theorem 3.2.
BollobaÂs [2, Corollary 5] obtains the universal upper bound

                             C n; n  k  C0 2ÿk nn 3kÿ1=2 ;

for some constant C0 , but for G n; c=n this leads to a trivial upper bound on
the probability of connectedness.
    We can also deduce the following result on the law of the number of edges
in the random graph, given that it is connected.
Corollary 3.3 Let End denote the number of edges present in the random graph
G n; d=n. For 0 < c < d,
                   h                                i                
            1             End                                 1 ÿ eÿc
     lim sup log E c=d j G n; d=n is connected  log                  :
        n   n                                                 1 ÿ eÿd

Proof. Using the fact that G n; c=n can be represented as the intersection of
independent realisations of G n; d=n and G n; c=d on the same set of n
vertices, we see that
284                                                                  N. O'Connell


      q n; c=n  q n; d=nP fG n; d=n < G n; c=dj G n; d=n is connectedg
                             h      d
                                                             i
                 q n; d=nE c=dEn j G n; d=n is connected :

Here, < denotes `is a subgraph of'. The statement now follows from Theorem
3.2.                                                                     (


4 The number of isolated vertices

Denote by D n; q the random directed graph constructed on n vertices, with
each of the n n ÿ 1 potential directed edges included independently with
probability q. It is clear that the number of isolated vertices in G n; p, which
we will denote   by V n; p, has the same law as the number of isolated vertices
             p
in D n; 1 ÿ 1 ÿ p. Now the number of vertices Y in D n; q with no `in-
coming' edges has a binomial distribution with parameters n and 1 ÿ qnÿ1 ;
conditional on Y , the number of isolated vertices in D n; q has a binomial
distribution with parameters Y and 1 ÿ qnÿY .
    Thus, for s  0,
                         X n             h                        ik
                              n k
         Es V n;p
                               r 1 ÿ rnÿk 1 ÿ 1 ÿ s 1 ÿ p nÿk=2 ;
                          k0
                              k

where r  1 ÿ p nÿ1=2 . Setting p  c=n and applying the principle of the
largest term we get,
             f s : lim 1n log EsV n;c=n
                       n
                           n      h                    i
                   sup x log 1 ÿ 1 ÿ seÿc 1ÿx=2  h x ÿ cx=2
                    0x1
                                           h        io
                              1 ÿ x log 1 ÿ eÿc=2    :

The GaÈrtner-Ellis theorem does not apply here, because the scaled cumulant
generating function K h : f eh  is not steep.
   We can, however, deduce (setting s  0) that
g c : lim 1n log P V n; c=n  0
          n
              n      h            i                       h          io
      sup x log 1 ÿ eÿc 1ÿx=2  h x ÿ cx=2  1 ÿ x log 1 ÿ eÿc=2    :
          0x1

                                                                               8
Observe that
                         
                         n
      P V n; p  k       1 ÿ pnÿ1 . . . 1 ÿ pnÿk P V n ÿ k; p  0 ;     9
                         k
and so
  lim 1n log P V n; c=n  xn  h x ÿ cx 1 ÿ x=2  1 ÿ xg c 1 ÿ x :
      n
Some large deviation results for sparse random graphs                                     285


Uniform convergence follows from the next lemma, the proof of which is
identical to that of Lemma 3.1 (exactly the same bounds are used) and the
fact that the mapping x 7! 1 ÿ xg 1 ÿ xc is continuous on 0; 1. Set
r n; p  P V n; p  0.
Lemma 4.1 For x 2 0; 1 we have
                                             1     r xn; c=n
                     lim lim sup sup           log              0 :
                     &0     n    y: jxÿyj< n     r yn; c=n
    We have proved:
Theorem 4.1 For c > 0, the sequence V n; c=n=n satis®es the LDP in 0; 1
with rate function given by
                Jc x  ÿh x  cx 1 ÿ x=2 ÿ 1 ÿ xg c 1 ÿ x :
   Note that we could have used (9) and the easy fact that V n; c=n=n
converges in probability to eÿc to determine the limit function g, using the
technique described in the introduction: Jc eÿc   0 implies that
                           g d  log d=a ÿ a ÿ d2 = 2d ;
where a > 0 satis®es 1 ÿ eÿa  d=a. (Note that this also provides an easy
alternative to solving the optimisation in (8)!)
    Finally, one can verify that g d is strictly bigger than m d, for each
d > 0. As we remarked in the introduction, the properties `connected' and
`contains no isolated vertices' are not asymptotically equivalent at this
scaling.


5 References

[1] BollobaÂs, B.: Random Graphs. Academic Press 1985
[2] BollobaÂs, B.: The evolution of sparse random graphs. In: BollobaÂs, B. (ed.) Graph Theory
    and Combinatorics, Academic Press 1984
[3] Janson, S., Knuth, D., Luczak, T., Pittel, B.: The birth of the giant component. Rand.
    Struct. Alg. 4, 233±358 (1993)
[4] O'Connell, N.: From laws of large numbers to large deviation principles. Markov Proc. Rel.
    Fields (to appear)
[5] Spencer, J.: Nine Lectures on Random Graphs. Ecole d' EteÂ de Probabilite's de Saint-Flour
    XXI-1991 (P.L. Hennequin, ed.) Lecture Notes in Mathematics 1541, Springer-Verlag. pp
    293±347.
[6] Wright, E.M.: The number of connected sparsely edged graphs. J. Graph Theor. 1, 317±330
    (1977)
