On
Dedicated

to0,random

Vargo,

By P. ERDdS

atthegraphs
occasionand A. R&WII.
ofhis

50thbirthday.

(Budapest).

Let us consider a “random graph” r,:l,~v having n possible (labelled)
vertices and N edges; in other words, let us choose at random (with equal(I;possible graphs which can be formed fromt N, 1
the n (labelled) vertices PI, P?, . . ., P,, by selecting N edges from the ;i)possible edges Px (1 5 i < j 5 n), Thus the effective number of vertices ofC,,,l- may be less than n, as some points Pi may be not connected in r,, X
with any other point P,; we shall call such points Pi isolafed points. We
consider the isolated points also as belonging to Z’7,,~Xy.r,,, X is called completely connected if it effectively contains all points PI, Pt, . . . , P,, (i, e. if it
has no isolated points) and is connected in the ordinary sense. In the present
paper we consider asymptotic statistical properties of random graphs for11++ 30. We shall deal with the following questions:
1. What is the probability of r,,. T being completely connected?
2. What is the probability that the greatest connected component (subgraph) of r,,, s should have effectively n-kpoints? (k=O, 1, . . .).
3. What is the probability that rp,N should consist of exactly kf I
connected components? (k = 0, 1, . +.).
4. If the edges of a graph with n vertices are chosen successively sothat after each step every edge which has not yet been chosen has the sameprobability to be chosen as the next, and if we continue this process untilthe graph becomes completely connected, what is the probability that thenumber of necessary sfeps v will be equal to a given number I?
As (partial) answers to the above questions we prove ihe following
four theorems. In Theorems 1, 2, and 3 we use the notationprobabilities) one of the-&n log n+cn(I1where c is an arbitrary fixed real number ([xl denotes the integer part of x).
N,=P. Erdijs and A. RCnyi: On random graphs I.
Theorem
1. Let P,(n, N,) denofe the probability
pletety connected. Then we haveof r,,, A7cbeing corn-.

Theorem
2. Let P,(n, NJ (k= 0, 1, . . .) denote the probability
greatest connecfed component of r,,. A: consisting effectively of n-k(Clearly P,(n, N,) has the same meaning as before.) Tiren we havelim Pk(n, A&)=(3)ii-t-02

i. e. the number of points
is disiributed in the limit

291of thepoinfs.

(e-oL)?<e-c-‘)f’k,,outside the greatest connected componenf of r,,, N
according to Poisson’s law wifh mean value e-~2’,

Theorem
3. Let I&($ N,) denote the probability of Tit: ~7~consisting
exactly of k + 1 disjoint connected components. (Clearly I&(n, I%) = Po(n, N,).)
Then we have(e-l,.),;e-e. “L’lim Z&~(n, NJ =k,,(4),l->+C
i. e. the number of connected components of r7,Ys diminished by one is in thelimif distributed according to Poisson’s law with mean value e-zi!.
Theorem
4, Let the edges of a random graph with possible vertices
PI, p2, .‘., P,I be chosen successively among the possible edges PF; in sucha manner, that at each stage every edge which has not yet been chosen has
the same probability to be chosen as the next, and let us continue this processuntil the graph becomes (completely) connected. Let I’,, denote the number ofedges of the resulting connected random graph r. Then we have(5)
for 11;= O(n) and’ I’,~-- + n log n(6)lim P)I++a, in<x1-al.
=e-c - .

As regards the first question, previously P. ERDQS and H. WHITNEY haveobtained some less complete results. They proved that if N >where e > 0 then the probabilityof r,?;N being connected tends to 1 if292P. Erd6s and A. Rhyin + + DO, but if N < G--E n log n with e > 0 then the probability of r,,, 3v(ibeing connected, tends to 0 if n --+ + 00. They did not publish their result.
This result is contained in Theorem 1.
Let G,,, N denote a graph having n vertices and N edges. Let C(n, N)
denote the number of (completely) connected graphs GN. Of course thesolution of the above problems would be easy if a simple formula were
known for C(r;, N). As a matter of fact, e. g. the probability P(,(n, N) of I;,.,?
being completely connected is given simply by

Unfortunately such a simple formula is not known. The special case N= n-l
has been considered already by A. CAYLEY[l] who proved that C(n, n-1) == w-~ (for other proofs see 0. DZIOBEK [2], A. PR~IJFER[3], Ci. P~LYA [4]).
For the general case, it has been shown by R. I. RIDDELLand G. E. UHLEG
BECK[5] (see also E. N. GILBERT [SJ), thatRelation (8) is a consequence of the following recursive formula for C(n, N):

Unfortunately neither (8) nor (9) helps much to deduce the asymptotic properties of C(n, N). In the present paper we follow a more direct approach.
All four theorems are based on the rather surprising Lemma given below.
Let us call the graph r?,, X~ with the n possible vertices P,, p2, . . ., P,,
and N, edges, of type A, if it consists of a connected graph having n-keffective vertices and of k isolated points (k = 0, 1, . . .). Any graph m, Sc
which is not of type A shall be called to be of type 2. Then the following
lemma holds.
Lemma. Let P(A, n, NJ denote the probability
Then we havelim P(A, n, N,) = 0.
(10)
?I++@2Thus for a large n almost all graphs r,,,,of I’,,, ~7~being of type A.

are of type A.

On random graphs I,293

PROOF OF THE LEMMA. Let M be a large positive number, which will
be chosen later. All graphs G,,,x~ having the possible vertices PI, P?, . . ,, P,and NC edges, where N, is defined by (1) shall be divided into two classes:
Those in which the greatest connected compone‘ni consists of not less thann-M
points shall constitute the class Ex, all others the class EH. Let
cM(EAV,n, NC) denote the number of graphs G,,, belonging to the class &,i. e. the number of graphs in which the greatest connected component consists of less then n-M
points.
If the graph consists of f connected components having Ii points(i= 1, 2,. . ., I-) thenand therefore if L= max & we have
(0--L--l22 A?,and thus L>----n ’,a-nthis implies that

Therefore we havebecause if the n--s points belonging to the greatest connected componentof the graph are fixed, the a@--s) edges connecting one of the points ofthis component with a point outside this component can not belong to thegraph. Thus, denoting by P(.&, n, NJ the probability of F,,:N, belonging to
the class &, we have

D 20

294

P. Erdtk and A. Rhyi

We obtain for n 2 n,, by using some elementary estimations,0;(14)ni;is-s{n-s)NC02”e(3-2c)si5S!

fors&Lt NC1

and02”-s(n-s)
HiinsNC~ &2c)(n-s)= (n-s)!

fors&- 202”i NC 1

We obtain from (13), (14) and (15)(16)

fornSn,.

Thus we haveThus to prove our Lemma it is sufficient to show that denoting by 2 EIOglog1E
the- class of those graphs which belong to both x and Elog~ogn and by
P(AG,, logn) the probability that r,, ATCbelongs to the class ~ElogloglL we have
Now we have

(1%because if the n-s points forming the greatest connected component of agraph belonging to the class %Z loglOgraare fixed, then if r is the number ofedges connecting some of the s points outside this connected component wemust have ~ZG 1, and the r edges in question can be chosen inways,

On random graphs I.

295

and the remaining NC- r edges which connect points of the connected component having n --s points can be chosen in less thanways. Thus

we obtain

which proves (18). Thus our lemma is proved.
Now we turn to the proof of our theorems.
PROOF OF THEOREM 1. Let 9’&,(12,N,) denote the number of completely
connected graphs Gn, 3~~.Then 9$(,, IV,) is equal to the number of graphs
G,,, XCof type A having no isolated points. Now let ‘%,‘(n, N,) denote thenumber of all graphs G,,, xc (including graphs of type A) having no isolatedpoint. Then clearly

As the Ieft hand side of (21) is contained between any two consecutive partial sums of the sum on the right of (al), and for any fixed value of k wehave(22)lim
Il-+fCCThus we obtain2(23)I,=I,(-lye-“”= &”k!

But clearly(24Thus, applying our Lemma, Theorem 1 follows,.

P. Ertiiis

296

and A. RCnyi

PROOF OF THEOREM 2. According to our Lemma we have to consider
only graphs of type A. Now the number of graphs G,, h-c of the type A
having a connected component consisting of n-k points is clearly equal to0;

multiplied by the number of connected graphs Gn+ x~. Thus it follows thatP,(n-k,(25)NJ.

Taking into account that for a fixed value of klo&+-k)

Nc-;(n-k)lim
12*mn-k-ec

with respect to (22) and (2) we obtain the assertion of Theorem 2. I)
PROOF OF THEOREM
3. As we may restrict ourselves to graphs of type
A, Theorem 3 follows from Theorem 2 immediately.
4. Clearly if ‘Y, = -2-n log n + 1=N+ 1 then be[’Ifore choosing the last edge, we had a disconnected graph G,z,s which canbe made completely connected by adding one edge. With respect to ourLemma we may suppose that G,,,x consists of a connected graph havingn-lvertices and an isolated point. As the last edge can be chosen in n-l
PROOF

OF THEOREM

ways among the remaining-Nedges it follows from Theorem 2

provided that J- IS bounded.
1) CompareTheorem 2 with the following known result (see [7], Exercise No. 7 ofChapter IV, p. 134): If N balls are distributed at random in n boxes and R&I, N) denotes
the probability that exactly k boxes remain empty, then we have for any fixed real x andfor k=O,
I,...

297

On random graphs I.

Thus (5) is proved. To prove (6) we have only to sum the probabilities (5) for I < nx and obtainr~ e-t-*-tdf.
J-mmAs however
2.r
^

(28)

ODe-t-"-tdt

J.- m-ie-1'd11=p-b,r-3;2

Theorem 4 is proved.
The following more general questions can be asked: Consider the random graph r,,. N(,~) with n possible vertices and N(n) edges. What is thedistribution of the number of vertices of the greatest connected componentof r,?, x(,~)and the distribution of the number of its components? What is thetypical structure of r,?, A-(11j(in the sense in which, according to our Lemma,
the typical structure of r?I,NP is that it belongs to type A)? We have solved
these problems in the present paper only in the case N(n) = + n log n fen.
We schall return to the general case in an other paper [S].

Bibliography.
[I] A. CAYLEY, A theorem on trees, Quaff. J. Pure A@, Math. 23 (1889), 376-378.
(See also The Collected Papers of A. Cuyley, Cambridge 1897, Vol. 13, pp.
26-28.)[2] 0. DZIOBEK, Eine Formel der Substitionstheorie, S.-B. Berlin. Mafk. Ges. 17 (1917)
64-67.
[3] A. PROFER, Neuer Beweis eines Sakes fiber Permutationen, Arch. Mafh. Pkys. 27 (1918),
142-144.
[4] G. P~LYA, Kombinaforische Anzahlbestimmungen fur Gruppen, Graphen und chemische
Verbindungen, Acfa Mafk. 68 (1937), 145-255.
[5] R. I. RIDDELL, JR. and G. E. UHLENBECK, On the theory of the virial development of theequation of state of monoatomic gases. J. Ckem. Pkys. 21 (1953), 2056-2064.
[6] E. N. GILBERT, Enumeration of labelled graphs, Canad. J. Mafk. 8 (1956), 405-411.
[7] A. R~NYI, Val6szinits&gsz~mitis, (Textbook of probability theory) Budapest, 1954 (Hungarian).
[S] P. ERD& and A. RBNYI, On the evolution of random graphs, Publications of tke Matkemafical Insfifufe of the Hungarian Academy of Sciences 5 (1960) (in print).
[Received November 19, 1958.)