FIRST ORDER SENTENCES ON G(n, p), ZERO-ONE LAWS, ALMOST SURE AND
COMPLETE THEORIES ON SPARSE RANDOM GRAPHS
MOUMANTI PODDER
1. First order theory on G(n, p)
We start with a very simple property of G(n, p), where n is the number of vertices in the vertex set
V (G) = V of G ∼ G(n, p), and p = p(n) the edge probability. Let the property be that a graph contains
a triangle. We denote this property by A and let µn (A) = P [G(n, p) |= A]. We shall for now consider p a
constant not depending on n. In particular, let us look at p = 1/2.
Theorem 1.1.
lim µn (A) = 1.
n→∞
Proof. We split the vertices of V (G) into s = bn/3c many disjoint triples. A triple {i, j, k} forms a triangle
with probability precisely 1/8. Because these involve different edges, these events are independent over all
s
the s triples, and the probability that none of them forms a triangle is therefore (7/8) . Now note that
as n → ∞, this quantity also goes to 0, and as this is the upper bound on the probability of absence of a
triangle in the graph, or in other words, an upper bound on P [G(n, 1/2) |= ¬A], hence this probability also
goes to 0, which gives us the proof.
Definition 1.2. When limn→∞ µn (A) = 1 for some property A, we say that the property A occurs almost
surely, i.e. almost all graphs have property A. When limn→∞ µn (A) = 0, we say that A holds almost never,
i.e. almost no graphs have property A.
We can expect similar zero-one laws for the class of properties referred to as first order properties for
graphs. These are formally defined as follows.
Definition 1.3. The first order language consists of
• variables that are the vertices of the graph, denoted by x, y, z etc.,
• binary predicates = (which means equality of vertices) and ∼ (which denotes the adjacency of two
vertices),
• Boolean connectives ∨, ∧, =⇒ , ⇔, ¬ etc.,
• existential (∃) and universal (∀) quantification over vertices (only).
A first order sentence will be of finite length, and the number of nested quantifiers gives the quantifier depth
of the sentence.
Example 1.4.
(i) There exists an isolated vertex in the graph. This can be expressed as
∃ v[∀ u {¬(u ∼ v)}].
(ii) There exists a triangle in the graph. This can be expressed as
∃ x ∃ y ∃ z [{x ∼ y} ∧ {y ∼ z} ∧ {z ∼ x}].
Example 1.5. A property that is not first order: a graph is connected. Proof: using Ehrenfeucht games!
Remark 1.6. When we study first order graph properties, it basically suffices to fix any possible arbitrary
finite graph H and ask for the property A(H) that G contains a subgraph isomorphic to H. This basically
exhausts all possible first order graph properties.
1
2
MOUMANTI PODDER
Theorem 1.7 (Fagin-GKLT). Let A be a first order graph property. Then for constant p(n), we have
lim µn (A) ∈ {0, 1}.
(1.1)
n→∞
That is, every first order sentence holds either almost surely or almost never.
Definition 1.8 (Witness and (r, s) extension statement). Given r + s distinct vertices x1 , . . . xr , y1 , . . . ys ,
a point z (distinct from x1, . . . xr , y1 , . . . ys ) is called the witness with respect to these vertices if z ∼ xi for
all 1 ≤ i ≤ r and z yj for all 1 ≤ j ≤ s.
The (r, s) extension statement, denoted by Ar,s , is that for all distinct vertices x1 , . . . xr and y1 , . . . ys ,
there exists a vertex z which is a witness with respect to these points.
Lemma 1.9. For all r, s ≥ 0 and constant p(n), the extension statement Ar,s holds almost surely.
Proof. Fix r, s ≥ 0. Then choose distinct x1 , . . . xr , y1 , . . . ys and fix them. Now, for any z distinct from
these points, we define the event
Gz = {z is a witness to x1 , . . . xr , y1 , . . . ys }.
(1.2)
P [Gz ] = P [z ∼ xi ∀ 1 ≤ i ≤ r, z yj ∀ 1 ≤ j ≤ s] = pr (1 − p)s .
(1.3)
Then
Then if Bad(x1 , . . . xr , y1 , . . . ys ) denotes the event that there exists no z distinct from x1 , . . . xr , y1 , . . . ys
such that Gz holds, then
\
P [Bad(x1 , . . . xr , y1 , . . . ys )] =P
Gcz
z6=x1 ,...xr ,y1 ,...ys
Y
=
P [Gcz ]
z6=x1 ,...xr ,y1 ,...ys
n−r−s
= [1 − pr (1 − p)s ]
.
(1.4)
We have used here the fact that when we consider two different z1 , z2 and the events Gz1 and Gz2 , they
involve two mutually exclusive set of edges and hence are independent of each other. Now suppose Bad is
the union of Bad(x1 , . . . xr , y1 , . . . ys ) over all x1 , . . . xr , y1 , . . . ys . Then if Bad happens then Ar,s is not true.
Hence
"
#
[
P [¬Ar,s ] =P [Bad] = P
Bad(x1 , . . . xr , y1 , . . . ys )
x1 ,...xr ,y1 ,...ys
≤
X
P [Bad(x1 , . . . xr , y1 , . . . ys )]
x1 ,...xr ,y1 ,...ys
n n−r
n−r−s
[1 − pr (1 − p)s ]
r
s
nr ns
n−r−s
·
· [1 − pr (1 − p)s ]
≤
r! s!
nr+s
n−r−s
=
[1 − pr (1 − p)s ]
.
r!s!
=
(1.5)
Suppose we set
= [1 − pr (1 − p)s ] < 1,
then we have the upper bound for P [¬Ar,s ] as
P [¬Ar,s ] ≤ c · nr+s · n−r−s = exp [(r + s) log n + (n − r − s) log ] → 0 as n → ∞.
This completes the proof.
(1.6)
FIRST ORDER WORLD OF G(n, p) AND ZERO-ONE LAWS
3
This lemma is one of the key steps for the proof of the Fagin-GKLT theorem. The rest follows from
creating a theory T that consists of Ar,s as axioms for all r, s ≥ 0. This theory is complete, a notion we
define later, and has a countable model (meaning a graph with countably infinite vertices that satisfy all
the axioms. Because the theory is complete, for every first order sentence B, either B ∈ T or ¬B ∈ T , i.e.
either B is derivable from T or ¬B is. This finishes the proof of the zero-one law.
2. Almost sure and complete theories
Let p(n) be any edge probability function.
Definition 2.1. The almost sure theory T relative to p(n) is the set of all first order sentences A that hold
almost surely when p(n) is the edge function for G(n, p), i.e.
lim P [G(n, p(n)) |= A] = 1.
n→∞
We denote this theory by Tα for the special case p(n) = n−α , 0 < α < 1.
Remark 2.2. A theory is a set of sentences which are closed under logical inferences in the first order language.
Definition 2.3. A theory T is called complete when for every first order sentence B, either B ∈ T or
¬B ∈ T .
Definition 2.4. We say p(n) satisfies the zero-one law if relative to p(n), every first order prorperty A either
holds almost surely or holds almost never.
Lemma 2.5. Easy consequence: p(n) satisfies the zero-one law if the almost sure theory T corresponding to
p(n) is complete.
Remark 2.6. In the case where p(n) = n−α , we generally talk about α irrational. Why? Because we get
zero-one laws only when α is irrational. This fact is not easy to prove in full generality, but let me give
you a flavour as to why this is kind of expected. Consider a fixed (though arbitrary) finite graph H, with v
vertices and e edges. We consider the event that the graph G(n, p(n)) contains H as a subgraph. Set
S = {S ⊆ V : |S| = v}.
Then for every S ∈ S, let XS be the indicator random variable for the event that the induced subgraph on
S by G(n, p(n)) contains H. Suppose the number of automorphisms of H possible is a. This means that for
each such automorphism,
we require the presence of e specific edges, which happens with probability p(n)e .
P
Finally, if X = S∈S XS , then
X
e
a
n
nv
E[X] =
E[XS ] =
· a · p(n)e ∼
· a · n−α =
· nv−αe .
(2.1)
v
v!
v!
S∈S
What if we have α = v/e, which is a rational? We shall not get a zero-one law for that.
A more specific example would be the presence of triangles. Here, if A denotes the property that a graph
contains a triangle, then with p(n) 1/n, A holds almost never, and with p(n) 1/n, A holds almost
always. But when p(n) = c/n, then we are within some kind of threshold and the probability of A is moving
from 0 to 1 as c moves from 0 to 1, and in fact one can show that
3
P [A] → 1 − e−c
/6
.
Hence we get no zero-one law in this case. A proof of this fact involves using Janson’s inequality, a topic I
talked about in the last to last student probability seminar.
4
MOUMANTI PODDER
3. Countable models
Suppose p(n) satisfies the zero-one law and T be its almost sure theory. Then as mentioned above Remark
2.5, T will be a complete theory. A model of a theory T is simply a specific graph G that satisfies all the
properties A ∈ T . We wish to find all possible models for this specific theory T .
First note that there can be no finite models. For any k there exists a first order sentence stating that
the graph has at least k vertices, i.e.
^
∃ x1 ∃ x2 . . . ∃ xk
{xi 6= xj }.
1≤i<j≤k
This sentence holds almost surely as it holds with probability 1 for all n ≥ k, where n is the total number of
vertices in G(n, p(n)). Thus G would have to satisfy it and hence have at least k elements, and this is true
for all k ∈ N. Hence G cannot be finite.
Does T necessarily have models? A deep theorem of Kurt Gödel says that any consistent theory will have
a countable or finite model. A theory T is called N0 -categorical, read as aleph-nought-categorical, if it has
precisely one countable model up to isomorphism. One sufficient condition for T being complete is given by
the following theorem:
Theorem 3.1 (Skolem-Lowenheim). If T has no finite models and T is N0 -categorical, then T is complete.
Proof. Brief inspiration behind this theorem: Suppose T is not complete, then there exists some first order
B such that B ∈
/ T . Then we consider the new theory T + obtained by adding B to T , and the theory T −
obtained by adding ¬B to T . Both are consistent and hence must have countable models G+ , G− . Clearly,
G+ and G− cannot be isomorphic since they disagree on the truth value of B. But both G+ and G− are
models for T . Hence T has two non-isomorphic countable models. Now take the contrapositive statement
and get the theorem.
4. Very Sparse Random Graphs
We will consider the evolution of G(n, p) as p increases from empty to full. We will consider various ranges
of the function p(n).
(i) Suppose p(n) n−2 . Then almost surely there are no edges.
Proof. Suppose, for every pair of distinct vertices vi , vj , Xi,j denotes the indicator random variable
for the event that vi , vj are adjacent. Then if X is the total number of edges present, then
X
X
n
n2
· p(n) → 0,
(4.1)
E[X] = E
Xi,j =
E[Xi,j ] =
· p(n) ∼
2
2
1≤i<j≤n
1≤i<j≤n
as n → ∞. Hence using Markov or Chebychev’s inequality,
P [X ≥ 1] ≤ E[X] → 0 as n → ∞.
(4.2)
So, what should be the almost sure theory for p(n) in this case? It consists of the following
axioms:
(a) for all r ∈ N,
Pr = there exist at least r vertices,
(b) no edge, i.e.
∀ x, y [¬ {x ∼ y}] .
Hence the countable model for this theory consists of countably infinite vertices and no edges. This
model is clearly N0 -categorical and hence complete.
FIRST ORDER WORLD OF G(n, p) AND ZERO-ONE LAWS
5
(ii) When p reaches Θ(n−2 ), edges start to appear. They remain scattered until p reaches Θ(n−3/2 ).
Then edges with common vertices appear - which we will consider as trees on three vertices. When
p reaches Θ(n−1−1/k ), trees on k + 1 vertices appear. All of these occur well before cycles appear
at Θ(n−1 ).
Let us examine the theory when
1
1
n−1− k p(n) n−1− k−1 .
(4.3)
• Are there cycles? Consider i vertices, for some i ∈ N. If these are to form a cycle, then there
are (i − 1)!/2 many automorphisms, and we require the presence of exactly i edges
for each
such automorphism. Finally these i vertices can be chosen out of n vertices in ni ways.
Hence the expected number of such cycles will be
i
1
ni (i − 1)!
1
p(n)
n
(i − 1)!
− k−1
·
n
→ 0,
(4.4)
· p(n)i ≤
·
· p(n)i ≤
·
·
1
2
i!
2
2i
i
n−1− k−1
as n → ∞.
• Are there components with more than k + 1 vertices? This means that we are asking for a
subset S of V with |S| ≥ k + 2, such that S is connected in the induced subgraph of G(n, p(n)).
Let us say we fix an S of i vertices with i ≥ k +2. Then the probability that it will be connected
is p(n)i−1 (since we need at least i − 1 edges to make it connected, but since there can be no
cycles, hence exactly i − 1 edges). The number of such subsets is ni . Hence the expected
number of such structures is
i−1
i−1
i−1
1
n
ni
p(n)
p(n)
·a·p(n)i−1 ≤ ·a·p(n)i−1 = C· −1− 1
·ni ·n(i−1)(−1− k−1 ) = C· −1− 1
·n1− k−1 . (4.5)
i
i!
k−1
k−1
n
n
Because the exponent of n above is negative when i ≥ k + 2. Hence this expectation is going
to 0. a is the number of automorphisms
for the tree structure we are considering.
• For i ≤ k + 1, there are ni ∼ ni /i! many choices for a subset of i vertices out of n vertices, and
then we have to make sure that there are i − 1 many edges within that subset in the induced
subgraph, which has probability p(n)i−1 . Then the expected number of such structures is a
constant times the following quantity
i−1
1
p(n)
i
i−1
n p(n)
=
(4.6)
· ni · n(i−1)(−1− k ) → ∞, as n → ∞.
1
−1−
k
n
We now can use second moment method or Janson’s inequality like argument to argue that
duch structures are almost surely as n → ∞.
These three properties (or observations) give us the almost sure theory T for this p(n). What are
the countable models G of T ? Each component (connected) can have at most k + 1 many vertices
and must be a tree, including the possibility of an isolated vertex. But every such tree does occur
as a component at least r times for all r ∈ N. So G consists of a countably infinite number of
copies of every possible tree on i vertices for every i ≤ k + 1, and nothing else. Hence clearly G is
N0 -categorical and hence complete. Thus there is a zero-one law.
References
[1] The Strange Logic of Random Graphs, Joel Spencer, ISBN 978-3-662-04538-1, Springer; 2001.
[2] The Probabilistic Method, Noga Alon and Joel Spencer, ISBN-13: 978-0470170205, Wiley Series in
Discrete Mathematics and Optimization; 1990.
Courant Institute of Mathematical Sciences, New York University
© Copyright 2026 Paperzz