Last time we saw a number of properties of graphs, such as connectivity, where the probability that an Erdős–Rényi random graph
To remind the reader, the Erdős–Rényi random “graph”
One might want to study this phenomenon in general. Even if we might not be able to find all the thresholds we want for a given property, can we classify which properties have thresholds and which do not?
The answer turns out to be mostly yes! For large classes of properties, there are proofs that say things like, “either this property holds with probability tending to one, or it holds with probability tending to zero.” These are called “zero-one laws,” and they’re sort of meta theorems. We’ll see one such theorem in this post relating to constant edge-probabilities in random graphs, and we’ll remark on another at the end.
Sentences about graphs in first order logic
A zero-one law generally works by defining a class of properties, and then applying a generic first/second moment-type argument to every property in the class.
So first we define what kinds of properties we’ll discuss. We’ll pick a large class: anything that can be expressed in first-order logic in the language of graphs. That is, any finite logical statement that uses existential and universal quantifiers over variables, and whose only relation (test) is whether an edge exists between two vertices. We’ll call this test
This seems like a really large class of properties, and it is, but let’s think carefully about what kinds of properties can be expressed this way. Clearly the existence of a triangle can be written this way, it’s just the sentence
I’m using
Here’s a question: can we write a formula which will be true for a graph if and only if it’s connected? Well such a formula seems like it would have to know about how many vertices there are in the graph, so it could say something like “for all
But as it turns out, connectivity is not a formula you can express in propositional logic. We won’t prove it here, but we will note at the end of the article that connectivity is in a different class of properties that you can prove has a similar zero-one law.
The zero-one law for first order logic
So the theorem about first-order expressible sentences is as follows.
Theorem: Let
Proof. We’ll prove the simpler case of
First let’s describe the
In other words, these formulas encapsulate every possible incidence pattern for a single vertex. It is a strange set of formulas, but they have a very nice property we’re about to get to. So for a fixed
Computing the probability: we have
And
Break from proof.
A bit of model theory
So what we’ve proved so far is that the probability of every formula of the form
Now look at the set of all such formulas
We ask: is there any graph which satisfies all of these formulas? Certainly it cannot be finite, because a finite graph would not be able to satisfy formulas with sufficiently large values of

rado
The Rado graph has some really interesting properties, such as that it contains every finite and countably infinite graph as induced subgraphs. Basically this means, as far as countably infinite graphs go, it’s the big momma of all graphs. It’s the graph in a very concrete sense of the word. It satisfies all of the formulas in
But for our purposes (proving a zero-one law), there’s a better perspective than graph theory on this object. In the logic perspective, the set
A good analogy comes from the rational numbers, because they satisfy a similar property among all ordered sets. In fact, the rational numbers are the unique countable, ordered set with the property that it has no biggest/smallest element and is dense. That is, in the ordering there is always another element between any two elements you want. So the theorem says if you have two countable sets with these properties, then they are actually isomorphic as ordered sets, and they are isomorphic to the rational numbers.
So, while we won’t prove that the Rado graph is a model for our theory
The proof that
So now we can go ahead and prove the zero-one law theorem.
Return to proof.
Given an arbitrary property
If you don’t like model theory, there is another “purely combinatorial” proof of the zero-one law using something called Ehrenfeucht–Fraïssé games. It is a bit longer, though.
Other zero-one laws
One might naturally ask two questions: what if your probability is not constant, and what other kinds of properties have zero-one laws? Both great questions.
For the first, there are some extra theorems. I’ll just describe one that has always seemed very strange to me. If your probability is of the form
For the second question, there is another theorem about monotone properties of graphs. Monotone properties come in two flavors, so called “increasing” and “decreasing.” I’ll describe increasing monotone properties and the decreasing counterpart should be obvious. A property is called monotone increasing if adding edges can never destroy the property. That is, with an empty graph you don’t have the property (or maybe you do), and as you start adding edges eventually you suddenly get the property, but then adding more edges can’t cause you to lose the property again. Good examples of this include connectivity, or the existence of a triangle.
So the theorem is that there is an identical zero-one law for monotone properties. Great!
It’s not so often that you get to see these neat applications of logic and model theory to graph theory and (by extension) computer science. But when you do get to apply them they seem very powerful and mysterious. I think it’s a good thing.
Until next time!
Want to respond? Send me an email, post a webmention, or find me elsewhere on the internet.